@font-face {
    font-family: Peyda;
    src: url('../fonts/Peyda-Regular.ttf')
}

@font-face {
    font-family: Peyda;
    src: url('../fonts/Peyda-Medium.ttf');
    font-weight: 500
}

@font-face {
    font-family: Peyda;
    src: url('../fonts/Peyda-Bold.ttf');
    font-weight: 700
}

@font-face {
    font-family: Peyda;
    src: url('../fonts/Peyda-ExtraBold.ttf');
    font-weight: 800
}

:root {
    --cream: #b7a17d;
    --cream-light: #eadfc9;
    --cream-soft: #c7b89e;
    --cream-muted: #8e7d62;
    --cream-dark: #5f513f;
    --bg: #100d09;
    --panel: #1b1510;
    --panel2: #241c13;
    --line: #51422f;
    --green: #789b70;
    --red: #ae6255;
    --gold: #c9a84c;
    --shadow: 0 22px 65px #0007;
    --radius: 18px
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

body {
    margin: 0;
    font-family: Peyda, Tahoma, sans-serif;
    background: var(--bg);
    color: var(--cream-light)
}

button,
input,
select,
textarea {
    font: inherit
}

a {
    color: inherit;
    text-decoration: none
}

.app-body {
    min-height: 100vh;
    background: radial-gradient(ellipse at 80% 0, #39291855, transparent 40%), radial-gradient(ellipse at 8% 85%, #5f513f22, transparent 40%), var(--bg)
}

.app-shell {
    max-width: 1600px;
    margin: 0 auto;
    padding: 26px 32px 60px 32px
}

.app-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 30px;
    gap: 12px;
    padding-right: 72px
}

.brand-mini {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--cream)
}

.brand-mini .mark {
    width: 42px;
    height: 42px;
    border: 1px solid #b7a17d55;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: var(--gold);
    font-size: 21px;
    background: linear-gradient(145deg, #b7a17d22, #0004)
}

.brand-mini b {
    display: block;
    font-size: 13px;
    letter-spacing: 2px
}

.brand-mini small {
    color: var(--cream-muted);
    font-size: 10px;
    letter-spacing: 1px
}

.page-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px
}

.page-heading h1 {
    font-size: clamp(23px, 3vw, 34px);
    margin: 5px 0;
    font-weight: 800
}

.page-heading p {
    margin: 5px 0;
    color: var(--cream-muted);
    font-size: 13px
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--gold);
    text-transform: uppercase
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 17px
}

.span-12 {
    grid-column: span 12
}

.span-8 {
    grid-column: span 8
}

.span-6 {
    grid-column: span 6
}

.span-4 {
    grid-column: span 4
}

.span-3 {
    grid-column: span 3
}

.panel {
    background: linear-gradient(145deg, #261e15e8, #17120eeb);
    border: 1px solid #b7a17d24;
    border-radius: var(--radius);
    padding: 21px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden
}

.panel:before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, #c6a35488, transparent)
}

.panel h2,
.panel h3 {
    margin: 0 0 14px
}

.panel-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px
}

.panel-title h2 {
    margin: 0;
    font-size: 16px
}

.panel-title small {
    color: var(--cream-muted)
}

.stat-card {
    min-height: 128px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px
}

.stat-card small {
    display: block;
    color: var(--cream-muted);
    font-size: 11px
}

.stat-card strong {
    display: block;
    font-size: 28px;
    margin-top: 8px;
    color: var(--cream-light);
    font-weight: 800
}

.stat-icon {
    width: 47px;
    height: 47px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background: #c6a35418;
    border: 1px solid #c6a35430;
    font-size: 19px
}

.muted {
    color: var(--cream-muted)
}

.small {
    font-size: 11px
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #c6a35466;
    background: linear-gradient(135deg, var(--cream), #8e7754);
    color: #16110a;
    padding: 10px 15px;
    border-radius: 11px;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
    transition: .2s;
    box-shadow: 0 8px 22px #0003
}

.btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.08)
}

.btn.secondary {
    background: #c6a35412;
    color: var(--cream-light);
    border-color: #c6a35435;
    box-shadow: none
}

.btn.danger {
    background: #8f453b;
    color: #fff;
    border-color: #a64a3d
}

.btn.success {
    background: #426d4d;
    color: #fff;
    border-color: #5e956b
}

.btn.small-btn {
    padding: 7px 10px;
    font-size: 11px
}

.btn-row {
    display: flex;
    gap: 9px;
    flex-wrap: wrap
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-bottom: 13px
}

.field label,
.field>span {
    font-size: 12px;
    color: var(--cream-soft)
}

.field input,
.field select,
.field textarea,
.search-input {
    width: 100%;
    background: #100d09;
    border: 1px solid #b7a17d35;
    border-radius: 11px;
    padding: 12px 13px;
    color: var(--cream-light);
    outline: 0;
    transition: .2s;
    min-width: 0
}

.field textarea {
    min-height: 115px;
    resize: vertical
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.search-input:focus {
    border-color: var(--cream);
    box-shadow: 0 0 0 3px #b7a17d18
}

.field select option {
    background: #20180f;
    color: var(--cream-light)
}

.check-row {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--cream-soft);
    font-size: 12px;
    margin: 9px 0
}

.check-row input {
    accent-color: var(--cream)
}

.table-wrap {
    width: 100%;
    overflow: auto;
    border: 1px solid #b7a17d20;
    border-radius: 13px
}

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

.data-table th,
.data-table td {
    text-align: right;
    padding: 13px 14px;
    border-bottom: 1px solid #b7a17d17;
    font-size: 12px;
    white-space: nowrap
}

.data-table th {
    color: var(--cream-muted);
    font-size: 10px;
    font-weight: 700;
    background: #ffffff05
}

.data-table tr:hover td {
    background: #ffffff04
}

.data-table tr:last-child td {
    border: 0
}

.person {
    display: flex;
    align-items: center;
    gap: 10px
}

.avatar {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    color: var(--gold);
    background: #c6a35418;
    border: 1px solid #c6a35435;
    font-weight: 800
}

.person b {
    display: block;
    font-size: 12px
}

.person small {
    font-size: 10px;
    color: var(--cream-muted)
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 30px;
    font-size: 10px;
    border: 1px solid #b7a17d28;
    background: #b7a17d12;
    color: var(--cream-soft)
}

.badge.green {
    color: #9bc89d;
    background: #477c4b20;
    border-color: #477c4b55
}

.badge.red {
    color: #e09b8f;
    background: #8f453b20;
    border-color: #8f453b55
}

.badge.yellow {
    color: #ead18a;
    background: #c6a35418;
    border-color: #c6a35455
}

.badge.blue {
    color: #a7c6d4;
    background: #40708022;
    border-color: #40708055
}

.empty {
    padding: 32px 14px;
    text-align: center;
    color: var(--cream-muted);
    font-size: 13px
}

.empty i {
    display: block;
    font-size: 27px;
    margin-bottom: 10px;
    color: var(--cream-dark)
}

.toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px
}

.toolbar .search-input {
    max-width: 300px
}

.toolbar select {
    max-width: 180px
}

.notice {
    padding: 15px 17px;
    border: 1px solid #c6a35435;
    background: #c6a3540e;
    border-radius: 13px;
    color: var(--cream-soft);
    font-size: 12px;
    line-height: 2
}

.notice strong {
    color: var(--gold)
}

.announcement-card,
.ticket-card,
.video-card {
    border: 1px solid #b7a17d24;
    background: #ffffff04;
    border-radius: 15px;
    padding: 17px;
    margin-bottom: 12px;
    transition: .2s
}

.announcement-card:hover,
.ticket-card:hover,
.video-card:hover {
    border-color: #c6a35455;
    transform: translateY(-2px)
}

.announcement-card h3 {
    font-size: 15px;
    margin: 0 0 8px
}

.announcement-card p {
    font-size: 12px;
    color: var(--cream-soft);
    line-height: 2;
    white-space: pre-line
}

.meta-line {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--cream-muted);
    font-size: 10px
}

.message-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0
}

.message {
    max-width: 82%;
    padding: 14px;
    border: 1px solid #c6a35428;
    border-radius: 14px;
    background: #c6a3540c
}

.message.mine {
    align-self: flex-start;
    background: #54794a16;
    border-color: #54794a44
}

.message .body {
    font-size: 13px;
    line-height: 2;
    white-space: pre-line
}

.message small {
    display: block;
    color: var(--cream-muted);
    font-size: 10px;
    margin-top: 7px
}

.rank-list {
    display: flex;
    flex-direction: column;
    gap: 9px
}

.rank-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: #ffffff04;
    border-radius: 10px
}

.rank-line b {
    font-size: 12px
}

.rank-line small {
    color: var(--cream-muted);
    font-size: 10px
}

.progress {
    height: 6px;
    border-radius: 10px;
    background: #ffffff10;
    overflow: hidden;
    margin-top: 9px
}

.progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #7e6847, var(--gold));
    border-radius: 10px
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px
}

.video-card {
    padding: 0;
    overflow: hidden
}

.video-card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    display: block;
    background: #100d09
}

.video-card .vinfo {
    padding: 14px
}

.video-card h3 {
    font-size: 13px;
    margin: 0 0 10px
}

.video-card .vactions {
    display: flex;
    justify-content: space-between;
    align-items: center
}

.form-actions {
    margin-top: 15px;
    display: flex;
    gap: 9px;
    flex-wrap: wrap
}

.section-divider {
    height: 1px;
    background: #b7a17d22;
    margin: 18px 0
}

.split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px
}

.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 25px
}

.login-box {
    width: min(490px, 100%);
    padding: 35px;
    background: linear-gradient(145deg, #2a2117, #15100c);
    border: 1px solid #c6a3543b;
    border-radius: 24px;
    box-shadow: 0 35px 90px #0009
}

.login-brand {
    text-align: center;
    margin-bottom: 25px
}

.login-brand .emblem {
    font-size: 40px;
    color: var(--gold)
}

.login-brand h1 {
    margin: 4px 0;
    font-size: 21px
}

.login-brand p {
    color: var(--cream-muted);
    font-size: 12px;
    margin: 4px 0
}

.public-body {
    min-height: 100vh
}

.public-page {
    max-width: 1150px;
    margin: 0 auto;
    padding: 24px
}

.public-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 65px;
    gap: 12px
}

.public-nav .links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    color: var(--cream-soft);
    font-size: 12px
}

.public-hero {
    text-align: center;
    padding: 70px 0 50px
}

.public-hero h1 {
    font-size: clamp(38px, 7vw, 72px);
    margin: 12px 0;
    color: var(--cream-light)
}

.public-hero h1 span {
    color: var(--gold)
}

.public-hero p {
    max-width: 650px;
    margin: 0 auto 28px;
    line-height: 2;
    color: var(--cream-muted)
}

.public-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px
}

.public-card {
    padding: 22px;
    border: 1px solid #b7a17d28;
    border-radius: 16px;
    background: #ffffff05;
    text-align: center;
    transition: .2s
}

.public-card:hover {
    transform: translateY(-5px);
    border-color: #c6a35466
}

.public-card i {
    font-size: 25px;
    color: var(--gold);
    margin-bottom: 13px
}

.public-card b {
    display: block;
    font-size: 13px;
    margin-bottom: 7px
}

.public-card small {
    font-size: 10px;
    color: var(--cream-muted)
}

.footer-note {
    text-align: center;
    margin: 35px 0 10px;
    color: var(--cream-muted);
    font-size: 10px;
    letter-spacing: 1px
}

.online-pulse {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7ebd7a;
    box-shadow: 0 0 0 5px #7ebd7a20;
    margin-left: 7px
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px
}

.detail-item {
    padding: 13px;
    border-radius: 12px;
    background: #ffffff05;
    border: 1px solid #b7a17d16
}

.detail-item small {
    display: block;
    color: var(--cream-muted);
    font-size: 10px;
    margin-bottom: 5px
}

.detail-item b {
    font-size: 13px;
    overflow-wrap: anywhere
}

.new-token {
    border: 1px dashed #c6a35477;
    background: #c6a35412;
    padding: 17px;
    border-radius: 14px;
    margin: 15px 0
}

.new-token code {
    display: block;
    direction: ltr;
    text-align: center;
    font-size: 20px;
    color: #f3d98b;
    letter-spacing: 1px;
    margin: 12px
}

.hidden {
    display: none !important
}


/* Sidebar compatibility overrides: preserve supplied sidebar structure while using Army palette. */

.sidebar-widget {
    font-family: Peyda, Tahoma, sans-serif
}

.sidebar-widget .sidebar {
    background: linear-gradient(180deg, #20180f, #120e0a);
    border-left: 1px solid #b7a17d40;
    box-shadow: 22px 0 70px #0009
}

.sidebar-widget .sidebar-header,
.sidebar-widget .sidebar-footer {
    border-color: #b7a17d25
}

.sidebar-widget .logo-icon {
    background: #c6a35419;
    color: var(--gold)
}

.sidebar-widget .nav-title {
    color: var(--cream-muted)
}

.sidebar-widget .nav-item {
    color: var(--cream-soft)
}

.sidebar-widget .nav-item:hover,
.sidebar-widget .nav-item.active {
    background: #c6a35419;
    color: var(--cream-light);
    border-color: #c6a35440
}

.sidebar-widget .nav-icon {
    color: var(--gold)
}

.sidebar-widget .user-avatar {
    background: #c6a35422;
    color: var(--gold);
    border: 1px solid #c6a35455
}

.sidebar-widget .status-dot {
    background: #82b97b
}

.sidebar-widget .open-btn {
    background: linear-gradient(135deg, var(--cream), #6f5a3c);
    color: #140f09
}

.sidebar-widget .overlay {
    background: #050403bb
}

@media(max-width:1050px) {
    .span-4,
    .span-3 {
        grid-column: span 6
    }
    .video-grid {
        grid-template-columns: repeat(2, 1fr)
    }
    .public-cards {
        grid-template-columns: repeat(2, 1fr)
    }
}

@media(max-width:700px) {
    .app-shell {
        padding: 18px 15px 45px
    }
    .app-topline {
        padding-right: 58px;
        margin-bottom: 23px
    }
    .page-heading {
        align-items: flex-start;
        flex-direction: column
    }
    .span-8,
    .span-6,
    .span-4,
    .span-3 {
        grid-column: span 12
    }
    .field-grid,
    .split {
        grid-template-columns: 1fr
    }
    .detail-grid {
        grid-template-columns: repeat(2, 1fr)
    }
    .video-grid {
        grid-template-columns: 1fr
    }
    .public-nav {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 35px
    }
    .public-cards {
        grid-template-columns: 1fr 1fr
    }
    .message {
        max-width: 96%
    }
    .login-box {
        padding: 25px 20px
    }
}

@media(max-width:430px) {
    .public-cards {
        grid-template-columns: 1fr
    }
    .detail-grid {
        grid-template-columns: 1fr
    }
    .stat-card strong {
        font-size: 23px
    }
}