*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  width: 100%;
  font-family: 'Nunito', sans-serif;
  background: #dde4ef;
  color: #1a2340;
  -webkit-font-smoothing: antialiased;

  /* Removes the ~300ms wait the browser spends deciding whether a tap is a
     double-tap-to-zoom. The single biggest reason a webview feels slower than a
     native app, and it costs one line. */
  touch-action: manipulation;
}

/* ===== NATIVE FEEL =====
   Cheap, global behaviour that makes the webview stop announcing itself as a web
   page. Everything here is progressive — an older WebView ignores what it does not
   know and renders exactly as before. Per-screen patterns (skeletons, bottom sheets,
   partial navigation) are deliberately NOT here; those are decided per screen once
   real screens exist. */

/* The grey flash Android paints over anything tappable. Removed in favour of the
   :active states this stylesheet already defines, which fire instantly and match
   the design. */
a, button, .menu-card, .bottom-nav-item, .top-bar-btn, .profile-row {
  -webkit-tap-highlight-color: transparent;
}

/* Long-pressing a nav label should not start a text selection — that is the gesture
   people use to drag or to hold a button, and a selection popup on it reads as a web
   page rather than an app.

   Scoped to chrome ON PURPOSE. Content text stays selectable: technicians copy serial
   numbers and document numbers out of these screens. */
.top-bar, .bottom-nav, .menu-card-label, .menu-grid-label, button {
  -webkit-user-select: none;
  user-select: none;
}

/* Cross-document page transitions. Chromium cross-fades between navigations instead
   of flashing white, with no JS and no change to how pages are built. Browsers
   without support ignore the whole at-rule. */
@view-transition { navigation: auto; }

/* Respect the OS setting. Without this the stagger on a 19-card grid is exactly the
   kind of motion people turn that setting on to avoid. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;

    /* Delays have to go too, not just durations. The menu grid staggers via inline
       animation-delay; zeroing only the duration still leaves cards appearing one
       after another over 0.3s — which is the staggered motion this setting exists
       to switch off. */
    animation-delay: 0ms !important;
    transition-delay: 0ms !important;
  }
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

.device-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100dvh;
  background: #F3F6FB;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(0,28,87,0.18);
  margin: 0 auto;
}

/* PC / mouse: constrain to tablet-width frame, centered on gray canvas */
@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
  .device-shell {
    max-width: 768px;
  }
}

/* Real touch device (tablet / iPad): fill the screen fully */
@media (min-width: 768px) and (hover: none) and (pointer: coarse) {
  html, body { background: #F3F6FB; }
  .device-shell {
    max-width: 100%;
    box-shadow: none;
  }
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;

  /* Stops a scroll that reaches the end of this container from bouncing the page
     behind it, and blocks pull-to-refresh. Both read as "this is a browser" the
     moment a technician over-scrolls a long form. */
  overscroll-behavior: contain;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.anim-fade-up  { animation: fadeSlideUp 0.38s cubic-bezier(0.22,1,0.36,1) both; }
.anim-fade-in  { animation: fadeIn 0.28s ease both; }

/* ===== TOP BAR ===== */
.top-bar {
  height: 60px;
  background: #001C57;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.top-bar-title {
  color: #F3F6FB;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.3px;
  flex: 1;
  text-align: center;
}
.top-bar-btn {
  width: 36px; height: 36px;
  border-radius: 8px;
  border: none;
  background: rgba(255,255,255,0.1);
  color: #F3F6FB;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  transition: background 0.18s;
  flex-shrink: 0;
  text-decoration: none;
}
.top-bar-btn:hover { background: rgba(255,255,255,0.2); }
.top-bar-btn:active { background: rgba(255,255,255,0.25); transform: scale(0.95); }
.top-bar-spacer { width: 36px; flex-shrink: 0; }

/* ===== BOTTOM NAV ===== */
.bottom-nav {
  /* 64px of nav plus whatever the device reserves for its gesture bar. Needs
     viewport-fit=cover on the viewport meta or env() resolves to 0 and this is a
     no-op — see layouts/main.php. The fallback keeps the original 64px on devices
     with no inset. */
  height: calc(64px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: #001C57;
  display: flex;
  align-items: stretch;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 100;
  box-shadow: 0 -2px 16px rgba(0,28,87,0.18);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  background: none;
  border: none;
  color: rgba(255,255,255,0.5);
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: color 0.18s;
  position: relative;
  padding: 0;
  text-decoration: none;
}
.bottom-nav-item.active { color: #fff; }
.bottom-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 48px;
  height: 3px;
  transform: translateX(-50%);
  background: #4A9DFF;
  border-radius: 0 0 999px 999px;
}
.bottom-nav-item i { font-size: 20px; }
.nav-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: #e53935;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
  pointer-events: none;
}

/* ===== LOGIN ===== */
.login-screen {
  min-height: 100dvh;
  background: linear-gradient(160deg, #001C57 0%, #012a7a 55%, #001440 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 32px;
}
.login-logo-wrap {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  margin-bottom: 48px;
}
.login-logo-icon {
  width: 72px; height: 72px;
  background: linear-gradient(135deg, #4A9DFF 0%, #2563EB 100%);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 32px rgba(74,157,255,0.35);
}
.login-logo-icon i { font-size: 34px; color: #fff; }
.login-app-name {
  font-size: 28px; font-weight: 800;
  color: #F8FAFC; letter-spacing: 0.5px;
}
.login-app-sub {
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,0.5); letter-spacing: 1.2px; text-transform: uppercase;
}
.login-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 36px 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.login-field-label {
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,0.6); letter-spacing: 0.8px; text-transform: uppercase;
  margin-bottom: 6px;
}
.login-field-wrap { position: relative; }
.login-field-wrap > i {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: rgba(255,255,255,0.35); font-size: 15px;
}
.login-input {
  width: 100%;
  height: 50px;
  background: rgba(255,255,255,0.08);
  border: 1.5px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  color: #F8FAFC;
  font-family: 'Nunito', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 0 14px 0 40px;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.login-input::placeholder { color: rgba(255,255,255,0.3); }
.login-input:focus {
  border-color: #4A9DFF;
  background: rgba(74,157,255,0.08);
}
.login-input-pw { padding-right: 44px; }
.login-pw-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: rgba(255,255,255,0.4); cursor: pointer; font-size: 14px;
  padding: 0; line-height: 1;
}
.login-btn {
  width: 100%; height: 52px;
  background: linear-gradient(135deg, #2563EB 0%, #1d4fc2 100%);
  border: none; border-radius: 12px;
  color: #fff; font-family: 'Nunito', sans-serif;
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.4px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(37,99,235,0.45);
  transition: transform 0.15s, box-shadow 0.15s;
  margin-top: 4px;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(37,99,235,0.55); }
.login-btn:active { transform: translateY(0); }
.login-error {
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  border-radius: 8px;
  padding: 10px 14px;
  color: #fca5a5;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.login-footer {
  margin-top: 32px;
  color: rgba(255,255,255,0.2);
  font-size: 11px; letter-spacing: 0.5px;
  text-align: center;
}

/* ===== MAIN MENU ===== */
.menu-header {
  background: #001C57;
  padding: 20px 20px 28px;
  position: relative;
  overflow: hidden;
}
.menu-header::after {
  content: '';
  position: absolute;
  right: -40px; bottom: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.menu-header-greeting {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.4px;
}
.menu-header-name {
  font-size: 22px; font-weight: 800;
  color: #F8FAFC; margin-top: 2px;
}
.menu-header-badge {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px;
  background: rgba(74,157,255,0.2);
  border: 1px solid rgba(74,157,255,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 14px; font-weight: 600; color: #93c5fd;
}
.menu-header-badge i { font-size: 10px; }
.menu-date-strip {
  background: #F8FAFC;
  border-bottom: 1px solid #e8edf5;
  padding: 10px 20px;
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: #6b7a99;
}
.menu-date-strip i { color: #001C57; font-size: 13px; }
.menu-grid-label {
  font-size: 13px; font-weight: 700;
  color: #001C57; letter-spacing: 0.4px;
  text-transform: uppercase;
  padding: 20px 20px 10px;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding: 0 16px 24px;
}
.menu-card {
  background: #F8FAFC;
  border-radius: 14px;
  padding: 16px 10px 14px;
  display: flex; flex-direction: column;
  align-items: center; gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,28,87,0.06);
  border: 1.5px solid #e8edf5;
  transition: transform 0.18s, box-shadow 0.18s, border-color 0.18s;
  text-align: center;
  user-select: none;
  text-decoration: none;
}
.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,28,87,0.12);
  border-color: #c5d3e8;
}
.menu-card:active { transform: scale(0.97); }
.menu-card-icon {
  width: 48px; height: 48px;
  border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.menu-card-label {
  font-size: 14px; font-weight: 700;
  color: #2a3a5e;
  line-height: 1.25;
  letter-spacing: 0.1px;
}
.menu-card-step {
  font-size: 9px; font-weight: 600;
  color: #9aa4be;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-top: 2px;
}

/* ===== ICON COLOR VARIANTS ===== */
.ic-navy   { background: rgba(0,28,87,0.08);    color: #001C57; }
.ic-blue   { background: rgba(37,99,235,0.1);   color: #1d4fc2; }
.ic-teal   { background: rgba(20,184,166,0.1);  color: #0d9488; }
.ic-amber  { background: rgba(245,158,11,0.1);  color: #d97706; }
.ic-purple { background: rgba(139,92,246,0.1);  color: #7c3aed; }
.ic-rose   { background: rgba(244,63,94,0.1);   color: #e11d48; }
.ic-green  { background: rgba(34,197,94,0.1);   color: #16a34a; }
.ic-indigo { background: rgba(99,102,241,0.1);  color: #4f46e5; }
.ic-sky    { background: rgba(14,165,233,0.1);  color: #0284c7; }
.ic-orange { background: rgba(249,115,22,0.1);  color: #ea580c; }
.ic-lime   { background: rgba(132,204,22,0.1);  color: #65a30d; }
.ic-pink   { background: rgba(236,72,153,0.1);  color: #db2777; }
.ic-cyan   { background: rgba(6,182,212,0.1);   color: #0891b2; }

/* ===== PROFILE ===== */
.profile-hero {
  background: linear-gradient(160deg, #001C57 0%, #012a7a 100%);
  padding: 32px 24px 40px;
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  position: relative; overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 200px; height: 200px; border-radius: 50%;
  background: rgba(255,255,255,0.04);
}
.profile-avatar {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4A9DFF 0%, #2563EB 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800; color: #fff;
  border: 3px solid rgba(255,255,255,0.25);
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}
.profile-name {
  font-size: 22px; font-weight: 800; color: #F8FAFC;
}
.profile-role {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  display: flex; align-items: center; gap: 6px;
}
.profile-role i { font-size: 11px; color: #4A9DFF; }

.profile-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin: -20px 16px 0;
  background: #F8FAFC;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,28,87,0.1);
  border: 1.5px solid #e8edf5;
  overflow: hidden;
  position: relative; z-index: 2;
}
.profile-stat {
  padding: 16px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border-right: 1px solid #e8edf5;
}
.profile-stat:last-child { border-right: none; }
.profile-stat-val { font-size: 22px; font-weight: 800; color: #001C57; }
.profile-stat-label {
  font-size: 10px; font-weight: 600; color: #9aa4be;
  text-align: center; letter-spacing: 0.4px; text-transform: uppercase;
}

.profile-section {
  margin: 20px 16px 0;
  background: #F8FAFC;
  border-radius: 14px;
  border: 1.5px solid #e8edf5;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,28,87,0.05);
}
.profile-section-title {
  padding: 14px 16px 10px;
  font-size: 11px; font-weight: 700;
  color: #9aa4be; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid #e8edf5;
}
.profile-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f4fa;
  transition: background 0.15s;
  cursor: pointer;
}
.profile-row:last-child { border-bottom: none; }
.profile-row:active { background: #f0f4fa; }
.profile-row-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
}
.profile-row-text { flex: 1; }
.profile-row-label { font-size: 14px; font-weight: 700; color: #1a2340; }
.profile-row-sub   { font-size: 12px; font-weight: 500; color: #9aa4be; margin-top: 1px; }
.profile-row-chevron { color: #c5d3e8; font-size: 13px; }

.profile-logout-btn {
  margin: 20px 16px 32px;
  width: calc(100% - 32px);
  height: 50px;
  background: rgba(239,68,68,0.08);
  border: 1.5px solid rgba(239,68,68,0.2);
  border-radius: 12px;
  color: #dc2626;
  font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background 0.18s, border-color 0.18s;
}
.profile-logout-btn:hover {
  background: rgba(239,68,68,0.13);
  border-color: rgba(239,68,68,0.35);
}
.profile-row-readonly {
  cursor: default;
}
.profile-row-readonly:active { background: transparent; }

/* Profile flash toast */
.profile-flash {
  display: flex; align-items: center; gap: 10px;
  margin: 12px 16px 0;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 13px; font-weight: 600;
}
.profile-flash i { font-size: 16px; }
.profile-flash-success {
  background: rgba(34,197,94,0.1);
  border: 1.5px solid rgba(34,197,94,0.25);
  color: #15803d;
}
.profile-flash-error {
  background: rgba(239,68,68,0.08);
  border: 1.5px solid rgba(239,68,68,0.2);
  color: #dc2626;
}

/* Profile bottom sheet */
.profile-sheet {
  position: fixed; inset: 0; z-index: 110;
  pointer-events: none;
}
.profile-sheet.is-open { pointer-events: auto; }
.profile-sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,28,87,0.45);
  opacity: 0;
  transition: opacity 0.25s;
}
.profile-sheet.is-open .profile-sheet-backdrop { opacity: 1; }
.profile-sheet-panel {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 20px 36px;
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.profile-sheet.is-open .profile-sheet-panel { transform: translateY(0); }
.profile-sheet-handle {
  width: 40px; height: 4px;
  background: #e8edf5; border-radius: 2px;
  margin: 0 auto 18px;
}
.profile-sheet-title {
  font-size: 18px; font-weight: 800; color: #001C57;
  margin-bottom: 18px;
}
.profile-field-label {
  display: block;
  font-size: 11px; font-weight: 700;
  color: #9aa4be; letter-spacing: 0.5px; text-transform: uppercase;
  margin-bottom: 6px;
}
.profile-field-input {
  display: block; width: 100%; box-sizing: border-box;
  background: #F8FAFC;
  border: 1.5px solid #e8edf5;
  border-radius: 12px;
  color: #1a2340;
  font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 600;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.18s;
  -webkit-appearance: none;
}
.profile-field-input:focus { border-color: #4A9DFF; }
.profile-sheet-save {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 50px; margin-top: 20px;
  background: linear-gradient(135deg, #001C57 0%, #012a7a 100%);
  border: none; border-radius: 12px;
  color: #fff;
  font-family: 'Nunito', sans-serif;
  font-size: 15px; font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,28,87,0.28);
  transition: opacity 0.18s;
}
.profile-sheet-save:active { opacity: 0.85; }

@media (orientation: landscape) and (max-height: 500px) {
  .profile-hero {
    padding: 16px 24px 24px;
    gap: 8px;
  }
  .profile-avatar {
    width: 52px; height: 52px;
    font-size: 20px;
  }
  .profile-name  { font-size: 17px; }
  .profile-role  { font-size: 12px; }
  .profile-stats { margin-top: -14px; }
  .profile-stat  { padding: 10px 8px; }
  .profile-stat-val { font-size: 18px; }
}

/* ===== MODULE DETAIL ===== */
.module-card {
  background: #F8FAFC;
  border-radius: 16px;
  padding: 24px 20px;
  border: 1.5px solid #e8edf5;
  box-shadow: 0 2px 10px rgba(0,28,87,0.06);
  display: flex; flex-direction: column; gap: 16px;
  margin: 24px 16px;
}
.module-card-header {
  display: flex; align-items: center; gap: 14px;
}
.module-card-icon-lg {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}
.module-card-title { font-size: 18px; font-weight: 800; color: #001C57; }
.module-card-sub   { font-size: 12px; color: #9aa4be; font-weight: 600; }
.module-divider    { height: 1px; background: #e8edf5; }
.module-placeholder {
  background: #f0f4fa;
  border: 1.5px dashed #c5d3e8;
  border-radius: 12px;
  padding: 40px 24px;
  text-align: center;
  color: #9aa4be;
}
.module-placeholder i    { font-size: 36px; margin-bottom: 12px; display: block; }
.module-placeholder-title { font-size: 15px; font-weight: 700; color: #6b7a99; }
.module-placeholder-sub   { font-size: 12px; margin-top: 4px; }
.module-actions { display: flex; gap: 10px; margin-top: 4px; }
.btn-cancel {
  flex: 1; height: 46px; border-radius: 10px;
  background: #f0f4fa; border: 1.5px solid #c5d3e8;
  color: #001C57; font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: 14px; cursor: pointer;
  text-decoration: none;
  display: flex; align-items: center; justify-content: center;
}
.btn-primary {
  flex: 2; height: 46px; border-radius: 10px;
  background: #001C57; border: none;
  color: #fff; font-family: 'Nunito', sans-serif;
  font-weight: 700; font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 3px 12px rgba(0,28,87,0.25);
}

/* ===== FORM COMPONENTS ===== */
.form-page { padding: 16px 16px 100px; display: flex; flex-direction: column; gap: 12px; }
.form-section {
  background: #F8FAFC;
  border-radius: 14px;
  border: 1.5px solid #e8edf5;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,28,87,0.05);
}
.form-section-title {
  padding: 12px 16px;
  font-size: 11px; font-weight: 700;
  color: #9aa4be; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid #e8edf5;
  background: #f0f4fa;
}
.form-section-subtitle {
  margin: 4px 0 10px;
  font-size: 12px;
  font-weight: 800;
  color: #001C57;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.form-body { padding: 16px; display: flex; flex-direction: column; gap: 14px; }

/* Explanatory text under a section title.
   Not .form-section-subtitle — that one is a bold uppercase navy LABEL, which reads
   as shouting when used for a sentence. This is quiet help text. */
.form-hint {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  color: #6b7a99;
  margin: -4px 0 2px;
}

/* A plain block inside a .form-section / .detail-section, for content that brings no
   padding of its own — free text, a photo grid, an item list. .detail-field and
   .form-body pad themselves; everything else would otherwise sit on the card edge. */
.section-body { padding: 14px 16px; }

/* Investigation overhaul status: option rows, CONTINUE sits beside its option */
.overhaul-option {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 28px;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  transition: border-color .15s ease, background .15s ease;
}
.overhaul-option.is-selected { border-color: #001C57; background: #f4f7fd; }
.overhaul-option .form-check { margin-bottom: 0; }
.overhaul-option .form-check-input { margin-top: .15rem; }
.overhaul-option .form-check-input:checked { background-color: #001C57; border-color: #001C57; }
.overhaul-option .form-check-input:focus { border-color: #001C57; box-shadow: 0 0 0 .2rem rgba(0,28,87,.15); }
.overhaul-option .form-check-label {
  font-size: 13px; font-weight: 700;
  color: #001C57; letter-spacing: 0.3px;
}
.overhaul-option .form-check-input:disabled + .form-check-label { color: #b3bccf; }
.overhaul-option .form-check-input:disabled:checked + .form-check-label { color: #001C57; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-group { display: flex; flex-direction: column; gap: 5px; }
.field-label {
  font-size: 11px; font-weight: 700;
  color: #6b7a99; letter-spacing: 0.5px; text-transform: uppercase;
}
.field-input, .field-select, .field-textarea {
  width: 100%;
  background: #fff;
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  color: #1a2340;
  font-family: 'Nunito', sans-serif;
  font-size: 14px; font-weight: 500;
  padding: 10px 12px;
  outline: none;
  transition: border-color 0.18s;
  -webkit-appearance: none;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color: #4A9DFF;
  background: #f8fbff;
}
.field-textarea { resize: vertical; min-height: 70px; }
.field-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239aa4be' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* Search field with dropdown */
.search-field { position: relative; }
.search-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #fff; border: 1.5px solid #e8edf5; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,28,87,0.12);
  z-index: 50; max-height: 200px; overflow-y: auto;
  display: none;
}
.search-dropdown.open { display: block; }
.search-option {
  padding: 10px 12px;
  font-size: 13px; font-weight: 600; color: #1a2340;
  cursor: pointer; border-bottom: 1px solid #f0f4fa;
  transition: background 0.12s;
}
.search-option:last-child { border-bottom: none; }
.search-option:hover { background: #f0f4fa; }
.search-option.disabled { color: #c5d3e8; cursor: default; font-style: italic; }
.search-option-sub { font-size: 11px; font-weight: 500; color: #9aa4be; margin-top: 1px; }

/* Tags input (NO ISO) */
.tags-wrap {
  min-height: 42px;
  background: #fff; border: 1.5px solid #e8edf5; border-radius: 10px;
  padding: 6px 10px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
  cursor: text; transition: border-color 0.18s;
}
.tags-wrap:focus-within { border-color: #4A9DFF; background: #f8fbff; }
.tag-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(37,99,235,0.1); color: #1d4fc2;
  border-radius: 6px; padding: 2px 8px;
  font-size: 12px; font-weight: 700;
}
.tag-chip button {
  background: none; border: none; color: #1d4fc2;
  cursor: pointer; font-size: 14px; padding: 0; line-height: 1;
}
.tags-input {
  border: none; outline: none; font-family: 'Nunito', sans-serif;
  font-size: 13px; color: #1a2340; flex: 1; min-width: 80px; background: transparent;
}

/* Item cards (dynamic rows) */
.item-list { display: flex; flex-direction: column; gap: 10px; }
.item-card {
  background: #fff; border-radius: 12px;
  border: 1.5px solid #e8edf5;
  padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
}
.item-card-header {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 700; color: #6b7a99; text-transform: uppercase; letter-spacing: 0.5px;
}
.item-remove-btn {
  width: 28px; height: 28px; border-radius: 8px;
  background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.2);
  color: #dc2626; cursor: pointer; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}
.add-item-btn {
  width: 100%; height: 42px; border-radius: 10px;
  background: rgba(0,28,87,0.05); border: 1.5px dashed #c5d3e8;
  color: #001C57; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 6px;
}

/* Photo upload */
.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.photo-slot {
  aspect-ratio: 1; border-radius: 12px;
  border: 1.5px dashed #c5d3e8; background: #f0f4fa;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; cursor: pointer; position: relative; overflow: hidden;
  transition: border-color 0.18s;
}
.photo-slot:hover { border-color: #4A9DFF; }
.photo-slot.has-photo { border-style: solid; border-color: #e8edf5; }
.photo-slot i { font-size: 24px; color: #9aa4be; }
.photo-slot span { font-size: 11px; color: #9aa4be; font-weight: 600; }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; border-radius: 11px; }
.photo-slot .photo-remove {
  position: absolute; top: 6px; right: 6px;
  width: 22px; height: 22px; border-radius: 50%;
  background: rgba(220,38,38,0.85); border: none;
  color: #fff; font-size: 12px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 2;
}
.photo-slot .photo-uploading {
  position: absolute; inset: 0; background: rgba(0,28,87,0.6);
  display: flex; align-items: center; justify-content: center; border-radius: 11px;
}

.chronos-photo-grid,
.photo-container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0;
}

.chronos-photo-card,
.photo-card {
  min-width: 0;
  min-height: 176px;
  border: 1.5px dashed #d7e0ea;
  border-radius: 10px;
  background: #fff;
  padding: 12px;
  text-align: center;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
  position: relative;
  overflow: hidden;
  transition: border-color 0.18s, background 0.18s;
}

.chronos-photo-card:hover,
.photo-card:hover {
  border-color: #4A9DFF;
  background: #f8fbff;
}

.chronos-photo-card.has-image,
.photo-card.has-image {
  border-style: solid;
}

.chronos-photo-card input[type="file"],
.photo-card input[type="file"] {
  display: none;
}

.chronos-photo-card .preview-img,
.photo-card .preview-img {
  max-width: 100%;
  max-height: 132px;
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: zoom-in;
}

.chronos-photo-card .remove-photo,
.photo-card .remove-photo {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(220,38,38,0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}

.chronos-photo-card .upload-icon,
.photo-card .upload-icon {
  font-size: 26px;
  color: #9aa4be;
}

.chronos-photo-card .photo-upload-area,
.photo-card .photo-upload-area {
  width: 100%;
  min-height: 132px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.photo-caption-input {
  width: 100%; border: none; border-top: 1px solid #e8edf5;
  padding: 7px 8px; font-size: 11px; font-family: 'Nunito', sans-serif;
  color: #6b7a99; outline: none; background: rgba(255,255,255,0.92);
}

.time-tracker-container {
  background: #F8FAFC;
  border: 1.5px solid #e8edf5;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,28,87,0.05);
}
.time-tracker-label {
  font-size: 11px;
  font-weight: 700;
  color: #9aa4be;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.time-tracker-display {
  margin-top: 6px;
  color: #001C57;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}
.time-tracker-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.time-tracker-btn {
  min-height: 40px;
  border: none;
  border-radius: 10px;
  padding: 0 14px;
  font-family: 'Nunito', sans-serif;
  font-size: 13px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
}
.time-tracker-btn-pause { background: rgba(245,158,11,0.12); color: #d97706; }
.time-tracker-btn-resume { background: rgba(34,197,94,0.12); color: #16a34a; }
.time-tracker-btn-draft { background: rgba(0,28,87,0.08); color: #001C57; }

.wizard { display: flex; flex-direction: column; gap: 12px; }
.wizard-progress {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255,255,255,0.96);
  border: 1.5px solid #e8edf5;
  border-radius: 14px;
  padding: 10px 12px;
  box-shadow: 0 4px 16px rgba(0,28,87,0.08);
}
.wizard-progress-text {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 11px;
  font-weight: 800;
  color: #001C57;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.wizard-progress-bar {
  height: 5px;
  margin-top: 8px;
  background: #e8edf5;
  border-radius: 999px;
  overflow: hidden;
}
.wizard-progress-fill {
  width: 0;
  height: 100%;
  background: #2563EB;
  border-radius: inherit;
  transition: width 0.2s ease;
}
.wizard-steps,
.wizard-substeps {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: thin;
}
.wizard-step {
  border: 1.5px solid #e8edf5;
  background: #F8FAFC;
  color: #6b7a99;
  border-radius: 999px;
  padding: 7px 10px;
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.wizard-substeps .wizard-step {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wizard-substep-select-wrap {
  background: #F8FAFC;
  border: 1.5px solid #e8edf5;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,28,87,0.05);
}
.wizard-substep-label {
  font-size: 10px;
  font-weight: 800;
  color: #9aa4be;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}
.wizard-substep-select {
  width: 100%;
  min-height: 42px;
  border: 1.5px solid #c5d3e8;
  border-radius: 10px;
  background-color: #fff;
  color: #001C57;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  padding: 9px 36px 9px 12px;
  outline: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23001C57' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.wizard-substep-select:focus {
  border-color: #4A9DFF;
  background-color: #f8fbff;
}
.wizard-substep-select-wrap.is-error {
  border-color: rgba(244,63,94,0.45);
  background: rgba(244,63,94,0.08);
}
.wizard-substep-select-wrap.is-error .wizard-substep-label {
  color: #e11d48;
}
.wizard-substep-select-wrap.is-error .wizard-substep-select {
  border-color: rgba(244,63,94,0.55);
  color: #e11d48;
  background-color: #fff;
}
.wizard-step.is-active {
  background: #001C57;
  border-color: #001C57;
  color: #fff;
}
.wizard-step.is-complete {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.08);
  color: #16a34a;
}
.wizard-step.is-error {
  border-color: rgba(244,63,94,0.45);
  background: rgba(244,63,94,0.08);
  color: #e11d48;
}
.wizard-pane,
.wizard-subpane {
  display: none;
}
.wizard-pane.is-active,
.wizard-subpane.is-active {
  display: block;
}
.wizard-review-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wizard-review-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.wizard-review-summary-item {
  background: #fff;
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wizard-review-summary-value {
  color: #001C57;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
}
.wizard-review-summary-label {
  color: #9aa4be;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.wizard-review-item {
  border: 1.5px solid #e8edf5;
  border-radius: 10px;
  background: #fff;
  padding: 10px 12px;
  color: #1a2340;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.wizard-review-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.wizard-review-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}
.wizard-review-title span {
  min-width: 0;
}
.wizard-review-status {
  flex-shrink: 0;
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(0,28,87,0.08);
  color: #001C57;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.wizard-review-meta {
  margin-top: 6px;
  color: #6b7a99;
  font-size: 12px;
  font-weight: 600;
}
.wizard-review-item.is-complete {
  border-color: rgba(34,197,94,0.3);
  background: rgba(34,197,94,0.06);
}
.wizard-review-item.is-complete .wizard-review-status {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
}
.wizard-review-item.is-complete i {
  color: #16a34a;
}
.wizard-review-item.is-incomplete {
  border-color: rgba(244,63,94,0.32);
  background: rgba(244,63,94,0.06);
}
.wizard-review-item.is-incomplete .wizard-review-status {
  background: rgba(244,63,94,0.12);
  color: #e11d48;
}
.wizard-review-item.is-incomplete i {
  color: #e11d48;
}
.wizard-review-item.is-uploading {
  border-color: rgba(245,158,11,0.36);
  background: rgba(245,158,11,0.08);
}
.wizard-review-item.is-uploading .wizard-review-status {
  background: rgba(245,158,11,0.14);
  color: #d97706;
}
.wizard-review-item.is-uploading i {
  color: #d97706;
}
.wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 45;
  display: flex;
  gap: 10px;
  padding: 12px 0 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 28%);
}
.wizard-actions .btn-cancel,
.wizard-actions .btn-primary {
  min-width: 0;
}

.floating-draft-btn {
  position: fixed;
  bottom: 96px;
  right: calc(50% - 368px + 16px);
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: transform 0.18s, box-shadow 0.18s;
}
.floating-draft-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.floating-draft-btn .save-indicator {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 20px;
  height: 20px;
  background: #16a34a;
  border: 2px solid #fff;
  border-radius: 50%;
  display: none;
}
.floating-draft-btn .save-indicator.active {
  display: block;
  animation: chronos-pulse 1s ease-in-out;
}
@keyframes chronos-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.8; }
}
@media (max-width: 768px) {
  .floating-draft-btn { right: 16px; }
}

@media (max-width: 420px) {
  .chronos-photo-grid,
  .photo-container {
    grid-template-columns: 1fr;
  }
}

.disassembly-photo-block {
  margin-top: 18px;
}
.disassembly-photo-title {
  margin-bottom: 8px;
}
.disassembly-photo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.disassembly-photo-card {
  min-width: 0;
}
.disassembly-photo-slot {
  width: 100%;
  min-height: 176px;
  border: 1.5px dashed #d7e0ea;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.18s;
}
.disassembly-photo-slot:hover,
.disassembly-photo-slot:focus {
  border-color: #4A9DFF;
  outline: none;
}
.disassembly-photo-slot.has-photo {
  border-style: dashed;
  border-color: #d7e0ea;
}
.disassembly-photo-slot img {
  width: 82%;
  height: 78%;
  object-fit: contain;
  display: block;
}
.disassembly-photo-slot i {
  font-size: 24px;
  color: #9aa4be;
}
.disassembly-photo-slot span {
  margin-left: 6px;
  font-size: 11px;
  color: #9aa4be;
  font-weight: 600;
}
.disassembly-photo-slot .photo-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(220,38,38,0.9);
  border: none;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.disassembly-photo-slot .photo-uploading {
  position: absolute;
  inset: 0;
  background: rgba(0,28,87,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (max-width: 420px) {
  .disassembly-photo-grid {
    gap: 12px;
  }
  .disassembly-photo-slot {
    min-height: 142px;
  }
}
/* List page */
.list-page { padding: 16px 16px 100px; display: flex; flex-direction: column; gap: 12px; }
.tab-toggle {
  background: #e8edf5;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 700;
  color: #6b7a99;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.tab-toggle.active { background: #001C57; color: #fff; }
.search-bar {
  display: flex; gap: 10px; align-items: center;
  background: #F8FAFC; border-radius: 12px;
  border: 1.5px solid #e8edf5; padding: 10px 14px;
}
.search-bar i { color: #9aa4be; font-size: 15px; flex-shrink: 0; }
.search-bar input {
  flex: 1; border: none; outline: none; background: transparent;
  font-family: 'Nunito', sans-serif; font-size: 14px; color: #1a2340;
}
.list-card {
  background: #F8FAFC; border-radius: 14px;
  border: 1.5px solid #e8edf5;
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 2px 8px rgba(0,28,87,0.05);
  text-decoration: none; color: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.list-card:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,28,87,0.1); }
.list-card-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.list-card-title { font-size: 15px; font-weight: 700; color: #1a2340; }
.list-card-badge {
  background: rgba(0,28,87,0.08); color: #001C57;
  border-radius: 6px; padding: 2px 8px;
  font-size: 11px; font-weight: 700; white-space: nowrap; flex-shrink: 0;
}
.list-card-title { min-width: 0; overflow-wrap: anywhere; }
.list-card-number {
  background: #001C57; color: #fff;
  border-radius: 6px; padding: 3px 8px;
  font-size: 11px; font-weight: 800; letter-spacing: 0.3px;
  white-space: nowrap; flex-shrink: 0;
}
.list-card-status { display: flex; justify-content: flex-end; }
.list-cards { display: flex; flex-direction: column; gap: 12px; }
.list-toolbar { display: flex; gap: 10px; align-items: stretch; }
.list-toolbar .search-bar { flex: 1; min-width: 0; }
.list-filter-btn {
  position: relative; flex-shrink: 0;
  width: 46px; border-radius: 12px;
  background: #F8FAFC; border: 1.5px solid #e8edf5;
  color: #001C57; font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.list-filter-btn.is-active { background: #001C57; border-color: #001C57; color: #fff; }
.list-filter-btn.is-active::after {
  content: ''; position: absolute; top: 7px; right: 7px;
  width: 7px; height: 7px; border-radius: 50%; background: #4A9DFF;
}

/* Filter & Sort sheet (list pages) */
.filter-sheet { position: fixed; inset: 0; z-index: 110; pointer-events: none; }
.filter-sheet.is-open { pointer-events: auto; }
.filter-sheet-backdrop {
  position: absolute; inset: 0; background: rgba(0,28,87,0.45);
  opacity: 0; transition: opacity 0.25s;
}
.filter-sheet.is-open .filter-sheet-backdrop { opacity: 1; }
.filter-sheet-panel {
  position: absolute; bottom: 0; left: 50%;
  width: 100%; max-width: 736px; max-height: 90vh; overflow-y: auto;
  background: #fff; border-radius: 20px 20px 0 0;
  transform: translate(-50%, 100%);
  transition: transform 0.3s cubic-bezier(0.32,0.72,0,1);
}
.filter-sheet.is-open .filter-sheet-panel { transform: translate(-50%, 0); }
.filter-sheet-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-bottom: 1px solid #e8edf5;
}
.filter-sheet-title { font-size: 16px; font-weight: 800; color: #001C57; }
.filter-sheet-close {
  width: 34px; height: 34px; border: none; background: transparent;
  color: #6b7a99; font-size: 18px; cursor: pointer;
}
.filter-sheet-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.filter-sheet-section { font-size: 13px; font-weight: 800; color: #1a2340; margin-top: 4px; }
.filter-sheet-actions {
  display: flex; gap: 10px;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid #e8edf5;
}
.list-card-meta { display: flex; flex-wrap: wrap; gap: 8px; }
.list-card-meta-item {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: #6b7a99;
}
.list-card-meta-item i { font-size: 11px; color: #9aa4be; }
.list-empty {
  text-align: center; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.list-empty i { font-size: 40px; color: #c5d3e8; }
.list-empty-title { font-size: 15px; font-weight: 700; color: #6b7a99; }
.list-empty-sub { font-size: 13px; color: #9aa4be; }
.list-load-more {
  width: 100%; height: 44px; border-radius: 10px;
  background: #F8FAFC; border: 1.5px solid #e8edf5;
  color: #001C57; font-family: 'Nunito', sans-serif;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.loading-spinner {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 24px; color: #9aa4be; font-size: 13px; font-weight: 600;
}
.loading-spinner i { font-size: 20px; animation: fa-spin 0.8s linear infinite; }

/* FAB */
.fab {
  position: fixed; bottom: 84px; right: calc(50% - 368px + 16px);
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, #2563EB 0%, #001C57 100%);
  border: none; color: #fff; font-size: 22px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,28,87,0.35);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.18s, box-shadow 0.18s;
  z-index: 90; text-decoration: none;
}
.fab:hover { transform: scale(1.07); box-shadow: 0 6px 28px rgba(0,28,87,0.45); }
@media (max-width: 768px) { .fab { right: 16px; } }

/* Detail page */
.detail-page { padding: 16px 16px 100px; display: flex; flex-direction: column; gap: 12px; }
.detail-section {
  background: #F8FAFC; border-radius: 14px;
  border: 1.5px solid #e8edf5;
  overflow: hidden; box-shadow: 0 2px 8px rgba(0,28,87,0.05);
}
.detail-section-title {
  padding: 12px 16px; font-size: 11px; font-weight: 700;
  color: #9aa4be; letter-spacing: 1px; text-transform: uppercase;
  border-bottom: 1px solid #e8edf5; background: #f0f4fa;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; }
.detail-field {
  padding: 12px 16px; border-bottom: 1px solid #f0f4fa; border-right: 1px solid #f0f4fa;
}
.detail-field:nth-child(even) { border-right: none; }
.detail-field:last-child, .detail-field:nth-last-child(2):nth-child(odd) { border-bottom: none; }
.detail-field-full { grid-column: 1 / -1; border-right: none; }
.detail-label { font-size: 10px; font-weight: 700; color: #9aa4be; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 3px; }
.detail-value { font-size: 14px; font-weight: 600; color: #1a2340; }
.detail-value.muted { color: #6b7a99; }
.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; font-weight: 700;
}
.badge-navy   { background: rgba(0,28,87,0.1);   color: #001C57; }
.badge-blue   { background: rgba(37,99,235,0.1);  color: #1d4fc2; }
.badge-green  { background: rgba(34,197,94,0.1);  color: #16a34a; }
.badge-amber  { background: rgba(245,158,11,0.1); color: #d97706; }
.badge-rose   { background: rgba(244,63,94,0.1);  color: #e11d48; }

/* Photo gallery */
.photo-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
.photo-thumb {
  aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  background: #e8edf5; cursor: pointer;
}
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Items detail table */
.items-table { width: 100%; }
.items-table-head {
  display: grid; grid-template-columns: 32px 1fr 60px 80px;
  padding: 8px 12px; background: #f0f4fa;
  font-size: 10px; font-weight: 700; color: #9aa4be;
  text-transform: uppercase; letter-spacing: 0.5px;
  border-bottom: 1px solid #e8edf5;
}
.items-table-row {
  display: grid; grid-template-columns: 32px 1fr 60px 80px;
  padding: 10px 12px; border-bottom: 1px solid #f0f4fa; align-items: start;
  font-size: 13px; font-weight: 600; color: #1a2340;
}
.items-table-row:last-child { border-bottom: none; }
.items-table-row .airend { font-size: 11px; color: #6b7a99; margin-top: 2px; }

/* Spinner (inline) */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { display: inline-block; animation: spin 0.7s linear infinite; }
