/* ===== CrewsOps v3 — Top-Nav Layout ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@600;700;800&display=swap');

:root {
  /* Accent */
  --amber:        #f59e0b;
  --amber-dark:   #d97706;
  --amber-light:  #fef3c7;
  --amber-muted:  #fffbeb;

  /* Dark chrome (nav bg) */
  --dark:         #0f172a;
  --dark-2:       #1e293b;
  --dark-3:       #334155;

  /* Semantic */
  --green:        #10b981;
  --green-dark:   #059669;
  --green-light:  #d1fae5;
  --green-bg:     #f0fdf9;
  --red:          #ef4444;
  --red-dark:     #dc2626;
  --red-light:    #fee2e2;
  --blue:         #3b82f6;
  --blue-light:   #dbeafe;
  --orange:       #f97316;
  --orange-light: #ffedd5;
  --purple:       #8b5cf6;
  --purple-light: #ede9fe;

  /* Surfaces */
  --bg:           #f1f5f9;
  --surface:      #ffffff;
  --surface-2:    #f8fafc;
  --border:       #e2e8f0;
  --border-2:     #cbd5e1;

  /* Text */
  --text:         #0f172a;
  --text-2:       #1e293b;
  --text-muted:   #64748b;
  --text-faint:   #94a3b8;

  /* Legacy aliases — keep inline var(--navy) etc. working */
  --navy:         #0f172a;
  --navy-dark:    #0f172a;
  --navy-light:   #1e293b;
  --gray:         #64748b;
  --gray-light:   #f1f5f9;
  --white:        #ffffff;

  /* Layout */
  --nav-h:        56px;
  --sidebar-w:    240px;
  --topbar-h:     56px;

  /* Radii */
  --r:      8px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  20px;
  --radius:    8px;
  --radius-lg: 12px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(15,23,42,.04);
  --shadow-sm: 0 1px 3px rgba(15,23,42,.07), 0 1px 2px rgba(15,23,42,.04);
  --shadow:    0 4px 6px rgba(15,23,42,.05), 0 2px 4px rgba(15,23,42,.04);
  --shadow-md: 0 8px 24px rgba(15,23,42,.09);
  --shadow-lg: 0 20px 60px rgba(15,23,42,.18);
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body { font-family: 'Inter', system-ui, sans-serif; color: var(--text); background: var(--bg); line-height: 1.55; display: flex; flex-direction: column; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
table { border-collapse: collapse; width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ===== Auth — Split Panel ===== */
.auth-body { min-height: 100vh; display: flex; flex-direction: row; }

.auth-panel-left {
  flex: 1;
  background: var(--dark);
  display: flex; align-items: center; justify-content: center;
  padding: 60px 56px;
  position: relative; overflow: hidden;
}
.auth-panel-left::before {
  content: ''; position: absolute;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(245,158,11,.13) 0%, transparent 65%);
  top: -120px; right: -120px; pointer-events: none;
}
.auth-panel-left::after {
  content: ''; position: absolute;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(16,185,129,.07) 0%, transparent 65%);
  bottom: -80px; left: -60px; pointer-events: none;
}
.auth-left-content { position: relative; z-index: 1; max-width: 380px; color: #fff; }
.auth-wordmark { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 38px; font-weight: 800; letter-spacing: -.5px; margin-bottom: 18px; }
.auth-wordmark em { color: var(--amber); font-style: normal; }
.auth-pitch { font-size: 17px; line-height: 1.7; color: rgba(255,255,255,.48); margin-bottom: 48px; }
.auth-perks { display: flex; flex-direction: column; gap: 14px; }
.auth-perk  { display: flex; align-items: center; gap: 14px; }
.perk-dot   { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); flex-shrink: 0; }
.perk-text  { font-size: 14px; color: rgba(255,255,255,.58); font-weight: 500; }

.auth-panel-right {
  width: 460px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 56px 48px; background: var(--surface);
}
.auth-form-inner { width: 100%; max-width: 340px; }
.auth-form-title { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 27px; font-weight: 800; color: var(--text); margin-bottom: 6px; letter-spacing: -.3px; }
.auth-form-sub   { font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.demo-box {
  background: var(--amber-muted); border: 1px solid var(--amber-light);
  border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 24px; font-size: 13px;
}
.demo-box strong { color: var(--amber-dark); display: block; margin-bottom: 3px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; }
.demo-box code { background: rgba(255,255,255,.8); padding: 1px 7px; border-radius: 4px; font-size: 12px; font-family: monospace; color: var(--text); }

/* ===== Top Navigation ===== */
.topnav {
  width: 100%;
  height: var(--nav-h);
  background: var(--dark);
  display: flex; align-items: center;
  padding: 0 28px; gap: 0;
  position: sticky; top: 0; z-index: 200;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.topnav-brand {
  display: flex; align-items: center;
  margin-right: 28px; flex-shrink: 0;
}
.topnav-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 20px; font-weight: 800;
  color: #fff; letter-spacing: -.2px; line-height: 1;
}
.topnav-logo em { color: var(--amber); font-style: normal; }

.topnav-links {
  display: flex; align-items: center;
  gap: 2px; flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.topnav-links::-webkit-scrollbar { display: none; }

.topnav-link {
  display: inline-flex; align-items: center;
  padding: 7px 12px;
  border-radius: var(--r);
  font-size: 13px; font-weight: 500;
  color: rgba(255,255,255,.48);
  white-space: nowrap; transition: all .14s;
  text-decoration: none; flex-shrink: 0;
}
.topnav-link:hover  { color: rgba(255,255,255,.85); background: rgba(255,255,255,.07); }
.topnav-link.active { color: var(--amber); background: rgba(245,158,11,.12); font-weight: 600; }

.topnav-sep {
  width: 1px; height: 16px;
  background: rgba(255,255,255,.1);
  margin: 0 6px; flex-shrink: 0;
}

.topnav-end {
  display: flex; align-items: center;
  gap: 10px; margin-left: 16px; flex-shrink: 0;
}

/* User details / dropdown */
.topnav-user { position: relative; }
.topnav-user summary { list-style: none; }
.topnav-user summary::-webkit-details-marker { display: none; }
.topnav-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px; font-weight: 800; color: var(--dark);
  cursor: pointer; flex-shrink: 0;
  border: 2px solid transparent; transition: border-color .14s;
}
.topnav-user[open] .topnav-avatar { border-color: var(--amber); }
.topnav-dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  min-width: 190px; padding: 8px;
  z-index: 300;
}
.topnav-dd-name { font-size: 13px; font-weight: 700; color: var(--text); padding: 8px 12px 2px; }
.topnav-dd-role { font-size: 11px; color: var(--text-muted); padding: 2px 12px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; text-transform: capitalize; }
.topnav-dd-item { display: block; padding: 8px 12px; font-size: 13px; color: var(--text-2); border-radius: var(--r); transition: background .12s; }
.topnav-dd-item:hover { background: var(--surface-2); }
.topnav-dd-signout { color: var(--red) !important; margin-top: 4px; border-top: 1px solid var(--border); padding-top: 10px; }

/* Hamburger — mobile only */
.topnav-burger {
  display: none; background: none; border: none;
  padding: 8px; border-radius: var(--r);
}
.topnav-burger span { display: block; width: 20px; height: 2px; background: rgba(255,255,255,.7); border-radius: 2px; margin: 4px 0; }
.topnav-mobile {
  display: none;
  background: var(--dark-2);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: 8px 20px 16px;
}
.topnav-mobile.open { display: block; }
.topnav-mobile .topnav-link { display: block; width: 100%; padding: 10px 12px; margin-bottom: 2px; }

/* ===== Layout ===== */
.layout { display: flex; flex-direction: column; min-height: 100vh; }
.sidebar { display: none; }

/* main-wrap is offset right by the fixed sidebar */
.main-wrap { flex: 1; display: flex; flex-direction: column; margin-left: var(--sidebar-w); }
.topbar { display: none; }

.main-content {
  flex: 1;
  padding: 36px 40px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
}

/* ===== Page Header ===== */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 28px; gap: 16px; }
.page-title  { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.4px; }
.page-sub    { font-size: 14px; color: var(--text-muted); margin-top: 4px; }
.breadcrumb  { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.breadcrumb span { margin: 0 6px; opacity: .4; }

/* ===== Stat Cards ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 28px; }
.stat-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  border: 1px solid var(--border);
  padding: 22px;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 14px; transition: box-shadow .18s, transform .18s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-body   { min-width: 0; flex: 1; }
.stat-label  { font-size: 11.5px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .07em; margin-bottom: 10px; }
.stat-value  { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 32px; font-weight: 800; color: var(--text); letter-spacing: -1px; line-height: 1; }
.stat-sub    { font-size: 12px; color: var(--text-muted); margin-top: 8px; }
.stat-icon-wrap { width: 46px; height: 46px; border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center; font-size: 21px; flex-shrink: 0; }
.sic-amber  { background: var(--amber-light); }
.sic-green  { background: var(--green-light); }
.sic-blue   { background: var(--blue-light); }
.sic-red    { background: var(--red-light); }
.sic-purple { background: var(--purple-light); }
.sic-orange { background: var(--orange-light); }

/* Legacy stat color classes (no-op) */
.stat-card::after { display: none; }

/* ===== Cards ===== */
.card { background: var(--surface); border-radius: var(--r-xl); border: 1px solid var(--border); }
.card-header { padding: 18px 22px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-title  { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 15px; font-weight: 700; color: var(--text); }
.card-body   { padding: 22px; }
.card-footer { padding: 14px 22px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }

/* ===== Grid ===== */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; }
.table th {
  padding: 11px 18px;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-muted); background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap; text-align: left;
}
.table td { padding: 13px 18px; font-size: 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background .1s; }
.table tbody tr:hover { background: var(--surface-2); }
[data-theme="dark"] .table tbody tr:hover { background: rgba(255,255,255,.04); }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.badge-green  { background: var(--green-light);  color: #065f46; }
.badge-blue   { background: var(--blue-light);   color: #1e40af; }
.badge-orange { background: var(--orange-light); color: #9a3412; }
.badge-red    { background: var(--red-light);    color: #991b1b; }
.badge-purple { background: var(--purple-light); color: #5b21b6; }
.badge-gray   { background: #f1f5f9;             color: #475569; }
.badge-navy   { background: #e0e7ff;             color: #3730a3; }
.badge-amber  { background: var(--amber-light);  color: #92400e; }

/* ===== Buttons ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; border-radius: var(--r); font-size: 14px; font-weight: 600; cursor: pointer; border: 1.5px solid transparent; transition: all .14s; white-space: nowrap; text-decoration: none; font-family: inherit; line-height: 1.2; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--amber); color: var(--dark); border-color: var(--amber); }
.btn-primary:hover { background: var(--amber-dark); border-color: var(--amber-dark); color: var(--dark); }
.btn-navy    { background: var(--dark); color: #fff; border-color: var(--dark); }
.btn-navy:hover { background: var(--dark-2); color: #fff; }
.btn-danger  { background: var(--red); color: #fff; border-color: var(--red); }
.btn-danger:hover { background: var(--red-dark); color: #fff; }
.btn-outline { background: transparent; color: var(--text-2); border-color: var(--border-2); }
.btn-outline:hover { background: var(--surface-2); }
.btn-ghost   { background: none; border: none; color: var(--text-muted); padding: 8px; }
.btn-ghost:hover { color: var(--text); background: var(--surface-2); border-radius: var(--r); }
.btn-sm  { padding: 6px 13px; font-size: 12.5px; }
.btn-xs  { padding: 3px 9px; font-size: 11.5px; }
.btn-block, .w-full { width: 100%; justify-content: center; display: flex; }
.btn-icon { padding: 8px; }

/* Theme toggle */
.btn-theme {
  width: 34px; height: 34px;
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  color: var(--text-muted);
  font-size: 15px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; flex-shrink: 0;
  transition: all .14s;
}
.btn-theme:hover { background: var(--amber-light); border-color: var(--amber); color: var(--amber-dark); }

/* ===== Forms ===== */
.form-group { margin-bottom: 16px; }
.form-row   { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
.form-row-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.form-control {
  width: 100%; padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: 14px; color: var(--text); background: var(--surface);
  transition: border-color .14s, box-shadow .14s;
  outline: none; font-family: inherit;
}
.form-control:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.22); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-hint  { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.required::after { content: ' *'; color: var(--red); }

/* ===== Alerts ===== */
.alert { padding: 12px 16px; border-radius: var(--r-lg); font-size: 14px; margin-bottom: 20px; border: 1.5px solid; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--green-light); color: #065f46; border-color: #a7f3d0; }
.alert-danger  { background: var(--red-light);   color: #991b1b; border-color: #fca5a5; }
.alert-warning { background: var(--amber-light); color: #92400e; border-color: var(--amber); }
.alert-info    { background: var(--blue-light);  color: #1e40af; border-color: #93c5fd; }

/* ===== Toast ===== */
#toast-container { position: fixed; bottom: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; pointer-events: none; }
.toast { background: var(--dark); color: #fff; padding: 13px 18px; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); font-size: 14px; font-weight: 500; max-width: 320px; animation: slideUp .25s ease; border-left: 4px solid var(--amber); pointer-events: all; }
.toast.error { border-left-color: var(--red); }
.toast.warn  { border-left-color: var(--orange); }
@keyframes slideUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Modal ===== */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 500; align-items: center; justify-content: center; padding: 20px; backdrop-filter: blur(3px); }
.modal-overlay.open { display: flex; animation: fadeIn .18s ease; }
.modal { background: var(--surface); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); width: 560px; max-width: 96vw; max-height: 90vh; display: flex; flex-direction: column; animation: scaleIn .18s ease; }
.modal-lg { width: 760px; }
.modal-sm { width: 420px; }
.modal-header { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.modal-title  { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; font-weight: 700; }
.modal-close  { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--text-muted); padding: 4px 8px; border-radius: 6px; line-height: 1; }
.modal-close:hover { background: var(--surface-2); color: var(--text); }
.modal-body   { padding: 24px; overflow-y: auto; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-shrink: 0; }
@keyframes fadeIn  { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }

/* ===== Filters & Search ===== */
.filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.search-input {
  flex: 1; min-width: 200px;
  padding: 9px 13px;
  border: 1.5px solid var(--border); border-radius: var(--r);
  font-size: 14px; outline: none; font-family: inherit; background: var(--surface);
}
.search-input:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(245,158,11,.18); }

.filter-tabs {
  display: flex; gap: 3px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 4px;
}
.filter-tab { padding: 6px 16px; border-radius: var(--r); font-size: 13px; font-weight: 600; cursor: pointer; border: none; background: transparent; color: var(--text-muted); transition: all .14s; }
.filter-tab:hover  { color: var(--text); background: rgba(15,23,42,.04); }
.filter-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); border: 1px solid var(--border); }

/* Tab bar (settings style) */
.tab-bar  { display: flex; border-bottom: 2px solid var(--border); margin-bottom: 24px; }
.tab-item { padding: 11px 20px; font-size: 14px; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .14s; }
.tab-item:hover { color: var(--text); }
.tab-item.active { color: var(--amber-dark); border-bottom-color: var(--amber); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ===== Line Items ===== */
.line-items th { background: var(--surface-2); padding: 9px 10px; font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--border); text-align: left; }
.line-items td { padding: 7px 6px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.line-items input, .line-items select { padding: 7px 9px; border: 1.5px solid var(--border); border-radius: var(--r); font-size: 13px; width: 100%; font-family: inherit; }
.line-items input:focus, .line-items select:focus { border-color: var(--amber); outline: none; }
.li-total { text-align: right; font-weight: 600; padding-right: 12px !important; }

/* ===== Totals Block ===== */
.totals-wrap   { display: flex; justify-content: flex-end; }
.totals-block  { width: 280px; margin-left: auto; }
.totals-row    { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; border-bottom: 1px solid var(--border); }
.totals-total  { font-size: 17px; font-weight: 700; border-bottom: none; padding-top: 10px; }
.totals-grand  { font-size: 18px; font-weight: 800; border: none; color: var(--dark); }
.print-header  { display:flex; justify-content:space-between; align-items:flex-start; margin-bottom:24px; padding-bottom:20px; border-bottom:2px solid var(--border); }
.print-parties { display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:24px; font-size:14px; }

/* ===== Print / Invoice Doc ===== */
.print-doc   { max-width: 760px; margin: 0 auto; background: var(--surface); border-radius: var(--r-xl); overflow: hidden; border: 1px solid var(--border); }
.print-inner { padding: 48px; }
.doc-header  { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 40px; }
.doc-logo    { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 26px; font-weight: 800; color: var(--dark); }
.doc-logo span, .doc-logo em { color: var(--amber); font-style: normal; }
.doc-title-block { text-align: right; }
.doc-type    { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 34px; font-weight: 800; color: var(--dark); letter-spacing: -1px; }
.doc-meta    { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.7; }
.doc-parties { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 32px; }
.doc-to-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); margin-bottom: 6px; }
.doc-to-name  { font-size: 17px; font-weight: 700; }
.doc-to-info  { font-size: 13px; color: var(--text-muted); margin-top: 3px; }
.doc-items th { background: var(--dark); color: #fff; padding: 11px 14px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
.doc-items td { padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 14px; }
.doc-items tr:last-child td { border: none; }
.doc-totals   { margin-left: auto; width: 260px; margin-top: 24px; }
.doc-totals .row  { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.doc-totals .grand { font-size: 18px; font-weight: 800; color: var(--dark); border: none; }
.doc-notes   { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-muted); }
.doc-notes strong { color: var(--text); }

/* ===== Chart ===== */
.chart-wrap { position: relative; height: 240px; }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 56px 24px; }
.empty-icon  { font-size: 52px; margin-bottom: 16px; opacity: .18; display: block; }
.empty-state h3 { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.empty-state p  { font-size: 14px; color: var(--text-muted); margin-bottom: 20px; }

/* Inline table empty message */
.table-empty { text-align: center; padding: 36px 16px; color: var(--text-muted); font-size: 14px; }

/* ===== Detail Grid ===== */
.detail-grid  { display: grid; grid-template-columns: 1fr 1fr; }
.detail-item  { padding: 13px 18px; border-bottom: 1px solid var(--border); }
.detail-item:nth-child(odd) { border-right: 1px solid var(--border); }
.detail-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-bottom: 4px; }
.detail-value { font-size: 14px; }

/* ===== Status dots ===== */
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-green { background: var(--green); }
.dot-amber, .dot-orange { background: var(--amber); }
.dot-red   { background: var(--red); }
.dot-blue  { background: var(--blue); }
.dot-gray  { background: var(--text-faint); }

/* ===== Misc ===== */
.scroll-y { overflow-y: auto; }
.max-h-400 { max-height: 400px; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ===== Utilities ===== */
.mb-0{margin-bottom:0}.mb-2{margin-bottom:8px}.mb-3{margin-bottom:16px}.mb-4{margin-bottom:24px}.mb-5{margin-bottom:32px}
.mt-2{margin-top:8px}.mt-3{margin-top:16px}.mt-4{margin-top:24px}
.me-2{margin-right:8px}.py-4{padding:24px 0}
.d-flex{display:flex}.align-center{align-items:center}.gap-2{gap:8px}.gap-3{gap:12px}.gap-4{gap:16px}
.justify-between{justify-content:space-between}.flex-wrap{flex-wrap:wrap}
.text-right{text-align:right}.text-center{text-align:center}
.text-muted{color:var(--text-muted)}.text-sm{font-size:13px}.text-xs{font-size:12px}
.font-bold{font-weight:700}.font-mono{font-family:monospace}
.w-100{width:100%}.nowrap{white-space:nowrap}
.text-green{color:var(--green)}.text-red{color:var(--red)}.text-amber{color:var(--amber)}.text-orange{color:var(--orange)}
.link { color: var(--amber-dark); cursor: pointer; transition: color .14s; }
.link:hover { color: var(--amber); }

/* ===== Theme Toggle Button ===== */
/* (defined above under .btn-theme in top nav context) */

/* ===== Dark Theme ===== */
[data-theme="dark"] {
  --bg:         #070c18;
  --surface:    #0d1526;
  --surface-2:  #162035;
  --border:     #1e2d45;
  --border-2:   #2a3f5f;
  --text:       #e2eaf7;
  --text-2:     #c8d6ed;
  --text-muted: #7090b8;
  --text-faint: #3a5070;

  --green-light:  rgba(16,185,129,.16);
  --green-bg:     rgba(16,185,129,.07);
  --blue-light:   rgba(59,130,246,.16);
  --orange-light: rgba(249,115,22,.16);
  --red-light:    rgba(239,68,68,.16);
  --purple-light: rgba(139,92,246,.16);
  --amber-light:  rgba(245,158,11,.18);
  --amber-muted:  rgba(245,158,11,.07);

  --gray-light: #162035;
  --white:      #0d1526;
  --navy:       #070c18;
  --navy-dark:  #070c18;
  --navy-light: #162035;
}

[data-theme="dark"] .badge-green  { color: #34d399; }
[data-theme="dark"] .badge-blue   { color: #60a5fa; }
[data-theme="dark"] .badge-orange { color: #fb923c; }
[data-theme="dark"] .badge-red    { color: #f87171; }
[data-theme="dark"] .badge-purple { color: #a78bfa; }
[data-theme="dark"] .badge-gray   { background: rgba(255,255,255,.07); color: #94a3b8; }
[data-theme="dark"] .badge-navy   { background: rgba(99,102,241,.18); color: #818cf8; }
[data-theme="dark"] .badge-amber  { color: #fcd34d; }

[data-theme="dark"] .alert-success { color: #34d399; border-color: rgba(16,185,129,.28); }
[data-theme="dark"] .alert-danger  { color: #f87171; border-color: rgba(239,68,68,.28); }
[data-theme="dark"] .alert-warning { color: #fcd34d; border-color: rgba(245,158,11,.4); }
[data-theme="dark"] .alert-info    { color: #60a5fa; border-color: rgba(59,130,246,.28); }

[data-theme="dark"] .filter-tab:hover  { background: rgba(255,255,255,.06); }
[data-theme="dark"] .filter-tab.active { background: var(--surface); box-shadow: 0 1px 3px rgba(0,0,0,.4); }

[data-theme="dark"] .topnav-dropdown   { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .topnav-dd-item    { color: var(--text-2); }
[data-theme="dark"] .topnav-dd-item:hover { background: var(--surface-2); }

[data-theme="dark"] .line-items input,
[data-theme="dark"] .line-items select { background: var(--surface-2); color: var(--text); }

[data-theme="dark"] .auth-panel-right  { background: var(--surface); }
[data-theme="dark"] .demo-box          { background: rgba(245,158,11,.08); border-color: rgba(245,158,11,.22); }
[data-theme="dark"] .demo-box code     { background: rgba(255,255,255,.07); color: var(--text); }
[data-theme="dark"] .auth-form-title   { color: var(--text); }

[data-theme="dark"] .sic-amber  { background: rgba(245,158,11,.18); }
[data-theme="dark"] .sic-green  { background: rgba(16,185,129,.18); }
[data-theme="dark"] .sic-blue   { background: rgba(59,130,246,.18); }
[data-theme="dark"] .sic-red    { background: rgba(239,68,68,.18); }
[data-theme="dark"] .sic-purple { background: rgba(139,92,246,.18); }
[data-theme="dark"] .sic-orange { background: rgba(249,115,22,.18); }

/* Smooth theme transitions */
body, .topnav-dropdown, .card, .modal, .form-control, .search-input,
.filter-tabs, .filter-tab, .stat-card, .table th, .table td, .badge, .alert {
  transition: background-color .2s, border-color .2s, color .2s;
}
/* Don't transition the topnav (already dark in both themes) */
.topnav { transition: none; }

/* ===== Sidebar ===== */
.app-sidebar {
  position: fixed; top: 0; left: 0;
  width: var(--sidebar-w); height: 100vh;
  background: var(--dark);
  display: flex; flex-direction: column;
  z-index: 300;
  overflow-y: auto; overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.08) transparent;
  box-shadow: 2px 0 24px rgba(15,23,42,.12);
}

.sidebar-brand {
  display: flex; align-items: center;
  padding: 22px 20px 16px;
  text-decoration: none; flex-shrink: 0;
}
.sidebar-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 22px; font-weight: 800;
  color: #fff; letter-spacing: -.2px;
}
.sidebar-logo em { color: var(--amber); font-style: normal; }

.sidebar-nav { flex: 1; padding: 0 0 8px; }
.sidebar-section { margin-bottom: 4px; }
.sidebar-section-label {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .1em; color: rgba(255,255,255,.25);
  padding: 14px 20px 5px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  font-size: 13.5px; font-weight: 500;
  color: rgba(255,255,255,.5);
  text-decoration: none; transition: all .13s;
  white-space: nowrap;
  border-left: 3px solid transparent;
}
.sidebar-link:hover { color: rgba(255,255,255,.85); background: rgba(255,255,255,.06); }
.sidebar-link.active {
  color: #fff;
  background: rgba(245,158,11,.13);
  border-left-color: var(--amber);
}
.sidebar-icon { width: 20px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: currentColor; }
.sidebar-icon svg { width: 16px; height: 16px; }

.sidebar-footer {
  flex-shrink: 0; padding: 14px 18px;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.sidebar-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, var(--amber) 0%, var(--amber-dark) 100%);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px; font-weight: 800; color: var(--dark);
  flex-shrink: 0;
}
.sidebar-user-info { min-width: 0; }
.sidebar-user-name {
  font-size: 13px; font-weight: 600; color: rgba(255,255,255,.75);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-user-role { font-size: 11px; color: rgba(255,255,255,.3); margin-top: 1px; }
.sidebar-footer-links { display: flex; align-items: center; gap: 10px; }
.sidebar-footer-link {
  font-size: 12px; color: rgba(255,255,255,.32);
  text-decoration: none; transition: color .13s;
}
.sidebar-footer-link:hover { color: rgba(255,255,255,.65); }

/* Sidebar mobile overlay */
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,23,42,.4);
  z-index: 299;
  backdrop-filter: blur(2px);
}
.sidebar-overlay.open { display: block; }

/* App Topbar (inside main-wrap) */
.app-topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px; gap: 12px;
  position: sticky; top: 0; z-index: 100;
  flex-shrink: 0;
}
.app-topbar-left  { display: flex; align-items: center; gap: 10px; }
.app-topbar-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.app-topbar-right { display: flex; align-items: center; gap: 8px; }

.sidebar-toggle {
  display: none; /* hidden on desktop */
  background: none; border: none;
  padding: 6px 8px; border-radius: var(--r);
  cursor: pointer; color: var(--text-muted);
  font-size: 18px; line-height: 1;
  transition: all .13s;
}
.sidebar-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ===== Responsive ===== */
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .main-content { padding: 28px 24px; }
}
@media (max-width: 900px) {
  /* Sidebar slides in as overlay on mobile */
  .app-sidebar {
    transform: translateX(-100%);
    transition: transform .25s cubic-bezier(.4,0,.2,1);
  }
  .app-sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .sidebar-toggle { display: flex; align-items: center; justify-content: center; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .form-row-2, .form-row-3, .form-row-4 { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-item:nth-child(odd) { border-right: none; }
  .main-content { padding: 20px 16px; }
  .doc-parties { grid-template-columns: 1fr; }
  .doc-header  { flex-direction: column; gap: 16px; }
  .auth-panel-left { display: none; }
  .auth-panel-right { width: 100%; }
  .app-topbar { padding: 0 16px; }
}
@media (max-width: 540px) {
  .stats-grid { grid-template-columns: 1fr; }
  .auth-panel-right { padding: 40px 24px; }
  .app-topbar-title { display: none; }
}

/* ===== AI Panel ===== */
.ai-tag {
  display: inline-flex; align-items: center;
  background: var(--amber); color: var(--dark);
  font-size: 9.5px; font-weight: 800; letter-spacing: .07em;
  padding: 2px 7px; border-radius: 4px; vertical-align: middle;
  flex-shrink: 0;
}
.ai-panel {
  background: linear-gradient(135deg, rgba(245,158,11,.07) 0%, rgba(245,158,11,.02) 100%);
  border: 1.5px solid rgba(245,158,11,.28);
  border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px;
}
[data-theme="dark"] .ai-panel {
  background: rgba(245,158,11,.07);
  border-color: rgba(245,158,11,.22);
}
.ai-panel-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--amber-dark);
  margin-bottom: 14px;
}
[data-theme="dark"] .ai-panel-title { color: #fcd34d; }

.ai-thinking { display: inline-flex; gap: 5px; align-items: center; }
.ai-thinking span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--amber); animation: ai-pulse 1.3s ease-in-out infinite;
}
.ai-thinking span:nth-child(2) { animation-delay: .18s; }
.ai-thinking span:nth-child(3) { animation-delay: .36s; }
@keyframes ai-pulse {
  0%, 80%, 100% { opacity: .25; transform: scale(.85); }
  40%           { opacity: 1;   transform: scale(1.2);  }
}

.ai-output {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: 20px 22px;
  font-size: 14px; line-height: 1.75; color: var(--text-2);
  max-height: 560px; overflow-y: auto;
}
.ai-output .ai-p {
  margin: 0 0 10px; color: var(--text-2); line-height: 1.7;
}
.ai-output .ai-p:last-child { margin-bottom: 0; }
.ai-output .ai-section {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--amber-dark);
  margin: 18px 0 8px;
  padding-bottom: 5px;
  border-bottom: 1.5px solid rgba(245,158,11,.25);
}
.ai-output .ai-section:first-child { margin-top: 0; }
.ai-output .ai-list {
  margin: 0 0 12px 0; padding-left: 0; list-style: none;
}
.ai-output .ai-list li {
  position: relative; padding: 5px 0 5px 20px;
  font-size: 14px; line-height: 1.6; color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.ai-output ul.ai-list li::before {
  content: '›'; position: absolute; left: 0;
  color: var(--amber); font-weight: 700; font-size: 16px; top: 4px;
}
.ai-output ol.ai-list { counter-reset: ai-counter; }
.ai-output ol.ai-list li { counter-increment: ai-counter; }
.ai-output ol.ai-list li::before {
  content: counter(ai-counter); position: absolute; left: 0;
  background: var(--amber); color: var(--dark);
  font-size: 10px; font-weight: 800;
  width: 16px; height: 16px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  top: 7px;
}
.ai-output .ai-list li:last-child { border-bottom: none; }
.ai-num {
  font-weight: 700; color: var(--green-dark);
  background: var(--green-light); border-radius: 3px;
  padding: 0 4px; font-size: 13px;
}
.ai-pct {
  font-weight: 700; color: var(--blue);
  background: var(--blue-light); border-radius: 3px;
  padding: 0 4px; font-size: 13px;
}
[data-theme="dark"] .ai-num { color: #34d399; background: rgba(16,185,129,.15); }
[data-theme="dark"] .ai-pct { color: #60a5fa; background: rgba(59,130,246,.15); }
[data-theme="dark"] .ai-output .ai-section { color: #fcd34d; border-color: rgba(245,158,11,.2); }

/* ===== Print ===== */
@media print {
  .no-print, .topnav, .topnav-mobile { display: none !important; }
  body { background: #fff; }
  .main-content { padding: 0; max-width: none; }
  .print-doc { border: none; }
  .print-inner { padding: 0; }
}

/* ===== Filter Tabs (used in jobs, timesheets, etc.) ===== */
.tabs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.tab {
  padding: 6px 14px; border-radius: var(--r);
  font-size: 13px; font-weight: 600;
  cursor: pointer; border: 1.5px solid transparent;
  background: transparent; color: var(--text-muted);
  transition: all .14s; white-space: nowrap;
}
.tab:hover  { color: var(--text); background: rgba(15,23,42,.05); }
.tab.active {
  background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-xs); border-color: var(--border);
}
[data-theme="dark"] .tab:hover  { background: rgba(255,255,255,.07); }
[data-theme="dark"] .tab.active { box-shadow: 0 1px 4px rgba(0,0,0,.4); }

/* ===== Table column helpers ===== */
td.actions { white-space: nowrap; text-align: right; }
.table tbody tr.clickable { cursor: pointer; }

/* ===== Slide-in detail panel ===== */
.detail-panel {
  position: fixed; top: 0; right: 0;
  width: 520px; max-width: 95vw; height: 100vh;
  background: var(--surface);
  box-shadow: -6px 0 48px rgba(15,23,42,.18);
  z-index: 400; display: flex; flex-direction: column;
  visibility: hidden; transform: translateX(100%);
  transition: transform .26s cubic-bezier(.4,0,.2,1), visibility 0s linear .26s;
}
.detail-panel.open {
  visibility: visible; transform: translateX(0);
  transition: transform .26s cubic-bezier(.4,0,.2,1), visibility 0s;
}
.panel-backdrop {
  position: fixed; inset: 0;
  background: rgba(15,23,42,.3);
  backdrop-filter: blur(2px);
  z-index: 399;
  opacity: 0; visibility: hidden;
  transition: opacity .26s, visibility 0s linear .26s;
}
.panel-backdrop.open {
  opacity: 1; visibility: visible;
  transition: opacity .26s, visibility 0s;
}
.detail-panel-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; gap: 12px;
  background: var(--surface);
}
.detail-panel-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 17px; font-weight: 800; color: var(--text);
  line-height: 1.25; min-width: 0; flex: 1;
}
.detail-panel-bd { flex: 1; overflow-y: auto; padding: 24px; }

/* ===== Panel section headings ===== */
.panel-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-muted);
  margin: 20px 0 10px;
}
.panel-section-title:first-child { margin-top: 0; }

/* ===== Crew pills ===== */
.crew-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 20px;
  font-size: 12px; font-weight: 500; color: var(--text-2);
}
.crew-lead-badge {
  display: inline-block; background: var(--orange); color: #fff;
  border-radius: 8px; font-size: 9px; padding: 1px 6px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
}

/* ===== Stat card color accents ===== */
.stat-blue  { border-top: 3px solid var(--blue); }
.stat-green { border-top: 3px solid var(--green); }
.stat-red   { border-top: 3px solid var(--red); }

/* ===== Search input in card headers ===== */
.card-header .search-input { width: 240px; flex-shrink: 0; }
.card-header.wrap { flex-wrap: wrap; }

/* ===== Responsive additions ===== */
@media (max-width: 600px) {
  .detail-panel { width: 100vw; max-width: 100vw; }
  .card-header .search-input { width: 100%; }
}

/* ===== Tablet (≤ 900px) ===== */
@media (max-width: 900px) {
  .page-header   { flex-wrap: wrap; }
  .card-header   { flex-wrap: wrap; }
}

/* ===== Mobile (≤ 768px) ===== */
@media (max-width: 768px) {
  /* Page headers — title stacks above button */
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .page-header .btn { align-self: stretch; text-align: center; }

  /* Card headers — button row wraps below title */
  .card-header { gap: 8px; padding: 14px 16px; }
  .card-header > div { flex-wrap: wrap; gap: 6px; }

  /* Table cells — tighter on mobile */
  .table th { padding: 10px 12px; font-size: 12px; }
  .table td { padding: 10px 12px; font-size: 13px; }

  /* Modal — slide up from bottom like a sheet */
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal {
    width: 100vw; max-width: 100vw;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    max-height: 92vh;
  }
  .modal-lg, .modal-sm { width: 100vw; max-width: 100vw; }

  /* Modal footer buttons stack */
  .modal-footer { flex-wrap: wrap; }
  .modal-footer .btn { flex: 1; min-width: 120px; text-align: center; justify-content: center; }

  /* Clock card — button row full width */
  #clock-btn-wrap { width: 100%; }
  #clock-btn-wrap .btn { flex: 1; text-align: center; justify-content: center; }

  /* Filter/tab rows wrap */
  .filter-tabs, .tabs { flex-wrap: wrap; }

  /* Stat card — tighter */
  .stat-card { padding: 16px 18px; }

  /* Reduce form padding */
  .modal-body { padding: 18px 16px; }
  .modal-header { padding: 16px 18px; }
  .card-body { padding: 16px; }
}

/* ===== Small phones (≤ 480px) ===== */
@media (max-width: 480px) {
  /* Stat card values */
  .stat-card .stat-value { font-size: 22px; }

  /* Table — hide lower-priority columns.
     Pages can add .col-hide-mobile to columns they want hidden. */
  .col-hide-mobile { display: none; }

  /* Main content tighter */
  .main-content { padding: 16px 12px; }

  /* Buttons in a row — stack */
  .btn-row { flex-direction: column; }
  .btn-row .btn { width: 100%; text-align: center; justify-content: center; }

  /* Card titles slightly smaller */
  .card-title { font-size: 14px; }
  .page-title { font-size: 20px; }

  /* Clock card — full-width selects */
  #clock-emp-wrap, #clock-job-wrap { min-width: 100%; }
}

/* ===== Dark mode — form control contrast ===== */
/* In dark mode, cards and .form-control both use --surface, making inputs invisible.
   Use --surface-2 for inputs so they contrast against the card background. */
[data-theme="dark"] .form-control {
  background: var(--surface-2);
  border-color: var(--border-2);
  color: var(--text);
}
[data-theme="dark"] .form-control:focus {
  border-color: var(--amber);
}
[data-theme="dark"] .form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}
/* Dropdown arrow — lighter so it's visible on dark surfaces */
[data-theme="dark"] select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237090b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

/* ===== Clock card — inputs always on dark background ===== */
/* The clock card is dark navy in both light and dark mode, so inputs need
   explicit light treatment regardless of theme. */
.clock-card .form-control {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.28);
}
.clock-card .form-control::placeholder {
  color: rgba(255,255,255,.5);
}
.clock-card select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
.clock-card select.form-control option {
  background: #1e293b;
  color: #fff;
}
.clock-card label {
  color: rgba(255,255,255,.75);
}
.clock-card .form-control:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(245,158,11,.3);
}
[data-theme="dark"] .clock-card .form-control {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
}
