* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background: #0a0c10;
    color: #c8d6e5;
    font: 14px/1.6 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    letter-spacing: 0.3px;
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: #11151c;
}
::-webkit-scrollbar-thumb {
    background: #2a3a4e;
    border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3f526a;
}

/* ── LAYOUT ── */
.shell,
.adminlayout {
    min-height: 100vh;
    display: flex;
}

/* ── SIDEBAR ── */
.sidebar,
.admin-sidebar {
    width: 250px;
    background: #0b0e14;
    border-right: 1px solid #1a2330;
    padding: 24px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(2px);
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.5);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin: 0 6px 32px 6px;
    padding-bottom: 18px;
    border-bottom: 1px solid #19222e;
}

.brandmark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #7c5cff, #4a8cff);
    font-weight: 900;
    font-size: 18px;
    color: #0b0e14;
    box-shadow: 0 0 20px rgba(124, 92, 255, 0.25);
    transition: 0.3s;
}

.brand b {
    display: block;
    font-size: 17px;
    font-weight: 700;
    color: #e8edf5;
    letter-spacing: -0.3px;
}

.brand small {
    display: block;
    color: #5c6f84;
    font-size: 10px;
    letter-spacing: 0.15em;
    margin-top: 2px;
    text-transform: uppercase;
}

/* ── NAVIGATION ── */
nav {
    display: grid;
    gap: 4px;
    flex: 1;
}

nav a,
.tree-nav a {
    color: #7c8ba0;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.2s ease;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

nav a i,
.tree-nav a i {
    width: 24px;
    text-align: center;
    font-style: normal;
    font-size: 15px;
    opacity: 0.7;
}

nav a:hover {
    background: #141b26;
    color: #e2e9f2;
    transform: translateX(3px);
}

nav a.active {
    background: linear-gradient(135deg, #1a1f2e, #131a24);
    color: #c8d6e5;
    border-left: 3px solid #7c5cff;
    box-shadow: inset 0 0 30px rgba(124, 92, 255, 0.05);
}

nav a.active i {
    opacity: 1;
    color: #a895ff;
}

nav .adminlink {
    color: #a895ff;
    border: 1px solid #2a2a4a;
    margin-top: 8px;
    background: rgba(124, 92, 255, 0.04);
}

nav .logout {
    color: #ff6b7f;
    margin-top: auto;
    border-top: 1px solid #1a2330;
    padding-top: 14px;
}

/* ── MAIN ── */
.main,
.admin-main {
    flex: 1;
    padding: 32px 36px;
    max-width: 1500px;
    margin: auto;
    width: 100%;
    background: radial-gradient(ellipse at 10% 20%, rgba(124, 92, 255, 0.03), transparent 50%);
}

/* ── TOP BAR ── */
.topbar,
.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    padding-bottom: 14px;
    border-bottom: 1px solid #171f2a;
}

.topbar h1 {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #e8edf5, #a8b9d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.eyebrow {
    font-size: 10px;
    letter-spacing: 0.2em;
    color: #4f637a;
    font-weight: 800;
    text-transform: uppercase;
}

.userchip {
    padding: 8px 16px;
    border: 1px solid #1f2b3a;
    border-radius: 99px;
    color: #b0c4db;
    background: #0d121b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

.userchip:before {
    content: "●";
    color: #58e39b;
    font-size: 10px;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* ── GRID ── */
.grid {
    display: grid;
    gap: 18px;
}

.grid.stats {
    grid-template-columns: repeat(4, 1fr);
}
.grid.two {
    grid-template-columns: repeat(2, 1fr);
}

/* ── CARDS ── */
.statcard,
.card {
    background: #0d121c;
    border: 1px solid #1a2330;
    border-radius: 14px;
    padding: 22px 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.02);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.statcard:hover,
.card:hover {
    border-color: #2a3a50;
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.statcard:after {
    content: "";
    position: absolute;
    top: -50%;
    right: -30%;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0.04;
    filter: blur(20px);
}

.statcard span {
    color: #5c6f84;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.statcard strong {
    display: block;
    font-size: 30px;
    font-weight: 700;
    margin: 8px 0 4px;
    letter-spacing: -0.5px;
}

.statcard small,
.muted {
    color: #4f637a;
    font-size: 12px;
}

/* ── STAT COLORS ── */
.statcard.blue {
    color: #6da5ff;
}
.statcard.violet {
    color: #a895ff;
}
.statcard.green {
    color: #58e39b;
}
.statcard.amber {
    color: #ffd06b;
}
.statcard.cyan {
    color: #5dd5ff;
}
.statcard.red {
    color: #ff6b7f;
}
.statcard.orange {
    color: #ff9f5c;
}
.statcard.pink {
    color: #e68aff;
}

/* ── HERO ── */
.hero,
.admin-hero {
    margin-top: 8px;
    padding: 28px 32px;
    border-radius: 16px;
    background: radial-gradient(circle at 80% 10%, #1a1640 0%, transparent 45%),
        radial-gradient(circle at 20% 90%, #0d1a2a 0%, transparent 40%),
        #0d121c;
    border: 1px solid #1a2330;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 200px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.3);
}

.hero h2 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 6px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, #e8edf5, #90a5c0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    color: #6d829b;
    max-width: 600px;
}

.heroorb {
    width: 120px;
    height: 120px;
    border-radius: 30px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #7c5cff, #4a8cff);
    font-size: 20px;
    font-weight: 900;
    color: #0b0e14;
    transform: rotate(6deg);
    box-shadow: 0 0 60px rgba(124, 92, 255, 0.2);
}

/* ── BUTTONS ── */
.button,
button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 10px 18px;
    background: linear-gradient(145deg, #7c5cff, #5a4adf);
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 20px rgba(124, 92, 255, 0.2);
}

.button:hover,
button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(124, 92, 255, 0.3);
}

.button:active,
button:active {
    transform: translateY(0);
}

.button.small {
    padding: 6px 12px;
    font-size: 11px;
}

.button.ghost {
    background: #141c28;
    border: 1px solid #273447;
    box-shadow: none;
}

.button.ghost:hover {
    background: #1c2635;
    border-color: #3a4d66;
}

.dangerbtn {
    background: #2a151e;
    color: #ff6b7f;
    border: 1px solid #3a1a26;
    padding: 6px 12px;
    font-size: 12px;
}

.dangerbtn:hover {
    background: #3a1a26;
    border-color: #5a2a3a;
}

/* ── FORMS ── */
label {
    display: grid;
    gap: 6px;
    color: #8ca0b8;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 14px;
}

input,
select,
textarea {
    width: 100%;
    background: #080c14;
    border: 1px solid #1a2330;
    border-radius: 10px;
    color: #c8d6e5;
    padding: 10px 14px;
    outline: none;
    font-size: 13px;
    transition: all 0.2s ease;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #7c5cff;
    box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.08);
}

input::placeholder {
    color: #3a4a5e;
}

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

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

.formgrid .full {
    grid-column: 1 / -1;
}

/* ── TABLE ── */
.tablewrap {
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #1a2330;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 760px;
    background: #0d121c;
}

th,
td {
    text-align: left;
    padding: 14px 16px;
    border-bottom: 1px solid #151e2a;
    vertical-align: middle;
    font-size: 13px;
}

th {
    color: #4f637a;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
    background: #090d14;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.01);
}

/* ── BADGES ── */
.badge {
    padding: 4px 10px;
    border-radius: 99px;
    background: #0f1e1a;
    color: #58e39b;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #1a2a24;
}

.badge.red {
    background: #1e0f14;
    color: #ff6b7f;
    border-color: #2a1a1e;
}

.badge.used {
    background: #18142a;
    color: #a895ff;
    border-color: #2a204a;
}

.status {
    display: inline-flex;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    background: #0f1e1a;
    color: #58e39b;
    border: 1px solid #1a2a24;
}

.status.suspended,
.status.expired {
    background: #1e1a0f;
    color: #ffd06b;
    border-color: #2a241a;
}

.status.banned {
    background: #1e0f14;
    color: #ff6b7f;
    border-color: #2a1a1e;
}

/* ── MISC ── */
code {
    display: inline-block;
    padding: 4px 10px;
    background: #080c14;
    border: 1px solid #1a2330;
    border-radius: 6px;
    color: #8db5ff;
    font-size: 12px;
    cursor: pointer;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
}

code:hover {
    border-color: #2a3a50;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-weight: 500;
}

.alert.success {
    background: #0a1a14;
    color: #58e39b;
    border-color: #1a2a24;
}

.alert.danger {
    background: #1a0a0e;
    color: #ff6b7f;
    border-color: #2a1a1e;
}

.alert.warning {
    background: #1a140a;
    color: #ffd06b;
    border-color: #2a241a;
}

/* ── AUTH ── */
.authwrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    background: radial-gradient(circle at 50% 0%, #1a1640 0%, transparent 50%),
        radial-gradient(circle at 80% 100%, #0d1a2a 0%, transparent 40%),
        #0a0c10;
}

.authcard {
    width: min(420px, 100%);
    background: #0d121c;
    border: 1px solid #1a2330;
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.authcard h2 {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 6px;
    background: linear-gradient(135deg, #e8edf5, #a8b9d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.authcard form {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.authcard button {
    margin-top: 8px;
    width: 100%;
}

.authcard p {
    text-align: center;
    color: #5c6f84;
    font-size: 13px;
}

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .grid.stats {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 900px) {
    .sidebar,
    .admin-sidebar {
        width: 72px;
        padding: 16px 8px;
    }
    .brand b,
    .brand small,
    .tree-title,
    nav a span,
    .tree-footer a {
        display: none;
    }
    .brand {
        justify-content: center;
        margin: 0 0 20px;
        border-bottom: 0;
    }
    nav a {
        justify-content: center;
        padding: 12px;
        font-size: 0;
    }
    nav a i {
        font-size: 18px;
        width: auto;
    }
    nav a:before {
        display: none;
    }
    .tree-nav a:before,
    .tree-nav:before {
        display: none;
    }
    .main,
    .admin-main {
        padding: 20px 16px;
    }
    .top-actions .muted {
        display: none;
    }
    .grid.stats,
    .grid.two {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 620px) {
    .grid.stats,
    .grid.two,
    .formgrid,
    .quickgrid {
        grid-template-columns: 1fr !important;
    }
    .hero {
        flex-direction: column;
        align-items: flex-start;
        min-height: auto;
        padding: 20px;
    }
    .heroorb {
        display: none;
    }
    .topbar h1 {
        font-size: 22px;
    }
    .main,
    .admin-main {
        padding: 14px;
    }
    .filterbar {
        flex-direction: column;
    }
    .filterbar .search {
        width: 100%;
    }
    .filterbar .search input {
        max-width: 100%;
    }
    .tablewrap {
        margin: 0 -8px;
    }
}

/* ── EXTRA HACKER TOUCHES ── */
.glow-text {
    text-shadow: 0 0 30px rgba(124, 92, 255, 0.15);
}

.scanline {
    position: relative;
    overflow: hidden;
}

.scanline:before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(124, 92, 255, 0.05), transparent);
    animation: scan 8s linear infinite;
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(1000%);
    }
}

/* ── TERMINAL STYLE CODE BLOCKS ── */
.terminal {
    background: #06090f;
    border: 1px solid #1a2330;
    border-radius: 10px;
    padding: 16px 18px;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: #8db5ff;
    overflow-x: auto;
    position: relative;
}

.terminal:before {
    content: "$> ";
    color: #58e39b;
}

/* ── CONSOLE LOG STYLING ── */
.log-entry {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px solid #11151c;
    font-size: 12px;
    font-family: 'JetBrains Mono', monospace;
}

.log-entry .time {
    color: #4f637a;
    min-width: 80px;
}

.log-entry .level {
    min-width: 60px;
    font-weight: 700;
}

.log-entry .level.info {
    color: #6da5ff;
}
.log-entry .level.warn {
    color: #ffd06b;
}
.log-entry .level.error {
    color: #ff6b7f;
}
.log-entry .level.success {
    color: #58e39b;
}

/* ── GLITCH EFFECT (subtle) ── */
.glitch-text {
    position: relative;
}

.glitch-text:before,
.glitch-text:after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0.3;
    pointer-events: none;
}

.glitch-text:before {
    color: #ff6b7f;
    transform: translate(-1px, -1px);
    animation: glitch-1 3s infinite;
}

.glitch-text:after {
    color: #6da5ff;
    transform: translate(1px, 1px);
    animation: glitch-2 3s infinite;
}

@keyframes glitch-1 {
    0%,
    100% {
        transform: translate(0);
    }
    20% {
        transform: translate(-2px, 1px);
    }
    40% {
        transform: translate(2px, -1px);
    }
    60% {
        transform: translate(-1px, 2px);
    }
    80% {
        transform: translate(1px, -2px);
    }
}

@keyframes glitch-2 {
    0%,
    100% {
        transform: translate(0);
    }
    20% {
        transform: translate(2px, -1px);
    }
    40% {
        transform: translate(-2px, 1px);
    }
    60% {
        transform: translate(1px, -2px);
    }
    80% {
        transform: translate(-1px, 2px);
    }
}

/* ── CROSS-BROWSER / ADMIN UNIFICATION ── */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select, textarea { -webkit-appearance: none; appearance: none; }
button { touch-action: manipulation; }
a, button { -webkit-tap-highlight-color: transparent; }
.adminbody { min-height: 100vh; background: #0a0c10; }
.adminlayout { min-height: 100vh; width: 100%; }
.admin-sidebar { flex: 0 0 250px; }
.admin-main { min-width: 0; }
.top-actions { display:flex; align-items:center; gap:10px; }
.live-dot { width:8px; height:8px; border-radius:50%; background:#58e39b; box-shadow:0 0 12px rgba(88,227,155,.55); }
.tree-title { color:#4f637a; font-size:10px; font-weight:800; letter-spacing:.18em; margin:0 8px 10px; }
.tree-nav { position:relative; display:grid; gap:4px; }
.tree-nav:before { content:""; position:absolute; left:20px; top:7px; bottom:7px; width:1px; background:#182230; pointer-events:none; }
.tree-nav a { position:relative; z-index:1; }
.tree-nav a:before { content:""; width:12px; height:1px; background:#263548; position:absolute; left:20px; }
.tree-nav a i { z-index:2; background:#0b0e14; border-radius:8px; }
.tree-footer { display:grid; gap:4px; padding-top:12px; border-top:1px solid #1a2330; }
.tree-footer a { color:#7c8ba0; text-decoration:none; padding:10px 14px; border-radius:8px; }
.tree-footer a:hover { background:#141b26; color:#e2e9f2; }
.admin-hero { display:flex; justify-content:space-between; gap:24px; align-items:center; padding:26px; margin-bottom:18px; border:1px solid #1a2330; border-radius:14px; background:radial-gradient(circle at 80% 20%,rgba(124,92,255,.15),transparent 42%),#0d121c; box-shadow:0 8px 32px rgba(0,0,0,.35); }
.admin-hero h2 { margin:4px 0 6px; font-size:28px; }
.admin-hero p { color:#7c8ba0; max-width:720px; }
.hero-actions { display:flex; gap:8px; flex-wrap:wrap; }
.admin-columns { align-items:start; }
.quickgrid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.quick { display:flex; gap:12px; align-items:center; padding:14px; border:1px solid #1a2330; border-radius:12px; color:#c8d6e5; text-decoration:none; background:#0b1018; }
.quick:hover { border-color:#34465d; background:#101722; transform:translateY(-1px); }
.quick b { width:34px; height:34px; display:grid; place-items:center; border-radius:9px; background:#151d2a; }
.quick span { display:grid; gap:2px; font-weight:700; }
.quick small { color:#61748a; font-weight:400; }
.filterbar { display:flex; justify-content:space-between; gap:10px; align-items:center; margin-bottom:14px; }
.filterbar .search { flex:1; max-width:620px; }
.filterbar .search input { min-width:0; }
.stat-inline { display:grid; text-align:right; }
.stat-inline b { font-size:22px; }
.stat-inline small { color:#61748a; }
.listrow { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:11px 0; border-bottom:1px solid #151e2a; }
.listrow:last-child { border-bottom:0; }
.listrow small { display:block; color:#61748a; margin-top:2px; }
.notice { padding:12px 14px; border:1px solid #29364a; border-radius:10px; background:#0b111a; color:#9fb1c8; }
.endpoint { display:flex; justify-content:space-between; align-items:center; gap:10px; padding:11px 0; border-bottom:1px solid #151e2a; }
.endpoint span { color:#61748a; font-size:10px; font-weight:800; letter-spacing:.12em; }
.healthrow { display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px solid #151e2a; }
.healthok { color:#58e39b; }
.turnstile-center { display:flex; justify-content:center; align-items:center; min-height:68px; margin:16px 0; }
.verified-banner { margin:10px 0 12px; padding:9px 12px; border:1px solid #1b3a2c; border-radius:10px; background:#0d1d16; color:#71e6a8; font-size:12px; text-align:center; }
.gate-form { margin-top:10px; }
@media (max-width: 900px) {
    .admin-sidebar { flex-basis:72px; }
    .admin-hero { align-items:flex-start; flex-direction:column; }
}
@media (max-width: 620px) {
    .admin-hero { padding:20px; }
    .quickgrid { grid-template-columns:1fr; }
    .filterbar .search { max-width:none; }
    .endpoint { align-items:flex-start; flex-direction:column; }
}

/* ─────────────────────────────────────────────────────────────
   MarkPiw UI polish v3.1
   Responsive, cleaner spacing, accessible controls and mobile fixes.
   ───────────────────────────────────────────────────────────── */
:root{
  --bg:#070a0f;
  --panel:#0d121a;
  --panel-2:#101722;
  --line:#1d2836;
  --line-soft:#17212d;
  --text:#edf3fb;
  --muted:#8090a5;
  --accent:#8b6cff;
  --accent-2:#5c8dff;
  --success:#48d597;
  --danger:#ff667d;
  --shadow:0 18px 55px rgba(0,0,0,.35);
}
html{scroll-behavior:smooth}
body{
  background:
    radial-gradient(900px 500px at 80% -10%,rgba(139,108,255,.10),transparent 60%),
    radial-gradient(700px 450px at 0% 20%,rgba(92,141,255,.07),transparent 60%),
    var(--bg);
  color:var(--text);
}
button,.button,input,select,textarea{font:inherit}
button,.button{cursor:pointer}
button:focus-visible,.button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{
  outline:2px solid rgba(139,108,255,.75);
  outline-offset:2px;
}
.card,.statcard{
  border-color:var(--line);
  box-shadow:var(--shadow);
}
.card:hover,.statcard:hover{border-color:#2b3a4e}
.formgrid{align-items:start}
.formgrid label{min-width:0}
input,select,textarea{
  width:100%;
  min-height:44px;
  margin-top:7px;
  padding:11px 13px;
  color:var(--text);
  background:#090e15;
  border:1px solid #243143;
  border-radius:10px;
  transition:border-color .18s,box-shadow .18s,background .18s;
}
textarea{min-height:110px;resize:vertical}
input:hover,select:hover,textarea:hover{border-color:#33455c}
input:focus,select:focus,textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(139,108,255,.10);
  background:#0b111a;
}
label{color:#aab9cc;font-weight:600;font-size:12px}
.fieldhint{display:block;margin-top:7px;color:#68798e;font-size:11px;font-weight:400;line-height:1.5}
.fieldhint code{color:#b9aaff}
button,.button{
  min-height:42px;
  border:0;
  border-radius:10px;
  padding:10px 16px;
  color:#fff;
  background:linear-gradient(135deg,var(--accent),var(--accent-2));
  box-shadow:0 8px 24px rgba(92,81,190,.22);
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  transition:transform .16s,filter .16s,box-shadow .16s;
}
button:hover,.button:hover{transform:translateY(-1px);filter:brightness(1.07)}
button.ghost,.button.ghost,.ghost{
  background:#111925;
  border:1px solid #263447;
  box-shadow:none;
  color:#b8c6d8;
}
button.dangerbtn,.dangerbtn{
  background:rgba(255,102,125,.09);
  color:#ff8295;
  border:1px solid rgba(255,102,125,.22);
  box-shadow:none;
}
.tablewrap{overflow:auto;border:1px solid var(--line);border-radius:12px}
table{width:100%;border-collapse:separate;border-spacing:0;min-width:720px}
th{
  position:sticky;top:0;z-index:1;
  background:#0c121b;
  color:#718299;
  font-size:10px;
  text-transform:uppercase;
  letter-spacing:.12em;
}
th,td{padding:13px 14px;border-bottom:1px solid var(--line-soft);text-align:left}
tbody tr:last-child td{border-bottom:0}
tbody tr:hover td{background:rgba(139,108,255,.035)}
code{
  color:#d5cbff;
  background:#0a1018;
  border:1px solid #202d3d;
  border-radius:7px;
  padding:4px 7px;
  font-family:ui-monospace,SFMono-Regular,Consolas,monospace;
  font-size:12px;
}
.actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.actions form{margin:0}
.alert{
  border-radius:11px;
  padding:12px 14px;
  margin-bottom:18px;
  border:1px solid var(--line);
  background:#101721;
}
.alert.success{border-color:rgba(72,213,151,.25);color:#8aefc0}
.alert.danger{border-color:rgba(255,102,125,.25);color:#ff9aaa}
.sectionhead{gap:18px}
.admin-hero{
  border:1px solid var(--line);
  background:linear-gradient(135deg,rgba(139,108,255,.10),rgba(13,18,26,.9));
  border-radius:18px;
  padding:26px;
  margin-bottom:20px;
  box-shadow:var(--shadow);
}
.quickgrid{gap:12px}
.quick{
  border:1px solid var(--line);
  background:rgba(13,18,26,.85);
  border-radius:13px;
  padding:16px;
  text-decoration:none;
  transition:.18s;
}
.quick:hover{transform:translateY(-2px);border-color:#34465d;background:#111925}
.sidebar{border-color:var(--line)}
.topbar,.admin-topbar{border-color:var(--line)}
@media (max-width:1100px){
  .grid.stats,.admin-stats{grid-template-columns:repeat(2,1fr)!important}
  .grid.two,.admin-columns{grid-template-columns:1fr!important}
  .main,.admin-main{padding:24px}
}
@media (max-width:760px){
  .adminlayout{display:block!important}
  .sidebar,.admin-sidebar{
    position:relative!important;
    width:100%!important;
    min-height:auto!important;
    height:auto!important;
    padding:14px!important;
  }
  .brand{margin-bottom:12px}
  nav,.tree-nav{display:flex!important;flex-wrap:wrap;gap:6px}
  nav a,.tree-nav a{flex:1 1 130px}
  .main,.admin-main{padding:18px 14px!important}
  .topbar,.admin-topbar{align-items:flex-start;gap:12px;flex-wrap:wrap}
  .topbar h1{font-size:22px}
  .grid.stats,.admin-stats{grid-template-columns:1fr!important}
  .formgrid{grid-template-columns:1fr!important}
  .formgrid .full{grid-column:auto!important}
  .hero-actions{width:100%}
  .hero-actions .button{width:100%}
  .actions{align-items:stretch}
}
@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}
