:root {
    --ev-navy: #12343b;
    --ev-ink: #0e2a30;
    --ev-teal: #1f6f78;
    --ev-teal-soft: #e7f3f4;
    --ev-gold: #c4a35a;
    --ev-gold-dark: #a7863d;
    --ev-paper: #f6f1e8;
    --ev-white: #fffcf7;
    --ev-text: #243238;
    --ev-muted: #6b7c82;
    --ev-sidebar: #10282e;
    --ev-shadow: 0 12px 30px rgba(18, 52, 59, 0.08);
}

* { box-sizing: border-box; }

body {
    font-family: "Source Sans 3", sans-serif;
    color: var(--ev-text);
    background: var(--ev-paper);
    min-height: 100vh;
}

h1, h2, h3, h4, .brand-heading {
    font-family: "Libre Baskerville", serif;
}

a { color: var(--ev-teal); }

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ev-gold);
    color: var(--ev-ink);
    font-size: 1.1rem;
}

.navbar-brand strong {
    display: block;
    line-height: 1.1;
    color: #fff;
    font-family: "Libre Baskerville", serif;
}

.navbar-brand small {
    display: block;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(255,255,255,.75);
}

.ev-navbar {
    background: var(--ev-navy);
}

.ev-navbar .navbar-toggler {
    border-color: rgba(255,255,255,.35);
}

.ev-navbar .navbar-toggler-icon {
    filter: invert(1);
}

.ev-navbar .nav-link,
.ev-navbar .nav-user {
    color: rgba(255,255,255,.86);
}

.ev-navbar .nav-link.active,
.ev-navbar .nav-link:hover {
    color: var(--ev-gold);
}

.btn-gold {
    background: var(--ev-gold);
    color: var(--ev-ink);
    border: none;
    font-weight: 600;
}

.btn-gold:hover {
    background: var(--ev-gold-dark);
    color: #fff;
}

.btn-navy {
    background: var(--ev-navy);
    color: #fff;
}

.btn-navy:hover { background: var(--ev-ink); color: #fff; }

.has-sidebar {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 250px;
    background: var(--ev-sidebar);
    color: #fff;
    min-height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-brand small {
    display: block;
    color: var(--ev-gold);
    font-size: 0.75rem;
}

.sidebar-nav {
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.sidebar-nav a {
    color: rgba(255,255,255,.8);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 8px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background: rgba(196, 163, 90, .16);
    color: var(--ev-gold);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.08);
}

.sidebar-footer a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
}

.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.app-content {
    padding: 28px;
    flex: 1;
}

.public-content {
    padding: 0;
}

.stat-card {
    background: var(--ev-white);
    border: 0;
    border-radius: 16px;
    box-shadow: var(--ev-shadow);
    padding: 20px;
    height: 100%;
}

.stat-card .stat-label {
    color: var(--ev-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: .06em;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--ev-navy);
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ev-teal-soft);
    color: var(--ev-teal);
    font-size: 1.25rem;
}

.panel-card {
    background: var(--ev-white);
    border: 0;
    border-radius: 16px;
    box-shadow: var(--ev-shadow);
}

.page-title {
    font-size: 1.7rem;
    margin-bottom: 4px;
}

.page-subtitle {
    color: var(--ev-muted);
    margin-bottom: 22px;
}

.hero {
    background:
        linear-gradient(110deg, rgba(14,42,48,.92), rgba(31,111,120,.78)),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.06'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    color: #fff;
    padding: 90px 0 80px;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 3.4rem);
    max-width: 720px;
}

.hero p {
    max-width: 560px;
    color: rgba(255,255,255,.86);
}

.feature-card {
    background: var(--ev-white);
    border-radius: 16px;
    padding: 24px;
    height: 100%;
    box-shadow: var(--ev-shadow);
}

.auth-body {
    background:
        linear-gradient(160deg, #12343b 0%, #1f6f78 55%, #c4a35a 160%);
    min-height: 100vh;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: var(--ev-white);
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0,0,0,.18);
}

.auth-card.wide { max-width: 640px; }

.table thead th {
    background: #edf4f5;
    color: var(--ev-navy);
    font-weight: 600;
    white-space: nowrap;
}

.app-footer,
.site-footer {
    color: var(--ev-muted);
    padding: 18px 28px;
    font-size: 0.9rem;
}

.site-footer {
    background: var(--ev-navy);
    color: rgba(255,255,255,.75);
    padding: 22px 0;
    margin-top: 40px;
}

.filter-bar {
    background: var(--ev-white);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--ev-shadow);
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    padding: 40px 16px;
    color: var(--ev-muted);
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
    background: var(--ev-teal-soft);
    color: var(--ev-navy);
    text-decoration: none;
    font-weight: 600;
}

.quick-action:hover {
    background: #d7ecee;
    color: var(--ev-ink);
}

@media (max-width: 991px) {
    .has-sidebar { display: block; }
    .app-sidebar {
        width: 100%;
        min-height: auto;
        position: relative;
    }
    .sidebar-nav { flex-direction: row; flex-wrap: wrap; }
}
