/* Al-Misbaah Fleet Management System: LubeLogger UI theme (data/themes/almisbaah.css).
   Brand: lantern orange #EC5A30, flame yellow #F9D81D, cream #F7F6F0, ink #0D0901, stone #4F4D4B.
   Type: Instrument Serif headings, Epilogue body. Colours and type only, no layout or behaviour changes. */
@import url('https://fonts.googleapis.com/css2?family=Epilogue:wght@400;500;600;700&family=Instrument+Serif&display=swap');

:root, [data-bs-theme="light"] {
  --bs-body-font-family: 'Epilogue', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --bs-body-bg: #F7F6F0;
  --bs-body-bg-rgb: 247, 246, 240;
  --bs-body-color: #0D0901;
  --bs-body-color-rgb: 13, 9, 1;
  --bs-emphasis-color: #0D0901;
  --bs-secondary-color: rgba(79, 77, 75, 0.9);
  --bs-tertiary-bg: #EFEDE4;
  --bs-primary: #EC5A30;
  --bs-primary-rgb: 236, 90, 48;
  --bs-primary-text-emphasis: #8A2E14;
  --bs-primary-bg-subtle: #FBDDD3;
  --bs-primary-border-subtle: #F6B8A5;
  --bs-link-color: #B83E1B;
  --bs-link-color-rgb: 184, 62, 27;
  --bs-link-hover-color: #8A2E14;
  --bs-link-hover-color-rgb: 138, 46, 20;
  --bs-focus-ring-color: rgba(236, 90, 48, 0.3);
  --bs-border-color: #DDD9CC;
}
[data-bs-theme="dark"] {
  --bs-body-font-family: 'Epilogue', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --bs-body-bg: #0D0901;
  --bs-body-bg-rgb: 13, 9, 1;
  --bs-body-color: #F7F6F0;
  --bs-body-color-rgb: 247, 246, 240;
  --bs-emphasis-color: #FFFFFF;
  --bs-secondary-bg: #1E1A14;
  --bs-tertiary-bg: #17130D;
  --bs-primary: #EC5A30;
  --bs-primary-rgb: 236, 90, 48;
  --bs-primary-text-emphasis: #F6A58C;
  --bs-primary-bg-subtle: #3A170C;
  --bs-primary-border-subtle: #8A2E14;
  --bs-link-color: #F38862;
  --bs-link-color-rgb: 243, 136, 98;
  --bs-link-hover-color: #F9D81D;
  --bs-link-hover-color-rgb: 249, 216, 29;
  --bs-focus-ring-color: rgba(236, 90, 48, 0.35);
  --bs-border-color: #3A342B;
}

body { font-family: var(--bs-body-font-family); }
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .display-1, .display-2, .display-3,
.display-4, .display-5, .display-6, .modal-title, .card-title {
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  letter-spacing: 0.01em;
}

/* Buttons: lantern orange with ink text (keeps AA contrast) */
.btn-primary {
  --bs-btn-color: #0D0901;
  --bs-btn-bg: #EC5A30;
  --bs-btn-border-color: #EC5A30;
  --bs-btn-hover-color: #0D0901;
  --bs-btn-hover-bg: #F07550;
  --bs-btn-hover-border-color: #F07550;
  --bs-btn-focus-shadow-rgb: 236, 90, 48;
  --bs-btn-active-color: #0D0901;
  --bs-btn-active-bg: #D94C24;
  --bs-btn-active-border-color: #D94C24;
  --bs-btn-disabled-color: #0D0901;
  --bs-btn-disabled-bg: #EC5A30;
  --bs-btn-disabled-border-color: #EC5A30;
}
.btn-outline-primary {
  --bs-btn-color: #B83E1B;
  --bs-btn-border-color: #EC5A30;
  --bs-btn-hover-color: #0D0901;
  --bs-btn-hover-bg: #EC5A30;
  --bs-btn-hover-border-color: #EC5A30;
  --bs-btn-active-color: #0D0901;
  --bs-btn-active-bg: #D94C24;
  --bs-btn-active-border-color: #D94C24;
}
[data-bs-theme="dark"] .btn-outline-primary { --bs-btn-color: #F38862; }
.btn-secondary {
  --bs-btn-bg: #4F4D4B;
  --bs-btn-border-color: #4F4D4B;
  --bs-btn-hover-bg: #3C3A38;
  --bs-btn-hover-border-color: #3C3A38;
}

/* Form controls, tabs, badges, pagination */
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #F39A7D;
  box-shadow: 0 0 0 0.25rem rgba(236, 90, 48, 0.25);
}
.form-check-input:checked { background-color: #EC5A30; border-color: #EC5A30; }
.nav-pills .nav-link.active, .nav-pills .show > .nav-link { background-color: #EC5A30; color: #0D0901; }
.nav-tabs .nav-link.active { border-bottom: 3px solid #EC5A30 !important; }
.lubelogger-tab .nav-link.active { color: #B83E1B; }
[data-bs-theme="dark"] .lubelogger-tab .nav-link.active { color: #F9D81D; }
.text-primary { color: #B83E1B !important; }
[data-bs-theme="dark"] .text-primary { color: #F38862 !important; }
.bg-primary { background-color: #EC5A30 !important; }
.badge.bg-primary, .badge.text-bg-primary { color: #0D0901 !important; }
.page-link { color: var(--bs-link-color); }
.active > .page-link, .page-link.active { background-color: #EC5A30; border-color: #EC5A30; color: #0D0901; }
.btn-check:checked + .dropdown-item, :not(.btn-check) + .dropdown-item:active,
.dropdown-item.active, .dropdown-item:active { background-color: #EC5A30; color: #0D0901; }
.progress-bar { background-color: #EC5A30; }

/* Logo swaps to the light lockup in dark mode */
[data-bs-theme="dark"] img.lubelogger-logo[src$="fleet-management-logo.svg"] { content: url('/brand/fleet-management-logo-dark.svg'); }
[data-bs-theme="dark"] img.lubelogger-logo[src$="fleet-management-mark.svg"] { content: url('/brand/fleet-management-mark-dark.svg'); }

/* LubeLogger uses the warning style for Login and highlights: flame yellow with ink text */
.btn-warning {
  --bs-btn-color: #0D0901;
  --bs-btn-bg: #F9D81D;
  --bs-btn-border-color: #F9D81D;
  --bs-btn-hover-color: #0D0901;
  --bs-btn-hover-bg: #FBE15A;
  --bs-btn-hover-border-color: #FBE15A;
  --bs-btn-active-color: #0D0901;
  --bs-btn-active-bg: #E5C40C;
  --bs-btn-active-border-color: #E5C40C;
}
