/* ============================================================
                        Global Stylesheet
   ============================================================ */

/* ── CSS Variables ── */
:root {
    --bg:      #0d0f14;
    --card:    #191c26;
    --surface: #13161d;
    --border:  rgba(255, 255, 255, 0.07);
    --accent:  #5b6ef5;
    --muted:   #6b7080;
    --text:    #e8eaf0;
    --green:   #22c98a;
    --yellow:  #f5a623;
    --cyan:    #38c8e8;
    --red:     #f56060;
}

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

body {
    background: var(--bg);
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    min-height: 100vh;
}

/* Ambient glow — position overridden per-page via .glow-tl / .glow-tr / .glow-br */
body::before {
    content: '';
    position: fixed;
    width: 600px;
    height: 600px;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(91, 110, 245, 0.08) 0%, transparent 70%);
}
body.glow-tl::before { top: -200px;  left:  -200px; }
body.glow-tr::before { top: -200px;  right: -200px; }
body.glow-br::before { bottom: -200px; right: -200px; background: radial-gradient(circle, rgba(34,201,138,0.07) 0%, transparent 70%); }

/* ── Animation ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Header ── */
.site-header {
    background: rgba(13, 15, 20, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}


/* ============================================================
   INDEX / LANDING PAGE
   ============================================================ */

/* ── Hero Badge ── */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(91, 110, 245, .12);
    color: var(--accent);
    border: 1px solid rgba(91, 110, 245, .25);
    border-radius: 100px;
    font-size: .78rem;
    font-weight: 600;
    padding: 6px 16px;
    letter-spacing: .04em;
    animation: fadeUp .4s ease both;
}
.hero-badge span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    display: inline-block;
}

/* ── Hero Title ── */
.hero-title {
    font-family: 'Syne', sans-serif;
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    font-weight: 800;
    letter-spacing: -.03em;
    line-height: 1.1;
    animation: fadeUp .4s .08s ease both;
}
.hero-title .highlight {
    background: linear-gradient(135deg, #5b6ef5 0%, #38c8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--muted);
    max-width: 520px;
    line-height: 1.7;
    animation: fadeUp .4s .16s ease both;
}

.hero-actions { animation: fadeUp .4s .24s ease both; }

/* ── Hero Buttons ── */
.btn-hero-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: .75rem 2rem;
    font-weight: 600;
    font-size: .95rem;
    transition: opacity .2s, transform .2s;
    text-decoration: none;
    display: inline-block;
}
.btn-hero-primary:hover { opacity: .88; transform: translateY(-2px); color: #fff; }

.btn-hero-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .75rem 2rem;
    font-weight: 500;
    font-size: .95rem;
    transition: all .2s;
    text-decoration: none;
    display: inline-block;
}
.btn-hero-secondary:hover { border-color: rgba(255,255,255,.2); color: #fff; }

/* ── Mockup Floating Card ── */
.mockup-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    animation: float 4s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-10px); }
}

.mockup-mini-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1rem;
}

.mockup-progress-track {
    height: 4px;
    background: var(--surface);
    border-radius: 4px;
    overflow: hidden;
}

.mockup-progress-fill {
    width: 65%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--cyan));
    border-radius: 4px;
}

.glow-circle {
    position: absolute;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91,110,245,.13) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* ── Stats Strip ── */
.stats-strip {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    animation: fadeUp .4s .3s ease both;
}

.stat-divider {
    width: 1px;
    background: var(--border);
    align-self: stretch;
}

.stat-value {
    font-family: 'Syne', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    font-size: .78rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .07em;
    margin-top: 4px;
}

/* ── Feature Cards ── */
.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1.75rem;
    transition: border-color .2s, transform .2s;
    animation: fadeUp .4s ease both;
}
.feature-card:hover { border-color: rgba(91,110,245,.3); transform: translateY(-3px); }
.feature-card.d1 { animation-delay: .10s; }
.feature-card.d2 { animation-delay: .18s; }
.feature-card.d3 { animation-delay: .26s; }

.feature-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

/* ── Hero Trust Checklist ── */
.hero-trust { display: flex; flex-direction: column; gap: 8px; }
.hero-trust-item {
    display: flex; align-items: center; gap: 8px;
    font-size: .875rem; color: var(--muted);
}

/* ── Hero Avatar Stack ── */
.hero-avatars { display: flex; align-items: center; gap: 12px; }
.avatar-stack { display: flex; }
.hero-avatar {
    width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid var(--bg);
    display: flex; align-items: center; justify-content: center;
    font-size: .7rem; font-weight: 700; color: #fff;
    margin-right: -8px;
}
.avatar-stack .hero-avatar:last-child { margin-right: 0; }

/* ── Mockup Toast ── */
.mockup-toast {
    background: var(--card);
    border: 1px solid rgba(34, 201, 138, .2);
    border-radius: 14px;
    padding: .85rem 1.1rem;
    animation: float 4s ease-in-out infinite;
}

/* ── How It Works ── */
.howit-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    position: relative;
    transition: border-color .2s, transform .2s;
    animation: fadeUp .4s ease both;
}
.howit-card:hover { border-color: rgba(91,110,245,.3); transform: translateY(-3px); }
.howit-card.howit-card-active {
    border-color: rgba(91,110,245,.35);
    background: linear-gradient(160deg, rgba(91,110,245,.08) 0%, var(--card) 60%);
}
.howit-step {
    font-family: 'Syne', sans-serif;
    font-size: .9rem; font-weight: 800;
    letter-spacing: .1em; color: var(--accent);
    text-transform: uppercase; margin-bottom: 1rem;
}
.howit-icon { font-size: 1.8rem; margin-bottom: .75rem; }

/* ── CTA Banner ── */
.cta-banner {
    background: linear-gradient(135deg, rgba(91,110,245,.15) 0%, rgba(56,200,232,.08) 100%);
    border: 1px solid rgba(91,110,245,.2);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    animation: fadeUp .4s ease both;
}

/* ── Footer ── */
.site-footer { border-top: 1px solid var(--border); }

.brand-icon {
    width: 36px;
    height: 36px;
    background: var(--accent);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ── Auth pages (login / register) ── */
.brand-icon-lg {
    width: 42px;
    height: 42px;
    background: var(--accent);
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    animation: fadeUp .45s ease both;
}

/* ── Form controls ── */
.form-control,
.form-label { color: var(--text) !important; }

.form-control {
    background: var(--surface) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    padding: .65rem 1rem !important;
    font-size: .9rem !important;
    transition: border-color .2s, box-shadow .2s !important;
}

.form-control::placeholder { color: var(--muted) !important; opacity: 1; }

.form-control:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(91, 110, 245, .15) !important;
}

textarea.form-control { min-height: 120px; resize: vertical; }

.form-label {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--muted) !important;
    margin-bottom: .4rem;
}

.file-drop {
    border: 1px dashed rgba(91, 110, 245, .3) !important;
    background: rgba(91, 110, 245, .04) !important;
    border-radius: 10px !important;
    color: var(--muted) !important;
}
.file-drop:hover { border-color: rgba(91, 110, 245, .6) !important; }

/* ── Cards ── */
.form-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    animation: fadeUp .45s ease both;
}

.dash-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    transition: border-color .2s, transform .2s;
    animation: fadeUp .4s ease both;
}
.dash-card:hover { border-color: rgba(91, 110, 245, .35); transform: translateY(-2px); }
.dash-card.delay-1 { animation-delay: .08s; }
.dash-card.delay-2 { animation-delay: .16s; }

.welcome-banner {
    background: linear-gradient(135deg, rgba(91,110,245,.15) 0%, rgba(91,110,245,.04) 100%);
    border: 1px solid rgba(91, 110, 245, .2);
    border-radius: 18px;
}

.action-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.current-file-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

/* ── Table ── */
.table-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    animation: fadeUp .45s ease both;
}

.table-card-header { border-bottom: 1px solid var(--border); }

table { border-collapse: collapse; }

thead th {
    background: rgba(255, 255, 255, .02);
    border-bottom: 1px solid var(--border) !important;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: var(--muted);
    font-weight: 600;
    padding: .85rem 1.25rem !important;
}

tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
    animation: fadeUp .35s ease both;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(255, 255, 255, .025); }

tbody td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle;
    font-size: .88rem;
    border: none !important;
}

/* Staggered row animation */
tbody tr:nth-child(1) { animation-delay: .05s; }
tbody tr:nth-child(2) { animation-delay: .10s; }
tbody tr:nth-child(3) { animation-delay: .15s; }
tbody tr:nth-child(4) { animation-delay: .20s; }
tbody tr:nth-child(n+5) { animation-delay: .25s; }

/* ── Status Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: .75rem;
    font-weight: 600;
    border: 1px solid;
}
.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.badge-open     { background: rgba(56,200,232,.12);  color: var(--cyan);   border-color: rgba(56,200,232,.25); }
.badge-progress { background: rgba(245,166,35,.12);   color: var(--yellow); border-color: rgba(245,166,35,.25); }
.badge-closed   { background: rgba(34,201,138,.12);   color: var(--green);  border-color: rgba(34,201,138,.25); }

/* ── Misc UI ── */
.ticket-num {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(91, 110, 245, .15);
    color: var(--accent);
    font-size: .75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-family: 'Syne', sans-serif;
}

.ticket-count-pill {
    background: rgba(91, 110, 245, .12);
    color: var(--accent);
    font-size: .75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 100px;
    border: 1px solid rgba(91, 110, 245, .2);
}

.file-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform .2s;
}
.file-thumb:hover { transform: scale(1.08); }

/* ── Buttons ── */
.btn-accent {
    background: var(--accent);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: .875rem;
    transition: opacity .2s, transform .2s;
}
.btn-accent:hover { opacity: .88; transform: translateY(-1px); }

.btn-auth {
    background: var(--accent);
    border: none;
    border-radius: 10px;
    padding: .7rem;
    font-weight: 600;
    font-size: .9rem;
    transition: opacity .2s, transform .2s;
}
.btn-auth:hover { opacity: .88; transform: translateY(-1px); }

.btn-save {
    background: var(--green);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: .9rem;
    padding: .65rem 1.75rem;
    transition: opacity .2s, transform .2s;
}
.btn-save:hover { opacity: .88; transform: translateY(-1px); }

.btn-back {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--muted);
    border-radius: 10px;
    font-size: .875rem;
    padding: .5rem 1rem;
    transition: all .2s;
}
.btn-back:hover { border-color: rgba(255,255,255,.15); color: var(--text); }

.btn-edit {
    background: rgba(245,166,35,.12);
    color: var(--yellow);
    border: 1px solid rgba(245,166,35,.25);
    border-radius: 8px;
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .9rem;
    transition: all .2s;
}
.btn-edit:hover { background: rgba(245,166,35,.22); border-color: rgba(245,166,35,.5); }

.btn-outline-ghost {
    background: transparent;
    border: 1px solid rgba(245,96,96,.25);
    color: var(--red);
    border-radius: 10px;
    font-size: .875rem;
    font-weight: 500;
    transition: all .2s;
}
.btn-outline-ghost:hover { background: rgba(245,96,96,.1); border-color: rgba(245,96,96,.5); }