:root {
    --bg: #080808;
    --panel: rgba(20, 8, 4, 0.82);
    --panel-strong: rgba(24, 10, 5, 0.92);
    --panel-soft: rgba(0, 0, 0, 0.55);
    --border: rgba(212, 175, 55, 0.55);
    --gold: #d4af37;
    --gold-strong: #f0cd63;
    --gold-dark: #8a6511;
    --text: #ffffff;
    --muted: #d6d6d6;
    --danger: #ffb4b4;
    --success: #9ff0b5;
    --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
    --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; min-height: 100%; }

body.dashboard-theme {
    font-family: Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 20% 35%, rgba(255, 204, 102, .10), transparent 20%),
        radial-gradient(circle at 80% 30%, rgba(255, 214, 140, .10), transparent 16%),
        linear-gradient(rgba(0,0,0,.48), rgba(0,0,0,.48)),
        var(--dashboard-bg, url('/assets/images/dashboard-bg.jpg'));
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    background-attachment: fixed;
}

a {
    color:#fff;
}

.top-shell,
.login-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    background: linear-gradient(180deg, rgba(0,0,0,.88), rgba(30,9,0,.78));
    border-bottom: 1px solid rgba(255,255,255,.12);
    box-shadow: var(--shadow);
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(212,175,55,.65);
    background: #111;
}

.brand-title {
    color: var(--gold-strong);
    font-size: 20px;
    font-weight: 700;
    text-decoration: none;
}

.top-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}

.top-nav a,
.top-nav button,
.nav-chip,
.nav-group-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(18,18,18,.88);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.top-nav a.active,
.top-nav a:hover,
.top-nav button:hover,
.nav-group.active .nav-group-toggle,
.nav-group-toggle:hover {
    border-color: var(--gold);
    color: #fff5c7;
}

.nav-group {
    position: relative;
    display: inline-block;
}

.nav-group-toggle {
    cursor: pointer;
    font: inherit;
    outline: none;
}

.nav-submenu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    padding: 8px;
    background: rgba(12, 12, 12, 0.98);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(0,0,0,.35);
    z-index: 1000;
}

.nav-submenu a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    min-height: 38px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: none;
}

.nav-submenu a:hover,
.nav-submenu a.active {
    background: rgba(212,175,55,.12);
    border-color: rgba(212,175,55,.28);
    color: #fff5c7;
}

.nav-group:hover .nav-submenu,
.nav-group:focus-within .nav-submenu {
    display: block;
}

.user-mini {
    min-width: 240px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 14px;
    background: rgba(0,0,0,.58);
    border: 1px solid rgba(255,255,255,.10);
}

.user-mini img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,.12);
}

.user-mini .meta { line-height: 1.2; }

.user-mini .meta .label {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.user-mini .meta .name,
.user-mini .meta .email {
    font-size: 12px;
    color: #f4f4f4;
}

.role-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #821717;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
}

.page-wrap {
    width: min(1240px, calc(100% - 32px));
    margin: 22px auto;
}

.hero-title {
    text-align: center;
    font-size: 34px;
    font-weight: 800;
    margin: 18px 0 26px;
    text-shadow: 0 2px 12px rgba(0,0,0,.35);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(180px, 1fr));
    gap: 18px;
    justify-content: center;
}

.dashboard-grid.two-row {
    max-width: 840px;
    margin: 0 auto;
}

.dashboard-card,
.panel,
.login-card,
.info-card {
    background: var(--panel);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(5px);
}

.dashboard-card {
    text-align: center;
    padding: 28px 16px 20px;
}

.dashboard-card h3 {
    margin: 0 0 14px;
    color: var(--gold-strong);
    font-size: 20px;
}

.dashboard-card .value {
    font-size: 52px;
    line-height: 1;
    margin-bottom: 14px;
}

.dashboard-card .value.small {
    font-size: 38px;
}

.gold-btn,
button,
input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 22px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #f3d56d, #d7ae36);
    color: #111;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 5px 14px rgba(0,0,0,.18);
}

.gold-btn:hover,
button:hover,
input[type="submit"]:hover {
    filter: brightness(1.04);
}

.center-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
}

.login-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.login-card {
    width: 100%;
    max-width: 360px;
    padding: 22px;
    background: rgba(0,0,0,.58);
    border: 1px solid rgba(255,255,255,.12);
}

.login-card h1 {
    margin: 0 0 12px;
    font-size: 22px;
    color: var(--gold-strong);
}

.login-subtext {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--gold-strong);
    font-weight: 700;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,.16);
    background: rgba(0,0,0,.76);
    color: #fff;
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,.16);
}

.error-box,
.success-box,
.notice-box {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 14px;
    font-weight: 700;
}

.error-box {
    background: rgba(113,28,36,.82);
    color: var(--danger);
    border: 1px solid rgba(255,255,255,.08);
}

.success-box {
    background: rgba(21,61,37,.82);
    color: var(--success);
    border: 1px solid rgba(255,255,255,.08);
}

.notice-box {
    background: rgba(31,41,55,.82);
    color: #fff;
    border: 1px solid rgba(255,255,255,.08);
}

.panel { padding: 18px; }

.panel h2 {
    margin-top: 0;
    color: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    color: var(--gold-strong);
    font-size: 13px;
    text-transform: uppercase;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge.accepted { background: rgba(21,61,37,.9); color: #9ff0b5; }
.badge.violation { background: rgba(113,28,36,.9); color: #ffb4b4; }
.badge.rejected,
.badge.suspended { background: rgba(92,45,0,.88); color: #ffd59a; }
.badge.pending,
.badge.ignored { background: rgba(42,50,68,.9); color: #d7e3ff; }

.footer-bar {
    width: min(1520px, calc(100% - 32px));
    margin: 10px auto 18px;
    padding: 26px 18px 34px;
    border-radius: 22px;
    background: linear-gradient(90deg, #9a6f0d, #2e1500 70%, #000 100%);
    border: 1px solid rgba(255,255,255,.12);
    box-shadow: var(--shadow);
    text-align: center;
    color: #fff;
}

.footer-bar .mini-logo {
    margin-top: 14px;
    width: 54px;
    height: auto;
}

.helper-text,
.muted {
    color: var(--muted);
}

.filters-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.center-info-card {
    max-width: 620px;
    margin: 26px auto 0;
    padding: 24px;
    text-align: center;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.inline-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

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

.day-card {
    background: rgba(0,0,0,.42);
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    padding: 16px;
}

.day-card h3 {
    margin: 0 0 12px;
    color: var(--gold-strong);
    font-size: 18px;
}

.day-slots {
    display: grid;
    gap: 10px;
}

.slot-row {
    display: grid;
    grid-template-columns: 70px 1fr 22px 1fr;
    gap: 10px;
    align-items: center;
}

.slot-label {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.slot-sep {
    text-align: center;
    color: var(--gold-strong);
    font-weight: 700;
}

.section-title {
    color: var(--gold-strong);
    margin: 0 0 14px;
}

.section-help {
    margin: 0 0 18px;
    color: var(--muted);
}

.copy-days {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}

.copy-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: rgba(18,18,18,.88);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
}

.copy-chip:hover {
    border-color: var(--gold);
    color: #fff5c7;
}

@media (max-width: 1100px) {
    .dashboard-grid,
    .dashboard-grid.two-row {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .user-mini {
        width: 100%;
    }
}

@media (max-width: 700px) {
    .dashboard-grid,
    .dashboard-grid.two-row {
        grid-template-columns: 1fr;
    }

    .hero-title { font-size: 28px; }
    .brand-title { font-size: 18px; }

    .slot-row {
        grid-template-columns: 1fr;
    }

    .slot-sep {
        display: none;
    }

    .nav-group {
        width: 100%;
    }

    .nav-group-toggle {
        width: 100%;
    }

    .nav-submenu {
        position: static;
        min-width: 100%;
        margin-top: 6px;
    }
}