/* =====================================================================
   VOYAGER CRM — DESIGN SYSTEM
   Fraunces (display) + Inter (UI) + IBM Plex Mono (data)
   ===================================================================== */

:root {
    --ink-navy:   #12213B;
    --deep-teal:  #0E3B43;
    --sand-gold:  #C9A15A;
    --sand-gold-soft: #E9D8B4;
    --paper:      #F7F4EC;
    --paper-dim:  #EFEADC;
    --slate:      #44506B;
    --slate-soft: #7C879E;
    --coral:      #C1543C;
    --green:      #3E7C59;
    --blue:       #33587C;
    --border:     #E1DAC6;
    --radius:     10px;
    --shadow-card: 0 1px 2px rgba(18,33,59,0.06), 0 8px 24px rgba(18,33,59,0.06);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    /*background: var(--paper);*/
    color: var(--ink-navy);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14.5px;
    line-height: 1.5;
}

h1, h2, h3, h4, .display {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--ink-navy);
    margin: 0 0 4px;
}

.mono, .stat-value, .data-table td.num { display: flex; font-family: 'IBM Plex Mono', monospace; }

a { color: var(--deep-teal); text-decoration: none; }

/* ---------- App shell ---------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: 245px;
    background: var(--ink-navy);
    color: #DCE3F0;
    flex-shrink: 0;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
}
.sidebar .brand {
    font-family: 'Fraunces', serif;
    font-size: 21px;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    padding-left: 4px;
}
.sidebar .brand .mark {
    width: 26px; height: 26px; border-radius: 6px;
    background: linear-gradient(135deg, var(--sand-gold), #A87F3B);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; color: var(--ink-navy); font-weight: 700;
}
.nav-group-label {
    font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em;
    color: #5E6C8C; margin: 18px 8px 6px;
}
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px; border-radius: 7px; color: #C6CFE3;
    font-size: 13.6px; margin-bottom: 2px;
}
.nav-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-link.active { background: var(--sand-gold); color: var(--ink-navy); font-weight: 600; }
.nav-icon { width: 16px; text-align: center; opacity: 0.9; }

.sidebar .user-chip {
    margin-top: 27px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.08);
    font-size: 12.5px; color: #9FADCB; display: flex; align-items: center; gap: 8px;
}

/* ---------- Main area ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 60px; background: #fff; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 5;
}
.topbar h1 { font-size: 19px; }
.content { padding: 24px; flex: 1; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 7px; font-size: 13.5px; font-weight: 600;
    border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.btn-primary { background: var(--ink-navy); color: #fff; }
.btn-primary:hover { background: #0B1830; }
.btn-gold { background: var(--sand-gold); color: var(--ink-navy); }
.btn-gold:hover { background: #BB9350; }
.btn-outline { background: #fff; border-color: var(--border); color: var(--ink-navy); }
.btn-outline:hover { border-color: var(--slate-soft); }
.btn-danger { background: #fff; border-color: var(--coral); color: var(--coral); }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* ---------- Cards ---------- */
.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: var(--shadow-card); padding: 20px;
}
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }

/* ---------- Signature element: boarding-pass stat card ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    position: relative; overflow: hidden; box-shadow: var(--shadow-card);
    display: flex; padding: 0;
}
.stat-card .stub-main { padding: 16px 14px; flex: 1; }
.stat-card .stub-tear {
    width: 34px; background: var(--paper-dim); border-left: 2px dashed var(--border);
    display: flex; align-items: center; justify-content: center; position: relative;
}
.stat-card .stub-tear span {
    writing-mode: vertical-rl; font-family: 'IBM Plex Mono', monospace;
    font-size: 9.5px; letter-spacing: 0.1em; color: var(--slate-soft); text-transform: uppercase;
}
.stat-card .stub-tear::before, .stat-card .stub-tear::after {
    content: ''; position: absolute; width: 12px; height: 12px; border-radius: 50%;
    background: var(--paper); left: -7px;
}
.stat-card .stub-tear::before { top: -6px; }
.stat-card .stub-tear::after { bottom: -6px; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--slate-soft); margin-bottom: 6px; }
.stat-value { font-size: 26px; font-weight: 600; color: var(--ink-navy); }
.stat-delta { font-size: 12px; margin-top: 4px; }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--coral); }

/* ---------- Badges ---------- */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    font-size: 11.5px; font-weight: 600; text-transform: capitalize;
}
.badge-slate { background: #E7EAF2; color: var(--slate); }
.badge-blue  { background: #DDE8F2; color: var(--blue); }
.badge-amber { background: var(--sand-gold-soft); color: #7A5A1E; }
.badge-green { background: #DCEEE2; color: var(--green); }
.badge-coral { background: #F5DDD6; color: var(--coral); }

/* ---------- Tables ---------- */
.data-table { width: 100%; border-collapse: collapse; background: #fff; }
.data-table th {
    text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--slate-soft); padding: 10px 14px; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 12px 14px; border-bottom: 1px solid var(--paper-dim); font-size: 13.5px; }
.data-table tr:hover td { background: var(--paper); }
.data-table td.num { text-align: right; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 12.5px; font-weight: 600; color: var(--slate); }
.form-control {
    padding: 9px 11px; border: 1px solid var(--border); border-radius: 7px;
    font-size: 13.5px; font-family: inherit; background: #fff; color: var(--ink-navy);
}
.form-control:focus { outline: none; border-color: var(--sand-gold); box-shadow: 0 0 0 3px rgba(201,161,90,0.2); }

/* ---------- Auth (login) ---------- */
.auth-wrap {
    min-height: 100vh; display: flex; align-items: center; justify-content: right;
 } 	
  /*background: radial-gradient(circle at 20% 20%, #17294A, var(--ink-navy) 60%);
} */
.auth-card {
    width: 500px; background: #fff; border-radius: 14px; padding: 34px 32px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.35);
}
.auth-card .mark {
    width: 190px; height: 40px; border-radius: 9px; margin-bottom: 14px;
    background: linear-gradient(135deg, var(--sand-gold), #A87F3B);
    display: flex; align-items: center; justify-content: center; font-weight: 700; color: var(--ink-navy);
}

.alert { padding: 10px 14px; border-radius: 7px; font-size: 13px; margin-bottom: 14px; }
.alert-error { background: #F5DDD6; color: #8A3220; }
.alert-success { background: #DCEEE2; color: #23593A; }

.text-muted { color: var(--slate-soft); }
.flex-between { display: flex; align-items: center; justify-content: space-between; }

@media (max-width: 900px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.required {
    color: red;
    font-weight: bold;
}

.actions {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.actions-cell {
    white-space: nowrap !important;
    width: 120px !important;
    min-width: 120px !important;
    text-align: left !important;
}

.lead-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.lead-actions .btn {
    flex: 0 0 auto !important;
    width: 32px;
    height: 32px;
    padding: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* ================================
   LEADS TABLE - COLUMN ALIGNMENT
================================ */

.leads-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    table-layout: fixed;
}

/* All cells */
.leads-table th,
.leads-table td {
    vertical-align: middle !important;
    text-align: left;
    white-space: nowrap;
    padding: 12px 10px;
}

/* Column 1 - Travel Date */
.leads-table th:nth-child(1),
.leads-table td:nth-child(1) {
    width: 13%;
}

/* Column 2 - Return Date */
.leads-table th:nth-child(2),
.leads-table td:nth-child(2) {
    width: 13%;
}

/* Column 3 - Budget */
.leads-table th:nth-child(3),
.leads-table td:nth-child(3) {
    width: 14%;
}

/* Column 4 - Source */
.leads-table th:nth-child(4),
.leads-table td:nth-child(4) {
    width: 10%;
}

/* Column 5 - Status */
.leads-table th:nth-child(5),
.leads-table td:nth-child(5) {
    width: 10%;
}

/* Column 6 - Agent */
.leads-table th:nth-child(6),
.leads-table td:nth-child(6) {
    width: 10%;
}

/* Column 7 - Created */
.leads-table th:nth-child(7),
.leads-table td:nth-child(7) {
    width: 15%;
}

/* Column 8 - Actions */
.leads-table th:nth-child(8),
.leads-table td:nth-child(8) {
    width: 15%;
    white-space: nowrap !important;
}


/* ================================
   ACTION BUTTONS
================================ */

.leads-table .actions-cell {
    white-space: nowrap !important;
    text-align: left !important;
    vertical-align: middle !important;
}

.leads-table .lead-actions {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 7px !important;
    flex-wrap: nowrap !important;
    white-space: nowrap !important;
}

.leads-table .lead-actions .btn {
    flex: 0 0 auto !important;
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}


/* Prevent date/revenue/status content from wrapping */
.leads-table td:nth-child(1),
.leads-table td:nth-child(2),
.leads-table td:nth-child(3),
.leads-table td:nth-child(4),
.leads-table td:nth-child(5),
.leads-table td:nth-child(6),
.leads-table td:nth-child(7),
.leads-table td:nth-child(8) {
    white-space: nowrap !important;
}