/* =========================================================
   Naggiar Talent Portal — Base Stylesheet
   Brand: deep ink + amber accent (logo-driven)
   Fully responsive, animated, with refined micro-interactions
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Playfair+Display:wght@700;800&display=swap');

:root {
    --ink-900:  #0c0d10;
    --ink-800:  #14161b;
    --ink-700:  #1d2027;
    --ink-600:  #2a2f38;
    --ink-500:  #3b414c;

    --paper:    #faf9f5;
    --paper-2:  #f5f4ee;
    --card:     #ffffff;
    --line:     #ececea;
    --line-2:   #e0dfd8;
    --muted:    #6b7280;
    --text:     #14161b;
    --text-soft:#4b5563;

    --amber-700:#a36400;
    --amber-600:#c98300;
    --amber-500:#f5a623;
    --amber-400:#ffbf3f;
    --amber-200:#ffd984;
    --amber-100:#fff4dc;
    --amber-50: #fffaee;

    --green-600:#15803d;
    --green-500:#16a34a;
    --green-100:#dcfce7;
    --red-600:  #b91c1c;
    --red-500:  #dc2626;
    --red-100:  #fee2e2;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50:  #f9fafb;

    --radius:    14px;
    --radius-md: 10px;
    --radius-sm: 8px;
    --radius-lg: 20px;

    --shadow-xs: 0 1px 2px rgba(20,22,27,0.05);
    --shadow-sm: 0 2px 4px rgba(20,22,27,0.06), 0 4px 12px rgba(20,22,27,0.04);
    --shadow-md: 0 8px 24px rgba(20,22,27,0.08), 0 2px 6px rgba(20,22,27,0.04);
    --shadow-lg: 0 24px 48px rgba(20,22,27,0.14), 0 8px 16px rgba(20,22,27,0.06);
    --shadow-amber: 0 12px 32px rgba(245,166,35,0.28);

    --max-w:    1200px;
    --header-h: 76px;

    --ease-out:  cubic-bezier(0.22, 1, 0.36, 1);
    --ease-soft: cubic-bezier(0.4, 0.0, 0.2, 1);

    --t-fast: 150ms;
    --t-med:  280ms;
    --t-slow: 500ms;
}

/* =========================================================
   Reset / Base
   ========================================================= */
* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

html, body { margin: 0; padding: 0; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--paper);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--gray-200); border-radius: 6px; border: 3px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--amber-400); }

a {
    color: var(--amber-600);
    text-decoration: none;
    transition: color var(--t-fast) var(--ease-soft);
}
a:hover { color: var(--amber-700); }

h1, h2, h3, h4, h5 {
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5em;
    color: var(--ink-900);
    line-height: 1.2;
}
h1 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
h3 { font-size: 1.1rem; }
h4 { font-size: 0.95rem; }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

img { max-width: 100%; display: block; }

::selection { background: var(--amber-200); color: var(--ink-900); }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 clamp(16px, 4vw, 28px); }

/* =========================================================
   Animations
   ========================================================= */
@keyframes fadeIn        { from { opacity: 0; }                          to { opacity: 1; } }
@keyframes fadeInUp      { from { opacity: 0; transform: translateY(16px); }  to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown    { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleIn       { from { opacity: 0; transform: scale(0.96); }      to { opacity: 1; transform: scale(1); } }
@keyframes shimmer       { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
@keyframes pulse         { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.06); opacity: .85; } }
@keyframes float         { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin          { to { transform: rotate(360deg); } }
@keyframes glow          { 0%,100% { box-shadow: 0 0 0 0 rgba(245,166,35,.4); } 50% { box-shadow: 0 0 0 12px rgba(245,166,35,0); } }
@keyframes slideInRight  { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
@keyframes gradientMove  { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }

.fade-in        { animation: fadeIn   var(--t-slow) var(--ease-out) both; }
.fade-in-up     { animation: fadeInUp var(--t-slow) var(--ease-out) both; }
.scale-in       { animation: scaleIn  var(--t-med)  var(--ease-out) both; }

/* Scroll-triggered reveal */
[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
    will-change: opacity, transform;
}
[data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

/* Stagger delays for child reveal */
[data-reveal-stagger] > *      { opacity: 0; transform: translateY(20px); transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out); }
[data-reveal-stagger].is-visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0ms; }
[data-reveal-stagger].is-visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 80ms; }
[data-reveal-stagger].is-visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 160ms; }
[data-reveal-stagger].is-visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 240ms; }
[data-reveal-stagger].is-visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 320ms; }
[data-reveal-stagger].is-visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 400ms; }
[data-reveal-stagger].is-visible > *:nth-child(n+7) { opacity: 1; transform: none; transition-delay: 480ms; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
    background: var(--ink-900);
    color: #fff;
    border-bottom: 3px solid var(--amber-500);
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: saturate(180%) blur(8px);
    transition: background var(--t-med) var(--ease-soft), box-shadow var(--t-med);
    animation: fadeInDown 500ms var(--ease-out) both;
}
.site-header.is-scrolled { box-shadow: var(--shadow-md); }
.site-header .container {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 16px; padding-bottom: 16px; gap: 24px;
    min-height: var(--header-h);
}
.site-header .brand {
    display: flex; align-items: center; gap: 14px;
    transition: transform var(--t-med) var(--ease-out);
}
.site-header .brand:hover { transform: translateX(2px); }
.site-header .brand img { height: 36px; width: auto; transition: transform var(--t-med); }
.site-header .brand:hover img { transform: rotate(-2deg) scale(1.05); }
.site-header .brand .tagline {
    font-size: .72rem; color: #b8bcc4;
    letter-spacing: .14em; text-transform: uppercase;
    font-weight: 600;
}
.site-nav {
    display: flex; align-items: center; gap: 4px;
}
.site-nav a {
    color: #e7e8ec; padding: 10px 14px; border-radius: var(--radius-sm);
    font-size: .92rem; font-weight: 500; position: relative;
    transition: all var(--t-fast) var(--ease-soft);
}
.site-nav a:hover {
    color: var(--amber-400);
    background: rgba(255,255,255,.04);
    text-decoration: none;
}
.site-nav .pill {
    background: var(--amber-500); color: var(--ink-900) !important; padding: 10px 20px;
    border-radius: 999px; font-weight: 700; margin-left: 8px;
    box-shadow: 0 4px 14px rgba(245,166,35,.3);
}
.site-nav .pill:hover {
    background: var(--amber-400) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(245,166,35,.4);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: transparent; border: 0; padding: 8px; cursor: pointer;
    width: 44px; height: 44px;
    color: #fff;
}
.menu-toggle span {
    display: block; width: 24px; height: 2px; margin: 5px auto;
    background: #fff; border-radius: 2px;
    transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast);
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
    .menu-toggle { display: block; }
    .site-nav {
        position: absolute; top: 100%; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: var(--ink-900); padding: 8px;
        border-bottom: 3px solid var(--amber-500);
        max-height: 0; overflow: hidden;
        transition: max-height var(--t-med) var(--ease-out), padding var(--t-med);
    }
    .site-nav.is-open {
        max-height: 80vh;
        padding: 12px 16px 20px;
    }
    .site-nav a { padding: 14px 12px; font-size: 1rem; border-radius: 8px; }
    .site-nav .pill { margin: 8px 0 0; text-align: center; }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--ink-800); color: #c5c8cf;
    padding: 32px 0; margin-top: 80px; font-size: .9rem;
    border-top: 1px solid var(--ink-700);
}
.site-footer .container {
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
    align-items: center;
}
.site-footer a { color: var(--amber-400); }
.site-footer a:hover { color: var(--amber-200); }

/* =========================================================
   HERO
   ========================================================= */
.hero {
    background:
      radial-gradient(circle at 85% 15%, rgba(245,166,35,0.20), transparent 55%),
      radial-gradient(circle at 15% 85%, rgba(245,166,35,0.08), transparent 50%),
      linear-gradient(135deg, var(--ink-900) 0%, var(--ink-800) 60%, var(--ink-700) 100%);
    background-size: 200% 200%;
    animation: gradientMove 18s var(--ease-soft) infinite;
    color: #fff; padding: clamp(60px, 12vw, 110px) 0 clamp(80px, 14vw, 140px);
    position: relative; overflow: hidden;
}
.hero::before, .hero::after {
    content: ''; position: absolute; border-radius: 50%;
    background: radial-gradient(circle, rgba(245,166,35,0.18), transparent 70%);
    pointer-events: none;
    animation: float 8s var(--ease-soft) infinite;
}
.hero::before { width: 380px; height: 380px; top: -120px; right: -80px; }
.hero::after  { width: 280px; height: 280px; bottom: -120px; left: -60px; animation-delay: -3s; }
.hero .container { position: relative; z-index: 2; }
.hero h1 {
    color: #fff; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.1; max-width: 780px;
    margin-top: 0;
    animation: fadeInUp 700ms var(--ease-out) both;
}
.hero h1 .accent {
    background: linear-gradient(120deg, var(--amber-400), var(--amber-200));
    -webkit-background-clip: text; background-clip: text;
    color: transparent;
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-weight: 800;
    /* Italic serif glyphs lean past their typographic box. With
       `background-clip: text`, the gradient is clipped to that box —
       slicing the tail off letters like the "e" in "since" and the
       "0" in "1860". A small horizontal padding widens the clip area
       so the full glyph renders. `box-decoration-break: clone` makes
       the padding apply to EACH wrapped line fragment (not just the
       last one), so a line ending mid-span (e.g. "...quality since")
       also keeps its trailing italic overhang. */
    padding-right: 0.15em;
    padding-left: 0.05em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}
.hero p.lead {
    color: #d6d8dd; max-width: 620px; font-size: clamp(1rem, 2vw, 1.18rem);
    margin-top: 18px;
    animation: fadeInUp 700ms 120ms var(--ease-out) both;
}
.hero .cta-row {
    margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap;
    animation: fadeInUp 700ms 240ms var(--ease-out) both;
}
.hero .meta-row {
    display: flex; gap: 28px; flex-wrap: wrap; margin-top: 50px;
    color: #b8bcc4; font-size: .9rem;
    animation: fadeInUp 700ms 360ms var(--ease-out) both;
}
.hero .meta-row .dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%;
    background: var(--amber-500); margin-right: 8px; vertical-align: middle;
    animation: pulse 2.4s var(--ease-soft) infinite;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 12px 22px; border-radius: var(--radius-sm); border: 1px solid transparent;
    font-weight: 600; font-size: .94rem; font-family: inherit;
    cursor: pointer; text-decoration: none;
    transition: transform var(--t-fast) var(--ease-out),
                background var(--t-fast),
                color var(--t-fast),
                border-color var(--t-fast),
                box-shadow var(--t-med) var(--ease-out);
    position: relative; overflow: hidden;
    user-select: none;
    line-height: 1.2;
}
.btn::after {
    content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
    border-radius: 50%; background: rgba(255,255,255,.35);
    transform: translate(-50%, -50%);
    transition: width 500ms var(--ease-out), height 500ms var(--ease-out), opacity 500ms;
    opacity: 0;
}
.btn:active::after { width: 240px; height: 240px; opacity: 1; transition: 0s; }
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 2px solid var(--amber-400); outline-offset: 2px; }

.btn-primary {
    background: linear-gradient(135deg, var(--amber-500), var(--amber-400));
    color: var(--ink-900);
    border-color: var(--amber-500);
    box-shadow: 0 4px 14px rgba(245,166,35,.3);
}
.btn-primary:hover {
    box-shadow: 0 10px 28px rgba(245,166,35,.45);
    color: var(--ink-900);
}
.btn-dark    { background: var(--ink-900); color: #fff; border-color: var(--ink-900); box-shadow: var(--shadow-xs); }
.btn-dark:hover    { background: var(--ink-700); box-shadow: var(--shadow-md); color: #fff; }
.btn-outline { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline:hover { background: rgba(255,255,255,.08); border-color: #fff; color: #fff; }
.btn-ghost   { background: transparent; color: var(--text); border-color: var(--gray-200); }
.btn-ghost:hover   { background: var(--gray-50); border-color: var(--gray-200); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-danger  { background: var(--red-500); color: #fff; border-color: var(--red-500); }
.btn-danger:hover  { background: var(--red-600); color: #fff; box-shadow: 0 6px 18px rgba(220,38,38,.3); }
.btn-success { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.btn-success:hover { background: var(--green-600); color: #fff; box-shadow: 0 6px 18px rgba(22,163,74,.3); }
.btn-sm { padding: 8px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 26px; font-size: 1rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none !important; box-shadow: none !important; }

/* loading state */
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::before {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 16px; height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor; border-top-color: transparent;
    border-radius: 50%; animation: spin 700ms linear infinite;
    color: var(--ink-900);
}
.btn-dark.is-loading::before, .btn-danger.is-loading::before, .btn-success.is-loading::before { color: #fff; }

/* =========================================================
   CARDS
   ========================================================= */
.card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); box-shadow: var(--shadow-xs);
    padding: clamp(20px, 3vw, 28px);
    transition: box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), border-color var(--t-med);
}
.card + .card { margin-top: 18px; }
.card h2:first-child, .card h3:first-child { margin-top: 0; }

.card-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.choice-card {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 28px; text-align: left;
    cursor: pointer; display: block; position: relative; overflow: hidden;
    transition: transform var(--t-med) var(--ease-out),
                box-shadow var(--t-med) var(--ease-out),
                border-color var(--t-med);
    isolation: isolate;
}
.choice-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, var(--amber-50) 0%, transparent 60%);
    opacity: 0; transition: opacity var(--t-med) var(--ease-out);
    z-index: -1;
}
.choice-card::after {
    content: ''; position: absolute; top: 0; left: -100%;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500));
    transition: left var(--t-med) var(--ease-out);
}
.choice-card:hover {
    border-color: var(--amber-400);
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.choice-card:hover::before { opacity: 1; }
.choice-card:hover::after { left: 0; }
.choice-card .ic {
    width: 52px; height: 52px; border-radius: 12px; display: inline-flex;
    align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--amber-100), var(--amber-200));
    color: var(--amber-700); font-size: 1.5rem; margin-bottom: 16px;
    font-weight: 800;
    transition: transform var(--t-med) var(--ease-out);
    box-shadow: 0 4px 12px rgba(245,166,35,.18);
}
.choice-card:hover .ic { transform: scale(1.1) rotate(-5deg); }
.choice-card h3 { color: var(--ink-900); margin-bottom: 8px; font-size: 1.2rem; }
.choice-card p { color: var(--text-soft); margin: 0; }
.choice-card .arrow {
    display: inline-block; margin-top: 14px; color: var(--amber-600);
    font-weight: 600; font-size: .9rem;
    transition: transform var(--t-med) var(--ease-out);
}
.choice-card:hover .arrow { transform: translateX(4px); }

/* Stat tile (dashboard) */
.stat-tile {
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 18px 20px;
    transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
    position: relative; overflow: hidden;
}
.stat-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-tile .label {
    color: var(--muted); font-size: .72rem;
    text-transform: uppercase; letter-spacing: .08em; font-weight: 600;
}
.stat-tile .value {
    font-size: clamp(1.8rem, 3.6vw, 2.4rem); font-weight: 800;
    color: var(--ink-900); margin: 6px 0 8px;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

/* =========================================================
   FORMS
   ========================================================= */
.form-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.field label {
    display: block; font-weight: 600; font-size: .9rem;
    color: var(--ink-900); margin-bottom: 6px;
}
.field label .req { color: var(--red-500); margin-left: 2px; }
.field .hint {
    font-size: .82rem; color: var(--muted); margin-top: 6px;
    transition: color var(--t-fast);
}
.field .hint.error { color: var(--red-500); }

input[type=text], input[type=email], input[type=tel], input[type=url], input[type=password],
input[type=number], input[type=date], select, textarea {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--line-2);
    border-radius: var(--radius-sm); font-size: .95rem; font-family: inherit;
    background: #fff; color: var(--text);
    transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
input::placeholder, textarea::placeholder { color: #a1a5ad; }
input:hover, select:hover, textarea:hover { border-color: var(--gray-200); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--amber-500);
    box-shadow: 0 0 0 4px rgba(245,166,35,.16);
    background: var(--amber-50);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.5; }

.file-drop {
    border: 2px dashed var(--line-2); border-radius: var(--radius);
    padding: clamp(24px, 4vw, 36px); text-align: center;
    transition: all var(--t-med) var(--ease-out);
    cursor: pointer; background: linear-gradient(180deg, var(--paper-2), #fff);
    position: relative; overflow: hidden;
}
.file-drop::before {
    content: '↑'; display: block; font-size: 2rem;
    color: var(--amber-500); margin-bottom: 8px;
    transition: transform var(--t-med) var(--ease-out);
}
.file-drop:hover, .file-drop.is-drag {
    border-color: var(--amber-500);
    background: linear-gradient(180deg, var(--amber-50), #fff);
    transform: scale(1.005);
}
.file-drop:hover::before, .file-drop.is-drag::before { transform: translateY(-4px) scale(1.1); }
.file-drop input[type=file] { display: none; }
.file-drop .file-name {
    font-weight: 600; color: var(--amber-700); margin-top: 10px;
    word-break: break-all;
}

/* =========================================================
   ALERTS / FLASH (toast-style top-right)
   ========================================================= */
.alert {
    padding: 14px 18px; border-radius: var(--radius-md); margin-bottom: 18px;
    border-left: 4px solid; font-size: .92rem;
    display: flex; align-items: flex-start; gap: 12px;
    animation: slideInRight 400ms var(--ease-out) both;
    box-shadow: var(--shadow-sm);
}
.alert::before {
    flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: .85rem; color: #fff;
}
.alert-success { background: #f0fdf4; border-color: var(--green-500); color: #14532d; }
.alert-success::before { content: '✓'; background: var(--green-500); }
.alert-error   { background: #fef2f2; border-color: var(--red-500); color: #7f1d1d; }
.alert-error::before { content: '!'; background: var(--red-500); }
.alert-info    { background: var(--amber-50); border-color: var(--amber-500); color: #7c4a03; }
.alert-info::before { content: 'i'; background: var(--amber-500); color: var(--ink-900); }

/* =========================================================
   BADGES / TAGS
   ========================================================= */
.badge {
    display: inline-flex; align-items: center; padding: 4px 10px; border-radius: 999px;
    font-size: .73rem; font-weight: 700; letter-spacing: .03em;
    text-transform: uppercase;
}
.badge-amber  { background: var(--amber-100); color: #7c4a03; }
.badge-green  { background: var(--green-100); color: #14532d; }
.badge-red    { background: var(--red-100);   color: #7f1d1d; }
.badge-gray   { background: var(--gray-100);  color: var(--text-soft); }

.tag {
    display: inline-block; background: var(--gray-100); color: var(--text-soft);
    padding: 5px 11px; border-radius: 6px; font-size: .82rem;
    margin: 2px 4px 2px 0;
    transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast);
}
.tag:hover { background: var(--amber-100); color: var(--amber-700); transform: translateY(-1px); }

/* =========================================================
   TABLES
   ========================================================= */
.table-wrap {
    overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius);
    background: #fff; box-shadow: var(--shadow-xs);
    -webkit-overflow-scrolling: touch;
}
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td {
    text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line);
    vertical-align: top;
}
table.data th {
    background: var(--gray-50); color: var(--text-soft); font-weight: 700;
    font-size: .75rem; text-transform: uppercase; letter-spacing: .05em;
    position: sticky; top: 0; z-index: 1;
}
table.data tbody tr {
    transition: background var(--t-fast);
}
table.data tbody tr:hover td { background: var(--amber-50); }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data a {  font-weight: 600; }
table.data a:hover { color: var(--amber-700); }

/* =========================================================
   ADMIN LAYOUT
   ========================================================= */
.admin-shell {
    display: grid; grid-template-columns: 240px 1fr;
    min-height: calc(100vh - var(--header-h) - 80px);
}
.admin-sidebar {
    background: var(--ink-900); color: #cbd0d8; padding: 28px 0;
    position: sticky; top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow-y: auto;
    transition: transform var(--t-med) var(--ease-out);
}
.admin-sidebar .who {
    padding: 0 22px 22px; border-bottom: 1px solid var(--ink-700);
    margin-bottom: 14px;
}
.admin-sidebar .who .name { color: #fff; font-weight: 600; font-size: .95rem; }
.admin-sidebar .who .role {
    font-size: .72rem; color: var(--amber-400);
    text-transform: uppercase; letter-spacing: .1em; margin-top: 2px;
    font-weight: 700;
}
.admin-sidebar a {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 22px; color: #cbd0d8; font-weight: 500; font-size: .92rem;
    border-left: 3px solid transparent;
    transition: all var(--t-fast) var(--ease-soft);
    position: relative;
}
.admin-sidebar a:hover {
    background: var(--ink-800); color: #fff; text-decoration: none;
    padding-left: 26px;
}
.admin-sidebar a.active {
    color: #fff; border-left-color: var(--amber-500); background: var(--ink-800);
}
.admin-sidebar-section {
    color: #6b7280; font-size: .68rem; font-weight: 700;
    letter-spacing: .12em; text-transform: uppercase;
    padding: 18px 22px 6px;
    margin-top: 4px;
    border-top: 1px solid var(--ink-700);
}
.admin-sidebar-section:first-child { border-top: 0; margin-top: 0; }

.admin-sidebar a.active::after {
    content: ''; position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
    width: 6px; height: 6px; border-radius: 50%; background: var(--amber-500);
    animation: pulse 2s var(--ease-soft) infinite;
}

.admin-main {
    padding: clamp(20px, 4vw, 36px); background: var(--paper);
    animation: fadeIn var(--t-slow) var(--ease-out) both;
    min-width: 0;
}
.admin-main .page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 18px; flex-wrap: wrap; margin-bottom: 24px;
    padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.admin-main .page-head h1 { margin: 0; }

/* Mobile: collapse sidebar to a slide-in drawer */
.admin-sidebar-toggle {
    display: none;
    background: var(--ink-900); color: #fff; border: 0;
    padding: 10px 14px; border-radius: var(--radius-sm);
    font-weight: 600; cursor: pointer; gap: 8px; align-items: center;
    margin-bottom: 14px;
}

@media (max-width: 900px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar-toggle { display: inline-flex; }
    .admin-sidebar {
        position: fixed; top: 0; left: 0; bottom: 0;
        width: 280px; max-width: 88vw; height: 100vh;
        z-index: 200; transform: translateX(-100%);
        box-shadow: var(--shadow-lg); padding-top: 24px;
    }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-sidebar-overlay {
        position: fixed; inset: 0; background: rgba(12,13,16,.5);
        z-index: 199; opacity: 0; pointer-events: none;
        transition: opacity var(--t-med);
    }
    .admin-sidebar-overlay.is-open { opacity: 1; pointer-events: auto; }
}

/* =========================================================
   AUTH (login)
   ========================================================= */
.auth-wrap {
    min-height: 100vh; display: grid; place-items: center;
    background:
        radial-gradient(circle at 20% 30%, rgba(245,166,35,.15), transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(245,166,35,.08), transparent 50%),
        var(--ink-900);
    padding: 24px;
    position: relative; overflow: hidden;
}
.auth-wrap::before {
    content: ''; position: absolute; width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(245,166,35,.12), transparent 70%);
    top: -200px; right: -200px; border-radius: 50%;
    animation: float 10s var(--ease-soft) infinite;
}
.auth-card {
    width: 100%; max-width: 440px;
    background: #fff; border-radius: 18px;
    padding: clamp(28px, 5vw, 40px);
    box-shadow: var(--shadow-lg);
    position: relative; z-index: 2;
    animation: scaleIn var(--t-med) var(--ease-out) both;
}
.auth-card .brand { text-align: center; margin-bottom: 24px; }
.auth-card .brand img { height: 44px; margin: 0 auto 8px; }
.auth-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 24px; }

/* =========================================================
   WORKFLOW STEPS
   ========================================================= */
.workflow {
    display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
    background: linear-gradient(180deg, var(--paper-2), #fff);
    border: 1px solid var(--line);
    padding: 16px; border-radius: var(--radius); margin-bottom: 18px;
    box-shadow: var(--shadow-xs);
}
.workflow .step {
    display: flex; align-items: center; gap: 8px; padding: 8px 14px;
    border-radius: 999px; background: #fff; border: 1px solid var(--line);
    font-size: .85rem; font-weight: 600;
    transition: all var(--t-med) var(--ease-out);
}
.workflow .step .num {
    width: 24px; height: 24px; border-radius: 50%; background: var(--gray-200);
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .78rem;
    transition: all var(--t-med);
}
.workflow .step.done {
    background: var(--green-100); border-color: var(--green-500); color: #14532d;
}
.workflow .step.done .num { background: var(--green-500); color: #fff; }
.workflow .step.current {
    background: var(--amber-100); border-color: var(--amber-500); color: var(--amber-700);
    animation: glow 2.4s var(--ease-soft) infinite;
}
.workflow .step.current .num { background: var(--amber-500); color: var(--ink-900); }
.workflow .arrow { color: var(--gray-200); font-weight: 700; }

/* =========================================================
   CANDIDATE DETAIL
   ========================================================= */
.kv {
    display: grid; grid-template-columns: 140px 1fr; gap: 10px 18px;
    font-size: .92rem;
}
.kv dt { color: var(--muted); font-weight: 500; }
.kv dd { margin: 0; color: var(--text); }
@media (max-width: 600px) { .kv { grid-template-columns: 1fr; gap: 4px 0; }
    .kv dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; margin-top: 8px; }
    .kv dt:first-child { margin-top: 0; }
}

.score-pill {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 52px; padding: 6px 12px; border-radius: 999px; font-weight: 800;
    background: var(--gray-100); color: var(--text-soft);
    font-variant-numeric: tabular-nums;
}
.score-pill.high { background: var(--green-100); color: #14532d; }
.score-pill.med  { background: var(--amber-100); color: #7c4a03; }
.score-pill.low  { background: var(--red-100);   color: #7f1d1d; }

.timeline { border-left: 2px solid var(--line); padding-left: 22px; }
.timeline .item { margin-bottom: 22px; position: relative; }
.timeline .item::before {
    content: ""; position: absolute; left: -29px; top: 6px;
    width: 12px; height: 12px; border-radius: 50%;
    background: var(--amber-500);
    box-shadow: 0 0 0 4px var(--paper);
}
.timeline .item .meta { color: var(--muted); font-size: .82rem; margin-bottom: 4px; }
.timeline .item .body { color: var(--text); }

/* =========================================================
   UTILITIES
   ========================================================= */
.stack-sm > * + * { margin-top: 8px; }
.stack-md > * + * { margin-top: 16px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 18px; }
.hidden { display: none !important; }

/* =========================================================
   COMBOBOX (autocomplete with create-new)
   ========================================================= */
.combobox { position: relative; }
.combobox input { padding-right: 36px; }
.combobox::after {
    content: ''; position: absolute; right: 14px; top: 50%;
    margin-top: -4px; width: 8px; height: 8px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg);
    pointer-events: none; transition: transform var(--t-fast);
}
.combobox.is-open::after { transform: rotate(-135deg); margin-top: 0; }

.combobox-menu {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: #fff; border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg); z-index: 50;
    overflow: hidden; max-height: 320px;
    animation: fadeIn 120ms var(--ease-out) both;
}
.combobox-options {
    list-style: none; margin: 0; padding: 4px 0;
    max-height: 280px; overflow-y: auto;
}
.combobox-option {
    padding: 8px 14px; cursor: pointer; display: grid;
    grid-template-columns: 1fr auto; gap: 4px 12px;
    align-items: baseline;
    transition: background var(--t-fast);
}
.combobox-option:hover, .combobox-option.is-active {
    background: var(--amber-50);
}
.combobox-option-main { color: var(--text); font-weight: 500; font-size: .93rem; }
.combobox-option-main mark {
    background: var(--amber-200); color: var(--ink-900);
    padding: 0 2px; border-radius: 3px;
}
.combobox-option-sub {
    color: var(--muted); font-size: .8rem; grid-column: 1;
}
.combobox-option-country {
    color: var(--muted); font-size: .78rem; grid-column: 2;
    align-self: center;
    background: var(--gray-100); padding: 2px 8px; border-radius: 999px;
}
.combobox-empty {
    padding: 12px 14px; color: var(--muted); font-size: .9rem;
}
.combobox-create {
    border-top: 1px dashed var(--line); padding: 6px;
}
.combobox-create-btn {
    width: 100%; background: var(--amber-50); color: var(--amber-700);
    border: 1px dashed var(--amber-400); border-radius: var(--radius-sm);
    padding: 8px 12px; cursor: pointer;
    font-family: inherit; font-size: .9rem;
    transition: background var(--t-fast);
}
.combobox-create-btn:hover { background: var(--amber-100); }

/* =========================================================
   ICONS (inline SVG)
   ========================================================= */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon + span, span + .icon { margin-left: 4px; }

/* Choice card icon override (was a single letter, now an SVG) */
.choice-card .ic .icon { width: 26px; height: 26px; }

/* =========================================================
   SECTION HEADERS
   ========================================================= */
.section-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin-bottom: 18px;
}
.section-head h2 { margin: 8px 0 4px; }
.section-head p  { margin: 0; }

/* =========================================================
   ROLE CARDS (open positions on landing page)
   ========================================================= */
.role-grid {
    display: grid; gap: 18px;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.role-card {
    display: flex; flex-direction: column;
    background: var(--card); border: 1px solid var(--line);
    border-radius: var(--radius); padding: 22px 22px 18px;
    text-decoration: none; color: var(--text);
    position: relative; overflow: hidden; isolation: isolate;
    transition: transform var(--t-med) var(--ease-out),
                box-shadow var(--t-med) var(--ease-out),
                border-color var(--t-med);
    min-height: 220px;
}
.role-card::after {
    content: ''; position: absolute; top: 0; left: 0;
    width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500));
    transform: scaleX(0); transform-origin: left;
    transition: transform var(--t-med) var(--ease-out);
}
.role-card:hover {
    border-color: var(--amber-400);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}
.role-card:hover::after { transform: scaleX(1); }
.role-card-head {
    display: flex; align-items: center; justify-content: space-between;
    gap: 10px; margin-bottom: 14px;
}
.role-card-head > div { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.role-icon {
    width: 44px; height: 44px; border-radius: 10px;
    background: linear-gradient(135deg, var(--amber-100), var(--amber-200));
    color: var(--amber-700);
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(245,166,35,.18);
    transition: transform var(--t-med) var(--ease-out);
}
.role-card:hover .role-icon { transform: scale(1.08) rotate(-4deg); }
.role-card h3 { margin: 0 0 6px; font-size: 1.1rem; color: var(--ink-900); }
.role-card p { color: var(--text-soft); font-size: .9rem; flex-grow: 1; margin-bottom: 14px; }
.role-card-foot {
    display: flex; align-items: center; justify-content: space-between;
    padding-top: 12px; border-top: 1px dashed var(--line);
}
.role-apply {
    color: var(--amber-600); font-weight: 700; font-size: .9rem;
    transition: transform var(--t-med) var(--ease-out);
}
.role-card:hover .role-apply { transform: translateX(3px); }

/* Two-column responsive layout for detail pages (main + sidebar) */
.split-2-1 {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}
@media (max-width: 1000px) {
    .split-2-1 { grid-template-columns: 1fr; }
}

/* AI summary card emphasis */
.ai-summary-card {
    background: linear-gradient(180deg, var(--amber-50) 0%, #fff 80px);
    border-color: var(--amber-200);
}

/* Simple loader/skeleton */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: 6px;
    color: transparent !important;
}

/* ============================================================
   Dashboard analytics — lightweight, dependency-free charts
   ============================================================ */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}
.an-title {
    margin: 0 0 14px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

/* Horizontal bar list (funnel, sources, departments, type) */
.barlist { display: flex; flex-direction: column; gap: 11px; }
.barrow {
    display: grid;
    grid-template-columns: 120px 1fr 40px;
    gap: 10px;
    align-items: center;
}
.barrow .bl {
    font-size: 0.82rem;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.barrow .bt {
    background: var(--gray-100);
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.barrow .bf {
    height: 100%;
    background: linear-gradient(90deg, var(--amber-400), var(--amber-500));
    border-radius: 999px;
    transition: width var(--t-slow) var(--ease-out);
}
.barrow .bv {
    font-size: 0.82rem;
    font-weight: 700;
    text-align: right;
    color: var(--text);
}

/* Vertical column chart (applications over time) */
.colchart {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    height: 130px;
}
.colchart .col {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    gap: 5px;
    height: 100%;
}
.colchart .cbar {
    width: 100%;
    max-width: 38px;
    background: linear-gradient(180deg, var(--amber-500), var(--amber-400));
    border-radius: 6px 6px 0 0;
    min-height: 3px;
    transition: height var(--t-slow) var(--ease-out);
}
.colchart .clbl { font-size: 0.68rem; color: var(--muted); text-align: center; }
.colchart .cval { font-size: 0.72rem; font-weight: 700; color: var(--text); }

/* Donut chart (hiring outcomes) */
.donutwrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut {
    width: 132px; height: 132px; border-radius: 50%;
    position: relative; flex: none;
}
.donut-hole {
    position: absolute; inset: 20px;
    background: var(--paper, #fff); border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    text-align: center;
}
.donut-hole strong { font-size: 1.35rem; line-height: 1; color: var(--text); }
.donut-hole span { font-size: 0.66rem; color: var(--muted); margin-top: 3px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.donut-legend li { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--text); }
.donut-legend .dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; flex: none; }
.donut-legend strong { margin-left: auto; padding-left: 12px; }

/* ============================================================
   Outlook-style mailbox (inbox page): rail | list | reading pane
   ============================================================ */
.mailbox {
    display: grid;
    grid-template-columns: 172px minmax(250px, 340px) 1fr;
    border: 1px solid var(--line);
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    background: var(--paper, #fff);
    min-height: 600px;
}
.mbx-rail {
    border-right: 1px solid var(--line);
    padding: 14px 12px;
    background: var(--surface, #fafaf8);
    display: flex; flex-direction: column; gap: 14px;
}
.mbx-compose { justify-content: center; }
.mbx-folders { display: flex; flex-direction: column; gap: 2px; }
.mbx-folder {
    display: block; padding: 9px 12px; border-radius: 8px;
    color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem;
}
.mbx-folder:hover { background: rgba(0,0,0,0.04); }
.mbx-folder.active { background: var(--amber-100, #fdebc8); }

.mbx-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 72vh; }
.mbx-item {
    display: block; padding: 11px 14px;
    border-bottom: 1px solid var(--line);
    text-decoration: none; color: var(--text);
}
.mbx-item:hover { background: rgba(0,0,0,0.03); }
.mbx-item.active { background: var(--amber-50, #fff7ea); box-shadow: inset 3px 0 0 var(--amber-500); }
.mbx-item-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.mbx-from { font-weight: 600; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mbx-date { color: var(--muted); font-size: 0.72rem; white-space: nowrap; flex: none; }
.mbx-subj { font-size: 0.85rem; color: var(--text-soft, #555); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); margin-right: 6px; vertical-align: middle; }

.mbx-read { padding: 20px; overflow-y: auto; max-height: 72vh; }
.mbx-body { width: 100%; min-height: 340px; border: 1px solid var(--line); border-radius: 8px; background: #fff; margin-top: 12px; }
.mbx-reply { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.mbx-reply > summary { cursor: pointer; font-weight: 600; }
.mbx-empty { padding: 44px 20px; text-align: center; }
.mbx-refresh { font-size: 0.85rem; color: var(--muted); }
.mbx-loading { padding: 28px 16px; color: var(--muted); font-size: 0.9rem; display: flex; align-items: center; gap: 10px; }
.mbx-spinner {
    width: 15px; height: 15px; border-radius: 50%; flex: none;
    border: 2px solid var(--line); border-top-color: var(--amber-500);
    display: inline-block; animation: mbx-spin 0.7s linear infinite;
}
@keyframes mbx-spin { to { transform: rotate(360deg); } }

@media (max-width: 880px) {
    .mailbox { grid-template-columns: 1fr; min-height: 0; }
    .mbx-rail { flex-direction: row; align-items: center; border-right: none; border-bottom: 1px solid var(--line); }
    .mbx-folders { flex-direction: row; }
    .mbx-list { max-height: 42vh; border-right: none; border-bottom: 1px solid var(--line); }
    .mbx-read { max-height: none; }
}

/* ============================================================
   "Why this match" — AI ranking rationale on the search page
   ============================================================ */
.why-match {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    padding: 10px 12px;
}
.why-match-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    margin-bottom: 5px;
}
.why-match-reason { margin: 0 0 8px; font-size: 0.9rem; color: var(--text-soft); }
.why-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    line-height: 1.3;
}
.chip-pos { background: var(--green-100); color: #14532d; }
.chip-gap { background: var(--amber-100); color: #7c4a03; }
