/* maintenance_professional/static/css/main.css
   Central stylesheet for the entire FixGrid platform.
   Style guide derived from the attached MP style image:
     - Deep navy/indigo backgrounds: #0D0F2B, #12153A, #1A1E4A
     - Accent purple: #7B5CF0, #9B79FF
     - Surface cards: #1E2352, #252A60
     - Text: #E8EAFF (primary), #9FA3CC (muted)
     - Success: #4ECDC4  Warning: #F7B731  Danger: #FF6B6B
     - Font: 'Inter', sans-serif
   Light theme overrides applied via [data-theme="light"] on <html>.
*/

/* ── Google Font ─────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS Variables: Dark Theme (default) ─────────────────────────────────── */
:root {
  --bg-base:       #0D0F2B;
  --bg-surface:    #12153A;
  --bg-card:       #1A1E4A;
  --bg-card-hover: #1E2352;
  --bg-input:      #252A60;
  --border:        #2E3470;
  --accent:        #7B5CF0;
  --accent-light:  #9B79FF;
  --accent-glow:   rgba(123,92,240,0.25);
  --text-primary:  #E8EAFF;
  --text-muted:    #B8BCDC;
  --text-inverse:  #0D0F2B;
  --success:       #4ECDC4;
  --warning:       #F7B731;
  --danger:        #FF6B6B;
  --info:          #5BC0DE;
  --sidebar-width: 240px;
  --topbar-height: 64px;
  --radius:        12px;
  --radius-sm:     8px;
  --shadow:        0 4px 24px rgba(0,0,0,0.5);
  --shadow-card:   0 2px 16px rgba(0,0,0,0.4);
  --transition:    0.2s ease;
}

/* ── Light Theme Overrides ──────────────────────────────────────────────── */
[data-theme="light"] {
  /* Backgrounds */
  --bg-base:       #F5F7FB;   /* was #F0F2FF */
  --bg-surface:    #ECEFF7;   /* was #E8EAFF */
  --bg-card:       #FFFFFF;
  --bg-card-hover: #F3F4FB;   /* softer hover */
  --bg-input:      #F0F2FA;   /* a bit more neutral */
  /* Borders */
  --border:        #D3D7E6;   /* lighter, less saturated */
  /* Accent (same hue, darker in dark mode, lighter here) */
  --accent:        #6C4FD9;
  --accent-light:  #7F63F2;
  --accent-glow:   rgba(108,79,217,0.10);
  /* Text */
  --text-primary:  #151A35;   /* darker for contrast */
  --text-muted:    #6A7093;
  --text-inverse:  #FFFFFF;
  /* Shadows */
  --shadow:        0 8px 24px rgba(15,23,42,0.06);
  --shadow-card:   0 4px 16px rgba(15,23,42,0.06);
}

/* ── Bridge: New Design System Tokens ───────────────────────────────────── */
:root {
  /* Color system */
  --color-primary:       #4f8ef7;
  --color-primary-hover: #3a78e8;
  --color-primary-muted: #1e3a6e;
  --color-success:       #34c97b;
  --color-warning:       #f5a623;
  --color-danger:        #e05252;
  --color-info:          #5bc4f5;
  --color-neutral:       #6c7a96;

  /* Background aliases */
  --bg-elevated:         var(--bg-card);
  --bg-hover:            var(--bg-card-hover);
  --bg-active:           #2d3650;

  /* Border aliases */
  --border-subtle:       var(--border);
  --border-default:      var(--border);
  --border-focus:        var(--color-primary);

  /* Text aliases */
  --text-secondary:      var(--text-muted);

  /* Shadow aliases */
  --shadow-sm:           var(--shadow-card);
  --shadow-md:           var(--shadow);
  --shadow-lg:           0 8px 30px rgba(0,0,0,0.6);
  --shadow-3d:           0 2px 4px rgba(0,0,0,0.4),
                         0 8px 16px rgba(0,0,0,0.5),
                         0 16px 40px rgba(0,0,0,0.6);

  /* Transition aliases */
  --transition-fast:     0.12s ease;
  --transition-base:     var(--transition);
  --transition-slow:     0.4s ease;

  /* Radius aliases */
  --radius-sm:           4px;
  --radius-md:           var(--radius-sm);
  --radius-lg:           var(--radius);
  --radius-pill:         999px;

  /* Typography scale */
  --font-family:         'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-xs:             0.70rem;
  --font-sm:             0.82rem;
  --font-md:             0.95rem;
  --font-lg:             1.10rem;
  --font-xl:             1.35rem;
  --font-2xl:            1.75rem;

  /* Spacing scale */
  --space-xs:            4px;
  --space-sm:            8px;
  --space-md:            16px;
  --space-lg:            24px;
  --space-xl:            32px;
  --space-2xl:           48px;
}

/* Bridge light mode overrides */
[data-theme="light"] {
  --bg-elevated:   var(--bg-card);
  --bg-hover:      var(--bg-card-hover);
  --bg-active:     #d6deef;
  --border-subtle: var(--border);
  --shadow-3d:     0 2px 4px rgba(0,0,0,0.08),
                   0 8px 16px rgba(0,0,0,0.10),
                   0 16px 40px rgba(0,0,0,0.12);
}


/* ── Reset & Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

/* ── Layout ──────────────────────────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  transition: background var(--transition);
}

.sidebar-logo {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}
.sidebar-logo .logo-icon {
  width: 38px; height: 38px;
  background: var(--accent);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.sidebar-logo span {
  font-weight: 700; font-size: 0.95rem;
  color: var(--text-primary); line-height: 1.2;
}

.sidebar-nav { flex: 1; padding: 16px 0; overflow-y: auto; }
.nav-section-label {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em;
  color: var(--text-muted); text-transform: uppercase;
  padding: 12px 24px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 24px; cursor: pointer;
  color: var(--text-muted); font-size: 0.875rem; font-weight: 500;
  border-radius: 0; transition: all var(--transition);
  position: relative;
}
.nav-item:hover, .nav-item.active {
  color: var(--text-primary);
  background: var(--accent-glow);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; background: var(--accent); border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.nav-item-back { font-size: 0.78rem; opacity: 0.65; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.nav-item-back:hover { opacity: 1; }

/* Nav badge counts (NAV-7) */
.nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  margin-left: auto;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
}
.nav-badge[data-count="0"] {
  display: none;
}

/* Main content area */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-width: 0;  
}

/* Topbar */
.topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  position: sticky; top: 0; z-index: 100;
  gap: 16px;
}
.topbar-title { font-size: 1.05rem; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

/* NAV-5: Super Admin company context pill */
.company-context-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 600;
}
.company-context-pill .pill-dismiss {
    background: none;
    border: none;
    cursor: pointer;
    color: #fff;
    opacity: 0.7;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
}
.company-context-pill .pill-dismiss:hover {
    opacity: 1;
}



/* Demo switcher layout (inside topbar, left side) */
.demo-switcher {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 4px 12px;
  background: rgba(255, 152, 0, 0.1);
  border: 1px solid rgba(255, 152, 0, 0.3);
  border-radius: 8px;
  margin-left: 0;
  margin-right: 8px;
}

/* Page content */
.page-content { padding: 28px; padding-top: calc(var(--topbar-height) + 28px); flex: 1; }

.page-header {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}
.page-header h1 { font-size: 1.4rem; font-weight: 700; }
.page-header .breadcrumb {
  font-size: 0.8rem; color: var(--text-muted); margin-top: 4px;
}

html[data-theme="light"] .sidebar {
  background: linear-gradient(180deg, #F4F5FF 0%, #E3E7F7 100%) !important;
}

/* Active/hover nav items: lighten instead of purple overlay */
[data-theme="light"] .nav-item:hover,
[data-theme="light"] .nav-item.active {
  background: #E3E7F7;
  color: var(--text-primary);
}

[data-theme="light"] .nav-item.active::before {
  background: var(--accent);
}


/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-card);
  transition: background var(--transition), border var(--transition);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px; padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 1rem; font-weight: 600; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column; gap: 8px;
  transition: background var(--transition);
}
.stat-card .stat-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--accent-glow); display: flex; align-items: center;
  justify-content: center; font-size: 1.3rem;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; }
.stat-card .stat-label { font-size: 0.8rem; color: var(--text-muted); }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 18px; border-radius: var(--radius-sm);
  font-size: 0.875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-light); border-color: var(--accent-light); }
.btn-secondary {
  background: var(--bg-input); color: var(--text-primary); border-color: var(--border);
}
.btn-secondary:hover { background: var(--bg-card-hover); }
.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-success { background: var(--success); color: #0D0F2B; border-color: var(--success); }
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-icon { padding: 8px; border-radius: var(--radius-sm); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
}
/* Required field indicator */
.form-label.required::after {
  content: " *"; color: var(--danger); font-weight: 700;
}
.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--bg-input); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.875rem; font-family: inherit;
  transition: border var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }
.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 4px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }

/* Required field highlight */
.form-control[required]:invalid { border-color: var(--danger); }

/* Checkbox */
.form-check { display: flex; align-items: center; gap: 10px; }
.form-check input[type="checkbox"] {
  width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer;
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); }
table {
  width: 100%; border-collapse: collapse;
  font-size: 0.875rem;
}
thead th {
  background: var(--bg-surface);
  color: var(--text-muted); font-weight: 600; font-size: 0.78rem;
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 12px 16px; text-align: left;
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
tbody tr:hover { background: var(--bg-card-hover); }
tbody td { padding: 12px 16px; color: var(--text-primary); }

/* Base responsive table hook (desktop stays a normal table) */
.table-wrapper .responsive-table {
  width: 100%;
  border-collapse: collapse;
}

/* ── Badges / Pills ──────────────────────────────────────────────────────── */
.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: 20px; font-size: 0.75rem; font-weight: 600;
}
.badge-open       { background: rgba(91,192,222,0.2); color: var(--info); }
.badge-in-progress{ background: rgba(247,183,49,0.2); color: var(--warning); }
.badge-completed  { background: rgba(78,205,196,0.2); color: var(--success); }
.badge-on-hold    { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge-cancelled  { background: rgba(159,163,204,0.15); color: var(--text-muted); }
.badge-low        { background: rgba(78,205,196,0.15); color: var(--success); }
.badge-medium     { background: rgba(247,183,49,0.2); color: var(--warning); }
.badge-high       { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge-emergency  { background: rgba(255,107,107,0.4); color: #fff; }
.badge-role       { background: var(--accent-glow); color: var(--accent-light); }
.badge-active     { background: rgba(78,205,196,0.2); color: var(--success); }
.badge-inactive   { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge-success    { background: rgba(78,205,196,0.2); color: var(--success); }
.badge-warning    { background: rgba(247,183,49,0.2); color: var(--warning); }
.badge-danger     { background: rgba(255,107,107,0.15); color: var(--danger); }
.badge-info       { background: rgba(91,192,222,0.2); color: var(--info); }

/* ── Pills / Status ──────────────────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.status-completed   { background: rgba(78,205,196,0.2);   color: var(--success); }
.status-in-progress { background: rgba(247,183,49,0.2);   color: var(--warning); }
.status-scheduled   { background: rgba(var(--accent-rgb, 99,102,241),0.15); color: var(--accent-light); }
.status-cancelled   { background: rgba(255,107,107,0.15); color: var(--danger); }
.status-on-hold     { background: rgba(255,107,107,0.15); color: var(--danger); }

/* ── Alerts / Flash messages ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px; border-radius: var(--radius-sm);
  font-size: 0.875rem; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.alert-success { background: rgba(78,205,196,0.15); border: 1px solid var(--success); color: var(--success); }
.alert-danger   { background: rgba(255,107,107,0.15); border: 1px solid var(--danger);  color: var(--danger); }
.alert-warning  { background: rgba(247,183,49,0.15);  border: 1px solid var(--warning); color: var(--warning); }
.alert-info     { background: rgba(91,192,222,0.15);  border: 1px solid var(--info);    color: var(--info); }

/* ── Login Page ──────────────────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--bg-base);
  background-image: radial-gradient(ellipse at 20% 50%, rgba(123,92,240,0.12) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(78,205,196,0.06) 0%, transparent 50%);
}
.auth-card {
  width: 100%; max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.auth-logo {
  text-align: center; margin-bottom: 28px;
}
.auth-logo .logo-circle {
  width: 56px; height: 56px; background: var(--accent);
  border-radius: 14px; margin: 0 auto 12px;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
}
.auth-logo h1 { font-size: 1.15rem; font-weight: 700; }
.auth-logo p { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }

/* ── Theme toggle ─────────────────────────────────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: 30px; padding: 6px 14px; cursor: pointer;
  font-size: 0.85rem; color: var(--text-muted);
}
.toggle-switch {
  width: 42px; height: 22px;
  background: var(--border); border-radius: 20px;
  position: relative; transition: background var(--transition);
}
.toggle-switch.on { background: var(--accent); }
.toggle-switch::after {
  content: ''; position: absolute;
  width: 16px; height: 16px; top: 3px; left: 3px;
  background: white; border-radius: 50%;
  transition: left var(--transition);
}
.toggle-switch.on::after { left: 23px; }

/* ── Ticket colors by priority ────────────────────────────────────────────── */
.ticket-row-emergency { border-left: 3px solid var(--danger) !important; }
.ticket-row-high      { border-left: 3px solid var(--warning) !important; }

/* ── Empty state ──────────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.4; }

/* ── Utility ─────────────────────────────────────────────────────────────── */
.flex   { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.gap-8  { gap: 8px; }
.gap-16 { gap: 16px; }
.gap-24 { gap: 24px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.mt-16  { margin-top: 16px; }
.text-muted   { color: var(--text-muted); }
.text-sm      { font-size: 0.8rem; }
.font-600     { font-weight: 600; }
.text-right   { text-align: right; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
.make-ready-grid-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.day-column {
  border-left: 1px solid var(--border);
  padding: 8px;
}

/* Alias new Make Ready classes to old grid behavior */
.make-ready-week-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}

.make-ready-week-column {
  border-left: 1px solid var(--border);
  padding: 8px;
}

.day-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}

.turn-pill {
  background: var(--bg-card);
  border-radius: 6px;
  padding: 6px 8px;
  margin-bottom: 6px;
  border: 1px solid var(--border-subtle);
}

/* Add to main.css or inline in the template */
.status-needs-scheduling {
    background: rgba(148,163,184,0.12);
    border: 1px dashed rgba(148,163,184,0.6);
    color: var(--text-primary);
    font-weight: 500;
}
.task-needs-review {
    border: 2px solid var(--warning) !important;
}


tr.row-past-due  { background: rgba(229, 57, 53, 0.12) !important; }
tr.row-due-soon  { background: rgba(240, 165, 0, 0.12) !important; }
tr.row-scheduled { background: transparent; }
tr.row-passed    { background: rgba(67, 160, 71, 0.08) !important; }
tr.row-failed    { background: rgba(229, 57, 53, 0.08) !important; }

/* Demo switcher when rendered in sidebar */
.sidebar-demo-switcher .demo-switcher {
  display: flex;
  flex-direction: column;      /* stack badge + controls */
  align-items: flex-start;
  gap: 8px;
  padding: 8px 12px;
  margin: 8px 16px 4px;
  background: rgba(255, 152, 0, 0.08);
  border-radius: 8px;
}

/* Stack role and property dropdowns vertically */
.sidebar-demo-switcher .demo-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

/* Full-width buttons in sidebar */
.sidebar-demo-switcher .demo-switch-btn {
  width: 100%;
  justify-content: space-between;
}

/* Menus stay within sidebar width */
.sidebar-demo-switcher .demo-switcher .dropdown-menu {
  left: 0 !important;
  right: auto !important;
  transform: none !important;
  max-width: 100%;
}

#taskModal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  overflow-y: auto;          /* allow scroll if content too tall */
}

#taskModal .card {
  width: 480px;
  max-width: 95vw;
  max-height: 90vh;          /* keep card inside viewport */
  overflow-y: auto;          /* scroll card body on mobile */
  box-shadow: var(--shadow);
}

/* ── Ticket Activity Timeline ───────────────────────────────────────────── */
.activity-timeline {
    margin-top: 1.5rem;
}
.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.activity-item:last-child {
    border-bottom: none;
}
.activity-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 0.875rem;
}
.activity-time {
    font-size: 0.75rem;
    white-space: nowrap;
}
.activity-note {
    margin-top: 4px;
    font-size: 0.85rem;
    color: var(--text-muted);
    padding-left: 4px;
}
.badge-internal {
    background: var(--warning);
    color: #000;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
}
/* ── Inspection autosave ────────────────────────────────────────────────── */
.autosave-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-left: 0.75rem;
    opacity: 0;
    transition: opacity 0.3s;
}
.autosave-indicator.visible {
    opacity: 1;
}
.draft-restore-banner {
    background: var(--accent);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}
.draft-restore-banner a {
    color: #fff;
    text-decoration: underline;
}
