/* ==========================================================================
   PC Soft Apps — Admin studio
   ========================================================================== */

:root {
    --bg: #070b14;
    --bg-soft: #0a101d;
    --panel: #0d1424;
    --panel-2: #111a2c;
    --panel-3: #162034;
    --line: rgba(148, 163, 184, .14);
    --line-strong: rgba(148, 163, 184, .24);
    --text: #e9eef8;
    --muted: #8c99ae;
    --faint: #66738a;
    --primary: #6366f1;
    --primary-2: #8b5cf6;
    --cyan: #22d3ee;
    --green: #22c55e;
    --amber: #f59e0b;
    --pink: #ec4899;
    --red: #ef4444;
    --radius: 18px;
    --radius-sm: 11px;
    --sidebar: 270px;
    --shadow: 0 24px 60px -30px rgba(2, 6, 23, .9);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Sora', 'Inter', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body.admin-body,
body.admin-auth-body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.admin-body {
    background:
        radial-gradient(900px 500px at 85% -10%, rgba(99, 102, 241, .12), transparent 65%),
        radial-gradient(700px 420px at 8% 0%, rgba(34, 211, 238, .07), transparent 60%),
        var(--bg);
    min-height: 100vh;
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(99, 102, 241, .4); color: #fff; }

.icon { display: inline-block; vertical-align: -.14em; flex: none; }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn .icon { margin: 0; }

.btn-primary {
    background: linear-gradient(120deg, var(--primary), var(--primary-2) 55%, var(--cyan));
    color: #fff;
    box-shadow: 0 12px 30px -14px rgba(99, 102, 241, .9), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 18px 36px -14px rgba(99, 102, 241, 1); }

.btn-ghost {
    background: rgba(148, 163, 184, .06);
    border-color: var(--line);
    color: #cbd5e1;
}
.btn-ghost:hover { background: rgba(148, 163, 184, .12); border-color: var(--line-strong); color: #fff; }

.btn-danger-ghost {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .25);
    color: #fca5a5;
}
.btn-danger-ghost:hover { background: rgba(239, 68, 68, .16); color: #fecaca; }

.btn-sm { padding: 8px 14px; font-size: 13px; gap: 6px; }
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-block { width: 100%; }

.inline-form { display: inline-flex; align-items: center; margin: 0; }

/* ==========================================================================
   Brand
   ========================================================================== */

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand-mark { width: 40px; height: 40px; flex: none; display: inline-flex; border-radius: 12px; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text {
    font-family: var(--display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.1;
    color: #f8fafc;
}
.brand-text small {
    display: block;
    font-family: var(--font);
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--faint);
    margin-top: 4px;
}
.brand-dot {
    background: linear-gradient(120deg, var(--primary), var(--cyan));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ==========================================================================
   Shell / sidebar
   ========================================================================== */

.admin-shell { display: flex; min-height: 100vh; }

.admin-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar);
    display: flex;
    flex-direction: column;
    gap: 22px;
    padding: 22px 18px;
    background: linear-gradient(180deg, #0a1120, #080d18 60%, #070b14);
    border-right: 1px solid var(--line);
    z-index: 50;
    overflow-y: auto;
    scrollbar-width: thin;
}

.admin-sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 0; }
.admin-sidebar-close {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    align-items: center;
    justify-content: center;
}

.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav-label {
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 0 12px 8px;
}
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #a4b0c4;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
    position: relative;
}
.admin-nav a:hover { background: rgba(148, 163, 184, .07); color: #fff; }
.admin-nav a.is-active {
    color: #fff;
    background: linear-gradient(100deg, rgba(99, 102, 241, .22), rgba(139, 92, 246, .1));
    border-color: rgba(99, 102, 241, .32);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
}
.admin-nav a.is-active::before {
    content: "";
    position: absolute;
    left: -18px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 0 4px 4px 0;
    background: linear-gradient(180deg, var(--primary), var(--cyan));
}
.admin-nav-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: rgba(148, 163, 184, .07);
    color: #90a0b8;
    flex: none;
}
.admin-nav a.is-active .admin-nav-icon { background: rgba(99, 102, 241, .26); color: #c7d2fe; }
.admin-nav-badge {
    margin-left: auto;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--amber);
    color: #241500;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.admin-sidebar-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.admin-user { display: flex; align-items: center; gap: 11px; padding: 0 4px; }
.admin-avatar {
    width: 38px;
    height: 38px;
    flex: none;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--display);
    font-size: 13px;
    font-weight: 600;
    color: #eef2ff;
    background: linear-gradient(140deg, rgba(99, 102, 241, .85), rgba(34, 211, 238, .55));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.admin-avatar--sm { width: 32px; height: 32px; border-radius: 9px; font-size: 11.5px; }
.admin-user-meta { display: flex; flex-direction: column; min-width: 0; }
.admin-user-meta b { font-size: 13.5px; font-weight: 600; color: #e2e8f3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-user-meta small { font-size: 12px; color: var(--faint); }
.admin-logout {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, .05);
    color: #9aa7bb;
    font-size: 13px;
    font-weight: 500;
    transition: .18s ease;
}
.admin-logout:hover { color: #fecaca; border-color: rgba(239, 68, 68, .3); background: rgba(239, 68, 68, .08); }
.admin-logout-form { margin: 0; }

.admin-main { flex: 1; min-width: 0; margin-left: var(--sidebar); display: flex; flex-direction: column; }

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 18px 34px;
    background: rgba(7, 11, 20, .82);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--line);
}
.admin-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 11px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, .06);
    color: #cbd5e1;
    align-items: center;
    justify-content: center;
}
.admin-heading { min-width: 0; }
.admin-heading h1 { font-size: 24px; line-height: 1.2; }
.admin-heading p { margin-top: 3px; font-size: 13px; color: var(--muted); }
.admin-top-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.admin-content { padding: 28px 34px 56px; width: 100%; max-width: 1420px; margin: 0 auto; display: grid; gap: 20px; }

.admin-backdrop { display: none; }

/* ==========================================================================
   Cards & general
   ========================================================================== */

.admin-card {
    background: linear-gradient(170deg, rgba(17, 26, 44, .92), rgba(11, 18, 32, .92));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    min-width: 0;
}
.admin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.admin-card-head h2 { font-size: 16.5px; letter-spacing: -.01em; }
.admin-card-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }

.admin-link { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; color: #a5b4fc; white-space: nowrap; }
.admin-link:hover { color: #c7d2fe; }

.admin-count { font-size: 12px; font-weight: 600; color: var(--muted); background: rgba(148, 163, 184, .08); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }

.admin-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, .07);
    font-size: 11.5px;
    font-weight: 600;
    color: #b6c2d6;
    white-space: nowrap;
}
.muted { color: var(--faint); }

.admin-time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.admin-hint-inline { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--faint); }

/* Flash / alerts */
.admin-flashes { display: grid; gap: 10px; }
.admin-flash {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 15px;
    border-radius: 13px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    font-size: 13.5px;
}
.admin-flash p { flex: 1; }
.admin-flash button { border: 0; background: transparent; color: var(--faint); display: inline-flex; padding: 4px; border-radius: 6px; }
.admin-flash button:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.admin-flash--success { border-color: rgba(34, 197, 94, .3); background: rgba(34, 197, 94, .09); color: #bbf7d0; }
.admin-flash--error { border-color: rgba(239, 68, 68, .3); background: rgba(239, 68, 68, .09); color: #fecaca; }

.admin-alert {
    display: flex;
    gap: 12px;
    padding: 15px 17px;
    border-radius: 14px;
    border: 1px solid rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .08);
    color: #fecaca;
    font-size: 13.5px;
}
.admin-alert .icon { margin-top: 2px; }
.admin-alert p + p { margin-top: 4px; }

/* ==========================================================================
   Dashboard
   ========================================================================== */

.admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.admin-stat {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 19px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: linear-gradient(165deg, rgba(17, 26, 44, .95), rgba(10, 16, 29, .95));
    overflow: hidden;
}
.admin-stat::after {
    content: "";
    position: absolute;
    inset: -40% -20% auto auto;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, .22), transparent 70%);
    pointer-events: none;
}
.admin-stat-icon {
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, .16);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, .25);
}
.admin-stat-icon--green { background: rgba(34, 197, 94, .14); color: #86efac; border-color: rgba(34, 197, 94, .22); }
.admin-stat-icon--amber { background: rgba(245, 158, 11, .14); color: #fcd34d; border-color: rgba(245, 158, 11, .22); }
.admin-stat-icon--pink { background: rgba(236, 72, 153, .14); color: #f9a8d4; border-color: rgba(236, 72, 153, .22); }
.admin-stat-body { display: flex; flex-direction: column; min-width: 0; position: relative; z-index: 1; }
.admin-stat-label { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.admin-stat-body b { font-family: var(--display); font-size: 27px; font-weight: 600; line-height: 1.25; color: #f8fafc; }
.admin-stat-body small { font-size: 12px; color: var(--faint); }
.admin-stat-spark { position: absolute; right: 14px; bottom: 12px; color: rgba(148, 163, 184, .14); }
.admin-stat-spark--green { color: rgba(34, 197, 94, .18); }
.admin-stat-spark--amber { color: rgba(245, 158, 11, .18); }
.admin-stat-spark--pink { color: rgba(236, 72, 153, .18); }

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

.admin-list { display: grid; gap: 2px; margin: 0 -8px; }
.admin-list-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 8px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: background .16s ease, border-color .16s ease;
}
.admin-list-row:hover { background: rgba(148, 163, 184, .06); border-color: var(--line); }
.admin-list-row > .icon:last-child { color: var(--faint); transform: rotate(-90deg); }
.admin-list-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.admin-list-main b { font-size: 13.5px; font-weight: 600; color: #e6ebf5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin-list-main b small { font-weight: 500; color: var(--faint); font-size: 11.5px; }
.admin-list-main span { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.admin-status { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; text-transform: capitalize; }
.admin-status.is-live { background: rgba(34, 197, 94, .12); color: #86efac; border: 1px solid rgba(34, 197, 94, .25); }
.admin-status.is-draft { background: rgba(148, 163, 184, .1); color: #a5b4c8; border: 1px solid var(--line); }
.admin-status.is-new { background: rgba(245, 158, 11, .14); color: #fcd34d; border: 1px solid rgba(245, 158, 11, .28); }
.admin-status.is-read { background: rgba(148, 163, 184, .08); color: var(--muted); border: 1px solid var(--line); }

.admin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    padding: 34px 20px;
    color: var(--muted);
}
.admin-empty > span { width: 54px; height: 54px; border-radius: 15px; display: inline-flex; align-items: center; justify-content: center; background: rgba(99, 102, 241, .1); color: #a5b4fc; margin-bottom: 4px; }
.admin-empty b { color: #e2e8f3; font-family: var(--display); font-size: 15px; }
.admin-empty p { font-size: 13px; color: var(--muted); max-width: 360px; }
.admin-empty .btn { margin-top: 10px; }
.admin-empty--large { padding: 60px 20px; }

.admin-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.admin-quick-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, .035);
    transition: .18s ease;
}
.admin-quick-item:hover { background: rgba(99, 102, 241, .08); border-color: rgba(99, 102, 241, .3); transform: translateY(-2px); }
.admin-quick-item > .icon { color: var(--faint); margin-left: auto; }
.admin-quick-icon {
    width: 40px;
    height: 40px;
    flex: none;
    border-radius: 11px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, .16);
    color: #a5b4fc;
}
.admin-quick-icon--violet { background: rgba(139, 92, 246, .16); color: #c4b5fd; }
.admin-quick-icon--amber { background: rgba(245, 158, 11, .14); color: #fcd34d; }
.admin-quick-icon--green { background: rgba(34, 197, 94, .14); color: #86efac; }
.admin-quick-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.admin-quick-item b { font-size: 13px; font-weight: 600; color: #e6ebf5; }
.admin-quick-item small { font-size: 11.5px; color: var(--faint); }

/* ==========================================================================
   Toolbar & tables
   ========================================================================== */

.admin-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-filters { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.admin-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, .55);
    color: var(--faint);
    min-width: 240px;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.admin-search:focus-within { border-color: rgba(99, 102, 241, .5); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.admin-search input { border: 0; background: transparent; padding: 9px 0; width: 100%; font-size: 13px; outline: none; color: var(--text); }
.admin-search input::placeholder { color: var(--faint); }
.admin-search--inline { margin-left: auto; }

.admin-filters select {
    appearance: none;
    padding: 9px 32px 9px 12px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, .55) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238c99ae' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 11px center;
    font-size: 13px;
    color: #cbd5e1;
    cursor: pointer;
}
.admin-filters select:focus { outline: none; border-color: rgba(99, 102, 241, .5); }

.admin-table-wrap { overflow-x: auto; margin: 0 -22px -22px; padding: 0 6px 6px; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 940px; }
.admin-table th {
    text-align: left;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--faint);
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.admin-table td { padding: 12px; border-bottom: 1px solid rgba(148, 163, 184, .08); vertical-align: middle; font-size: 13px; }
.admin-table tbody tr { transition: background .15s ease; }
.admin-table tbody tr:hover { background: rgba(148, 163, 184, .04); }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table .t-right { text-align: right; }

.admin-product-cell { display: flex; align-items: center; gap: 11px; min-width: 200px; }
.admin-product-cell > div { display: flex; flex-direction: column; min-width: 0; }
.admin-product-cell b { font-weight: 600; }
.admin-product-cell b a:hover { color: #c7d2fe; }
.admin-product-cell span { font-size: 11.5px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }

.admin-link-badges { display: flex; gap: 4px; color: var(--faint); }
.admin-link-badges span { width: 22px; height: 22px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; background: rgba(148, 163, 184, .08); }

.admin-icon-btn {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #94a3b8;
    transition: .16s ease;
}
.admin-icon-btn:hover { background: rgba(148, 163, 184, .12); color: #fff; border-color: var(--line); }
.admin-icon-btn.is-featured { color: var(--amber); }
.admin-icon-btn.is-featured:hover { background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); }
.admin-icon-btn--danger:hover { background: rgba(239, 68, 68, .12); border-color: rgba(239, 68, 68, .3); color: #fca5a5; }

.admin-row-actions { display: inline-flex; align-items: center; gap: 2px; justify-content: flex-end; }

.admin-status-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, .07);
    color: var(--muted);
    transition: .16s ease;
}
.admin-status-btn .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.admin-status-btn.is-live { color: #86efac; border-color: rgba(34, 197, 94, .27); background: rgba(34, 197, 94, .1); }
.admin-status-btn.is-draft { color: #a5b4c8; }
.admin-status-btn:hover { filter: brightness(1.2); }

.sort-form { gap: 4px; }
.sort-form input {
    width: 52px;
    padding: 5px 6px;
    border-radius: 7px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, .6);
    font-size: 12px;
    text-align: center;
    color: #cbd5e1;
}
.sort-form input:focus { outline: none; border-color: rgba(99, 102, 241, .5); }

/* Tabs */
.admin-tabs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.admin-tabs > a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(148, 163, 184, .04);
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}
.admin-tabs > a span { font-size: 11px; padding: 1px 7px; border-radius: 999px; background: rgba(148, 163, 184, .12); color: #cbd5e1; }
.admin-tabs > a:hover { color: #fff; border-color: var(--line-strong); }
.admin-tabs > a.is-active { background: rgba(99, 102, 241, .16); border-color: rgba(99, 102, 241, .4); color: #dbe3ff; }

/* ==========================================================================
   Inquiries
   ========================================================================== */

.enquiry-list { display: grid; gap: 14px; }
.enquiry-card {
    background: linear-gradient(170deg, rgba(17, 26, 44, .88), rgba(11, 18, 32, .92));
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    scroll-margin-top: 100px;
}
.enquiry-card.is-new { border-color: rgba(245, 158, 11, .28); box-shadow: 0 0 0 1px rgba(245, 158, 11, .06), var(--shadow); }
.enquiry-head { display: flex; align-items: center; gap: 13px; }
.enquiry-who { flex: 1; min-width: 0; }
.enquiry-who h2 { display: flex; align-items: center; gap: 8px; font-size: 15px; }
.enquiry-who p { font-size: 12.5px; color: var(--faint); display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.enquiry-who p a:hover { color: #c7d2fe; }
.enquiry-body {
    margin: 16px 0 16px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(7, 11, 20, .45);
    border: 1px solid rgba(148, 163, 184, .08);
    font-size: 13.5px;
    line-height: 1.7;
    color: #c8d2e2;
    overflow-wrap: anywhere;
}
.enquiry-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.enquiry-foot form:last-child { margin-left: auto; }

/* ==========================================================================
   Forms
   ========================================================================== */

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #b8c4d8; }
.field label em { color: #f87171; font-style: normal; }
.field input[type="text"],
.field input[type="email"],
.field input[type="url"],
.field input[type="number"],
.field input[type="password"],
.field input[type="search"],
.field select,
.field textarea {
    width: 100%;
    padding: 10px 13px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, .55);
    color: var(--text);
    font-size: 13.5px;
    line-height: 1.5;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field textarea { resize: vertical; min-height: 74px; }
.field input::placeholder, .field textarea::placeholder { color: #56647a; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: none;
    border-color: rgba(99, 102, 241, .55);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
    background: rgba(7, 11, 20, .75);
}
.field-hint { font-size: 11.5px; color: var(--faint); }
.field-hint a { color: #a5b4fc; }

.input-prefix {
    display: flex;
    align-items: stretch;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, .55);
    overflow: hidden;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.input-prefix:focus-within { border-color: rgba(99, 102, 241, .55); box-shadow: 0 0 0 3px rgba(99, 102, 241, .12); }
.input-prefix > span {
    display: inline-flex;
    align-items: center;
    padding: 0 11px;
    background: rgba(148, 163, 184, .07);
    border-right: 1px solid var(--line);
    font-size: 12px;
    color: var(--faint);
    white-space: nowrap;
}
.input-prefix input { border: 0; background: transparent; border-radius: 0; }
.input-prefix input:focus { box-shadow: none; background: transparent; }

.admin-form { margin: 0; }
.admin-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 20px; align-items: start; }
.admin-form-main, .admin-form-side { display: grid; gap: 20px; min-width: 0; }
.admin-form-side { position: sticky; top: 100px; }
.admin-fields { display: grid; gap: 15px; }
.admin-fields--compact { gap: 12px; }
.admin-field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }

.admin-form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 20px; flex-wrap: wrap; }
.admin-form-actions--inner { margin-top: 16px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(148, 163, 184, .08); }
.switch-row + .switch-row { border-bottom: 0; padding-top: 3px; }
.switch-row > span { display: flex; flex-direction: column; }
.switch-row b { font-size: 13px; font-weight: 600; }
.switch-row small { font-size: 11.5px; color: var(--faint); }
.switch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
    width: 42px;
    height: 24px;
    border-radius: 999px;
    background: rgba(148, 163, 184, .2);
    border: 1px solid var(--line);
    position: relative;
    transition: background .2s ease;
}
.switch-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: transform .2s ease, background .2s ease;
}
.switch input:checked + .switch-track { background: linear-gradient(120deg, var(--primary), var(--violet)); border-color: transparent; }
.switch input:checked + .switch-track::after { transform: translateX(18px); background: #fff; }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px rgba(99, 102, 241, .25); }

.color-field { display: flex; align-items: center; gap: 10px; }
.color-field input[type="color"] {
    width: 44px;
    height: 38px;
    padding: 3px;
    border-radius: 9px;
    border: 1px solid var(--line);
    background: rgba(7, 11, 20, .55);
    cursor: pointer;
}
.color-field span { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; color: var(--muted); text-transform: uppercase; }

.admin-media { display: flex; gap: 16px; align-items: center; }
.admin-media--stack { flex-direction: column; align-items: stretch; }
.admin-media-preview {
    width: 96px;
    height: 96px;
    flex: none;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(7, 11, 20, .5);
    border: 1px dashed var(--line-strong);
    padding: 6px;
}
.admin-media-body { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.admin-media-body small { font-size: 11px; color: var(--faint); }

.admin-file { position: relative; display: inline-flex; }
.admin-file input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.admin-file span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 13px;
    border-radius: 9px;
    border: 1px solid var(--line-strong);
    background: rgba(148, 163, 184, .08);
    font-size: 12.5px;
    font-weight: 500;
    color: #cbd5e1;
    transition: .16s ease;
}
.admin-file:hover span { background: rgba(99, 102, 241, .14); border-color: rgba(99, 102, 241, .35); color: #e0e7ff; }

.admin-check { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; }
.admin-check input { accent-color: var(--primary); }

.admin-cover-preview {
    width: 100%;
    aspect-ratio: 16 / 7;
    border-radius: 13px;
    border: 1px dashed var(--line-strong);
    background: rgba(7, 11, 20, .5);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.admin-cover-preview img { width: 100%; height: 100%; object-fit: cover; }
.admin-cover-preview span { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }

.admin-settings-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.admin-password-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }

/* App icon rendering */
.app-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex: none;
    border-radius: 13px;
    overflow: hidden;
    background: color-mix(in srgb, var(--accent, #6366f1) 18%, #0a1120);
    border: 1px solid color-mix(in srgb, var(--accent, #6366f1) 38%, transparent);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.app-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.app-icon--sm { width: 36px; height: 36px; border-radius: 10px; }
.app-icon--lg { width: 100%; height: 100%; border-radius: 16px; }
.app-icon--fallback > span {
    font-family: var(--display);
    font-size: 15px;
    font-weight: 700;
    color: color-mix(in srgb, var(--accent, #6366f1) 60%, #fff);
}
.app-icon--sm.app-icon--fallback > span { font-size: 12px; }
.app-icon--lg.app-icon--fallback > span { font-size: 30px; }

/* ==========================================================================
   Auth / login
   ========================================================================== */

.admin-auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 34px 20px;
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(900px 520px at 78% 18%, rgba(99, 102, 241, .18), transparent 60%),
        radial-gradient(700px 480px at 10% 85%, rgba(34, 211, 238, .1), transparent 60%),
        #060a12;
}
.auth-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.auth-orb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5; }
.auth-orb--1 { width: 460px; height: 460px; background: rgba(99, 102, 241, .35); top: -140px; right: -100px; }
.auth-orb--2 { width: 380px; height: 380px; background: rgba(34, 211, 238, .25); bottom: -160px; left: -120px; }

.auth-wrap { width: 100%; max-width: 980px; position: relative; z-index: 1; }
.auth-card {
    display: grid;
    grid-template-columns: 1.08fr .92fr;
    border-radius: 26px;
    border: 1px solid rgba(148, 163, 184, .16);
    background: rgba(10, 16, 29, .78);
    box-shadow: 0 50px 120px -40px rgba(2, 6, 23, 1);
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}
.auth-aside {
    padding: 38px 36px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    background:
        radial-gradient(500px 300px at 100% 0%, rgba(139, 92, 246, .28), transparent 65%),
        radial-gradient(400px 300px at 0% 100%, rgba(99, 102, 241, .22), transparent 65%),
        linear-gradient(160deg, #0b1322, #0a101d);
    border-right: 1px solid var(--line);
}
.auth-aside-copy { margin-top: auto; }
.auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, .18);
    background: rgba(148, 163, 184, .06);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .04em;
    color: #c7d2fe;
    margin-bottom: 16px;
}
.auth-aside h1 { font-size: 28px; line-height: 1.25; letter-spacing: -.03em; color: #f8fafc; }
.auth-aside-copy p { margin-top: 12px; font-size: 13.5px; line-height: 1.7; color: #93a2b8; max-width: 40ch; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.auth-points li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: #a9b6ca; }
.auth-points .icon { color: #6ee7b7; flex: none; }
.auth-aside-foot { margin-top: auto; font-size: 11.5px; color: var(--faint); }
.auth-aside-foot span { margin: 0 5px; }
.auth-aside-foot a { color: #a5b4fc; }
.auth-aside-foot a:hover { color: #c7d2fe; }

.auth-form-side { padding: 40px 38px; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.auth-form-head { display: flex; flex-direction: column; gap: 6px; }
.auth-lock {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, .15);
    border: 1px solid rgba(99, 102, 241, .3);
    color: #a5b4fc;
    margin-bottom: 8px;
}
.auth-form-head h2 { font-size: 24px; letter-spacing: -.03em; }
.auth-form-head p { font-size: 13px; color: var(--muted); }
.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 13px;
    border-radius: 11px;
    border: 1px solid rgba(239, 68, 68, .3);
    background: rgba(239, 68, 68, .09);
    color: #fecaca;
    font-size: 12.5px;
    line-height: 1.5;
}
.auth-error .icon { margin-top: 2px; flex: none; }
.auth-form { display: grid; gap: 15px; }
.auth-form .field label { color: #c3cfe2; }
.auth-hint { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--faint); }
.auth-hint .icon { flex: none; }

.password-wrap { position: relative; display: flex; align-items: center; }
.password-wrap input { padding-right: 42px !important; }
.password-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--faint);
}
.password-toggle:hover { color: #e2e8f3; background: rgba(148, 163, 184, .1); }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1280px) {
    .admin-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .admin-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
    .admin-form-grid, .admin-settings-grid { grid-template-columns: minmax(0, 1fr); }
    .admin-form-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .auth-card { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
    .admin-grid-2 { grid-template-columns: minmax(0, 1fr); }
    .admin-topbar { padding: 15px 22px; }
    .admin-content { padding: 22px 22px 48px; }
    .admin-heading h1 { font-size: 21px; }
    .admin-heading p { display: none; }
    .admin-password-grid { grid-template-columns: 1fr; }
    .auth-card { grid-template-columns: 1fr; max-width: 460px; margin: 0 auto; }
    .auth-aside { display: none; }
}

@media (max-width: 860px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .24s ease;
        box-shadow: 30px 0 80px rgba(2, 6, 23, .6);
    }
    .admin-sidebar.is-open { transform: translateX(0); }
    .admin-sidebar-close { display: inline-flex; }
    .admin-main { margin-left: 0; }
    .admin-menu-toggle { display: inline-flex; }
    .admin-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(2, 6, 23, .6);
        backdrop-filter: blur(2px);
        opacity: 0;
        pointer-events: none;
        transition: opacity .2s ease;
        z-index: 45;
    }
    .admin-backdrop.is-open { opacity: 1; pointer-events: auto; }
    .admin-form-side { grid-template-columns: minmax(0, 1fr); }
    .enquiry-card { padding: 17px; }
    .enquiry-foot form:last-child { margin-left: 0; }
}

@media (max-width: 640px) {
    body.admin-body { font-size: 14px; }
    .admin-topbar { padding: 12px 16px; gap: 12px; }
    .admin-content { padding: 16px 16px 40px; gap: 16px; }
    .admin-heading h1 { font-size: 18px; }
    .admin-top-actions .btn span { display: none; }
    .admin-top-actions .btn { padding: 9px 11px; }
    .admin-stats { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .admin-quick { grid-template-columns: minmax(0, 1fr); }
    .admin-card { padding: 17px; border-radius: 15px; }
    .admin-table-wrap { margin: 0 -17px -17px; }
    .admin-field-row { grid-template-columns: minmax(0, 1fr); }
    .admin-filters { width: 100%; }
    .admin-search { flex: 1 1 100%; min-width: 0; }
    .admin-filters select { flex: 1; }
    .admin-search--inline { margin-left: 0; width: 100%; }
    .admin-tabs { gap: 5px; }
    .admin-tabs > a { padding: 7px 11px; font-size: 12px; }
    .admin-form-actions { flex-direction: column-reverse; align-items: stretch; }
    .admin-form-actions .btn { width: 100%; }
    .admin-hint-inline { justify-content: center; }
    .auth-wrap { max-width: 100%; }
    .auth-card { border-radius: 20px; }
    .auth-form-side { padding: 28px 22px; }
    .enquiry-head { flex-wrap: wrap; }
    .enquiry-head .admin-tag { order: 3; }
    .admin-media { flex-direction: column; align-items: stretch; }
    .admin-media-preview { align-self: flex-start; }
}
