/* ==========================================================================
   Hermes Control Center — 2027 Youthful, Fresh, Clean Visual System
   ========================================================================== */
:root {
    --bg: #07090e;
    --bg-soft: #0b0e17;
    --surface: #0f1422;
    --surface-2: #151b2d;
    --surface-3: #1c243c;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --border-glow: rgba(0, 245, 155, 0.35);
    --text: #f8fafc;
    --muted: #94a3b8;
    --muted-2: #64748b;
    --primary: #00f59b;
    --primary-glow: rgba(0, 245, 155, 0.28);
    --primary-deep: #059669;
    --cyan: #00e5ff;
    --cyan-glow: rgba(0, 229, 255, 0.24);
    --violet: #8b5cf6;
    --pink: #ff3b7a;
    --success: #00f59b;
    --warning: #f59e0b;
    --danger: #ff4757;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-pill: 9999px;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 35px rgba(0, 245, 155, 0.22);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --display: "Space Grotesk", "Inter", sans-serif;
    --mono: "JetBrains Mono", Consolas, monospace;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(1100px 600px at 8% -6%, rgba(0, 245, 155, 0.12), transparent 55%),
        radial-gradient(900px 550px at 94% 2%, rgba(0, 229, 255, 0.10), transparent 52%),
        radial-gradient(800px 500px at 50% 100%, rgba(139, 92, 246, 0.06), transparent 60%),
        var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(circle at 50% 10%, #000 0%, transparent 80%);
    z-index: 0;
}

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

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

button {
    cursor: pointer;
    background: none;
    border: none;
}

img {
    max-width: 100%;
    display: block;
}

svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.svg-sprite {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

.hidden {
    display: none !important;
}

.mono {
    font-family: var(--mono);
}

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

::selection {
    background: rgba(56, 189, 248, 0.28);
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.18);
    border-radius: 99px;
    border: 2px solid var(--bg);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.3);
}

/* ==========================================================================
   Shell
   ========================================================================== */
.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 252px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 24px 18px;
    background: linear-gradient(180deg, rgba(11, 16, 25, 0.96), rgba(6, 9, 14, 0.98));
    border-right: 1px solid var(--border);
    backdrop-filter: blur(18px);
    z-index: 40;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 6px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(135deg, #00f59b 0%, #00e5ff 50%, #8b5cf6 100%);
    box-shadow: 0 8px 26px rgba(0, 245, 155, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    font-family: var(--display);
    font-size: 19px;
    font-weight: 800;
    color: #03140a;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-text strong {
    font-family: var(--display);
    font-size: 17px;
    letter-spacing: -0.02em;
}

.brand-text span {
    color: var(--muted-2);
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    margin-top: 3px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background 0.18s, color 0.18s, border-color 0.18s;
}

.nav-item svg {
    width: 17px;
    height: 17px;
    opacity: 0.85;
}

.nav-item:hover {
    background: rgba(148, 163, 184, 0.06);
    color: var(--text);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 245, 155, 0.16), rgba(0, 245, 155, 0.02));
    border-color: rgba(0, 245, 155, 0.32);
    color: #ffffff;
}

.nav-item.active svg {
    color: var(--primary);
    opacity: 1;
}

.nav-count {
    margin-left: auto;
    font-style: normal;
    font-size: 10px;
    color: var(--muted-2);
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 1px 7px;
}

.nav-dot {
    margin-left: auto;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.5);
    animation: pulse 1.6s infinite;
}

.sidebar-foot {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.server-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.03);
}

.server-card div {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.server-card strong {
    font-size: 11.5px;
    font-weight: 600;
}

.server-card span:not(.pulse-dot) {
    font-size: 10.5px;
    color: var(--muted-2);
    font-family: var(--mono);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    animation: pulse 1.8s infinite;
    flex: 0 0 8px;
}

.vault-mini {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(148, 163, 184, 0.025);
}

.vault-mini-title {
    display: block;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--muted-2);
    margin-bottom: 8px;
}

.vault-mini-row {
    display: flex;
    justify-content: space-between;
    font-size: 11.5px;
    color: var(--muted);
    padding: 2px 0;
}

.vault-mini-row b {
    color: var(--text);
    font-family: var(--mono);
    font-weight: 500;
}

.main {
    margin-left: 252px;
    min-height: 100vh;
    padding: 26px 32px 96px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 26px;
}

.page-heading h1 {
    font-family: var(--display);
    font-size: 1.75rem;
    letter-spacing: -0.035em;
    line-height: 1.15;
}

.page-heading p {
    color: var(--muted);
    font-size: 12.5px;
    margin-top: 5px;
}

.topbar-actions {
    display: flex;
    gap: 9px;
    flex: 0 0 auto;
}

.mobile-menu {
    display: none !important;
}

.content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: fadeUp 0.28s ease both;
}

/* ==========================================================================
   Buttons / badges / forms
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 15px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 600;
    border: 1px solid transparent;
    white-space: nowrap;
    transition: transform 0.16s, background 0.16s, border-color 0.16s, box-shadow 0.16s, opacity 0.16s;
}

.btn svg {
    width: 15px;
    height: 15px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.45;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, #00f59b, #00e5ff);
    color: #03140a;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(0, 245, 155, 0.32);
}

.btn-primary:hover {
    box-shadow: 0 9px 32px rgba(0, 245, 155, 0.48);
}

.btn-cloudflare {
    background: linear-gradient(135deg, #f38020, #faad3f);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(243, 128, 32, 0.28);
}

.btn-cloudflare:hover {
    box-shadow: 0 9px 28px rgba(243, 128, 32, 0.42);
}

.btn-cyan {
    background: linear-gradient(135deg, #00e5ff, #8b5cf6);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 6px 20px rgba(0, 229, 255, 0.25);
}

.btn-cyan:hover {
    box-shadow: 0 9px 28px rgba(0, 229, 255, 0.4);
}

.btn-ghost {
    background: rgba(148, 163, 184, 0.06);
    border-color: var(--border);
    color: #cbd5e1;
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.11);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.25);
    color: #fca5a5;
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.17);
}

.btn-sm {
    padding: 6px 10px;
    font-size: 11.5px;
    border-radius: 8px;
}

.btn-sm svg {
    width: 13px;
    height: 13px;
}

.icon-btn {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 8px;
    border: 1px solid transparent;
    color: var(--muted);
    transition: background 0.16s, color 0.16s, border-color 0.16s;
}

.icon-btn:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--border);
    color: var(--text);
}

.icon-btn.danger:hover {
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
    border-color: rgba(248, 113, 113, 0.2);
}

.icon-btn svg {
    width: 15px;
    height: 15px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    white-space: nowrap;
}

.badge svg {
    width: 11px;
    height: 11px;
}

.badge-neutral {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--border);
    color: #cbd5e1;
}

.badge-info {
    background: rgba(56, 189, 248, 0.1);
    border-color: rgba(56, 189, 248, 0.22);
    color: #7dd3fc;
}

.badge-success {
    background: rgba(52, 211, 153, 0.1);
    border-color: rgba(52, 211, 153, 0.22);
    color: #6ee7b7;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.22);
    color: #fcd34d;
}

.badge-danger {
    background: rgba(248, 113, 113, 0.1);
    border-color: rgba(248, 113, 113, 0.22);
    color: #fca5a5;
}

.badge-violet {
    background: rgba(129, 140, 248, 0.1);
    border-color: rgba(129, 140, 248, 0.22);
    color: #a5b4fc;
}

.input,
.select,
.textarea {
    width: 100%;
    background: rgba(6, 10, 16, 0.65);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 10px 12px;
    color: var(--text);
    font-size: 12.5px;
    outline: none;
    transition: border-color 0.16s, box-shadow 0.16s;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.textarea {
    min-height: 110px;
    resize: vertical;
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1.6;
}

.select {
    appearance: none;
    padding-right: 30px;
    background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
    background-position: calc(100% - 15px) 50%, calc(100% - 10px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field label {
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.03em;
}

.field-hint {
    font-size: 10.5px;
    color: var(--muted-2);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

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

.form-error {
    display: none;
    padding: 10px 12px;
    border-radius: 9px;
    background: rgba(248, 113, 113, 0.1);
    border: 1px solid rgba(248, 113, 113, 0.25);
    color: #fca5a5;
    font-size: 11.5px;
}

.form-error.show {
    display: block;
}

.check-row {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(148, 163, 184, 0.03);
    cursor: pointer;
}

.check-row input {
    accent-color: var(--primary);
    margin-top: 2px;
}

.check-row span {
    font-size: 12px;
    color: #cbd5e1;
}

.check-row small {
    display: block;
    color: var(--muted-2);
    font-size: 10.5px;
    margin-top: 2px;
}

/* ==========================================================================
   Panels / stats / hero
   ========================================================================== */
.panel {
    background: linear-gradient(180deg, rgba(17, 25, 39, 0.9), rgba(10, 15, 24, 0.94));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--border);
}

.panel-head h3 {
    font-family: var(--display);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.panel-head a,
.panel-link {
    color: var(--primary);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.panel-head a:hover {
    text-decoration: underline;
}

.panel-body {
    padding: 20px;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 18px;
    align-items: start;
}

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

.hero-panel {
    position: relative;
    display: grid;
    grid-template-columns: 1.45fr 0.55fr;
    gap: 26px;
    align-items: center;
    min-height: 238px;
    padding: 32px 34px;
    border-radius: 22px;
    border: 1px solid rgba(56, 189, 248, 0.18);
    background:
        radial-gradient(520px 260px at 82% 20%, rgba(56, 189, 248, 0.18), transparent 65%),
        radial-gradient(420px 240px at 10% 100%, rgba(129, 140, 248, 0.14), transparent 70%),
        linear-gradient(135deg, rgba(17, 25, 39, 0.97), rgba(8, 12, 20, 0.98));
    overflow: hidden;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(148, 163, 184, 0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(148, 163, 184, 0.05) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: radial-gradient(circle at 75% 30%, #000, transparent 72%);
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #7dd3fc;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow svg {
    width: 13px;
    height: 13px;
}

.hero-copy h2 {
    font-family: var(--display);
    font-size: clamp(1.55rem, 2.4vw, 2.3rem);
    line-height: 1.1;
    letter-spacing: -0.045em;
    margin: 12px 0 10px;
    max-width: 620px;
}

.hero-copy h2 em {
    font-style: normal;
    background: linear-gradient(90deg, #7dd3fc, #a5b4fc);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-copy p {
    color: var(--muted);
    font-size: 12.5px;
    max-width: 540px;
    line-height: 1.65;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 20px;
}

.hero-orbit {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    min-height: 180px;
}

.orbit-ring {
    position: absolute;
    border: 1px solid rgba(56, 189, 248, 0.16);
    border-radius: 50%;
}

.orbit-ring.r1 {
    width: 150px;
    height: 150px;
    animation: spin 22s linear infinite;
}

.orbit-ring.r2 {
    width: 210px;
    height: 210px;
    border-style: dashed;
    border-color: rgba(129, 140, 248, 0.14);
    animation: spin 34s linear infinite reverse;
}

.orbit-core {
    width: 94px;
    height: 94px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 35% 30%, rgba(56, 189, 248, 0.35), rgba(9, 14, 23, 0.95) 70%);
    border: 1px solid rgba(56, 189, 248, 0.3);
    box-shadow: 0 0 60px rgba(56, 189, 248, 0.2), inset 0 0 30px rgba(56, 189, 248, 0.12);
}

.orbit-core svg {
    width: 32px;
    height: 32px;
    color: #7dd3fc;
}

.orbit-label {
    position: absolute;
    font-size: 9px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted-2);
}

.orbit-label.top {
    top: 4px;
}

.orbit-label.bottom {
    bottom: 4px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.stat-card {
    padding: 15px 16px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: linear-gradient(160deg, rgba(17, 25, 39, 0.9), rgba(9, 14, 22, 0.92));
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: border-color 0.18s, transform 0.18s;
}

.stat-card:hover {
    border-color: rgba(56, 189, 248, 0.24);
    transform: translateY(-2px);
}

.stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(56, 189, 248, 0.08);
    color: #7dd3fc;
}

.stat-icon svg {
    width: 15px;
    height: 15px;
}

.stat-card:nth-child(2) .stat-icon {
    background: rgba(129, 140, 248, 0.09);
    color: #a5b4fc;
}

.stat-card:nth-child(3) .stat-icon {
    background: rgba(52, 211, 153, 0.08);
    color: #6ee7b7;
}

.stat-card:nth-child(4) .stat-icon {
    background: rgba(251, 191, 36, 0.08);
    color: #fcd34d;
}

.stat-card:nth-child(5) .stat-icon {
    background: rgba(248, 113, 113, 0.08);
    color: #fca5a5;
}

.stat-card:nth-child(6) .stat-icon {
    background: rgba(148, 163, 184, 0.08);
    color: #cbd5e1;
}

.stat-value {
    font-family: var(--display);
    font-size: 1.45rem;
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1;
}

.stat-label {
    font-size: 10px;
    color: var(--muted-2);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.stat-sub {
    font-size: 10.5px;
    color: var(--muted);
}

.bar-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bar-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bar-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--muted);
}

.bar-meta b {
    color: #cbd5e1;
    font-family: var(--mono);
    font-weight: 500;
}

.bar-track {
    height: 6px;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.09);
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.bar-row:nth-child(2n) .bar-fill {
    background: linear-gradient(90deg, #818cf8, #c084fc);
}

.bar-row:nth-child(3n) .bar-fill {
    background: linear-gradient(90deg, #34d399, #38bdf8);
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 44px 20px;
    text-align: center;
    color: var(--muted);
}

.empty-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid var(--border);
    color: var(--muted-2);
}

.empty-icon svg {
    width: 22px;
    height: 22px;
}

.empty h4 {
    color: #cbd5e1;
    font-size: 13px;
    font-weight: 600;
}

.empty p {
    font-size: 11.5px;
    max-width: 340px;
    line-height: 1.6;
}

.page-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 340px;
    color: var(--muted);
    font-size: 12.5px;
}

.spinner {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid rgba(148, 163, 184, 0.2);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

.skeleton {
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.05), rgba(148, 163, 184, 0.11), rgba(148, 163, 184, 0.05));
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
}

/* ==========================================================================
   Toolbars / tables / pagination
   ========================================================================== */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    padding: 13px 15px;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 9px;
    flex-wrap: wrap;
}

.search-box {
    position: relative;
    min-width: 260px;
    flex: 1 1 260px;
    max-width: 420px;
}

.search-box svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--muted-2);
    pointer-events: none;
}

.search-box .input {
    padding-left: 33px;
    height: 36px;
}

.toolbar-select {
    min-width: 160px;
    height: 36px;
    padding-top: 0;
    padding-bottom: 0;
}

.selection-info {
    font-size: 11px;
    color: var(--muted);
    white-space: nowrap;
}

.table-panel {
    overflow: visible;
}

.table-scroll {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th {
    text-align: left;
    padding: 11px 14px;
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--muted-2);
    font-weight: 700;
    border-bottom: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.025);
    white-space: nowrap;
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.07);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background 0.15s;
}

.data-table tbody tr:hover {
    background: rgba(56, 189, 248, 0.035);
}

.data-table tbody tr.selected {
    background: rgba(56, 189, 248, 0.06);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.checkbox {
    width: 14px;
    height: 14px;
    accent-color: var(--primary);
    cursor: pointer;
}

.lead-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.avatar {
    position: relative;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, #1e293b, #0f172a);
    display: grid;
    place-items: center;
}

.avatar img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    font-family: var(--display);
    font-size: 10px;
    font-weight: 700;
    color: #7dd3fc;
    letter-spacing: 0.02em;
}

.lead-name {
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.25;
}

.lead-handle {
    font-size: 10.5px;
    color: var(--muted-2);
    font-family: var(--mono);
}

.cell-sub {
    font-size: 10.5px;
    color: var(--muted-2);
    margin-top: 2px;
}

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

.table-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 15px;
    border-top: 1px solid var(--border);
    font-size: 11px;
    color: var(--muted-2);
    flex-wrap: wrap;
}

.pager {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pager button {
    min-width: 28px;
    height: 28px;
    padding: 0 8px;
    border-radius: 7px;
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: 11px;
}

.pager button:hover:not(:disabled) {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text);
}

.pager button.active {
    background: rgba(56, 189, 248, 0.13);
    border-color: rgba(56, 189, 248, 0.3);
    color: #7dd3fc;
}

.pager button:disabled {
    opacity: 0.3;
    cursor: default;
}

/* ==========================================================================
   Overview specifics
   ========================================================================== */
.mini-design-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 11px;
    padding: 15px;
}

.mini-design {
    border: 1px solid var(--border);
    border-radius: 11px;
    overflow: hidden;
    background: #070b11;
    transition: border-color 0.18s, transform 0.18s;
}

.mini-design:hover {
    border-color: rgba(56, 189, 248, 0.28);
    transform: translateY(-2px);
}

.mini-frame {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #04060a;
}

.mini-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    border: 0;
    transform: scale(0.5);
    transform-origin: top left;
    pointer-events: none;
}

.mini-info {
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.mini-name {
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-sub {
    font-size: 9.5px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-list {
    display: flex;
    flex-direction: column;
}

.run-list-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 18px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.07);
}

.run-list-item:last-child {
    border-bottom: none;
}

.run-status-icon {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.07);
    color: var(--muted);
}

.run-status-icon.running {
    background: rgba(56, 189, 248, 0.1);
    color: #7dd3fc;
}

.run-status-icon.success {
    background: rgba(52, 211, 153, 0.1);
    color: #6ee7b7;
}

.run-status-icon.failed {
    background: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

.run-status-icon.warning {
    background: rgba(251, 191, 36, 0.1);
    color: #fcd34d;
}

.run-status-icon svg {
    width: 14px;
    height: 14px;
}

.run-list-main {
    flex: 1;
    min-width: 0;
}

.run-list-title {
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
}

.run-list-sub {
    font-size: 10px;
    color: var(--muted-2);
    margin-top: 2px;
}

.progress {
    height: 5px;
    border-radius: 99px;
    background: rgba(148, 163, 184, 0.09);
    overflow: hidden;
}

.progress>span {
    display: block;
    height: 100%;
    border-radius: 99px;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    transition: width 0.4s ease;
}

.progress.success>span {
    background: linear-gradient(90deg, #34d399, #38bdf8);
}

.progress.danger>span {
    background: linear-gradient(90deg, #f87171, #fb923c);
}

.active-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 16px;
    border-radius: 13px;
    border: 1px solid rgba(56, 189, 248, 0.22);
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.09), rgba(129, 140, 248, 0.05));
}

.active-banner .progress {
    flex: 1;
}

.active-banner strong {
    font-size: 11.5px;
}

.active-banner span {
    font-size: 10.5px;
    color: var(--muted);
}

/* ==========================================================================
   Designs
   ========================================================================== */
.design-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 15px;
    padding: 15px;
}

.design-card {
    border: 1px solid var(--border);
    border-radius: 13px;
    overflow: hidden;
    background: linear-gradient(180deg, #0e141f, #090d14);
    transition: border-color 0.18s, transform 0.18s, box-shadow 0.18s;
}

.design-card:hover {
    border-color: rgba(56, 189, 248, 0.28);
    transform: translateY(-2px);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.design-card.selected {
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.design-frame {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #030509;
    border-bottom: 1px solid var(--border);
}

.design-frame iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 200%;
    border: 0;
    transform: scale(0.5);
    transform-origin: top left;
    pointer-events: none;
    background: #000;
}

.design-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(3, 5, 9, 0.1), rgba(3, 5, 9, 0.78));
    opacity: 0;
    transition: opacity 0.18s;
}

.design-card:hover .design-overlay {
    opacity: 1;
}

.design-overlay .btn {
    backdrop-filter: blur(8px);
}

.select-badge {
    position: absolute;
    top: 9px;
    left: 9px;
    z-index: 2;
    width: 22px;
    height: 22px;
    display: grid;
    place-items: center;
    border-radius: 6px;
    background: rgba(6, 10, 16, 0.8);
    border: 1px solid var(--border-strong);
}

.design-info {
    padding: 12px 13px;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.design-title {
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.design-sub {
    font-size: 10px;
    color: var(--muted-2);
    font-family: var(--mono);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.design-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    font-size: 9.5px;
    color: var(--muted-2);
}

.design-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-top: 2px;
}

.design-actions .row-actions {
    justify-content: flex-start;
}

.design-list .data-table td {
    padding-top: 9px;
    padding-bottom: 9px;
}

/* ==========================================================================
   Vault cards (templates / sections)
   ========================================================================== */
.vault-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
    padding: 15px;
}

.vault-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, #0e141f, #090d14);
    transition: border-color 0.18s, transform 0.18s;
    display: flex;
    flex-direction: column;
}

.vault-card:hover {
    border-color: rgba(56, 189, 248, 0.26);
    transform: translateY(-2px);
}

.vault-thumb {
    position: relative;
    aspect-ratio: 16 / 10;
    background: linear-gradient(145deg, #111927, #070b11);
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.vault-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}

.vault-card:hover .vault-thumb img {
    transform: scale(1.035);
}

.vault-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    background: radial-gradient(circle at 30% 25%, rgba(56, 189, 248, 0.12), transparent 60%), linear-gradient(145deg, #0f172a, #070b11);
}

.vault-placeholder span {
    font-family: var(--display);
    font-size: 24px;
    font-weight: 700;
    color: rgba(125, 211, 252, 0.8);
    letter-spacing: -0.04em;
}

.vault-type-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 1;
}

.vault-body {
    padding: 11px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    flex: 1;
}

.vault-title {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 31px;
}

.vault-sub {
    font-size: 10px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tag-row {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 5px;
    background: rgba(148, 163, 184, 0.06);
    border: 1px solid rgba(148, 163, 184, 0.1);
    color: var(--muted);
    white-space: nowrap;
}

.vault-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: auto;
    padding-top: 3px;
}

/* ==========================================================================
   Assets
   ========================================================================== */
.asset-tabs {
    display: flex;
    gap: 7px;
    padding: 13px 15px;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}

.asset-tab {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.03);
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
    transition: all 0.16s;
}

.asset-tab:hover {
    color: var(--text);
    border-color: var(--border-strong);
}

.asset-tab.active {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.3);
    color: #bae6fd;
}

.asset-tab b {
    font-family: var(--mono);
    font-size: 9.5px;
    color: var(--muted-2);
    font-weight: 500;
}

.asset-tab.active b {
    color: #7dd3fc;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(142px, 1fr));
    gap: 11px;
    padding: 15px;
}

.asset-tile {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: #090d14;
    transition: border-color 0.16s, transform 0.16s;
}

.asset-tile:hover {
    border-color: rgba(56, 189, 248, 0.28);
    transform: translateY(-2px);
}

.asset-thumb {
    position: relative;
    aspect-ratio: 1 / 1;
    background: linear-gradient(145deg, #101827, #070b11);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.asset-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-thumb .file-glyph {
    width: 38px;
    height: 38px;
    color: var(--muted-2);
}

.asset-thumb .file-glyph svg {
    width: 100%;
    height: 100%;
}

.asset-hover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: rgba(3, 5, 9, 0.7);
    opacity: 0;
    transition: opacity 0.16s;
}

.asset-tile:hover .asset-hover {
    opacity: 1;
}

.asset-info {
    padding: 7px 8px;
}

.asset-name {
    font-size: 9.5px;
    color: #cbd5e1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.asset-meta {
    font-size: 8.5px;
    color: var(--muted-2);
    margin-top: 1px;
}

.asset-group-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    background: #070b11;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.asset-group-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.asset-group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
    gap: 13px;
    padding: 15px;
}

/* ==========================================================================
   Runs
   ========================================================================== */
.run-grid {
    display: flex;
    flex-direction: column;
    gap: 11px;
    padding: 15px;
}

.run-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 15px;
    background: rgba(148, 163, 184, 0.025);
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.run-card.running {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.035);
}

.run-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.run-id {
    font-family: var(--mono);
    font-size: 11px;
    color: #cbd5e1;
}

.run-date {
    font-size: 10px;
    color: var(--muted-2);
    margin-top: 2px;
}

.run-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 10px;
    color: var(--muted-2);
}

.run-card-meta b {
    color: #cbd5e1;
    font-family: var(--mono);
    font-weight: 500;
}

.run-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.run-card-meta svg {
    width: 12px;
    height: 12px;
}

.run-card-meta .tag {
    display: inline-flex;
    align-items: center;
}

.run-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.log-view {
    margin: 0;
    padding: 15px;
    border-radius: 10px;
    background: #05080d;
    border: 1px solid var(--border);
    color: #cbd5e1;
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.65;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 430px;
    overflow: auto;
}

/* ==========================================================================
   Modal / toast / job dock
   ========================================================================== */
.modal-root {
    position: relative;
    z-index: 100;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 5, 9, 0.76);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 18px 30px;
    overflow-y: auto;
    animation: fadeIn 0.16s ease both;
}

.modal {
    width: 100%;
    max-width: 640px;
    border-radius: 17px;
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, #111927, #0a0f18);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.65);
    animation: modalIn 0.2s ease both;
    overflow: hidden;
}

.modal.modal-lg {
    max-width: 860px;
}

.modal.modal-xl {
    max-width: 1120px;
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
}

.modal-head h3 {
    font-family: var(--display);
    font-size: 15px;
    letter-spacing: -0.02em;
}

.modal-head p {
    font-size: 11px;
    color: var(--muted);
    margin-top: 3px;
}

.modal-body {
    padding: 20px;
    max-height: 68vh;
    overflow-y: auto;
}

.modal.modal-xl .modal-body {
    max-height: 76vh;
}

.modal-foot {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.02);
    flex-wrap: wrap;
}

.modal-foot .left {
    margin-right: auto;
}

.tabs {
    display: flex;
    gap: 5px;
    padding: 4px;
    border-radius: 9px;
    background: rgba(148, 163, 184, 0.05);
    border: 1px solid var(--border);
    width: fit-content;
    margin-bottom: 16px;
}

.tab {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    color: var(--muted);
}

.tab.active {
    background: rgba(56, 189, 248, 0.13);
    color: #bae6fd;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.json-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.json-view {
    margin: 0;
    padding: 14px;
    border-radius: 10px;
    background: #05080d;
    border: 1px solid var(--border);
    color: #cbd5e1;
    font-family: var(--mono);
    font-size: 10.5px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 48vh;
    overflow: auto;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.detail-item {
    padding: 10px 11px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: rgba(148, 163, 184, 0.03);
}

.detail-item span {
    display: block;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted-2);
    margin-bottom: 3px;
}

.detail-item b {
    font-size: 11px;
    color: #e2e8f0;
    font-weight: 600;
    word-break: break-word;
}

.preview-frame {
    width: 100%;
    height: 62vh;
    border: 1px solid var(--border);
    border-radius: 11px;
    background: #000;
    overflow: hidden;
}

.preview-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: #000;
}

.preview-image {
    width: 100%;
    max-height: 62vh;
    object-fit: contain;
    border-radius: 11px;
    border: 1px solid var(--border);
    background: #05080d;
}

.run-lead-list {
    max-height: 310px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(6, 10, 16, 0.45);
}

.run-lead-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.07);
    cursor: pointer;
}

.run-lead-row:last-child {
    border-bottom: none;
}

.run-lead-row:hover {
    background: rgba(56, 189, 248, 0.04);
}

.run-lead-row.selected {
    background: rgba(56, 189, 248, 0.07);
}

.run-lead-row .avatar {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
    border-radius: 8px;
}

.run-lead-main {
    flex: 1;
    min-width: 0;
}

.run-lead-name {
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-lead-sub {
    font-size: 9.5px;
    color: var(--muted-2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-modal-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.run-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 15px;
}

.dropzone {
    border: 1.5px dashed rgba(148, 163, 184, 0.25);
    border-radius: 12px;
    padding: 26px 18px;
    text-align: center;
    color: var(--muted);
    background: rgba(148, 163, 184, 0.025);
    transition: border-color 0.16s, background 0.16s;
    cursor: pointer;
}

.dropzone:hover,
.dropzone.dragover {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.05);
}

.dropzone svg {
    width: 26px;
    height: 26px;
    color: #7dd3fc;
    margin: 0 auto 8px;
}

.dropzone strong {
    display: block;
    font-size: 12px;
    color: #cbd5e1;
}

.dropzone span {
    font-size: 10.5px;
    color: var(--muted-2);
}

.file-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.file-list-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 10.5px;
    color: var(--muted);
}

.file-list-item svg {
    width: 12px;
    height: 12px;
    color: var(--primary);
}

.toast-root {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 200;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    min-width: 260px;
    max-width: 390px;
    padding: 11px 13px;
    border-radius: 10px;
    background: #111927;
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    font-size: 11.5px;
    color: #e2e8f0;
    animation: toastIn 0.24s ease both;
    pointer-events: auto;
}

.toast svg {
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    margin-top: 1px;
}

.toast.success {
    border-color: rgba(52, 211, 153, 0.3);
}

.toast.success svg {
    color: var(--success);
}

.toast.error {
    border-color: rgba(248, 113, 113, 0.32);
}

.toast.error svg {
    color: var(--danger);
}

.toast.info svg {
    color: var(--primary);
}

.job-dock {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 90;
    width: 340px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(56, 189, 248, 0.3);
    background: linear-gradient(160deg, #101a29, #080d15);
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
    animation: dockIn 0.25s ease both;
}

.job-dock-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.job-dock-title {
    font-size: 11.5px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.job-dock-title .run-status-icon {
    margin-right: 2px;
}

.job-dock-title .run-status-icon svg {
    width: 12px;
    height: 12px;
}

.job-dock-sub {
    font-size: 10px;
    color: var(--muted-2);
    margin-top: 2px;
}

.job-dock .progress {
    margin-bottom: 9px;
}

.job-dock-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.job-dock-foot span {
    font-size: 10px;
    color: var(--muted);
}

.mobile-overlay {
    display: none;
}

/* ==========================================================================
   Animations
   ========================================================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.4);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(56, 189, 248, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(56, 189, 248, 0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.985);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes dockIn {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shimmer {
    to {
        background-position: -200% 0;
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1280px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1080px) {
    .sidebar {
        width: 76px;
        padding: 20px 12px;
        align-items: center;
    }

    .brand-text,
    .nav-item span,
    .nav-count,
    .sidebar-foot .vault-mini,
    .server-card div {
        display: none;
    }

    .brand {
        padding: 2px;
    }

    .nav {
        width: 100%;
    }

    .nav-item {
        justify-content: center;
        padding: 12px;
    }

    .nav-item svg {
        width: 19px;
        height: 19px;
    }

    .nav-dot {
        position: absolute;
        margin: 0;
        top: 8px;
        right: 9px;
    }

    .server-card {
        justify-content: center;
        padding: 11px;
    }

    .main {
        margin-left: 76px;
        padding: 24px 24px 90px;
    }

    .hero-panel {
        grid-template-columns: 1fr;
    }

    .hero-orbit {
        display: none;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body {
        font-size: 13px;
    }

    .sidebar {
        position: fixed;
        inset: auto 0 0 0;
        width: 100%;
        height: 64px;
        flex-direction: row;
        padding: 8px 10px;
        border-right: none;
        border-top: 1px solid var(--border);
        background: rgba(7, 11, 18, 0.98);
        backdrop-filter: blur(20px);
        z-index: 60;
    }

    .brand,
    .sidebar-foot {
        display: none;
    }

    .nav {
        flex-direction: row;
        justify-content: space-around;
        gap: 0;
        width: 100%;
    }

    .nav-item {
        flex-direction: column;
        gap: 2px;
        padding: 6px 4px;
        border-radius: 8px;
        flex: 1;
    }

    .nav-item span {
        display: block;
        font-size: 8px;
        letter-spacing: 0.01em;
    }

    .nav-item svg {
        width: 17px;
        height: 17px;
    }

    .nav-count {
        display: none;
    }

    .main {
        margin-left: 0;
        padding: 18px 14px 92px;
    }

    .topbar {
        align-items: center;
        margin-bottom: 18px;
    }

    .page-heading h1 {
        font-size: 1.35rem;
    }

    .page-heading p {
        font-size: 11px;
    }

    .topbar-actions .btn-ghost span {
        display: none;
    }

    .topbar-actions .btn-primary span {
        display: none;
    }

    .topbar-actions .btn {
        padding: 9px 11px;
    }

    .mobile-menu {
        display: none !important;
    }

    .hero-panel {
        padding: 22px 18px;
        min-height: 0;
    }

    .hero-copy h2 {
        font-size: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 1.25rem;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .page-toolbar {
        align-items: stretch;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }

    .search-box {
        max-width: none;
        flex-basis: 100%;
    }

    .toolbar-select {
        flex: 1;
        min-width: 0;
    }

    .table-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .design-grid {
        grid-template-columns: 1fr;
        padding: 11px;
    }

    .vault-grid {
        grid-template-columns: 1fr 1fr;
        padding: 11px;
        gap: 9px;
    }

    .asset-grid {
        grid-template-columns: 1fr 1fr;
        padding: 11px;
        gap: 9px;
    }

    .detail-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .modal-backdrop {
        padding: 3vh 10px 20px;
    }

    .modal-body {
        max-height: 72vh;
        padding: 16px;
    }

    .modal-head,
    .modal-foot {
        padding: 14px 16px;
    }

    .job-dock {
        left: 12px;
        right: 12px;
        bottom: 76px;
        width: auto;
    }

    .toast-root {
        left: 12px;
        right: 12px;
        bottom: 76px;
    }

    .toast {
        max-width: none;
    }

    .mini-design-grid {
        grid-template-columns: 1fr;
    }

    .data-table th:nth-child(4),
    .data-table td:nth-child(4),
    .data-table th:nth-child(6),
    .data-table td:nth-child(6) {
        display: none;
    }
}

@media (max-width: 460px) {

    .vault-grid,
    .asset-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Telemetry Ribbon, Device Viewport Switcher & Quality Controls (2027 Pro)
   ========================================================================== */
.telemetry-ribbon {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 20px;
    border-radius: 14px;
    background: linear-gradient(90deg, rgba(15, 20, 34, 0.95), rgba(7, 9, 14, 0.98));
    border: 1px solid rgba(0, 245, 155, 0.22);
    box-shadow: 0 8px 32px rgba(0, 245, 155, 0.08);
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.telemetry-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.telemetry-item .label {
    color: var(--muted-2);
    text-transform: uppercase;
    font-size: 9.5px;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.telemetry-item .val {
    color: var(--text);
    font-family: var(--mono);
    font-weight: 600;
}

.telemetry-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.telemetry-pill.live {
    background: rgba(0, 245, 155, 0.12);
    border: 1px solid rgba(0, 245, 155, 0.35);
    color: var(--primary);
}

.telemetry-pill.speed {
    background: rgba(0, 229, 255, 0.12);
    border: 1px solid rgba(0, 229, 255, 0.3);
    color: var(--cyan);
}

.telemetry-pill.cf {
    background: rgba(243, 128, 32, 0.12);
    border: 1px solid rgba(243, 128, 32, 0.3);
    color: #faad3f;
}

.viewport-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 14px;
    background: rgba(6, 10, 16, 0.85);
    border-radius: 12px;
    border: 1px solid var(--border);
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.viewport-switch {
    display: flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.04);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--border);
}

.viewport-btn {
    padding: 5px 11px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--muted);
    transition: all 0.15s ease;
}

.viewport-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
}

.viewport-btn.active {
    background: linear-gradient(135deg, rgba(0, 245, 155, 0.2), rgba(0, 229, 255, 0.15));
    color: #ffffff;
    border: 1px solid rgba(0, 245, 155, 0.4);
}

.preview-stage-container {
    width: 100%;
    display: flex;
    justify-content: center;
    background: #04060a;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    overflow-x: auto;
}

.preview-stage-frame {
    width: 100%;
    height: 68vh;
    border: none;
    background: #000;
    border-radius: 10px;
    transition: max-width 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
}

.preview-stage-frame.desktop {
    max-width: 100%;
}

.preview-stage-frame.tablet {
    max-width: 768px;
    border: 4px solid #1a2234;
    border-radius: 16px;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
}

.preview-stage-frame.mobile {
    max-width: 375px;
    border: 5px solid #1a2234;
    border-radius: 28px;
    box-shadow: 0 0 60px rgba(0, 0, 0, 0.9);
}

.qa-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.qa-badge.verified {
    background: rgba(0, 245, 155, 0.14);
    color: #00f59b;
    border: 1px solid rgba(0, 245, 155, 0.35);
}

.qa-badge.active {
    background: rgba(56, 189, 248, 0.12);
    color: #7dd3fc;
    border: 1px solid rgba(56, 189, 248, 0.28);
}

.qa-badge.quarantined {
    background: rgba(255, 71, 87, 0.14);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.35);
}

.cf-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(243, 128, 32, 0.12);
    border: 1px solid rgba(243, 128, 32, 0.32);
    color: #faad3f;
    font-size: 10.5px;
    font-family: var(--mono);
    text-decoration: none;
}

.cf-pill:hover {
    background: rgba(243, 128, 32, 0.2);
    color: #ffffff;
}

.preset-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.preset-card {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
}

.preset-card:hover {
    background: rgba(0, 245, 155, 0.06);
    border-color: rgba(0, 245, 155, 0.3);
    transform: translateY(-1px);
}

.preset-card strong {
    display: block;
    font-size: 12px;
    color: #ffffff;
}

.preset-card span {
    display: block;
    font-size: 10.5px;
    color: var(--muted);
    margin-top: 2px;
}

.webhook-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(0, 229, 255, 0.25);
    background: linear-gradient(90deg, rgba(0, 229, 255, 0.06), rgba(139, 92, 246, 0.04));
    margin-bottom: 16px;
}

.color-swatch-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 6px;
}

.color-swatch {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}