/* © Private - All Rights Reserved */
/* Parking Installation Manager — Minimalist Stylesheet */

/* ============================================================
   CSS Variables - Light theme (default)
   ============================================================ */
:root {
  /* Backgrounds */
  --bg-base: #fafafa;
  --bg-surface: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #f5f5f5;
  --bg-active: #ebebeb;

  /* Text */
  --text-primary: #18181b;
  --text-secondary: #52525b;
  --text-muted: #a1a1aa;
  --text-inverse: #ffffff;

  /* Borders */
  --border-subtle: #e4e4e7;
  --border-default: #d4d4d8;
  --border-strong: #a1a1aa;

  /* Accent (deep blue) */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-muted: #eff6ff;

  /* Semantic */
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;

  /* Typography */
  --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Heebo', 'Rubik', system-ui, sans-serif;
  --font-mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 0.9375rem; /* 15px - slightly larger for Hebrew readability */
  --text-lg: 1.0625rem;  /* 17px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Radii */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-full: 9999px;

  /* Shadows - subtle */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.08);

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 180ms ease;
}

/* ============================================================
   Dark theme
   ============================================================ */
[data-theme="dark"] {
  --bg-base: #0a0a0a;
  --bg-surface: #141414;
  --bg-elevated: #1c1c1c;
  --bg-hover: #242424;
  --bg-active: #2c2c2c;

  --text-primary: #fafafa;
  --text-secondary: #d4d4d8;
  --text-muted: #71717a;
  --text-inverse: #18181b;

  --border-subtle: #27272a;
  --border-default: #3f3f46;
  --border-strong: #52525b;

  --accent: #3b82f6;
  --accent-hover: #60a5fa;
  --accent-soft: rgba(59, 130, 246, 0.15);
  --accent-muted: rgba(59, 130, 246, 0.08);

  --success: #22c55e;
  --success-soft: rgba(34, 197, 94, 0.15);
  --warning: #eab308;
  --warning-soft: rgba(234, 179, 8, 0.15);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.15);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.6);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

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

.muted {
  color: var(--text-muted);
}

/* ============================================================
   Auth pages (login)
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  position: relative;
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  box-shadow: var(--shadow-md);
}

.auth-header {
  text-align: center;
  margin-bottom: var(--space-8);
}

.auth-header h1 {
  font-size: var(--text-2xl);
  font-weight: 600;
  margin: 0 0 var(--space-2);
  letter-spacing: -0.02em;
}

.auth-header p {
  margin: 0;
  font-size: var(--text-sm);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.auth-footer {
  margin-top: var(--space-8);
  text-align: center;
  font-size: var(--text-xs);
}

/* ============================================================
   Form fields
   ============================================================ */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.field input:disabled {
  background: var(--bg-hover);
  color: var(--text-muted);
  cursor: not-allowed;
}

.error-message {
  padding: var(--space-3);
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-5);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover {
  background: var(--bg-hover);
  text-decoration: none;
}

.btn:active {
  background: var(--bg-active);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-danger {
  background: var(--danger);
  border-color: var(--danger);
  color: var(--text-inverse);
}

.btn-block {
  width: 100%;
}

.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--text-lg);
  transition: background var(--transition-fast);
}

.icon-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

/* ============================================================
   Theme toggle (auth page)
   ============================================================ */
.theme-toggle {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: var(--text-lg);
}

.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline; }

/* ============================================================
   App shell
   ============================================================ */
.app-header {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  height: 56px;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.app-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-base);
  white-space: nowrap;
}

.app-brand-mark {
  color: var(--accent);
  font-size: var(--text-xl);
}

.app-nav {
  display: flex;
  gap: var(--space-1);
  flex: 1;
}

.app-nav a {
  padding: var(--space-2) var(--space-4);
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--transition-fast);
}

.app-nav a:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  text-decoration: none;
}

.app-nav a.active {
  background: var(--accent-muted);
  color: var(--accent);
}

.app-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  position: relative;
}

.user-menu-btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.user-menu-btn:hover {
  background: var(--bg-hover);
}

.user-menu-btn .caret {
  font-size: 10px;
  color: var(--text-muted);
}

.user-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: var(--space-1);
  z-index: 50;
}

.user-menu button {
  width: 100%;
  text-align: right;
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-primary);
}

.user-menu button:hover {
  background: var(--bg-hover);
}

/* ============================================================
   Main content
   ============================================================ */
.app-main {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-6);
}

.loading-state {
  text-align: center;
  padding: var(--space-16);
  color: var(--text-muted);
}

/* Page sections */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-8);
  gap: var(--space-4);
}

.page-title {
  font-size: var(--text-3xl);
  font-weight: 600;
  margin: 0 0 var(--space-1);
  letter-spacing: -0.02em;
}

.page-subtitle {
  color: var(--text-muted);
  margin: 0;
  font-size: var(--text-sm);
}

/* Cards */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
}

.card + .card {
  margin-top: var(--space-4);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--space-16) var(--space-6);
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-4);
  opacity: 0.4;
}

.empty-state h3 {
  font-size: var(--text-lg);
  font-weight: 500;
  color: var(--text-secondary);
  margin: 0 0 var(--space-2);
}

.empty-state p {
  margin: 0 0 var(--space-6);
  font-size: var(--text-sm);
}

/* ============================================================
   Toast notifications
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: var(--space-6);
  left: var(--space-6);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  box-shadow: var(--shadow-lg);
  font-size: var(--text-sm);
  animation: toast-in 200ms ease;
  pointer-events: auto;
  max-width: 360px;
}

.toast.success { border-right: 3px solid var(--success); }
.toast.error { border-right: 3px solid var(--danger); }
.toast.warning { border-right: 3px solid var(--warning); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   Mobile responsive
   ============================================================ */
@media (max-width: 768px) {
  .app-header-inner {
    padding: 0 var(--space-4);
    gap: var(--space-3);
  }

  .app-nav {
    gap: 0;
  }

  .app-nav a {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .app-brand-name {
    display: none;
  }

  .app-main {
    padding: var(--space-6) var(--space-4);
  }

  .page-title {
    font-size: var(--text-2xl);
  }

  .user-menu-btn {
    padding: var(--space-2);
  }

  #user-name {
    display: none;
  }
}

/* ============================================================
   Forms — extended
   ============================================================ */
.form-card {
  max-width: 720px;
  margin: 0 auto;
}

.form-section {
  padding-bottom: var(--space-6);
  margin-bottom: var(--space-6);
  border-bottom: 1px solid var(--border-subtle);
}
.form-section:last-of-type { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.form-section-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0 0 var(--space-4);
  color: var(--text-primary);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 600px) {
  .field-row { grid-template-columns: 1fr; }
}

.field .required { color: var(--danger); }
.field-hint {
  display: block;
  margin-top: var(--space-1);
  color: var(--text-muted);
  font-size: var(--text-xs);
}

.field textarea {
  font-family: inherit;
  resize: vertical;
  min-height: 80px;
}

.form-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-subtle);
}
.form-actions .btn-danger { margin-left: auto; }

@media (max-width: 600px) {
  .form-actions {
    flex-direction: column-reverse;
  }
  .form-actions .btn { width: 100%; }
  .form-actions .btn-danger { margin-left: 0; }
}

/* ============================================================
   Stats grid
   ============================================================ */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-2);
}
.stat-value {
  font-size: var(--text-3xl);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1;
}
.stat-value.muted { color: var(--text-muted); }

/* ============================================================
   Cards — extended
   ============================================================ */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.card-title {
  font-size: var(--text-base);
  font-weight: 600;
  margin: 0;
}
.card-link {
  font-size: var(--text-sm);
  color: var(--accent);
}
.card-link:hover { text-decoration: none; }

.card-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
@media (max-width: 600px) {
  .card-grid { grid-template-columns: 1fr; }
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.info-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-sm);
  padding-bottom: var(--space-2);
  border-bottom: 1px dashed var(--border-subtle);
}
.info-row:last-child { border-bottom: none; padding-bottom: 0; }
.info-label { color: var(--text-muted); }
.info-value { color: var(--text-primary); font-weight: 500; }

.notes-text {
  white-space: pre-wrap;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

.breadcrumb {
  display: inline-block;
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}
.breadcrumb:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   Filter bar
   ============================================================ */
.filter-card {
  display: flex;
  gap: var(--space-4);
  align-items: center;
  flex-wrap: wrap;
  padding: var(--space-3) var(--space-4);
}
.filter-input {
  flex: 1;
  min-width: 240px;
  padding: var(--space-2) var(--space-3);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--text-sm);
}
.filter-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.filter-chips {
  display: flex;
  gap: var(--space-1);
  flex-wrap: wrap;
}
.chip-btn {
  padding: var(--space-2) var(--space-3);
  background: transparent;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: var(--text-xs);
  cursor: pointer;
  font-weight: 500;
  transition: all var(--transition-fast);
}
.chip-btn:hover { background: var(--bg-hover); }
.chip-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--text-inverse);
}

/* ============================================================
   Tables
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th {
  text-align: right;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
  padding: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover { background: var(--bg-hover); }
.row-actions {
  text-align: left;
}
.action-link {
  font-size: var(--text-sm);
  color: var(--accent);
}

/* ============================================================
   Chips (status)
   ============================================================ */
.chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  white-space: nowrap;
}
.chip.success { background: var(--success-soft); color: var(--success); }
.chip.warning { background: var(--warning-soft); color: var(--warning); }
.chip.danger { background: var(--danger-soft); color: var(--danger); }
.chip.muted { background: var(--bg-hover); color: var(--text-secondary); }
.chip.accent { background: var(--accent-muted); color: var(--accent); }

/* ============================================================
   Modal
   ============================================================ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: var(--space-4);
  animation: fadeIn 150ms ease;
  overflow-y: auto;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh - 32px);
  display: flex;
  flex-direction: column;
  animation: scaleIn 150ms ease;
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.modal-content {
  padding: var(--space-6);
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.modal-title {
  font-size: var(--text-lg);
  font-weight: 600;
  margin: 0 0 var(--space-3);
  flex-shrink: 0;
}
.modal-body {
  color: var(--text-secondary);
  margin: 0 0 var(--space-6);
  line-height: 1.6;
}
.modal-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: flex-end;
  flex-shrink: 0;
  margin-top: auto;
  padding-top: var(--space-3);
  position: sticky;
  bottom: 0;
  background: var(--bg-elevated);
  z-index: 5;
}


/* ============================================================
   Spec Form
   ============================================================ */
.elevators-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.elevator-form {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}

.elevator-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-base);
}

.btn-icon {
  background: transparent;
  border: 1px solid var(--border-default);
  padding: 4px 10px;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.btn-icon:hover { background: var(--bg-hover); }
.btn-danger-text {
  color: var(--danger);
  border-color: var(--danger);
}
.btn-danger-text:hover { background: var(--danger-soft); }

.system-fields {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin: var(--space-2) 0 var(--space-3);
  border-right: 3px solid var(--accent);
}

.field-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 700px) {
  .field-row-3 { grid-template-columns: 1fr; }
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
}
@media (max-width: 600px) {
  .checkbox-grid { grid-template-columns: 1fr; }
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-primary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
}
.checkbox-item:hover { background: var(--bg-hover); }
.checkbox-item input[type="checkbox"] {
  cursor: pointer;
}

/* ============================================================
   Spec Summary (read-only display on site detail)
   ============================================================ */
.spec-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-base);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.spec-summary-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.spec-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.elevators-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 760px) {
  .elevators-list { grid-template-columns: 1fr; }
}

.elevator-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
}
.elevator-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.elevator-card-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.elevator-card-body .info-row {
  border-bottom: 1px dashed var(--border-subtle);
  padding-bottom: var(--space-2);
}
.elevator-card-body .info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* ============================================================
   Shuttle per-floor lengths
   ============================================================ */
.shuttle-lengths-section {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin: var(--space-2) 0 var(--space-3);
  border-right: 3px solid #d97706;
}
.floor-lengths-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: var(--space-2);
}
.floor-length-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.floor-length-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}
.floor-length-item input {
  padding: 6px 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-sm);
  text-align: center;
}
.floor-length-item input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-muted);
}

/* Acoustic components section */
.acoustic-components-section {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: var(--space-3);
  margin: var(--space-2) 0 var(--space-3);
  border-right: 3px solid #ec4899;
}

/* ============================================================
   Tasks Section
   ============================================================ */
.time-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.time-summary-card {
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  border-right: 4px solid transparent;
}
.time-summary-card.mech { border-right-color: #2563eb; }
.time-summary-card.ctrl { border-right-color: #d97706; }
.time-summary-card.int { border-right-color: #16a34a; }
.time-summary-card.total {
  border-right-color: var(--accent);
  background: var(--accent-muted);
}

.ts-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 600;
  margin-bottom: 4px;
}
.ts-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.ts-value small {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-muted);
  margin-right: 4px;
}

.phase-section {
  margin-bottom: var(--space-5);
}
.phase-section:last-child { margin-bottom: 0; }

.phase-header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-base);
  border-right: 4px solid;
  border-radius: var(--radius-sm);
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.phase-task-count {
  margin-right: auto;
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-weight: 500;
}

.tasks-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  gap: var(--space-3);
}
.task-item:hover { background: var(--bg-hover); }

.task-item-main {
  flex: 1;
  min-width: 0;
}
.task-item-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-primary);
}
.task-item-notes {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

.task-item-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-shrink: 0;
}

.task-days {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

@media (max-width: 600px) {
  .task-item {
    flex-direction: column;
    align-items: flex-start;
  }
  .task-item-meta {
    width: 100%;
    justify-content: space-between;
  }
}

/* ============================================================
   Teams Page
   ============================================================ */
.teams-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-3);
}

.team-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-right: 4px solid;
  border-radius: var(--radius-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.team-card.inactive { opacity: 0.55; }

.team-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border-subtle);
}
.team-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: var(--text-base);
}
.team-color-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  flex-shrink: 0;
}
.team-priority {
  font-size: var(--text-xs);
  color: var(--text-muted);
  background: var(--bg-base);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

.team-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--text-sm);
}
.team-info-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}
.team-info-label { color: var(--text-muted); }

.team-card-actions {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
}
.team-card-actions .btn {
  flex: 1;
  font-size: var(--text-xs);
  padding: 6px;
}

/* Color picker */
.color-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}
.color-swatch {
  height: 36px;
  border: 2px solid #ccc;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  transition: all 0.15s;
}
.color-swatch:hover { transform: scale(1.05); }
.color-swatch.active {
  border-width: 3px;
  border-color: #000;
  transform: scale(1.08);
}

/* ============================================================
   Weekly Board
   ============================================================ */
.board-header {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.board-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}
.week-nav {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.week-label {
  font-weight: 600;
  font-size: var(--text-sm);
  background: var(--bg-base);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.board-controls {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.chip-stat {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  background: var(--bg-base);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}
.chip-stat strong { color: var(--text-primary); }
.mode-toggle { display: flex; gap: 4px; margin-right: auto; }
.mode-toggle .btn { font-size: var(--text-xs); padding: 4px 10px; }

/* Board table */
.board-wrap {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: auto;
  box-shadow: var(--shadow-sm);
}
.board-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 720px;
}
.board-table th, .board-table td {
  border: 1px solid var(--border-subtle);
  padding: 0;
  vertical-align: middle;
  text-align: center;
}
.board-table thead th {
  background: var(--bg-base);
  font-weight: 700;
  padding: 8px 4px;
  font-size: var(--text-sm);
  position: sticky;
  top: 0;
  z-index: 5;
}
.board-table .site-col { width: 180px; text-align: right; }
.board-table .day-col { width: auto; }
.day-name { font-size: var(--text-sm); font-weight: 700; }
.day-date { font-size: var(--text-xs); color: var(--text-muted); margin-top: 2px; }

.site-cell {
  text-align: right !important;
  padding: 8px 12px !important;
  font-weight: 700;
  font-size: var(--text-sm);
  background: var(--bg-base);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.board-cell {
  height: auto;
  min-height: 56px;
  cursor: pointer;
  transition: background 0.1s;
  padding: 4px 6px !important;
  vertical-align: top !important;
}
.board-cell.empty {
  background: var(--bg-surface);
}
.board-cell.empty:hover {
  background: var(--bg-hover);
}
.board-cell.team {
  font-weight: 700;
  color: #000;
}
.cell-team-name {
  font-size: var(--text-sm);
  font-weight: 700;
}
.cell-note {
  font-size: var(--text-xs);
  margin-top: 2px;
  opacity: 0.85;
  font-weight: 500;
}
.cell-note-only {
  font-size: var(--text-xs);
  font-weight: 600;
  color: #000;
  padding: 4px;
}

/* View mode - disable cell hover/cursor */
.board-cell:not(.empty) {
  cursor: pointer;
}

/* Site picker modal */
.site-pick-list {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  background: var(--bg-base);
}
.site-pick-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.1s;
}
.site-pick-item:last-child { border-bottom: none; }
.site-pick-item:hover { background: var(--bg-hover); }

/* Assign modal */
.assign-summary {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: var(--text-sm);
}

/* btn-icon */
.btn-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 18px;
  color: var(--text-secondary);
}
.btn-icon:hover { background: var(--bg-hover); }

/* ============================================================
   v0.6.1 - Multiple rows per site, clipboard, holidays
   ============================================================ */
.site-cell-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
}
.site-cell-address {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.site-row-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 50%;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  padding: 0;
}
.site-row-btn:hover { background: var(--accent-muted); color: var(--accent); }
.site-row-btn.remove:hover { background: var(--danger-soft); color: var(--danger); }
.row-remove-cell {
  width: 30px;
  background: var(--bg-base);
  padding: 0 !important;
}

/* Selected & copied cells */
.board-cell.selected {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
  position: relative;
  z-index: 2;
}
.board-cell.copied {
  outline: 3px dashed #d97706;
  outline-offset: -3px;
}

/* Clipboard bar */
.clipboard-bar {
  margin-top: var(--space-2);
  padding: 6px 12px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
}
.clipboard-status { flex: 1; color: var(--text-muted); }
.clipboard-status.active { color: #d97706; font-weight: 600; }
.btn-sm { font-size: var(--text-xs); padding: 3px 8px; }

/* Holiday header */
.board-table .day-col {
  position: relative;
}
.board-table .day-col[data-edit-holiday] {
  cursor: pointer;
}
.board-table .day-col[data-edit-holiday]:hover {
  background: var(--accent-muted) !important;
}
.board-table .day-col[data-edit-holiday]:not(.is-holiday)::after {
  content: '🕎 +';
  position: absolute;
  bottom: 2px;
  right: 4px;
  font-size: 9px;
  color: var(--text-muted);
  opacity: 0;
  transition: opacity 0.15s;
}
.board-table .day-col[data-edit-holiday]:hover::after {
  opacity: 0.8;
}
.board-table .day-col.is-holiday {
  cursor: pointer;
}
.day-holiday {
  font-size: 11px;
  font-weight: 700;
  margin-top: 3px;
  color: #000;
  background: rgba(0,0,0,0.08);
  padding: 1px 6px;
  border-radius: 4px;
  display: inline-block;
}

/* Holidays modal */
.holidays-list {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}
.holiday-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: var(--text-sm);
}
.holiday-item:last-child { border-bottom: none; }
.holiday-item small { color: #555; }

/* ============================================================
   v0.7 - Teams list (vertical, draggable)
   ============================================================ */
.teams-list-header {
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.teams-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.team-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all 0.15s;
  cursor: default;
}
.team-row:hover { background: var(--bg-hover); }
.team-row.inactive { opacity: 0.55; }
.team-row.dragging { opacity: 0.4; }

.team-row.drag-over-top { box-shadow: 0 -3px 0 var(--accent) inset; }
.team-row.drag-over-bottom { box-shadow: 0 3px 0 var(--accent) inset; }

.team-row-grip {
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: -2px;
  cursor: grab;
  user-select: none;
  font-size: 14px;
  padding: 0 2px;
}
.team-row[draggable="true"] .team-row-grip:hover {
  color: var(--text-primary);
}

.team-row-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.team-row-name {
  font-weight: 700;
  font-size: var(--text-base);
  min-width: 80px;
}

.team-row-leader {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.team-row-phone {
  font-size: var(--text-sm);
  color: var(--accent);
}

.team-row-priority-input {
  margin-right: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.team-row-priority-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
}
.team-priority-input {
  width: 60px;
  padding: 4px 8px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: var(--text-sm);
  text-align: center;
}

.team-row-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.team-row-action:hover { background: var(--bg-hover); }
.team-row-action.danger:hover { background: var(--danger-soft); color: var(--danger); }

.team-add-row {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: var(--space-2);
  align-items: stretch;
}
.team-add-name {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.team-add-priority {
  width: 90px;
  padding: 8px 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  font-size: var(--text-sm);
  text-align: center;
  color: var(--text-primary);
}
.team-add-name:focus, .team-add-priority:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}

.teams-inactive-section {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.teams-inactive-section summary {
  cursor: pointer;
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-weight: 600;
  padding: 6px 0;
}

@media (max-width: 700px) {
  .team-row { flex-wrap: wrap; gap: 8px; }
  .team-row-priority-input { order: 10; width: 100%; margin-right: 0; }
  .team-row-leader, .team-row-phone { font-size: var(--text-xs); }
}

/* ============================================================
   v0.7 - Transports
   ============================================================ */
.transports-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.transport-date-group {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.transport-date-header {
  background: var(--bg-base);
  padding: 8px 14px;
  font-weight: 700;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.transport-items {
  display: flex;
  flex-direction: column;
}

.transport-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.transport-item:last-child { border-bottom: none; }
.transport-item.has-escort { background: #fffbeb; }

.transport-item-main {
  flex: 1;
  min-width: 0;
}
.transport-item-site {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.transport-item-details {
  font-size: var(--text-sm);
  color: var(--text-primary);
}
.transport-item-notes {
  color: var(--text-secondary);
  font-weight: 400;
}
.transport-escort-badge {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #fde68a;
  color: #7a4000;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  border: 1px solid #d97706;
}

.transport-item-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

/* Cell transports on board */
.cell-transports {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cell-transport-badge {
  font-size: 11px;
  font-weight: 600;
  background: #fef3c7;
  color: #7a4000;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 3px 6px;
  text-align: right;
  line-height: 1.3;
}
.cell-transport-badge.has-escort {
  background: #fde68a;
  border-color: #d97706;
  color: #7a2a00;
  font-weight: 700;
}
.ctb-line {
  font-weight: 700;
}
.ctb-details {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 1px;
  white-space: pre-wrap;
  word-break: break-word;
}

.board-cell.has-transport {
  background: #fffbeb;
}

/* ============================================================
   v0.7 - Dashboard
   ============================================================ */
.dashboard-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.dashboard-kpi-card {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s;
  position: relative;
}
.dashboard-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.dashboard-kpi-card.primary {
  border-right: 4px solid var(--accent);
}
.dashboard-kpi-card.highlight {
  border-right: 4px solid #f59e0b;
  background: linear-gradient(to right, #fffbeb, var(--bg-surface));
}

.kpi-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.kpi-content { flex: 1; min-width: 0; }
.kpi-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}
.kpi-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 4px;
}
.kpi-sub {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.kpi-sub.warning {
  color: #d97706;
  font-weight: 600;
}

/* Task status bar */
.task-status-bar {
  display: flex;
  height: 24px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: var(--space-2);
  border: 1px solid var(--border-subtle);
}
.task-status-segment.muted { background: #d1d5db; }
.task-status-segment.info { background: #3b82f6; }
.task-status-segment.success { background: #16a34a; }
.task-status-segment.danger { background: #dc2626; }

.task-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}
.legend-item .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-item .dot.muted { background: #d1d5db; }
.legend-item .dot.info { background: #3b82f6; }
.legend-item .dot.success { background: #16a34a; }
.legend-item .dot.danger { background: #dc2626; }

/* Alert card for stuck tasks */
.card.alert-card {
  border-right: 4px solid var(--danger);
  background: linear-gradient(to right, #fef2f2, var(--bg-surface));
}

.stuck-tasks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stuck-task-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
}
.stuck-task-item:hover {
  background: var(--bg-hover);
  border-color: var(--danger);
}
.stuck-task-item small {
  color: var(--text-muted);
}
.stuck-task-reason {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-style: italic;
}

/* Two-column dashboard layout */
.dashboard-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
@media (max-width: 800px) {
  .dashboard-2col { grid-template-columns: 1fr; }
}

/* Today's assignments */
.today-assignments {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.today-asgn-item {
  padding: 8px 12px;
  background: var(--bg-base);
  border-right: 3px solid var(--border-default);
  border-radius: var(--radius-sm);
}
.today-asgn-team {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  color: #fff;
  font-size: var(--text-xs);
  font-weight: 700;
  margin-bottom: 4px;
}
.today-asgn-site {
  font-size: var(--text-sm);
  font-weight: 600;
}
.today-asgn-note {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 2px;
}

/* Upcoming transports */
.upcoming-transports {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.upcoming-transport-item {
  display: flex;
  gap: var(--space-3);
  padding: 8px 12px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}
.upcoming-transport-item.has-escort {
  background: #fffbeb;
  border-color: #f59e0b;
}
.ut-date {
  font-size: var(--text-xs);
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 64px;
}
.ut-content { flex: 1; }
.ut-site {
  font-size: var(--text-sm);
  font-weight: 600;
}
.ut-carrier {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* Active sites progress list */
.active-sites-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.active-site-item {
  display: block;
  padding: 10px 14px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s;
}
.active-site-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.active-site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.active-site-pct {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--accent);
}
.progress-bar {
  height: 6px;
  background: var(--bg-surface);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 6px;
}
.progress-bar-fill {
  height: 100%;
  background: linear-gradient(to left, var(--accent), #60a5fa);
  border-radius: 3px;
  transition: width 0.3s;
}
.active-site-stats {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}
.active-site-stats .danger { color: var(--danger); font-weight: 600; }

/* Task status modal */
.task-status-modal { max-width: 540px; }
.task-modal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--space-4);
  padding: 10px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
}

.status-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.status-option {
  padding: 10px 14px;
  border: 2px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
}
.status-option:hover { background: var(--bg-hover); }
.status-option.active {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent);
}

.task-status-chip {
  cursor: pointer;
  border: 0;
  font-family: inherit;
}
.task-status-chip:hover {
  filter: brightness(0.95);
}

.task-item-stuck {
  margin-top: 6px;
  padding: 6px 8px;
  background: #fef2f2;
  border-right: 3px solid var(--danger);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: #991b1b;
}
.task-item-actual {
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: 4px;
}

/* ============================================================
   v0.7.2 - Inline transports in assign modal
   ============================================================ */
.assign-modal {
  max-width: 600px;
}

.transports-section {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-default);
}
.transports-section-title {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}
.modal-transports-empty {
  padding: 10px;
  text-align: center;
  color: var(--text-muted);
  font-size: var(--text-xs);
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}

.transport-entry {
  position: relative;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-bottom: var(--space-2);
}

.transport-entry-remove {
  position: absolute;
  top: 6px;
  left: 6px;
  width: 22px;
  height: 22px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.transport-entry-remove:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.tr-escort-row {
  margin-top: 4px;
}

/* ============================================================
   v0.8 - Employees
   ============================================================ */
.employees-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.employee-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}
.employee-row:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}
.employee-row.inactive {
  opacity: 0.55;
}

.emp-row-main {
  flex: 1;
  min-width: 0;
}
.emp-row-name {
  font-weight: 700;
  font-size: var(--text-base);
  display: flex;
  align-items: center;
  gap: 6px;
}
.emp-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-top: 4px;
}
.emp-row-id { color: var(--text-muted); }
.emp-row-phone { color: var(--accent); }
.emp-row-team {
  padding: 1px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
}
.emp-row-alerts {
  margin-top: 4px;
}
.emp-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}
.emp-badge.warning { background: #fef3c7; color: #92400e; border: 1px solid #f59e0b; }
.emp-badge.danger { background: #fef2f2; color: #991b1b; border: 1px solid var(--danger); }

.emp-row-docs {
  flex-shrink: 0;
}
.emp-docs-score {
  font-size: var(--text-xs);
  font-weight: 700;
}
.chip.warning { background: #fef3c7; color: #92400e; border: 1px solid #fbbf24; }

.emp-row-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.emp-row-action {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}
.emp-row-action:hover { background: var(--bg-hover); }
.emp-row-action.danger:hover { background: var(--danger-soft); color: var(--danger); }

/* Employee modal form sections */
.employee-modal { max-width: 600px; }
.employee-modal .form-section {
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}
.employee-modal .form-section:last-of-type {
  border-bottom: none;
}
.form-section-title {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.doc-group {
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: var(--space-2);
}

/* Employee alerts on list page */
.emp-alert-section {
  padding: 6px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.emp-alert-section strong {
  font-size: var(--text-sm);
  margin-left: 6px;
}
.emp-alert-chip {
  font-size: var(--text-xs);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 600;
}
.emp-alert-chip.warning { border: 1px solid #f59e0b; background: #fef3c7; color: #7a4000; }
.emp-alert-chip.danger { border: 1px solid var(--danger); background: #fef2f2; color: #991b1b; }

/* ============================================================
   v0.8.2 - Employee file uploads
   ============================================================ */

/* File section in modal (edit mode) */
.doc-file-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}

.doc-file-preview {
  display: flex;
  align-items: center;
  gap: 12px;
}

.doc-file-thumbnail {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  border: 1.5px solid var(--border-default);
  cursor: pointer;
  background: #fff;
}
.doc-file-thumbnail:hover {
  border-color: var(--accent);
}

.doc-file-pdf {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px;
  border: 1.5px solid var(--border-default);
  border-radius: 8px;
  background: #fff;
  min-width: 70px;
  text-align: center;
}

.doc-file-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.doc-file-actions .btn {
  font-size: 12px;
  padding: 4px 10px;
}
.doc-file-actions label.btn {
  margin: 0;
  cursor: pointer;
}

.doc-file-upload {
  margin-top: 6px;
}
.doc-file-upload .upload-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-muted);
  color: var(--accent);
  border: 1.5px dashed var(--accent);
  cursor: pointer;
  padding: 8px 16px;
  font-weight: 600;
}
.doc-file-upload .upload-btn:hover {
  background: var(--accent);
  color: #fff;
}

.doc-file-uploading {
  padding: 12px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 13px;
  background: var(--bg-base);
  border-radius: 6px;
}

/* Detail page docs list */
.docs-detail-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.doc-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg-base);
  border-radius: 8px;
  border: 1px solid var(--border-subtle);
}

.doc-detail-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.doc-detail-label {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
}

.doc-detail-file {
  flex-shrink: 0;
}
.doc-detail-file.no-file {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

.doc-detail-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  border: 1.5px solid var(--border-default);
  cursor: pointer;
  background: #fff;
}
.doc-detail-thumbnail:hover {
  border-color: var(--accent);
  transform: scale(1.05);
  transition: transform 0.15s;
}

.doc-pdf-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--bg-surface);
  border: 1.5px solid var(--border-default);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 600;
}
.doc-pdf-link:hover {
  border-color: var(--accent);
  background: var(--accent-muted);
  color: var(--accent);
}

/* ============================================================
   v0.9 - Safety Briefings
   ============================================================ */
.briefings-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.briefing-date-group {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.briefing-date-header {
  background: var(--bg-base);
  padding: 8px 14px;
  font-weight: 700;
  font-size: var(--text-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.briefing-items {
  display: flex;
  flex-direction: column;
}

.briefing-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: background 0.15s;
}
.briefing-item:last-child { border-bottom: none; }
.briefing-item:hover { background: var(--bg-hover); }
.briefing-item.warning { background: #fffbeb; }
.briefing-item.warning:hover { background: #fef3c7; }

.briefing-item-status { font-size: 24px; flex-shrink: 0; }
.briefing-status-ok { color: var(--success); }
.briefing-status-warn { color: #d97706; }

.briefing-item-main { flex: 1; min-width: 0; }
.briefing-item-site {
  font-weight: 700;
  font-size: var(--text-sm);
  margin-bottom: 2px;
}
.briefing-item-meta {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.briefing-item-notes { font-style: italic; color: var(--text-muted); }

.briefing-item-actions { flex-shrink: 0; }

/* Attended employees in form */
.attended-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 4px;
}
.attended-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: var(--text-sm);
}
.attended-item:hover { background: var(--bg-hover); }
.attended-item input { width: 16px; height: 16px; cursor: pointer; }

/* Checklist form */
.checklist-form {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checklist-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.15s;
}
.checklist-item:has(input:checked) {
  background: #f0fdf4;
  border-color: var(--success);
}
.checklist-item input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}
.checklist-num {
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 24px;
  font-size: var(--text-sm);
}
.checklist-text {
  flex: 1;
  font-size: var(--text-sm);
  line-height: 1.4;
}

.checklist-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
}

/* Detail page */
.attended-display {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.checklist-display {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.checklist-display-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  border-right: 3px solid var(--border-default);
}
.checklist-display-item.ok { border-right-color: var(--success); }
.checklist-display-item.missing { border-right-color: var(--danger); background: #fef2f2; }
.checklist-icon { font-size: 18px; flex-shrink: 0; }

/* Editor */
.checklist-editor {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.checklist-editor-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}
.checklist-editor-num {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  min-width: 20px;
}
.checklist-editor-input {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: var(--text-sm);
}
.checklist-editor-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-muted);
}
.checklist-add-row {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px dashed var(--border-default);
  display: flex;
  gap: var(--space-2);
}
.checklist-add-row .filter-input { flex: 1; }

/* ============================================================
   v0.9.1 - Pending file picker (during employee creation)
   ============================================================ */
.pending-file-name:not(:empty) {
  background: #f0fdf4;
  border: 1px solid var(--success, #16a34a);
  padding: 6px 10px;
  border-radius: 6px;
  display: inline-block;
}

/* ============================================================
   v0.9.2 - Doc titles + date preview
   ============================================================ */
.doc-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.date-preview {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}
.date-preview:empty {
  display: none;
}

/* ============================================================
   v0.9.2 - Safety document display (read-only)
   ============================================================ */
.safety-document-display {
  background: #fefce8;
  border: 1px solid #facc15;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
  line-height: 1.6;
}

.safety-doc-intro {
  font-weight: 600;
  margin: 0 0 12px;
  color: #713f12;
}

.safety-doc-subhead {
  font-weight: 600;
  margin: 12px 0 8px;
  color: #422006;
}

.safety-doc-list {
  margin: 0 24px 12px 0;
  padding: 0;
  list-style-position: inside;
  list-style-type: decimal;
}
.safety-doc-list li {
  margin: 4px 0;
  font-size: 14px;
  color: #422006;
}

.safety-doc-footnote {
  margin: 12px 0 0;
  padding-top: 10px;
  border-top: 1px dashed #d4a017;
  font-size: 12px;
  color: #713f12;
  font-style: italic;
}

.briefing-confirm-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #f0fdf4;
  border: 2px solid #22c55e;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  color: #14532d;
  transition: all 0.15s;
}
.briefing-confirm-box:hover {
  background: #dcfce7;
}
.briefing-confirm-box:has(input:checked) {
  background: #22c55e;
  color: white;
}
.briefing-confirm-box input {
  width: 20px;
  height: 20px;
  cursor: pointer;
  flex-shrink: 0;
}

/* ============================================================
   v0.10.0 - Board context menu
   ============================================================ */
.board-context-menu {
  background: var(--bg-surface, #fff);
  border: 1px solid var(--border-default, #d4d4d4);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  padding: 6px 0;
  min-width: 160px;
  font-size: 14px;
}
.board-context-menu button {
  display: block;
  width: 100%;
  padding: 8px 16px;
  text-align: right;
  background: none;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  color: var(--text-primary);
}
.board-context-menu button:hover:not(:disabled) {
  background: var(--bg-hover, #f5f5f5);
}
.board-context-menu button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.board-cell.copied {
  outline: 2px dashed var(--accent, #2563eb);
  outline-offset: -2px;
}

/* ============================================================
   v0.10.0 - Issues (field problem reports)
   ============================================================ */
.filters-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg-surface);
  border-radius: 8px;
  border: 1px solid var(--border-default);
}
.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}
.filter-pills {
  display: flex;
  gap: 4px;
}
.filter-pill {
  padding: 4px 10px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  border-radius: 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.15s;
}
.filter-pill:hover {
  background: var(--bg-hover);
}
.filter-pill.active {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.filter-select {
  padding: 4px 10px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  background: var(--bg-surface);
  color: var(--text-primary);
}

.badge-urgent {
  display: inline-block;
  background: #fee2e2;
  color: #991b1b;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  margin-right: 6px;
}

.issues-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.issue-card {
  display: block;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.15s;
}
.issue-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.issue-card.is-urgent.is-open {
  border-right: 4px solid #dc2626;
}
.issue-card.is-closed {
  opacity: 0.7;
}

.issue-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 8px;
}

.issue-status-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}
.issue-status-badge.open {
  background: #fee2e2;
  color: #991b1b;
}
.issue-status-badge.closed {
  background: #d1fae5;
  color: #065f46;
}

.issue-priority-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  background: #f3f4f6;
  color: #4b5563;
}
.issue-priority-badge.urgent {
  background: #fef3c7;
  color: #92400e;
}

.issue-cat-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: #e0e7ff;
  color: #3730a3;
}

.issue-date {
  margin-right: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.issue-site {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 4px;
}

.issue-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.issue-description {
  padding: 12px 14px;
  background: var(--bg-hover);
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
  white-space: pre-wrap;
}

.issue-resolution {
  padding: 12px 14px;
  background: #f0fdf4;
  border-right: 3px solid #16a34a;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.5;
}

.issue-photo {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  display: block;
}

.issue-detail-meta {
  margin-bottom: 16px;
}

.issue-detail-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 6px;
}
.radio-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border-default);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.radio-item:hover {
  background: var(--bg-hover);
}
.radio-item:has(input:checked) {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
}
.radio-item.priority-urgent:has(input:checked) {
  border-color: #dc2626;
  background: #fef2f2;
}
.radio-item input {
  flex-shrink: 0;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty-state .empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
  opacity: 0.5;
}
.empty-state h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 4px;
  color: var(--text-secondary);
}
