:root {
    --accent:        #C8961A;
    --accent-light:  #F5E8A8;
    --accent-hover:  #A67A10;
    --dark:          #18181F;
    --dark-2:        #232330;
    --text:          #26262F;
    --text-muted:    #64647A;
    --bg:            #F5F5F3;
    --bg-card:       #FFFFFF;
    --border:        #E3E3EB;
    --radius:        8px;
    --shadow:        0 1px 3px rgba(0,0,0,0.07), 0 4px 14px rgba(0,0,0,0.05);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Sans 3', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', system-ui, sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s;
}

a:hover {
    color: var(--accent-hover);
}

/* ── Layout ── */

.container {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Header ── */

.site-header {
    background: var(--dark);
    border-bottom: 3px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 120px;
}

.brand {
    display: flex;
    align-items: baseline;
    gap: 10px;
    text-decoration: none;
}

.brand-abbr {
    font-family: 'Montserrat', sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: -0.5px;
}

.brand-name {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    letter-spacing: 0.01em;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 32px;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: var(--radius);
    border: none;
    background: none;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--accent);
    background: rgba(200, 150, 26, 0.1);
}

.nav-separator {
    width: 1px;
    height: 18px;
    background: rgba(255,255,255,0.12);
    margin: 0 6px;
}

.nav-user {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-light);
    padding: 6px 10px;
}

.nav-link--logout {
    color: rgba(255,255,255,0.35);
    font-size: 13px;
}

/* ── Main ── */

.site-main {
    flex: 1;
    padding: 48px 0 64px;
}

/* ── Page header ── */

.page-header {
    margin-bottom: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.page-title {
    font-size: 30px;
    color: var(--dark);
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--text-muted);
    font-size: 15px;
}

/* ── Card grid ── */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: box-shadow 0.15s, transform 0.15s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
    transform: translateY(-1px);
}

.card-icon {
    font-size: 26px;
    line-height: 1;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.card-text {
    color: var(--text-muted);
    font-size: 14px;
    flex: 1;
}

/* ── Hero ── */

.hero {
    padding: 80px 0 64px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 56px;
    text-align: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-label {
    display: inline-block;
    color: var(--accent);
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.hero-title {
    font-size: 58px;
    color: var(--dark);
    max-width: 720px;
    margin-bottom: 20px;
    line-height: 1.1;
}

.hero-title .accent {
    color: var(--accent);
}

.hero-text {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 520px;
    line-height: 1.65;
}

/* ── Auth ── */

.auth-section {
    display: flex;
    justify-content: center;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 36px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow);
}

.auth-title {
    font-size: 22px;
    color: var(--dark);
    margin-bottom: 4px;
}

.auth-subtitle {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

.auth-divider {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 18px;
}

/* ── Forms ── */

.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 5px;
    letter-spacing: 0.01em;
}

.form-input {
    width: 100%;
    padding: 9px 13px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 15px;
    color: var(--text);
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(200, 150, 26, 0.14);
    background: #fff;
}

.form-input::placeholder {
    color: var(--text-muted);
    opacity: 0.6;
}

/* ── Buttons ── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 20px;
    font-family: 'Source Sans 3', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
    text-decoration: none;
    letter-spacing: 0.01em;
    margin-top: 6px;
}

.btn:active {
    transform: scale(0.98);
}

.btn--primary {
    background: var(--accent);
    color: #1a1008;
}

.btn--primary:hover {
    background: var(--accent-hover);
    color: #1a1008;
    box-shadow: 0 2px 8px rgba(200,150,26,0.3);
}

.btn--secondary {
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn--secondary:hover {
    background: var(--border);
    color: var(--text);
}

.btn--danger {
    background: #dc2626;
    color: #fff;
}

.btn--danger:hover {
    background: #b91c1c;
    color: #fff;
    box-shadow: 0 2px 8px rgba(220,38,38,0.3);
}

.btn--full {
    width: 100%;
    margin-top: 4px;
}

/* ── Alerts ── */

.alert {
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: 14px;
    margin-bottom: 16px;
}

.alert--error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* ── Links ── */

.link {
    color: var(--accent);
    font-weight: 600;
}

.link:hover {
    color: var(--accent-hover);
}

/* ── Footer ── */

.site-footer {
    background: var(--dark-2);
    border-top: 1px solid rgba(255,255,255,0.05);
    padding: 18px 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-brand {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.35);
}

.footer-copy {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 13px;
    color: rgba(255,255,255,0.2);
}

/* ── Table scroll wrapper ── */

.table-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* ── 2-col form row ── */

.form-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 16px;
}

/* ── Faction breakdown grid ── */

.faction-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

/* ── Responsive ── */

@media (max-width: 600px) {
    .brand-name { display: none; }
    .hero-title { font-size: 36px; }
    .hero { padding: 40px 0 32px; margin-bottom: 32px; }
    .auth-card { padding: 24px; }
    .card-grid { grid-template-columns: 1fr; }
    .form-row-2 { grid-template-columns: 1fr; }
    .faction-grid { grid-template-columns: 1fr; }
    .site-main { padding: 28px 0 40px; }
}
