@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --gold: #d4af37;
    --emerald: #34d399;
}

html, body { background: #07070a; }
body { font-family: Outfit, system-ui, sans-serif; }

.ambient {
    pointer-events: none;
    position: fixed;
    inset: 0;
    background:
        radial-gradient(900px 400px at 10% -10%, rgba(16, 185, 129, 0.10), transparent 55%),
        radial-gradient(700px 380px at 95% 0%, rgba(212, 175, 55, 0.08), transparent 50%),
        linear-gradient(180deg, #0b0b10 0%, #07070a 40%);
    z-index: 0;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
    background: linear-gradient(160deg, #14532d, #052e16);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.25);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.18);
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.8rem;
    border-radius: 999px;
    color: #a1a1aa;
    transition: 0.15s ease;
}
.nav-link:hover { color: #fff; background: rgba(39, 39, 42, 0.7); }
.nav-link.is-active {
    color: #ecfccb;
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(52, 211, 153, 0.25);
}

.icon-btn {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 0.8rem;
    border: 1px solid #3f3f46;
    background: #18181b;
    color: #d4d4d8;
}
.icon-btn:hover { border-color: #7f1d1d; color: #fca5a5; background: #1c1010; }

.card {
    background: linear-gradient(180deg, rgba(24,24,27,0.96), rgba(12,12,16,0.96));
    border: 1px solid #27272a;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
    border-color: #10b981;
}

.alt-row:hover { background-color: #27272a !important; }
.prof-cell { cursor: pointer; }
.prof-cell:hover { color: #34d399; text-decoration: underline; }
th.sortable { cursor: pointer; user-select: none; }
th { position: sticky; top: 0; z-index: 10; background-color: #111114; }
.group-header { background-color: #1c1c22; font-weight: 600; }

#main-table,
#prof-table {
    width: 100%;
    table-layout: auto;
}
#main-table th,
#main-table td,
#prof-table th,
#prof-table td {
    white-space: nowrap;
}
#main-table td:last-child,
#prof-table td:last-child {
    white-space: normal;
}

.field-label {
    display: block;
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #a1a1aa;
    margin-bottom: 0.4rem;
}
.field {
    width: 100%;
    background: #09090b;
    border: 1px solid #3f3f46;
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    background: linear-gradient(180deg, #34d399, #059669);
    color: #022c22;
    font-weight: 700;
    border-radius: 1rem;
    padding: 0.85rem 1.2rem;
    transition: 0.15s ease;
}
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: 1px solid #3f3f46;
    background: #18181b;
    border-radius: 1rem;
    padding: 0.7rem 1rem;
}
.btn-ghost:hover { border-color: #10b981; color: #fff; }

.toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 70;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.85rem 1.1rem;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(0,0,0,0.4);
}
.toast-success { background: #059669; color: #fff; }
.toast-error { background: #991b1b; color: #fff; }

.progress-bar { height: 6px; background: #27272a; border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; background: #34d399; }

.exp-pips { display: flex; gap: 2px; align-items: flex-end; height: 18px; }
.exp-pip {
    width: 7px;
    height: 18px;
    background: #27272a;
    border-radius: 2px;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}
.exp-pip-fill { width: 100%; background: #34d399; min-height: 0; }
.exp-pip.is-max .exp-pip-fill { background: #6ee7b7; }

.grid-cell {
    text-align: center;
    padding: 0.45rem 0.3rem;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
    border-bottom: 1px solid #27272a;
    border-right: 1px solid #18181b;
}
.grid-cell.is-empty { color: #52525b; }
.grid-cell.is-max { color: #6ee7b7; }
.grid-cell.is-partial { color: #fbbf24; }
.grid-cell.is-none { color: #71717a; }
.grid-cell.is-clickable { cursor: pointer; }
.grid-cell.is-clickable:hover { outline: 1px solid #34d399; outline-offset: -1px; }

.heat-cell {
    text-align: center;
    padding: 0.4rem 0.25rem;
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    min-width: 2.2rem;
}
.heat-cell.is-zero { color: #3f3f46; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 60;
    padding: 1rem;
}
.hidden { display: none !important; }
