:root {
    --bg: #060505;
    --panel: rgba(11, 12, 14, 0.78);
    --panel-strong: rgba(10, 13, 15, 0.88);
    --panel-soft: rgba(18, 19, 22, 0.7);
    --line: rgba(215, 171, 112, 0.12);
    --line-soft: rgba(255, 255, 255, 0.06);
    --text: #f2ece4;
    --muted: #b7a998;
    --torch: #e0a15a;
    --torch-soft: rgba(224, 161, 90, 0.16);
    --torch-strong: #ffbf7a;
    --violet: #7d67b7;
    --violet-soft: rgba(125, 103, 183, 0.18);
    --success: #73d979;
    --success-soft: rgba(115, 217, 121, 0.14);
    --danger: #ff8a98;
    --shadow: 0 26px 60px rgba(0, 0, 0, 0.45);
    --blur: blur(14px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        linear-gradient(rgba(5, 5, 7, 0.7), rgba(5, 5, 7, 0.9)),
        radial-gradient(circle at 58% 72%, rgba(224, 161, 90, 0.14), transparent 18%),
        radial-gradient(circle at 72% 38%, rgba(224, 161, 90, 0.08), transparent 14%),
        url("../wallpaper.jpg") center center / cover no-repeat fixed;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.56) 0%, rgba(0, 0, 0, 0.18) 28%, rgba(0, 0, 0, 0.2) 100%),
        linear-gradient(180deg, rgba(4, 4, 5, 0.2) 0%, rgba(4, 4, 5, 0.58) 100%);
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.018) 1px, transparent 1px);
    background-size: 34px 34px;
    opacity: 0.14;
}

.panel-shell {
    position: relative;
    z-index: 1;
    max-width: 1540px;
    margin: 0 auto;
    padding: 36px 28px 50px;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hero-bar,
.brand-block,
.session-block,
.top-actions,
.action-button-row,
.dashboard-grid,
.card-header,
.action-card-head,
.staff-row,
.staff-identity,
.staff-status,
.staff-actions,
.meta-line,
.compact-grid,
.toggle-row,
.chip-list,
.toolbar-strip {
    display: flex;
}

.hero-bar,
.card-header,
.action-card-head,
.staff-row {
    justify-content: space-between;
}

.hero-bar,
.brand-block,
.session-block,
.action-button-row,
.staff-identity,
.toggle-row {
    align-items: center;
}

.hero-bar {
    margin-bottom: 26px;
}

.brand-block {
    gap: 18px;
}

.brand-mark {
    width: 92px;
    height: 92px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    font-size: 2.7rem;
    font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif;
    color: var(--torch-strong);
    background:
        linear-gradient(180deg, rgba(224, 161, 90, 0.18), rgba(40, 25, 13, 0.92)),
        rgba(12, 12, 14, 0.78);
    border: 1px solid rgba(224, 161, 90, 0.2);
    box-shadow: inset 0 1px 0 rgba(255, 248, 238, 0.08), var(--shadow);
}

.brand-kicker,
.section-tag,
.small-copy,
.session-chip span,
.muted-copy,
.inline-note {
    color: var(--muted);
}

.brand-kicker,
.section-tag {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
}

.brand-block h1 {
    margin-bottom: 6px;
    font-size: clamp(2.7rem, 4vw, 5rem);
}

.brand-subtitle {
    margin-bottom: 0;
    font-size: 1.28rem;
    color: #ddd2c5;
    max-width: 34ch;
}

.session-block {
    gap: 14px;
}

.session-chip,
.panel-card,
.notice,
.popover-panel {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
    backdrop-filter: var(--blur);
}

.session-chip {
    min-width: 220px;
    padding: 12px 16px;
    border-radius: 16px;
}

.session-chip strong {
    display: block;
    margin-top: 4px;
}

.notice {
    padding: 16px 18px;
    border-radius: 18px;
    margin-bottom: 18px;
}

.success {
    color: #f7e9d6;
    background: rgba(57, 38, 18, 0.88);
    border-color: rgba(224, 161, 90, 0.18);
}

.error {
    color: #ffdbe0;
    background: rgba(63, 17, 24, 0.9);
    border-color: rgba(255, 138, 152, 0.16);
}

.login-wrap {
    min-height: 62vh;
    display: grid;
    place-items: center;
}

.panel-card {
    background: var(--panel);
    border-radius: 26px;
    padding: 24px;
}

.panel-card-strong {
    background:
        linear-gradient(180deg, rgba(27, 20, 14, 0.42), rgba(10, 13, 15, 0.86)),
        var(--panel-strong);
    border-color: rgba(224, 161, 90, 0.14);
}

.auth-panel {
    width: min(100%, 520px);
}

.top-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 18px;
    margin-bottom: 24px;
}

.top-actions-spacer {
    min-height: 1px;
}

.action-button-row {
    gap: 16px;
    align-items: flex-start;
}

.action-popover {
    position: relative;
}

.action-popover summary {
    list-style: none;
}

.action-popover summary::-webkit-details-marker {
    display: none;
}

.action-button {
    min-width: 275px;
    padding: 22px 26px;
    border-radius: 18px;
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    cursor: pointer;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: "Segoe UI Semibold", "Segoe UI", sans-serif;
    background: rgba(18, 20, 22, 0.86);
}

.action-button-green {
    color: #f6eadb;
    border-color: rgba(224, 161, 90, 0.18);
    background: linear-gradient(180deg, rgba(51, 33, 18, 0.96), rgba(20, 16, 12, 0.96));
}

.action-button-purple {
    color: #eee7ff;
    border-color: rgba(125, 103, 183, 0.26);
    background: linear-gradient(180deg, rgba(50, 39, 73, 0.96), rgba(20, 17, 28, 0.96));
}

.action-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.08);
    font-size: 1.2rem;
}

.popover-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 14px);
    width: min(540px, 92vw);
    padding: 22px;
    border-radius: 24px;
    z-index: 10;
    background:
        linear-gradient(180deg, rgba(36, 27, 19, 0.2), rgba(10, 13, 15, 0.96)),
        rgba(12, 15, 18, 0.98);
}

.action-card-head,
.card-header {
    gap: 14px;
    margin-bottom: 18px;
}

.count-chip,
.stat-badge,
.rank-pill,
.presence,
.mini-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
}

.count-chip,
.stat-badge {
    min-width: 96px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid var(--line-soft);
}

.stat-badge {
    min-width: 108px;
    flex-direction: column;
}

.stat-badge strong {
    line-height: 1;
    font-size: 1.85rem;
}

.stack-form,
.mini-form,
.field-block {
    display: grid;
    gap: 10px;
}

.compact-grid {
    gap: 12px;
    flex-wrap: wrap;
}

.compact-grid > * {
    flex: 1 1 220px;
}

.field-block span {
    color: #e1d8cb;
    font-size: 0.9rem;
}

input,
button,
summary {
    font: inherit;
}

input {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(224, 161, 90, 0.08);
    background: rgba(5, 6, 8, 0.66);
    color: var(--text);
    outline: none;
}

input::placeholder {
    color: #86796b;
}

input:focus {
    border-color: rgba(224, 161, 90, 0.28);
    box-shadow: 0 0 0 3px rgba(224, 161, 90, 0.08);
}

button {
    border: 0;
    border-radius: 16px;
    cursor: pointer;
    padding: 14px 18px;
    font-weight: 700;
    color: white;
}

.primary-button {
    background: linear-gradient(180deg, #59422b, #2a1f16);
    border: 1px solid rgba(224, 161, 90, 0.12);
}

.primary-button.green {
    background: linear-gradient(180deg, #5b4222, #2d1f11);
}

.primary-button.purple {
    background: linear-gradient(180deg, #4d3f66, #251f33);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line-soft);
}

.danger-button {
    background: linear-gradient(180deg, #7f2d3b, #5a1a26);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(360px, 0.98fr) minmax(520px, 1.02fr);
    gap: 20px;
}

.toolbar-strip {
    gap: 12px;
    margin-bottom: 16px;
}

.fake-search,
.fake-filter {
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid rgba(224, 161, 90, 0.08);
    background: rgba(6, 7, 9, 0.6);
    color: #8f8070;
}

.fake-search {
    flex: 1;
}

.fake-filter {
    width: 180px;
}

.staff-list {
    display: grid;
    gap: 12px;
}

.staff-row {
    gap: 18px;
    padding: 13px 14px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.035);
    background: rgba(255, 255, 255, 0.022);
    align-items: flex-start;
}

.staff-row-active {
    background: linear-gradient(90deg, rgba(224, 161, 90, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: inset 4px 0 0 rgba(224, 161, 90, 0.58);
}

.staff-identity {
    gap: 14px;
    flex: 1;
}

.staff-identity img {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.26);
}

.staff-identity strong {
    display: block;
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.meta-line {
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.rank-pill {
    padding: 6px 10px;
    background: var(--torch-soft);
    color: var(--torch-strong);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
}

.rank-pill-alt {
    background: var(--violet-soft);
    color: #d6ccf5;
}

.presence {
    padding: 6px 12px;
    font-size: 0.88rem;
    font-weight: 700;
}

.presence.online {
    color: var(--success);
    background: var(--success-soft);
}

.presence.offline {
    color: #d8d2ca;
    background: rgba(255, 255, 255, 0.06);
}

.staff-status,
.staff-actions {
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

.inline-details {
    width: min(360px, 100%);
}

.inline-details summary {
    list-style: none;
    cursor: pointer;
    font-weight: 700;
    color: #e4d9cd;
}

.inline-details summary::-webkit-details-marker {
    display: none;
}

.inline-details[open] {
    width: 100%;
}

.mini-form {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.toggle-row {
    gap: 10px;
    justify-content: flex-start;
    color: #e2d8cb;
}

.toggle-row input {
    width: auto;
}

.chip-list {
    margin-top: 16px;
    gap: 8px;
    flex-wrap: wrap;
}

.mini-chip {
    padding: 6px 10px;
    font-size: 0.85rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #ddd2c5;
}

.empty-state {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px dashed rgba(224, 161, 90, 0.12);
}

.dot-indicator {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 999px;
    background: var(--torch);
    margin-right: 10px;
    box-shadow: 0 0 12px rgba(224, 161, 90, 0.42);
}

@media (max-width: 1180px) {
    .top-actions,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .action-button-row {
        flex-wrap: wrap;
    }

    .popover-panel {
        position: static;
        width: 100%;
        margin-top: 12px;
    }
}

@media (max-width: 760px) {
    body {
        background-attachment: scroll;
    }

    .panel-shell {
        padding: 20px 14px 30px;
    }

    .hero-bar,
    .session-block {
        flex-direction: column;
        align-items: flex-start;
    }

    .brand-mark {
        width: 76px;
        height: 76px;
    }

    .brand-block h1 {
        font-size: 2.4rem;
    }

    .action-button {
        min-width: 100%;
    }

    .toolbar-strip {
        flex-direction: column;
    }

    .fake-filter {
        width: 100%;
    }

    .staff-row,
    .staff-identity,
    .staff-actions,
    .staff-status {
        align-items: flex-start;
    }

    .staff-row {
        flex-direction: column;
    }
}
