/* Almaty Seasons — custom admin */
:root {
    --purple: #7b61ff;
    --purple-2: #6a4ae6;
    --purple-soft: rgba(123, 97, 255, .12);
    --ink: #17171f;
    --muted: #8a8a99;
    --bg: #f4f4f7;
    --sidebar: #14141f;
    --card: #fff;
    --border: #ececf1;
    --green: #22c55e;
    --amber: #f59e0b;
    --red: #ef4444;
}

* { box-sizing: border-box; }
html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
    width: 240px;
    flex: 0 0 240px;
    background: var(--sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 22px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
}
.side-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 22px;
}
.side-logo {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, #8b6bff, #6a4ae6);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 20px rgba(123, 97, 255, .35);
}
.side-brand b { font-size: 17px; letter-spacing: -.01em; }

.side-group-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: #6d6d7c;
    padding: 16px 12px 8px;
}
.side-nav { display: flex; flex-direction: column; gap: 4px; }
.side-nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #a7a7b4;
    font-size: 14px; font-weight: 500;
    transition: background .15s, color .15s;
}
.side-nav a svg { width: 18px; height: 18px; opacity: .9; }
.side-nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side-nav a.active {
    background: var(--purple);
    color: #fff;
    box-shadow: 0 8px 20px rgba(123, 97, 255, .4);
}
.side-foot { margin-top: auto; padding: 12px; color: #55556a; font-size: 12px; }

.main { flex: 1; min-width: 0; padding: 30px 38px 60px; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { color: var(--purple); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.page-title { font-size: 30px; font-weight: 700; margin: 0; letter-spacing: -.02em; }
.page-sub { color: var(--muted); font-size: 14px; margin-top: 6px; }

/* ---------- Cards ---------- */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 1px 2px rgba(20, 20, 31, .03);
}
.card-pad { padding: 22px 24px; }
.card + .card { margin-top: 22px; }
.card-title { font-size: 17px; font-weight: 700; margin: 0 0 16px; }

/* ---------- Metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.metric { background: var(--card); border: 1px solid var(--border); border-radius: 18px; padding: 20px 22px; }
.metric-label { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; }
.metric-value { font-size: 34px; font-weight: 700; margin-top: 10px; line-height: 1; }
.metric-foot { font-size: 12px; color: var(--muted); margin-top: 8px; }
@media (max-width: 1100px) { .metrics { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 10px 20px;
    font-size: 14px; font-weight: 600;
    cursor: pointer;
    transition: background .15s, opacity .15s, border-color .15s;
    background: #fff; color: var(--ink); border-color: var(--border);
}
.btn:hover { opacity: .92; }
.btn-primary { background: var(--purple); color: #fff; border-color: var(--purple); }
.btn-primary:hover { background: var(--purple-2); border-color: var(--purple-2); opacity: 1; }
.btn-dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn-danger { background: #fff; color: var(--red); border-color: #f3d0d0; }
.btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--purple); padding-left: 0; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table thead th {
    text-align: left;
    font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
    color: var(--muted); font-weight: 600;
    padding: 4px 14px 14px;
    border-bottom: 1px solid var(--border);
}
.table tbody td { padding: 16px 14px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafafc; }
.t-title { font-weight: 600; color: var(--ink); }
.t-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.t-right { text-align: right; }

/* ---------- Badges ---------- */
.badge {
    display: inline-block;
    padding: 3px 12px;
    border-radius: 999px;
    font-size: 12px; font-weight: 600;
}
.pill-ok { color: var(--green); }
.pill-warn { color: var(--amber); }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; }
.field label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin-bottom: 8px; }
.field input, .field select, .field textarea {
    width: 100%;
    border: 1px solid #e6e6ee;
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 14px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 92px; }
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-soft);
}
.field-help { font-size: 12px; color: var(--muted); margin-top: 6px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 6px; }
.form-actions { display: flex; gap: 10px; margin-top: 24px; align-items: center; }
.filters { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 14px; margin-bottom: 4px; }
@media (max-width: 900px) { .form-grid, .filters { grid-template-columns: 1fr; } }

.cover-preview { max-width: 220px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 12px; display: block; }

/* ---------- Flash ---------- */
.flash {
    background: #ecfdf3; color: #067647; border: 1px solid #abefc6;
    padding: 12px 18px; border-radius: 12px; margin-bottom: 20px; font-size: 14px; font-weight: 500;
}

/* ---------- Empty ---------- */
.empty { text-align: center; color: var(--muted); padding: 50px 0; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 6px; margin-top: 18px; flex-wrap: wrap; }
.pager a, .pager span {
    padding: 7px 12px; border-radius: 10px; font-size: 13px;
    border: 1px solid var(--border); background: #fff; color: var(--ink);
}
.pager .active { background: var(--purple); color: #fff; border-color: var(--purple); }
.pager .disabled { color: #c7c7d1; }

/* ---------- Login ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); padding: 20px; }
.login-card { width: 100%; max-width: 400px; background: #fff; border-radius: 22px; padding: 38px 34px; box-shadow: 0 24px 60px rgba(20, 20, 31, .1); }
.login-brand { display: flex; align-items: center; gap: 11px; justify-content: center; margin-bottom: 26px; }
.login-brand b { font-size: 20px; }
.login-title { font-size: 22px; font-weight: 700; text-align: center; margin: 0 0 22px; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; justify-content: center; }
