/* ══════════════════════════════════════════════ RESET + ROOT ══════════════════════════════════════════════ */
:root {
  --marsh:      #1F3D3B;
  --marsh-deep: #152B29;
  --navy:       #1B2A33;
  --navy-deep:  #0F1A1F;
  --sand:       #F4EFE6;
  --card:       #EFE7D8;
  --brass:      #C08A3E;
  --brass-bright: #E0AC5E;
  --sage:       #5C7A6B;
  --ink:        #21303A;
  --ink-mid:    #444444;
  --ink-lt:     #717171;
  --terra:      #C9622D;
  --success:    #2E7D5E;
  --error:      #C0392B;
  --warning:    #8B6200;
  --line:       rgba(255,255,255,0.08);
  --rule:       rgba(31,61,59,0.12);
  --shadow:     0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 24px 60px -20px rgba(15,26,31,0.45);
  --radius:     8px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Source Sans 3', sans-serif; background: var(--sand); color: var(--ink); line-height: 1.6; font-size: 17px; -webkit-font-smoothing: antialiased; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: 'Fraunces', serif; line-height: 1.15; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* ══════════════════════════════════════════════ BUTTONS ══════════════════════════════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 0.95rem;
  padding: 11px 22px; border-radius: var(--radius); border: none;
  cursor: pointer; transition: background 0.2s ease, transform 0.15s ease;
  white-space: nowrap; text-decoration: none; min-height: 44px;
}
.btn-primary   { background: var(--marsh); color: var(--sand); }
.btn-primary:hover { background: var(--marsh-deep); transform: translateY(-1px); }
.btn-brass     { background: var(--brass); color: #fff; }
.btn-brass:hover { background: #a8762e; }
.btn-ghost     { background: transparent; color: var(--marsh); border: 1.5px solid var(--marsh); }
.btn-ghost:hover { background: var(--marsh); color: var(--sand); }
.btn-danger    { background: var(--error); color: #fff; }
.btn-danger:hover { background: #a0301f; }
.btn-sm        { padding: 7px 14px; font-size: 0.85rem; min-height: 36px; }
.btn-icon      { padding: 9px; border-radius: 50%; width: 40px; height: 40px; min-height: 40px; }
.btn:disabled, .btn[disabled] { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.btn.loading { pointer-events: none; }
.btn.loading::after {
  content: ''; width: 14px; height: 14px;
  border: 2px solid currentColor; border-top-color: transparent;
  border-radius: 50%; animation: spin 0.7s linear infinite; margin-left: 4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════ CARDS ══════════════════════════════════════════════ */
.card {
  background: #fff; border-radius: 14px; padding: 24px 26px;
  border: 1px solid rgba(27,42,51,0.07);
  box-shadow: 0 4px 20px -12px rgba(21,43,41,0.18);
  margin-bottom: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; flex-wrap: wrap; gap: 10px; }
.card-title { font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 600; color: var(--navy); }
.card-sub { font-size: 0.85rem; color: var(--ink-lt); margin-top: 2px; }

/* ══════════════════════════════════════════════ PILLS ══════════════════════════════════════════════ */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; white-space: nowrap;
}
.pill-green   { background: #EEF7F2; color: var(--success); }
.pill-yellow  { background: #FFF8E6; color: var(--warning); }
.pill-red     { background: #FDF0EF; color: var(--error); }
.pill-blue    { background: #EEF4FB; color: #1B5FA8; }
.pill-gray    { background: rgba(27,42,51,0.07); color: var(--ink-mid); }
.pill-brass   { background: rgba(192,138,62,0.15); color: #7A6100; }
.pill-marsh   { background: rgba(31,61,59,0.1); color: var(--marsh); }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex-shrink: 0; }

/* ══════════════════════════════════════════════ FORM FIELDS ══════════════════════════════════════════════ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage);
}
.field input, .field select, .field textarea {
  font-family: 'Source Sans 3', sans-serif; font-size: 0.96rem;
  padding: 11px 14px; border: 1.5px solid #DDD3C2; border-radius: var(--radius);
  background: var(--sand); color: var(--ink); outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  width: 100%; min-height: 44px;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brass); box-shadow: 0 0 0 3px rgba(192,138,62,0.15);
}
.field textarea { resize: vertical; min-height: 90px; }
.field-hint { font-size: 0.8rem; color: var(--ink-lt); }
.field-error { font-size: 0.8rem; color: var(--error); display: none; }
.field.has-error input, .field.has-error select { border-color: var(--error); }
.field.has-error .field-error { display: block; }
.field input[readonly], .field input:disabled { background: var(--card); color: var(--ink-lt); cursor: not-allowed; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--ink-mid); }
.checkbox-row input[type="checkbox"] { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--marsh); }
.radio-pill-group { display: flex; flex-direction: column; gap: 10px; }
.radio-pill {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border: 1.5px solid #DDD3C2; border-radius: var(--radius); cursor: pointer;
  transition: border-color 0.2s, background 0.2s; background: #fff;
}
.radio-pill input[type="radio"] { width: 18px; height: 18px; accent-color: var(--marsh); flex-shrink: 0; }
.radio-pill.selected { border-color: var(--brass); background: rgba(192,138,62,0.06); }
.toggle-row { display: flex; gap: 10px; }
.toggle-btn {
  flex: 1; padding: 12px; border-radius: var(--radius); border: 1.5px solid #DDD3C2;
  background: #fff; font-weight: 600; cursor: pointer; font-family: 'Source Sans 3', sans-serif;
}
.toggle-btn.selected { border-color: var(--marsh); background: var(--marsh); color: var(--sand); }

/* ══════════════════════════════════════════════ GRIDS ══════════════════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.col-full { grid-column: 1 / -1; }
@media (max-width: 768px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
@media (max-width: 1024px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
.two-col-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .two-col-layout { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════ KPI ══════════════════════════════════════════════ */
.kpi-card { background: #fff; border-radius: 12px; padding: 22px 20px; border: 1px solid rgba(27,42,51,0.07); box-shadow: var(--shadow); }
.kpi-value { font-family: 'Fraunces', serif; font-size: 2.2rem; font-weight: 600; color: var(--navy); line-height: 1; margin-bottom: 6px; }
.kpi-label { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage); }
.kpi-delta { font-size: 0.82rem; color: var(--ink-lt); margin-top: 4px; }

/* ══════════════════════════════════════════════ MODAL ══════════════════════════════════════════════ */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(15,26,31,0.6); backdrop-filter: blur(4px); z-index: 500; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 18px; width: 100%; max-width: 600px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); animation: modalIn 0.22s ease; }
.modal-lg { max-width: 860px; }
.modal-xl { max-width: 1100px; }
@keyframes modalIn { from { opacity:0; transform: translateY(16px) scale(0.98); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; padding: 26px 28px 0; margin-bottom: 20px; }
.modal-header h2 { font-family: 'Fraunces', serif; font-size: 1.25rem; color: var(--navy); }
.modal-close { background: none; border: none; font-size: 1.6rem; line-height: 1; color: var(--ink-lt); cursor: pointer; padding: 4px 6px; flex-shrink: 0; transition: color 0.15s; border-radius: 6px; }
.modal-close:hover { color: var(--navy); background: rgba(27,42,51,0.06); }
.modal-body { padding: 0 28px 28px; }
.modal-footer { padding: 16px 28px; border-top: 1px solid var(--rule); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 600px) {
  .modal { border-radius: 16px 16px 0 0; position: fixed; bottom: 0; left: 0; right: 0; max-width: none; max-height: 92vh; }
  .modal-overlay { align-items: flex-end; }
}

/* ══════════════════════════════════════════════ TOAST ══════════════════════════════════════════════ */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(40px); background: var(--navy); color: var(--sand); padding: 13px 24px; border-radius: 999px; font-size: 0.9rem; box-shadow: var(--shadow-lg); opacity: 0; transition: opacity 0.25s ease, transform 0.25s ease; z-index: 900; border: 1px solid var(--brass); pointer-events: none; max-width: calc(100vw - 40px); text-align: center; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--error); border-color: #e88; }
.toast.success { background: var(--success); border-color: #5db; }

/* ══════════════════════════════════════════════ TABS ══════════════════════════════════════════════ */
.tab-bar { display: flex; gap: 4px; background: var(--card); border-radius: 999px; padding: 4px; width: fit-content; margin-bottom: 28px; flex-wrap: wrap; max-width: 100%; overflow-x: auto; }
.tab-btn { font-family: 'Source Sans 3', sans-serif; font-weight: 600; font-size: 0.88rem; color: var(--navy); background: transparent; border: none; padding: 9px 18px; border-radius: 999px; cursor: pointer; transition: background 0.2s, color 0.2s; white-space: nowrap; min-height: 40px; }
.tab-btn.active { background: var(--marsh); color: var(--brass-bright); }
.tab-btn:not(.active):hover { background: rgba(27,42,51,0.07); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ══════════════════════════════════════════════ TABLE ══════════════════════════════════════════════ */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.data-table th { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--sage); padding: 10px 14px; border-bottom: 1.5px solid var(--rule); text-align: left; font-weight: 500; white-space: nowrap; }
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.15s; }
.data-table tbody tr.clickable:hover { background: rgba(192,138,62,0.04); cursor: pointer; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--rule); background: #fff; }

/* ══════════════════════════════════════════════ PROGRESS ══════════════════════════════════════════════ */
.progress-bar { height: 6px; background: var(--card); border-radius: 999px; overflow: hidden; margin-top: 6px; }
.progress-fill { height: 100%; background: var(--brass); border-radius: 999px; transition: width 0.5s ease; }
.progress-fill.green { background: var(--success); }
.progress-fill.red   { background: var(--error); }

/* ══════════════════════════════════════════════ AVATAR ══════════════════════════════════════════════ */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--marsh); color: var(--brass-bright); display: flex; align-items: center; justify-content: center; font-family: 'Fraunces', serif; font-size: 1rem; font-weight: 600; flex-shrink: 0; text-transform: uppercase; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.3rem; }

/* ══════════════════════════════════════════════ SECTION LABEL ══════════════════════════════════════════════ */
.section-label { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass); margin: 28px 0 14px; display: flex; align-items: center; gap: 12px; }
.section-label:first-child { margin-top: 0; }
.section-label::after { content: ''; flex: 1; height: 1px; background: var(--rule); }

/* ══════════════════════════════════════════════ ALERT ══════════════════════════════════════════════ */
.alert { padding: 14px 18px; border-radius: var(--radius); font-size: 0.9rem; display: flex; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.alert-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }
.alert-warning { background: #FFF8E6; border: 1px solid #F0C050; color: var(--warning); }
.alert-error   { background: #FDF0EF; border: 1px solid #E8A0A0; color: var(--error); }
.alert-success { background: #EEF7F2; border: 1px solid #8FCFB0; color: var(--success); }
.alert-info    { background: #EEF4FB; border: 1px solid #90BDE8; color: #1B5FA8; }

/* ══════════════════════════════════════════════ GATE + INVITE ══════════════════════════════════════════════ */
.gate-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--marsh); padding: 20px; }
.gate-card { background: var(--navy); color: var(--sand); border-radius: 20px; padding: 48px 40px; max-width: 380px; width: 100%; text-align: center; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.gate-card.wide { max-width: 460px; text-align: left; }
.gate-eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--brass-bright); margin-bottom: 8px; text-align: center; }
.gate-card h2 { color: var(--sand); font-size: 1.4rem; margin-bottom: 6px; text-align: center; }
.gate-card > p.gate-sub { font-size: 0.85rem; color: rgba(244,239,230,0.6); margin-bottom: 28px; text-align: center; }
.gate-card input, .gate-card select { width: 100%; font-family: 'Source Sans 3', sans-serif; font-size: 1rem; padding: 13px 16px; border: 1.5px solid rgba(244,239,230,0.2); border-radius: 10px; background: rgba(244,239,230,0.06); color: var(--sand); outline: none; margin-bottom: 14px; transition: border-color 0.2s; min-height: 44px; }
.gate-card input { text-align: center; }
.gate-card.wide input, .gate-card.wide select { text-align: left; }
.gate-card input:focus, .gate-card select:focus { border-color: var(--brass-bright); }
.gate-card input::placeholder { color: rgba(244,239,230,0.4); }
.gate-error { color: #E08E8E; font-size: 0.85rem; margin-top: 10px; min-height: 1.2em; text-align: center; }
.gate-card .field label { color: var(--brass-bright); }
.gate-card .field-hint { color: rgba(244,239,230,0.5); }
.step-dots { display: flex; gap: 8px; justify-content: center; margin-bottom: 24px; }
.step-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(244,239,230,0.2); transition: background 0.2s; }
.step-dot.active { background: var(--brass-bright); }
.gate-hint-link { display: block; margin-top: 18px; font-size: 0.82rem; color: rgba(244,239,230,0.5); text-align: center; }

/* ── Vendor-login-matched sign-in card (mirrors vendors.html's #authModal exactly: white card,
   marsh header banner, form-group/form-input/btn-submit/auth-msg) — used for the Team Sign In screen only. ── */
.vl-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: rgba(15,26,22,0.72); padding: 1rem; }
.vl-card { background: #fff; border-radius: 12px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); overflow: hidden; }
.vl-header { background: var(--marsh); padding: 1.6rem 2rem 1.4rem; text-align: center; }
.vl-header svg { margin: 0 auto 10px; }
.vl-header h2 { color: var(--sand); font-size: 1.3rem; font-family: 'Fraunces', serif; }
.vl-header p { color: rgba(244,239,230,0.7); font-size: 0.85rem; margin-top: 4px; }
.vl-body { padding: 1.8rem 2rem 2rem; }
.vl-group { margin-bottom: 1.1rem; }
.vl-label { display: block; font-family: 'Source Sans 3', sans-serif; font-size: 0.88rem; font-weight: 600; color: var(--marsh); margin-bottom: 5px; }
.vl-input { width: 100%; padding: 11px 14px; border: 1.5px solid rgba(31,61,59,0.2); border-radius: var(--radius); font-family: 'Source Sans 3', sans-serif; font-size: 0.96rem; color: var(--ink); background: #fff; outline: none; transition: border-color 0.2s; min-height: 44px; }
.vl-input:focus { border-color: var(--marsh); }
.vl-submit { width: 100%; background: var(--marsh); color: var(--sand); border: none; padding: 13px; border-radius: var(--radius); font-family: 'Source Sans 3', sans-serif; font-size: 0.96rem; font-weight: 600; cursor: pointer; transition: background 0.2s; margin-top: 0.4rem; min-height: 46px; }
.vl-submit:hover { background: var(--marsh-deep); }
.vl-submit:disabled { opacity: 0.55; cursor: not-allowed; }
.vl-msg { font-size: 0.88rem; padding: 10px 14px; border-radius: var(--radius); margin-top: 1rem; display: none; }
.vl-msg.error { background: #fdf0ef; color: var(--error); display: block; }
.vl-hint { text-align: center; margin-top: 1rem; font-size: 0.85rem; color: var(--ink-lt); }

/* ══════════════════════════════════════════════ TOP NAV ══════════════════════════════════════════════ */
.wf-nav { position: sticky; top: 0; z-index: 100; background: var(--marsh); height: 60px; display: flex; align-items: center; padding: 0 20px; gap: 14px; }
.wf-nav-brand { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.wf-nav-lamp { width: 26px; height: 30px; flex-shrink: 0; }
.wf-nav-name { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--sand); white-space: nowrap; }
.wf-nav-sub { font-family: 'JetBrains Mono', monospace; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--brass-bright); display: block; }
.wf-nav-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.wf-nav-vendor { font-size: 0.85rem; color: rgba(244,239,230,0.75); white-space: nowrap; display: none; }
@media (min-width: 640px) { .wf-nav-vendor { display: inline; } }
.wf-nav .btn-ghost { border-color: rgba(244,239,230,0.35); color: var(--sand); padding: 7px 14px; min-height: 36px; font-size: 0.85rem; }
.wf-nav .btn-ghost:hover { background: rgba(244,239,230,0.12); color: var(--sand); }

/* ══════════════════════════════════════════════ LAYOUT ══════════════════════════════════════════════ */
.wf-view { display: none; }
.wf-view.active { display: block; }
.wf-container { max-width: 1200px; margin: 0 auto; padding: 28px 20px 80px; }
.wf-header-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.wf-header-bar h1 { font-size: 1.5rem; color: var(--navy); }
.profile-completion { flex: 1; min-width: 200px; }
.profile-completion-label { font-size: 0.82rem; color: var(--ink-lt); margin-bottom: 4px; }
.top-action-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; justify-content: space-between; }
.top-action-row .left-controls { display: flex; gap: 12px; flex-wrap: wrap; flex: 1; }
.top-action-row input, .top-action-row select { min-width: 200px; }
.search-input, .filter-select { font-family: 'Source Sans 3', sans-serif; font-size: 0.92rem; padding: 10px 14px; border: 1.5px solid #DDD3C2; border-radius: var(--radius); background: #fff; min-height: 42px; }
.empty-state { text-align: center; padding: 48px 20px; color: var(--ink-lt); }
.empty-state-icon { font-size: 2.4rem; margin-bottom: 12px; opacity: 0.5; }
.empty-state h3 { color: var(--navy); font-size: 1.05rem; margin-bottom: 6px; }

/* ══════════════════════════════════════════════ EMPLOYEE GRID / CARD ══════════════════════════════════════════════ */
.employee-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.employee-card { background: #fff; border-radius: 14px; padding: 20px; border: 1px solid var(--rule); cursor: pointer; transition: box-shadow 0.2s, transform 0.15s; }
.employee-card:hover { box-shadow: 0 8px 28px -10px rgba(21,43,41,0.2); transform: translateY(-2px); }
.employee-card-top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.employee-card-name { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--navy); }
.employee-card-title { font-size: 0.85rem; color: var(--ink-lt); }
.employee-card-icons { display: flex; gap: 14px; margin-top: 12px; font-size: 0.78rem; color: var(--ink-lt); flex-wrap: wrap; }
.employee-card-icons span { display: flex; align-items: center; gap: 4px; }

/* ══════════════════════════════════════════════ DETAIL PANEL ══════════════════════════════════════════════ */
.detail-panel { position: fixed; top: 0; right: -100%; width: 480px; max-width: 100vw; height: 100vh; background: #fff; box-shadow: -4px 0 30px rgba(0,0,0,0.15); z-index: 400; transition: right 0.3s ease; overflow-y: auto; display: flex; flex-direction: column; }
.detail-panel.open { right: 0; }
.panel-overlay { display: none; position: fixed; inset: 0; background: rgba(15,26,31,0.4); z-index: 399; }
.panel-overlay.open { display: block; }
.detail-panel-header { background: var(--navy); color: var(--sand); padding: 24px 24px 18px; position: sticky; top: 0; z-index: 2; }
.detail-panel-close { position: absolute; top: 16px; right: 16px; background: none; border: none; color: var(--sand); font-size: 1.6rem; cursor: pointer; }
.detail-panel-body { padding: 20px 24px 40px; flex: 1; }

/* ══════════════════════════════════════════════ KANBAN ══════════════════════════════════════════════ */
.kanban-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.kanban-col { flex: 0 0 220px; background: var(--card); border-radius: 12px; padding: 14px 12px; min-height: 300px; }
.kanban-col-header { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; display: flex; justify-content: space-between; }
.kanban-card { background: #fff; border-radius: 10px; padding: 12px; margin-bottom: 10px; border: 1px solid var(--rule); cursor: pointer; box-shadow: var(--shadow); }
.kanban-card:hover { border-color: var(--brass); }
.kanban-card-name { font-weight: 600; font-size: 0.92rem; color: var(--navy); }
.kanban-card-sub { font-size: 0.78rem; color: var(--ink-lt); margin-top: 3px; }
.kanban-card-move { display: flex; gap: 6px; margin-top: 8px; }
.kanban-card-move button { flex: 1; font-size: 0.7rem; padding: 4px 6px; border-radius: 5px; border: 1px solid var(--rule); background: var(--sand); cursor: pointer; }

/* ══════════════════════════════════════════════ WEEK / SCHEDULE ══════════════════════════════════════════════ */
.week-nav { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.week-nav-label { font-family: 'Fraunces', serif; font-size: 1.05rem; color: var(--navy); }
.week-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; background: var(--rule); border-radius: var(--radius); overflow: hidden; }
.week-col { background: #fff; min-height: 220px; }
.week-col-header { padding: 10px 8px; text-align: center; border-bottom: 1px solid var(--rule); background: var(--card); }
.week-col-header .day-name { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; text-transform: uppercase; color: var(--sage); }
.week-col-header .day-num { font-family: 'Fraunces', serif; font-size: 1.1rem; color: var(--navy); }
.availability-card { margin-bottom: 18px; }
.availability-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.availability-grid { display: flex; flex-direction: column; gap: 8px; }
.availability-row { display: grid; grid-template-columns: minmax(110px, 1fr) minmax(120px, 160px) minmax(120px, 160px); align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 10px; background: #fff; }
.availability-day { display: flex; align-items: center; gap: 9px; font-weight: 600; min-height: 44px; }
.availability-day input { width: 22px; height: 22px; accent-color: var(--marsh); }
.availability-row input[type="time"] { min-height: 48px; }
.availability-row.is-off input[type="time"] { opacity: .45; }
.availability-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 14px; }
.availability-summary { font-size: .83rem; color: var(--ink-lt); }
.availability-hint { margin-top: 7px; padding: 9px 11px; border-radius: 8px; font-size: .84rem; background: rgba(31,61,59,.06); color: var(--ink-mid); }
.availability-hint.available { background: rgba(46,125,94,.1); color: #216047; }
.availability-hint.outside, .availability-hint.unavailable { background: #FFF3E8; color: #8B4A12; }
.week-col-header.today { background: var(--marsh); }
.week-col-header.today .day-name, .week-col-header.today .day-num { color: var(--brass-bright); }
.assignment-block { margin: 4px; padding: 6px 8px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; cursor: pointer; border-left: 3px solid currentColor; }
.assignment-block.customer  { background: rgba(46,125,94,0.1);  color: var(--success); }
.assignment-block.training  { background: rgba(192,138,62,0.1); color: var(--brass); }
.assignment-block.internal  { background: rgba(27,42,51,0.08);  color: var(--navy); }
.assignment-block.admin     { background: rgba(27,42,51,0.08);  color: var(--navy); }
@media (max-width: 768px) { .week-grid { grid-template-columns: 1fr; } .week-col { min-height: auto; } }
.employee-filter-list { display: flex; flex-direction: column; gap: 8px; }
.employee-filter-item { display: flex; align-items: center; gap: 8px; font-size: 0.88rem; }
.employee-filter-item .dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

/* ══════════════════════════════════════════════ TRAINING ══════════════════════════════════════════════ */
.training-summary { display: flex; align-items: center; gap: 24px; padding: 20px; background: #fff; border-radius: 14px; border: 1px solid var(--rule); margin-bottom: 24px; flex-wrap: wrap; }
.training-summary .big-pct { font-family: 'Fraunces', serif; font-size: 2.6rem; color: var(--navy); }
.training-module-card { background: #fff; border: 1px solid var(--rule); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.training-module-left { flex: 1; min-width: 200px; }
.training-status-icon { font-size: 1.2rem; margin-right: 8px; }
.training-lib-list { display: flex; flex-direction: column; gap: 6px; }
.training-lib-item { padding: 12px; border-radius: 8px; cursor: pointer; border: 1px solid var(--rule); background: #fff; }
.training-lib-item.selected { border-color: var(--brass); background: rgba(192,138,62,0.06); }
.training-lib-panel { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
@media (max-width: 900px) { .training-lib-panel { grid-template-columns: 1fr; } }

/* ══════════════════════════════════════════════ PAYROLL ══════════════════════════════════════════════ */
.payroll-table input[type="number"] { width: 70px; padding: 7px 10px; border: 1.5px solid #DDD3C2; border-radius: 6px; text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; min-height: 36px; }
.payroll-table input[type="number"]:focus { border-color: var(--brass); outline: none; }
.payroll-gross-preview { font-family: 'JetBrains Mono', monospace; color: var(--sage); }
.employer-cost-card { background: rgba(31,61,59,0.05); border: 1.5px solid rgba(31,61,59,0.15); }
.paystub-line { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.92rem; }
.paystub-line.total { border-top: 1.5px solid var(--rule); margin-top: 6px; padding-top: 10px; font-weight: 700; }
.paystub-line.net { font-family: 'Fraunces', serif; font-size: 1.2rem; color: var(--marsh); }
@media (max-width: 640px) { .payroll-table, .payroll-table thead { display: none; } .payroll-card-row { display: block; background: #fff; border: 1px solid var(--rule); border-radius: 10px; padding: 14px; margin-bottom: 10px; } }
@media (max-width: 640px) {
  .availability-head { display: block; }
  .availability-head .btn { width: 100%; min-height: 52px; margin-top: 10px; }
  .availability-row { grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px; }
  .availability-day { grid-column: 1 / -1; min-height: 42px; }
  .availability-row input[type="time"] { width: 100%; min-height: 54px; font-size: 1rem; }
  .availability-actions .btn { width: 100%; min-height: 56px; }
}

/* ══════════════════════════════════════════════ RATING STARS ══════════════════════════════════════════════ */
.rating-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--rule); flex-wrap: wrap; gap: 8px; }
.rating-stars { display: flex; gap: 6px; }
.rating-star { width: 32px; height: 32px; border-radius: 50%; border: 1.5px solid #DDD3C2; background: var(--sand); cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; transition: background 0.15s, border-color 0.15s; }
.rating-star.selected { background: var(--brass); border-color: var(--brass); color: #fff; }

/* ══════════════════════════════════════════════ SKELETON ══════════════════════════════════════════════ */
.skeleton { background: linear-gradient(90deg, var(--card) 25%, #e8e0d4 50%, var(--card) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 6px; height: 18px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ══════════════════════════════════════════════ UPLOAD ══════════════════════════════════════════════ */
.upload-zone { border: 2px dashed #DDD3C2; border-radius: var(--radius); padding: 24px; text-align: center; cursor: pointer; background: var(--sand); transition: border-color 0.2s; }
.upload-zone:hover, .upload-zone.dragover { border-color: var(--brass); }
.doc-type-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.doc-chip { padding: 8px 16px; border-radius: 999px; border: 1.5px solid #DDD3C2; background: #fff; cursor: pointer; font-size: 0.85rem; font-weight: 600; }
.doc-chip.selected { background: var(--marsh); color: var(--sand); border-color: var(--marsh); }

/* ══════════════════════════════════════════════ PRINT ══════════════════════════════════════════════ */
@media print { .wf-nav, .tab-bar, .btn:not(.btn-print-stub), .toast, .modal-close { display: none !important; } .modal-overlay { position: static; background: none; backdrop-filter: none; padding: 0; } .modal { box-shadow: none; border: none; max-height: none; } body { background: white; } }

/* ══════════════════════════════════════════════ WORK ORDER (Photo Gate) ══════════════════════════════════════════════
   Adapted from the wo_photo_gate_preview mockup's styles, reusing this file's
   own design tokens (marsh/brass/sand/terra) instead of the preview's near-duplicate set. */
.eyebrow { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--terra); font-weight: 600; margin-bottom: 4px; }
.wo-sub { color: var(--ink-lt); font-size: 0.9rem; margin-bottom: 16px; }
.wo-layout { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
@media (max-width: 920px) { .wo-layout { grid-template-columns: 1fr; } }

.wo-stepper { display: flex; gap: 6px; margin: 16px 0 18px; }
.wo-step { flex: 1; text-align: center; padding: 8px 4px; border-radius: 8px; font-family: 'JetBrains Mono', monospace; font-size: 0.66rem; letter-spacing: 0.04em; background: var(--card); color: var(--ink-lt); text-transform: uppercase; font-weight: 600; }
.wo-step.done { background: var(--marsh); color: var(--sand); }
.wo-step.active { background: var(--brass-bright); color: var(--marsh-deep); }

.wo-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 14px; font-size: 0.9rem; }
.wo-meta div span { display: block; color: var(--ink-lt); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; font-family: 'JetBrains Mono', monospace; }

.wo-note-callout { background: #F8E9E1; border: 1.5px solid var(--terra); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.wo-note-item { font-size: 0.9rem; margin-top: 8px; }
.wo-note-item:first-of-type { margin-top: 10px; }
.wo-note-source { font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; color: var(--ink-lt); margin-top: 2px; }

.wo-instructions { background: var(--card); border: 1px solid var(--rule); border-radius: 10px; padding: 14px 16px; margin-bottom: 16px; }
.wo-instructions ol { margin: 8px 0 0 20px; font-size: 0.9rem; }
.wo-instructions li { margin-bottom: 6px; }

.wo-checklist { margin-bottom: 16px; }
.wo-check-row { display: flex; align-items: flex-start; gap: 8px; padding: 4px 0; font-size: 0.9rem; }

.wo-photo-block { border: 1.5px dashed var(--rule); border-radius: 12px; padding: 14px; display: flex; gap: 14px; align-items: center; margin-bottom: 14px; background: var(--card); }
.wo-photo-block.locked { opacity: 0.55; }
.wo-photo-thumb { width: 76px; height: 76px; border-radius: 10px; background: #E5E0D2; flex-shrink: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; color: var(--ink-lt); }
.wo-photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.wo-photo-info { flex: 1; min-width: 0; }
.wo-photo-label { font-weight: 600; margin-bottom: 2px; }
.wo-photo-hint { font-size: 0.82rem; color: var(--ink-lt); }
.chip { font-family: 'JetBrains Mono', monospace; font-size: 0.65rem; padding: 2px 8px; border-radius: 20px; display: inline-flex; align-items: center; font-weight: 600; margin-top: 6px; }
.chip-ok { background: #EEF7F2; color: var(--success); }
.chip-warn { background: #FFF8E6; color: var(--warning); }

.wo-center-btn { display: flex; justify-content: center; margin: 6px 0 18px; }

.wo-net-toggle { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; border-radius: 10px; background: var(--card); border: 1px solid var(--rule); font-size: 0.85rem; }
.wo-net-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.wo-net-dot.online { background: var(--success); }
.wo-net-dot.offline { background: var(--error); }
.wo-queue-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; background: var(--card); border: 1px solid var(--rule); margin-bottom: 8px; font-size: 0.85rem; }
.wo-queue-name { font-weight: 600; }
.wo-queue-meta { font-size: 0.75rem; margin-top: 2px; }
.wo-empty-note { color: var(--ink-lt); font-size: 0.85rem; text-align: center; padding: 10px 0; }

/* v9.95 mobile-first Work Order and employee availability controls */
.wo-number { display:inline-flex; align-items:center; min-height:34px; padding:6px 12px; margin-bottom:8px; border-radius:999px; background:var(--marsh); color:#fff; font-family:'JetBrains Mono',monospace; font-size:.9rem; font-weight:700; letter-spacing:.04em; }
.wo-address { display: inline-flex; align-items: center; gap: 7px; color: var(--marsh); font-weight: 600; text-decoration: none; }
.wo-address::before { content: '↗'; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--card); color: var(--brass); }
.wo-travel-card { display:grid; grid-template-columns:1fr auto; gap:10px 14px; align-items:center; padding:14px; margin:0 0 16px; border:1.5px solid var(--brass); border-radius:12px; background:#FFF9EE; }
.wo-travel-value { font-size:1.25rem; font-weight:700; color:var(--marsh-deep); }
.wo-travel-origin { margin-top:2px; color:var(--ink-lt); font-size:.82rem; }
.wo-travel-actions { display:flex; gap:8px; flex-wrap:wrap; grid-column:1 / -1; }
.wo-travel-actions .btn { min-height:48px; flex:1 1 190px; }
.wo-arrival-card { margin:0 0 16px; padding:14px; border:1.5px solid var(--marsh); border-radius:12px; background:#fff; }
.wo-arrival-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }
.wo-arrival-latest { margin-top:10px; padding:10px 12px; border-radius:10px; background:#EEF7F2; color:var(--marsh); }
.wo-arrival-latest.pending { background:#FFF8E6; color:var(--warning); }
.wo-arrival-editor { margin-top:12px; padding-top:12px; border-top:1px solid var(--rule); }
.wo-arrival-quick { display:grid; grid-template-columns:repeat(5,1fr); gap:7px; margin:10px 0; }
.wo-arrival-quick .btn { min-height:48px; padding:8px; }
.wo-arrival-editor input,.wo-arrival-editor textarea { width:100%; padding:11px 12px; border:1.5px solid var(--rule); border-radius:8px; font:inherit; font-size:16px; }
.wo-arrival-warning { display:none; margin:10px 0; padding:10px 12px; border-radius:8px; background:#FFF0E8; border-left:4px solid var(--terra); color:#8B3D1B; font-weight:600; }
.wo-arrival-warning.show { display:block; }
.wo-test-reset { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 16px; padding:12px 14px; border:1.5px dashed #A6473C; border-radius:12px; background:#FFF8F5; }
.wo-test-reset-copy { font-size:.84rem; color:var(--ink-mid); line-height:1.35; }
.wo-test-reset-copy strong { display:block; color:#8B3D1B; margin-bottom:2px; }
.wo-test-reset .btn { min-height:52px; flex:0 0 auto; }
.wo-primary-action .btn { min-height: 48px; padding-inline: 24px; }
@media (max-width: 640px) {
  #viewWorkOrder #woContainer { padding: 10px 10px 96px; }
  #woContainer > .btn { min-height: 44px; margin: 0 0 10px 2px !important; }
  .wo-layout { display: flex; flex-direction: column; gap: 12px; }
  .wo-layout > div { width: 100%; min-width: 0; }
  .wo-card { padding: 18px 14px; border-radius: 14px; margin-bottom: 0; }
  .wo-card h2 { font-size: 1.45rem; line-height: 1.16; }
  .wo-sub { font-size: 0.95rem; line-height: 1.4; }
  .wo-address { width: 100%; min-height: 44px; padding: 7px 10px; margin-left: -10px; border-radius: 10px; }
  .wo-stepper { gap: 3px; margin: 12px 0 16px; }
  .wo-step { padding: 8px 2px; font-size: 0.56rem; letter-spacing: 0; }
  .wo-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--rule); border-radius: 10px; overflow: hidden; }
  .wo-meta > div { min-width: 0; padding: 10px; border-bottom: 1px solid var(--rule); }
  .wo-meta > div:nth-child(odd) { border-right: 1px solid var(--rule); }
  .wo-meta > div:nth-last-child(-n+2) { border-bottom: 0; }
  .wo-note-callout,.wo-instructions { padding: 14px 12px; }
  .wo-instructions ol { margin-left: 18px; }
  .wo-instructions li { margin-bottom: 10px; line-height: 1.4; }
  .wo-checklist { padding-top: 4px; }
  .wo-check-row { min-height: 62px; padding: 12px 8px; gap: 14px; align-items: center; border-bottom: 1px solid var(--rule); font-size: 1rem; line-height: 1.35; }
  .wo-check-row input { width: 30px; height: 30px; flex: 0 0 30px; accent-color: var(--marsh); }
  .wo-photo-block { display: grid; grid-template-columns: 74px minmax(0,1fr); gap: 12px; padding: 12px; }
  .wo-photo-thumb { width: 74px; height: 74px; }
  .wo-photo-block > div:last-child { grid-column: 1 / -1; }
  .wo-photo-block .btn { width: 100%; min-height: 68px; padding:14px 18px; font-size: 1.05rem; }
  .wo-photo-label { font-size: 1rem; }
  .wo-photo-hint { line-height: 1.35; }
  .wo-center-btn { margin: 8px 0 16px; }
  .wo-primary-action { position: sticky; bottom: 8px; z-index: 20; padding: 8px; margin-inline: -4px; border-radius: 14px; background: rgba(247,243,236,.96); box-shadow: 0 8px 28px rgba(21,43,41,.24); backdrop-filter: blur(8px); }
  .wo-primary-action .btn { width: 100%; min-height: 72px; font-size: 1.08rem; font-weight:700; }
  .wo-travel-card { grid-template-columns:1fr; }
  .wo-travel-actions { display:grid; grid-template-columns:1fr; }
  .wo-travel-actions .btn { width:100%; min-height:60px; }
  .wo-arrival-head { display:grid; grid-template-columns:1fr; }
  .wo-arrival-head .btn { width:100%; min-height:68px; }
  .wo-arrival-quick { grid-template-columns:1fr 1fr; }
  .wo-arrival-quick .btn { min-height:58px; }
  .wo-arrival-editor > .btn { width:100%; min-height:68px; }
  .wo-test-reset { display:grid; grid-template-columns:1fr; }
  .wo-test-reset .btn { width:100%; min-height:68px; font-size:1rem; }
  .wo-net-toggle { display: grid; grid-template-columns: auto 1fr; padding: 12px; line-height: 1.35; }
  .wo-net-toggle .btn { grid-column: 1 / -1; width: 100%; min-height: 44px; margin: 4px 0 0 !important; }
  .wo-queue-item { align-items: flex-start; flex-wrap: wrap; padding: 12px; }
  .wo-queue-item .pill { margin-left: auto; }
  #wfNoteInput { min-height: 84px !important; font-size: 16px !important; }
  #wfAddNoteBtn { min-height: 44px; }
}
