/* ============================================================
   SAMARA BRAND — GOOGLE FONTS
   Add to your index.html <head>:

   <link rel="preconnect" href="https://fonts.googleapis.com">
   <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
   <link href="https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Jost:wght@300;400;500;600;700&display=swap" rel="stylesheet">
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES (safe names — no conflict with Tailwind v4)
   ============================================================ */
:root {
  --ink: #1A1816;
  --charcoal: #2C2A27;
  --stone: #9A8F80;
  --stone-light: #C5BCB0;
  --sand-dark: #DDD5C6;
  --sand: #F0EBE0;
  --sand-light: #F8F5EF;
  --gold: #B8965A;
  --gold-light: #D4B07A;
  --gold-bg: rgba(184, 150, 90, 0.10);
  --teal: #4A7C74;
  --teal-light: #6A9C94;
  --teal-bg: rgba(74, 124, 116, 0.10);
  --alert: #C0614A;
  --alert-bg: rgba(192, 97, 74, 0.10);
}

/* ============================================================
   BASE
   ============================================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  background: #F8F5EF;
  color: #2C2A27;
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Inputs / buttons inherit font */
input,
select,
textarea,
button {
  font-family: inherit;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--sand-light);
}

::-webkit-scrollbar-thumb {
  background: var(--stone-light);
  border: 2px solid var(--sand-light);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--stone);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(10px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-fade-up {
  animation: fadeUp 0.28s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-modal-in {
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-slide-down {
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* ============================================================
   LAYOUT
   ============================================================ */
.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--sand-light);
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
  width: 220px;
  min-width: 220px;
  background: var(--ink);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  transition: width 0.2s ease;
  flex-shrink: 0;
}

.sidebar.collapsed {
  width: 60px;
  min-width: 60px;
}

/* Gold gradient rule on right edge */
.sidebar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 1px;
  height: 100%;
  background: linear-gradient(180deg, transparent, rgba(184, 150, 90, 0.3) 40%, transparent);
  pointer-events: none;
}

.sidebar-brand {
  padding: 26px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.brand-wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--sand);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  white-space: nowrap;
}

.brand-sub {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 4px;
  opacity: 0.85;
  white-space: nowrap;
}

.sidebar-section {
  padding: 16px 20px 5px;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--stone);
  opacity: 0.55;
  white-space: nowrap;
  overflow: hidden;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(197, 188, 176, 0.72);
  font-size: 12.5px;
  font-weight: 400;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  text-decoration: none;
  position: relative;
  transition: background 0.18s, color 0.18s;
  white-space: nowrap;
  overflow: hidden;
}

.nav-btn:hover {
  color: var(--sand);
  background: rgba(255, 255, 255, 0.04);
}

.nav-btn.active {
  color: var(--gold-light);
  background: rgba(184, 150, 90, 0.10);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 2px;
  background: var(--gold);
  border-radius: 0 2px 2px 0;
}

.nav-btn .nav-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-icon-wrap {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.65;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover .nav-icon-wrap,
.nav-btn.active .nav-icon-wrap {
  opacity: 1;
}

.nav-badge {
  margin-left: auto;
  font-size: 9px;
  font-weight: 700;
  background: var(--alert);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
  flex-shrink: 0;
}

.sidebar-footer {
  margin-top: auto;
  padding: 14px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.user-ava {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--teal) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.user-name {
  font-size: 12px;
  color: var(--sand);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 10px;
  color: var(--stone);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

/* ============================================================
   MAIN / TOPBAR
   ============================================================ */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  height: 58px;
  background: white;
  border-bottom: 1px solid var(--sand-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
  flex-shrink: 0;
}

.content-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.page-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.page-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* For pages that want a fixed header/search and scrollable list */
.page-body.flex-body {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page-body.flex-body .table-wrap {
  flex: 1;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  border-radius: 3px;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
  padding: 8px 16px;
}

.btn-primary {
  background: var(--charcoal);
  color: var(--sand-light);
}

.btn-primary:hover {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--charcoal);
  border: 1px solid var(--sand-dark);
}

.btn-ghost:hover {
  border-color: var(--charcoal);
  background: var(--sand);
}

.btn-danger {
  background: var(--alert-bg);
  color: var(--alert);
  border: 1px solid rgba(192, 97, 74, 0.2);
}

.btn-danger:hover {
  background: var(--alert);
  color: white;
}

.btn-teal {
  background: var(--teal);
  color: white;
}

.btn-teal:hover {
  background: var(--teal-light);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-sm {
  padding: 5px 11px;
  font-size: 10px;
}

.btn-xs {
  padding: 3px 8px;
  font-size: 9.5px;
}

.btn-lg {
  padding: 11px 22px;
  font-size: 12px;
}

/* full-width */
.btn-block {
  width: 100%;
  justify-content: center;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: white;
  border: 1px solid var(--sand-dark);
  border-radius: 10px;
  transition: box-shadow 0.18s;
}

.card:hover {
  box-shadow: 0 2px 12px rgba(26, 24, 22, 0.08);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--sand-dark);
}

.card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
  background: white;
  border: 1px solid var(--sand-dark);
  border-radius: 10px;
  padding: 18px 20px;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.18s, transform 0.18s;
}

.stat-card:hover {
  box-shadow: 0 4px 20px rgba(26, 24, 22, 0.10);
  transform: translateY(-1px);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
}

.stat-gold::before {
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.stat-teal::before {
  background: linear-gradient(90deg, var(--teal), var(--teal-light));
}

.stat-stone::before {
  background: linear-gradient(90deg, var(--stone), var(--stone-light));
}

.stat-alert::before {
  background: linear-gradient(90deg, var(--alert), #D97A65);
}

.stat-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 8px;
}

.stat-num {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 40px;
  font-weight: 300;
  color: var(--charcoal);
  line-height: 1;
  margin-bottom: 5px;
}

.stat-num.alert-val {
  color: var(--alert);
}

/* ============================================================
   TAGS & BADGES
   ============================================================ */
.tag {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 3px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.tag-hosp {
  background: rgba(184, 150, 90, 0.12);
  color: #8A6010;
}

.tag-ops {
  background: rgba(74, 124, 116, 0.12);
  color: var(--teal);
}

.tag-const {
  background: rgba(44, 42, 39, 0.08);
  color: var(--charcoal);
}

.tag-src {
  background: var(--sand);
  color: var(--stone);
}

.tag-lombok {
  background: rgba(74, 124, 116, 0.12);
  color: var(--teal);
}

.stage-badge {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 3px;
}

.stage-new {
  background: rgba(44, 42, 39, 0.08);
  color: var(--charcoal);
}

.stage-screening {
  background: rgba(184, 150, 90, 0.12);
  color: #8A6010;
}

.stage-interview {
  background: rgba(74, 124, 116, 0.14);
  color: var(--teal);
}

.stage-offer {
  background: rgba(74, 124, 116, 0.20);
  color: var(--teal);
}

.stage-hired {
  background: rgba(74, 124, 116, 0.25);
  color: #2A5C54;
}

.stage-rejected {
  background: rgba(192, 97, 74, 0.10);
  color: var(--alert);
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-label {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 5px;
}

.form-control {
  width: 100%;
  padding: 8px 11px;
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  background: white;
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 13px;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.form-control:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 90, 0.14);
}

.form-control::placeholder {
  color: var(--stone-light);
}

.form-control.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
}

/* Select arrow */
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%239A8F80' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-hint {
  font-size: 11px;
  color: var(--stone);
  margin-top: 4px;
}

.form-error {
  font-size: 11px;
  color: var(--alert);
  margin-top: 4px;
}

.form-group {
  margin-bottom: 14px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ============================================================
   ALERT BANNER (48h stale warning)
   ============================================================ */
.alert-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(192, 97, 74, 0.07);
  border: 1px solid rgba(192, 97, 74, 0.22);
  border-left: 3px solid var(--alert);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--charcoal);
  margin-bottom: 16px;
  animation: slideDown 0.3s ease both;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--sand-dark);
  margin-bottom: 18px;
}

.tab {
  padding: 8px 16px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--stone);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}

.tab:hover {
  color: var(--charcoal);
}

.tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ============================================================
   SEARCH / FILTER BAR
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.search-wrap {
  position: relative;
  flex: 1;
  min-width: 180px;
}

.search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stone-light);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 12px 8px 30px;
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  background: white;
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: 12.5px;
  color: var(--charcoal);
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(184, 150, 90, 0.12);
}

.search-input::placeholder {
  color: var(--stone-light);
}

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap {
  flex: 1;
  background: white;
  border: 1px solid var(--sand-dark);
  border-radius: 10px;
  overflow-y: auto;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead {
  background: var(--sand);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table th {
  padding: 10px 14px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--stone);
  text-align: left;
  white-space: nowrap;
}

.data-table td {
  padding: 10px 14px;
  font-size: 12.5px;
  color: var(--charcoal);
  border-bottom: 1px solid var(--sand-dark);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.15s;
  cursor: pointer;
}

.data-table tbody tr:hover td {
  background: var(--sand-light);
}

/* stale row accent */
.data-table tbody tr.row-stale td:first-child {
  border-left: 3px solid var(--alert);
}

/* ============================================================
   KANBAN
   ============================================================ */
.kanban-wrap {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 16px;
  height: 100%;
  align-items: flex-start;
}

.k-col {
  display: flex;
  flex-direction: column;
  min-width: 200px;
  flex: 1;
}

.k-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.k-col-title {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.k-col-count {
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Column colour themes */
.k-col-new .k-col-head {
  background: rgba(44, 42, 39, 0.06);
}

.k-col-new .k-col-title {
  color: var(--charcoal);
}

.k-col-screening .k-col-head {
  background: rgba(184, 150, 90, 0.10);
}

.k-col-screening .k-col-title {
  color: #8A6010;
}

.k-col-interview .k-col-head {
  background: rgba(74, 124, 116, 0.10);
}

.k-col-interview .k-col-title {
  color: var(--teal);
}

.k-col-offer .k-col-head {
  background: rgba(74, 124, 116, 0.16);
}

.k-col-offer .k-col-title {
  color: var(--teal);
}

.k-col-hired .k-col-head {
  background: rgba(74, 124, 116, 0.22);
}

.k-col-hired .k-col-title {
  color: #2A5C54;
}

.k-col-rejected .k-col-head {
  background: rgba(192, 97, 74, 0.08);
}

.k-col-rejected .k-col-title {
  color: var(--alert);
}

.k-col-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

.k-card {
  background: white;
  border: 1px solid var(--sand-dark);
  border-radius: 6px;
  padding: 11px;
  cursor: grab;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  position: relative;
}

.k-card:hover {
  border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(26, 24, 22, 0.08);
  transform: translateY(-1px);
}

.k-card:active {
  cursor: grabbing;
}

.k-card.stale {
  border-left: 3px solid var(--alert);
}

.k-card-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: 2px;
  padding-right: 20px;
  cursor: pointer;
  transition: color 0.15s;
}

.k-card-name:hover {
  color: var(--gold);
}

.k-card-role {
  font-size: 11px;
  color: var(--stone);
  margin-bottom: 8px;
}

.k-card-foot {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.k-stale-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 8.5px;
  font-weight: 700;
  background: var(--alert);
  color: white;
  padding: 1px 5px;
  border-radius: 3px;
  letter-spacing: 0.06em;
}

.k-lombok-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  font-size: 11px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 24, 22, 0.55);
  backdrop-filter: blur(4px);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: white;
  border-radius: 14px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 48px rgba(26, 24, 22, 0.15);
  animation: modalIn 0.25s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--sand-dark);
  position: sticky;
  top: 0;
  background: white;
  z-index: 2;
}

.modal-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

.modal-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--sand-dark);
  border-radius: 5px;
  background: none;
  cursor: pointer;
  color: var(--stone);
  transition: border-color 0.15s, color 0.15s;
  flex-shrink: 0;
}

.modal-close:hover {
  border-color: var(--alert);
  color: var(--alert);
}

.modal-body {
  padding: 20px 22px;
}

.modal-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--sand-dark);
  background: var(--sand-light);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  border-radius: 0 0 14px 14px;
}

/* ============================================================
   CV UPLOAD ZONE
   ============================================================ */
.upload-zone {
  border: 2px dashed var(--sand-dark);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--sand-light);
  transition: border-color 0.18s, background 0.18s;
}

.upload-zone:hover {
  border-color: var(--gold);
  background: var(--gold-bg);
}

.upload-zone.scanning {
  border-color: var(--teal);
  background: var(--teal-bg);
}

.upload-zone.scanned {
  border-color: var(--teal);
  background: rgba(74, 124, 116, 0.06);
}

/* ============================================================
   TCOW RESULT PANEL
   ============================================================ */
.tcow-result {
  background: var(--charcoal);
  border-radius: 10px;
  padding: 22px;
  color: var(--sand-light);
}

.tcow-result-label {
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone-light);
  margin-bottom: 6px;
}

.tcow-result-val {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 36px;
  font-weight: 300;
  color: var(--gold-light);
  line-height: 1;
  margin-bottom: 3px;
}

.tcow-result-sub {
  font-size: 11px;
  color: var(--stone-light);
}

.tcow-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.tcow-line-label {
  color: var(--stone-light);
}

.tcow-line-val {
  color: var(--sand);
  font-weight: 500;
}

.tcow-total .tcow-line-label,
.tcow-total .tcow-line-val {
  color: var(--gold-light);
  font-weight: 700;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-shell {
  min-height: 100vh;
  display: flex;
  background: var(--ink);
}

.login-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--ink) 0%, #2A2320 55%, #1C1A16 100%);
}

/* ambient glow effects */
.login-left::before {
  content: '';
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 150, 90, 0.08) 0%, transparent 70%);
  top: -80px;
  left: -80px;
  pointer-events: none;
}

.login-left::after {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74, 124, 116, 0.06) 0%, transparent 70%);
  bottom: -60px;
  right: -60px;
  pointer-events: none;
}

.login-wordmark {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 56px;
  font-weight: 300;
  color: var(--sand);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.login-tagline {
  font-size: 9.5px;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 48px;
  position: relative;
  z-index: 1;
}

.login-divider {
  width: 1px;
  height: 72px;
  background: linear-gradient(180deg, transparent, var(--gold), transparent);
  margin: 0 auto 44px;
  position: relative;
  z-index: 1;
}

.login-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 18px;
  text-align: left;
  position: relative;
  z-index: 1;
}

.login-feat-icon {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: rgba(184, 150, 90, 0.1);
  border: 1px solid rgba(184, 150, 90, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  flex-shrink: 0;
}

.login-feat-title {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--sand);
}

.login-feat-desc {
  font-size: 11px;
  color: var(--stone-light);
  margin-top: 1px;
}

.login-right {
  width: 400px;
  min-width: 400px;
  background: var(--sand-light);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
}

.login-form-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--charcoal);
  letter-spacing: 0.02em;
  margin-bottom: 3px;
}

.login-form-sub {
  font-size: 12px;
  color: var(--stone);
  margin-bottom: 30px;
}

.login-note {
  background: var(--teal-bg);
  border: 1px solid rgba(74, 124, 116, 0.2);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 11.5px;
  color: var(--teal);
  margin-top: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.login-sent {
  text-align: center;
  padding: 20px 0;
}

.login-sent-icon {
  font-size: 44px;
  margin-bottom: 12px;
}

.login-sent-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--charcoal);
  margin-bottom: 4px;
}

.login-sent-sub {
  font-size: 12px;
  color: var(--stone);
}

/* ============================================================
   ANALYTICS RECHARTS OVERRIDES
   ============================================================ */
.recharts-tooltip-wrapper {
  outline: none;
}

/* ============================================================
   IMPORT — PROGRESS BAR
   ============================================================ */
.progress-bar-track {
  width: 100%;
  height: 6px;
  background: var(--sand-dark);
  border-radius: 6px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--gold);
  border-radius: 6px;
  transition: width 0.3s ease;
}

/* ============================================================
   USERS PAGE
   ============================================================ */
.users-page {
  background: var(--sand-light);
  min-height: 100%;
}

/* ============================================================
   LOADING STATE
   ============================================================ */
.loading-state {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
  color: var(--stone);
  font-size: 13px;
  gap: 8px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--sand-dark);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--stone);
  font-size: 13px;
}

/* ============================================================
   WHATSAPP BUTTON OVERRIDE
   ============================================================ */
.wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #22C55E;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}

.wa-btn:hover {
  background: #16A34A;
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  background: var(--sand);
  color: var(--stone);
  border: 1px solid var(--sand-dark);
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.lang-toggle:hover {
  background: var(--sand-dark);
}