:root {
    --bg: #0e1110;
    --panel: #171c1a;
    --panel-2: #202722;
    --line: #343a32;
    --text: #f3efe5;
    --muted: #b8b2a4;
    --gold: #c7a34b;
    --gold-2: #f0d684;
    --danger: #d76565;
    --success: #67bf84;
    --warning: #d6a94d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: radial-gradient(circle at 24% 0%, rgba(199, 163, 75, .12), transparent 34%), linear-gradient(180deg, #121614, #0e1110 62%, #090b0a);
    font-family: Arial, Helvetica, sans-serif;
}

a { color: var(--gold-2); text-decoration: none; }
a:hover { color: #fff; }

.topbar {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 16px clamp(18px, 4vw, 52px);
    background: rgba(13, 16, 15, .94);
    border-bottom: 1px solid var(--line);
}

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

.brand-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
    flex: 0 0 auto;
}

.brand small, .muted { color: var(--muted); }
.brand span:last-child { display: grid; gap: 2px; }

.nav {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.lang-switch {
    display: inline-flex;
    border: 1px solid var(--line);
    border-radius: 6px;
    overflow: hidden;
}

.lang-switch a {
    padding: 8px 10px;
    color: var(--muted);
}

.lang-switch a.active {
    background: var(--gold);
    color: #17130a;
    font-weight: 800;
}

.shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 34px 0 56px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 28px;
    align-items: stretch;
    min-height: 520px;
}

.hero-copy, .panel, .card, .table-wrap {
    background: rgba(23, 28, 26, .92);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.hero-copy {
    padding: clamp(28px, 5vw, 58px);
    display: grid;
    align-content: center;
}

.hero-copy h1 {
    margin: 0 0 18px;
    font-size: clamp(36px, 5vw, 66px);
    line-height: 1;
    letter-spacing: 0;
}

.eyebrow {
    color: var(--gold-2);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 13px;
    margin: 0 0 12px;
}

.hero-actions, .actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.hero-panel {
    padding: 24px;
    background: linear-gradient(145deg, rgba(199, 163, 75, .16), rgba(32, 39, 34, .94));
    border: 1px solid rgba(199, 163, 75, .34);
    border-radius: 8px;
}

.stat {
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
}
.stat:last-child { border-bottom: 0; }
.stat strong { display: block; font-size: 28px; color: var(--gold-2); }

.button, button, input[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border: 1px solid var(--gold);
    border-radius: 6px;
    background: var(--gold);
    color: #17130a;
    font-weight: 700;
    cursor: pointer;
}

.button.ghost, button.ghost {
    background: transparent;
    color: var(--gold-2);
}

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

.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel, .card { padding: 22px; }
.panel h2, .card h3 { margin-top: 0; }

.form {
    display: grid;
    gap: 16px;
}

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

label { display: grid; gap: 7px; color: var(--muted); font-weight: 700; }

.checkline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.45;
}

input, select, textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 10px 12px;
    background: #101412;
    color: var(--text);
    font: inherit;
}

input[type="checkbox"] {
    width: auto;
    min-height: 0;
    accent-color: var(--gold);
}

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

.alert {
    padding: 13px 15px;
    margin-bottom: 18px;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}
.alert.success { border-color: rgba(103, 191, 132, .5); }
.alert.warning { border-color: rgba(214, 169, 77, .6); }
.alert.danger { border-color: rgba(215, 101, 101, .6); }

.badge {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #323832;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}
.badge.success { background: rgba(103, 191, 132, .18); color: #9be0b2; }
.badge.warning { background: rgba(214, 169, 77, .18); color: #f0d684; }
.badge.danger { background: rgba(215, 101, 101, .18); color: #ef9f9f; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 13px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--gold-2); font-size: 13px; text-transform: uppercase; }

.admin-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.list-head, .pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.list-head h1 { margin-bottom: 4px; }

.filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) repeat(4, minmax(120px, 170px));
    gap: 10px;
    margin: 18px 0;
    align-items: end;
}

.compact-list {
    display: grid;
    border-top: 1px solid var(--line);
}

.list-row {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) 120px 130px 130px auto;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.course-row {
    grid-template-columns: minmax(280px, 1fr) 100px 110px 130px auto;
}

.payment-row {
    grid-template-columns: 28px minmax(190px, .85fr) minmax(240px, 1fr) minmax(150px, .75fr) minmax(320px, 1.2fr);
}

.list-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.list-main strong,
.list-main span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
}

.row-actions .button,
.row-actions button {
    min-height: 34px;
    padding: 7px 11px;
}

.inline-update {
    display: grid;
    grid-template-columns: minmax(120px, .7fr) minmax(120px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.inline-update select,
.inline-update input,
.inline-update button {
    min-height: 34px;
    padding: 7px 10px;
}

.pager { margin-top: 18px; }

.dashboard-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .9fr);
    gap: 18px;
    align-items: start;
}

.dashboard-name {
    margin: 0 0 18px;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
}

.info-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.info-list div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.info-list div:last-child {
    border-bottom: 0;
}

.info-list dt {
    color: var(--muted);
    font-weight: 700;
}

.info-list dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.footer {
    display: flex;
    justify-content: center;
    gap: 22px;
    flex-wrap: wrap;
    padding: 24px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    background: #0b0d0c;
}

@media (max-width: 820px) {
    .topbar { align-items: flex-start; flex-direction: column; }
    .hero, .grid, .grid.two, .form-row, .filters, .list-row, .course-row, .payment-row, .dashboard-columns, .info-list div, .inline-update { grid-template-columns: 1fr; }
    .nav { gap: 10px; }
    .row-actions { justify-content: flex-start; }
}
