/* ObsidiaDigital TSMS — Premium light SaaS */
@import url('https://fonts.googleapis.com/css2?family=Quicksand:wght@300;400;500;600;700&display=swap');

:root {
  --bg: #f4f7fb;
  --bg-soft: #eef3f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #1d4ed8;
  --primary-soft: #dbeafe;
  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #ffedd5;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0284c7;
  --info-soft: #e0f2fe;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.04);
  --radius: 14px;
  --radius-sm: 10px;
  --sidebar-w: 272px;
  --header-h: 68px;
  --font: 'Quicksand', sans-serif;
}

[data-theme="dark"] {
  --bg: #0b1220;
  --bg-soft: #111827;
  --surface: #111827;
  --surface-2: #1f2937;
  --border: #243044;
  --border-strong: #334155;
  --text: #f1f5f9;
  --text-2: #cbd5e1;
  --muted: #94a3b8;
  --primary: #60a5fa;
  --primary-soft: #1e3a5f;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
  font-family: 'Quicksand', sans-serif;
}

html, body, button, input, select, textarea, table, label, a, span, div, p,
h1, h2, h3, h4, h5, h6 {
  font-family: 'Quicksand', sans-serif !important;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-weight: 400;
  line-height: 1.5;
  min-height: 100%;
}

body {
  overflow: hidden;
}

h1, h2, h3 {
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.35rem;
}

h4, h5, h6 {
  font-weight: 600;
  margin: 0 0 0.25rem;
}

button, .nav-link, .sidebar-item {
  font-weight: 600;
}

input, select, textarea {
  font-weight: 500;
}

a { color: var(--primary); text-decoration: none; }

.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  height: 100vh;
  width: 100vw;
}

.sidebar {
  grid-row: 1 / span 2;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: transform .25s ease;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 4px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}

.brand img {
  height: 40px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  background: transparent;
  display: block;
  margin: 0 auto;
}

.brand-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

[data-theme="dark"] .brand img,
[data-theme="dark"] .login-card .logo,
[data-theme="dark"] .receipt img.logo {
  background: #ffffff;
  border-radius: 8px;
  padding: 6px 10px;
}

.sidebar-scroll {
  overflow: auto;
  padding: 12px;
  flex: 1;
}

.menu-group {
  margin-bottom: 14px;
}

.menu-group-title {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 10px;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--text-2);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s, transform .15s;
}

.sidebar-item:hover {
  background: var(--bg-soft);
  color: var(--text);
}

.sidebar-item.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.sidebar-item i {
  font-size: 1.1rem;
  width: 22px;
  text-align: center;
}

.header {
  grid-column: 2;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  z-index: 30;
}

[data-theme="dark"] .header {
  background: rgba(17,24,39,0.85);
}

.search-wrap {
  flex: 1;
  max-width: 520px;
  position: relative;
}

.search-wrap input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 12px;
  padding: 10px 14px 10px 40px;
  outline: none;
  color: var(--text);
}

.search-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .15s, background .15s;
}

.icon-btn:hover { background: var(--bg-soft); transform: translateY(-1px); }

.badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 6px 10px 6px 6px;
  cursor: pointer;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 0.75rem;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.user-meta strong { font-size: 0.85rem; font-weight: 700; }
.user-meta span { font-size: 0.72rem; color: var(--muted); font-weight: 500; }

.main {
  grid-column: 2;
  overflow: auto;
  padding: 20px;
  background:
    radial-gradient(1200px 400px at 10% -10%, rgba(37,99,235,0.06), transparent),
    radial-gradient(800px 300px at 90% 0%, rgba(8,145,178,0.05), transparent),
    var(--bg);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  font-weight: 400;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px 16px;
  transition: transform .15s, box-shadow .15s;
}

.kpi:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.kpi-label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}

.kpi-value {
  font-weight: 700;
  font-size: 1.35rem;
  margin-top: 4px;
  letter-spacing: -0.02em;
}

.kpi-foot {
  margin-top: 6px;
  font-size: 0.75rem;
  color: var(--muted);
}

.grid-2 { display: grid; grid-template-columns: 1.2fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 14px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.card-head h3 { font-size: 1rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 10px 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .12s, background .12s, box-shadow .12s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { box-shadow: 0 8px 18px rgba(29,78,216,0.25); }

.btn-secondary {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-2);
}

.btn-success { background: var(--success); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; color: var(--text-2); border-color: transparent; }
.btn-sm { padding: 7px 10px; font-size: 0.85rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 16px; font-size: 0.95rem; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

table.data th, table.data td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: 0.9rem;
  font-weight: 500;
}

table.data th {
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 600;
  position: sticky;
  top: 0;
}

table.data tr:hover td { background: var(--bg-soft); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--text-2);
}

.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }

.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.small-text, .helper-text { font-weight: 400; color: var(--muted); font-size: 0.85rem; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mb-12 { margin-bottom: 12px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.wrap { flex-wrap: wrap; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-span-2 { grid-column: span 2; }

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 6px;
}

.field input, .field select, .field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
}

.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

.field .error {
  color: var(--danger);
  font-size: 0.75rem;
  margin-top: 4px;
  font-weight: 500;
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
  padding-bottom: 8px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  font-weight: 600;
}

.tab.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding-left: 18px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--border);
}

.tl-item {
  position: relative;
  padding: 0 0 16px 14px;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--surface);
  box-shadow: 0 0 0 2px var(--primary-soft);
}

.tl-item strong { display: block; font-weight: 700; }
.tl-item .meta { color: var(--muted); font-size: 0.8rem; }

.modal-backdrop, .drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 80;
  display: none;
  opacity: 0;
  transition: opacity .2s;
}

.modal-backdrop.open, .drawer-backdrop.open {
  display: block;
  opacity: 1;
}

.modal {
  position: fixed;
  z-index: 90;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -48%) scale(0.98);
  width: min(920px, calc(100vw - 24px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  display: none;
  opacity: 0;
  transition: all .2s ease;
}

.modal.open {
  display: block;
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.modal-sm { width: min(480px, calc(100vw - 24px)); }
.modal-lg { width: min(1100px, calc(100vw - 24px)); }

.modal-head, .drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 2;
}

.modal-body, .drawer-body { padding: 18px; }
.modal-foot, .drawer-foot {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  position: sticky;
  bottom: 0;
  background: var(--surface);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(520px, 100vw);
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 90;
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
}

.drawer.open { transform: translateX(0); }
.drawer .drawer-body { overflow: auto; flex: 1; }

.toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  min-width: 260px;
  animation: slideIn .25s ease;
  font-weight: 600;
}

.toast.success { border-left-color: var(--success); }
.toast.warning { border-left-color: var(--warning); }
.toast.danger { border-left-color: var(--danger); }

@keyframes slideIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in { animation: fadeIn .25s ease; }

.skeleton {
  background: linear-gradient(90deg, var(--bg-soft), #fff, var(--bg-soft));
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
  height: 14px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
}

.empty h3 { color: var(--text); margin-bottom: 8px; }

.kanban {
  display: grid;
  grid-template-columns: repeat(8, minmax(220px, 1fr));
  gap: 12px;
  overflow: auto;
  padding-bottom: 8px;
}

.kanban-col {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  min-height: 420px;
}

.kanban-col h4 {
  font-size: 0.85rem;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
}

.kanban-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: grab;
  box-shadow: var(--shadow-sm);
}

.kanban-card:active { cursor: grabbing; }
.kanban-card .title { font-weight: 700; font-size: 0.85rem; }

.planning-board {
  display: grid;
  grid-template-columns: 240px repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  overflow: auto;
}

.plan-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  min-height: 480px;
}

.plan-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: grab;
}

.chat-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 560px;
  background: var(--surface);
}

.chat-side {
  border-right: 1px solid var(--border);
  background: var(--surface-2);
  overflow: auto;
}

.chat-side button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  font-weight: 600;
}

.chat-side button.active { background: var(--primary-soft); color: var(--primary); }

.chat-main {
  display: flex;
  flex-direction: column;
}

.chat-messages {
  flex: 1;
  overflow: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-bubble {
  display: flex;
  gap: 10px;
  max-width: 85%;
}

.chat-bubble .bubble {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px 12px;
}

.chat-bubble.me { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble.me .bubble { background: var(--primary-soft); border-color: transparent; }

.chat-input {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.chat-input input { flex: 1; }

.map-box {
  height: 520px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.tech-marker-dot {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.map-popup-head {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  min-width: 220px;
  display: none;
  z-index: 50;
  overflow: hidden;
}

.dropdown.open { display: block; }

.dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
  color: var(--text-2);
  font-weight: 600;
}

.dropdown button:hover { background: var(--bg-soft); }

.notif-panel {
  width: min(380px, calc(100vw - 24px));
  max-height: 420px;
  overflow: auto;
}

.notif-item {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}

.notif-item.unread { background: var(--primary-soft); }

.command-palette {
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 18%;
  transform: translateX(-50%);
  width: min(640px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  display: none;
}

.command-palette.open { display: block; animation: fadeIn .15s ease; }
.command-palette input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  padding: 16px;
  outline: none;
  font-size: 1rem;
  background: transparent;
  color: var(--text);
}

.command-list { max-height: 320px; overflow: auto; }
.command-list button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 12px 16px;
  cursor: pointer;
  color: var(--text-2);
  font-weight: 600;
}
.command-list button:hover, .command-list button.active { background: var(--bg-soft); color: var(--primary); }

.role-switch {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.role-switch button {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-2);
}

.role-switch button.active {
  background: var(--primary-soft);
  color: var(--primary);
  border-color: transparent;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.photo-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}

.photo-card img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  display: block;
  background: #e2e8f0;
}

.photo-card .meta { padding: 8px; font-size: 0.75rem; }

.signature-pad {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: #fff;
  width: 100%;
  height: 180px;
  touch-action: none;
}

.stars button {
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  cursor: pointer;
  color: #cbd5e1;
}

.stars button.on { color: #f59e0b; }

.receipt {
  background: #fff;
  color: #0f172a;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 16px;
  margin-bottom: 16px;
}

.receipt img.logo { height: 42px; }

.tech-mobile {
  display: none;
}

.mobile-nav {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 60;
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.mobile-nav button {
  border: 0;
  background: transparent;
  color: var(--muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 4px;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
}

.mobile-nav button.active { color: var(--primary); }
.mobile-nav i { font-size: 1.15rem; }

.menu-toggle { display: none; }

.login-gate {
  position: fixed;
  inset: 0;
  z-index: 200;
  background:
    radial-gradient(900px 400px at 20% 10%, rgba(37,99,235,0.12), transparent),
    radial-gradient(700px 300px at 80% 0%, rgba(8,145,178,0.1), transparent),
    var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.login-card {
  width: min(440px, 100%);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 28px;
  text-align: center;
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  gap: 6px;
}

.login-card .logo {
  height: 52px;
  width: auto;
  max-width: 260px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}

.login-brand-sub {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.login-card h2 {
  text-align: center;
}

.login-card .helper-text {
  text-align: center;
}

.login-card .field {
  text-align: left;
}

.progress-bar {
  height: 8px;
  background: var(--bg-soft);
  border-radius: 999px;
  overflow: hidden;
}

.progress-bar > span {
  display: block;
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
}

.sla-danger { color: var(--danger); font-weight: 700; }
.sla-warn { color: var(--warning); font-weight: 700; }

.leaflet-container, .leaflet-popup, .leaflet-tooltip,
.fc, .fc * {
  font-family: 'Quicksand', sans-serif !important;
}

/* FullCalendar light overrides */
.fc {
  --fc-border-color: var(--border);
  --fc-button-bg-color: var(--primary);
  --fc-button-border-color: var(--primary);
  --fc-button-hover-bg-color: #1e40af;
  --fc-button-hover-border-color: #1e40af;
  --fc-page-bg-color: var(--surface);
  --fc-neutral-bg-color: var(--surface-2);
  --fc-list-event-hover-bg-color: var(--bg-soft);
  --fc-today-bg-color: rgba(37, 99, 235, 0.08);
}
.fc .fc-toolbar-title { font-weight: 700; font-size: 1.1rem; }
.fc .fc-button { font-weight: 600; border-radius: 10px !important; text-transform: none; }

.theme-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.theme-card {
  text-align: left;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 14px;
  padding: 12px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  color: var(--text);
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.theme-card.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.theme-swatch {
  height: 72px;
  border-radius: 10px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border);
}

.theme-swatch span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

@media print {
  body * { visibility: hidden !important; }
  #print-area, #print-area * { visibility: visible !important; }
  #print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #fff;
    color: #000;
    padding: 0;
  }
  .no-print { display: none !important; }
}
