/* ═══════════════════════════════════════════════════════════════════════════
   VarGate — Neutral Observer Dashboard Styles
   Premium dark-mode glassmorphism design
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens ──────────────────────────────────────────────────────── */
:root {
    /* Background */
    --bg-deep: #0a0e1a;
    --bg-surface: rgba(15, 20, 35, 0.85);
    --bg-elevated: rgba(20, 28, 50, 0.75);
    --bg-glass: rgba(25, 35, 60, 0.45);
    --bg-hover: rgba(40, 55, 90, 0.5);

    /* Accent palette */
    --accent-primary: #6EE7B7;
    --accent-secondary: #3B82F6;
    --accent-tertiary: #A78BFA;
    --accent-warn: #F59E0B;
    --accent-danger: #EF4444;
    --accent-success: #10B981;

    /* Gradients */
    --grad-primary: linear-gradient(135deg, #6EE7B7, #3B82F6);
    --grad-warm: linear-gradient(135deg, #F59E0B, #EF4444);
    --grad-cool: linear-gradient(135deg, #3B82F6, #A78BFA);
    --grad-success: linear-gradient(135deg, #10B981, #6EE7B7);
    --grad-danger: linear-gradient(135deg, #EF4444, #F59E0B);

    /* Text */
    --text-primary: #E2E8F0;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;
    --text-bright: #F8FAFC;

    /* Borders */
    --border-subtle: rgba(100, 116, 139, 0.15);
    --border-glass: rgba(110, 231, 183, 0.12);
    --border-active: rgba(110, 231, 183, 0.35);

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px rgba(110, 231, 183, 0.1);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    /* Animations */
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --duration-fast: 150ms;
    --duration-base: 250ms;
    --duration-slow: 400ms;
}

/* ─── Reset & Base ───────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-deep);
    color: var(--text-primary);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* ─── Ambient Background ─────────────────────────────────────────────────── */
.ambient-bg {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.ambient-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--accent-secondary);
    bottom: -150px;
    left: -100px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--accent-tertiary);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(40px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(30px, 40px) scale(1.02);
    }
}

/* ─── Login Screen ───────────────────────────────────────────────────────── */
.login-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-deep);
    transition: opacity 0.5s var(--ease-smooth), visibility 0.5s;
}

.login-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: var(--space-2xl) var(--space-xl);
    text-align: center;
    position: relative;
    animation: loginAppear 0.6s var(--ease-spring);
}

@keyframes loginAppear {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

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

.login-logo {
    margin-bottom: var(--space-lg);
}

.login-logo svg {
    width: 64px;
    height: 64px;
    filter: drop-shadow(0 0 20px rgba(110, 231, 183, 0.2));
}

.login-title {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    margin-bottom: var(--space-xs);
}

.login-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    margin-bottom: var(--space-xl);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    text-align: left;
}

.login-label {
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    width: 18px;
    height: 18px;
    color: var(--text-muted);
    pointer-events: none;
    transition: color var(--duration-base) var(--ease-smooth);
}

.login-input {
    width: 100%;
    padding: 14px 16px 14px 44px;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.15em;
    color: var(--text-bright);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    outline: none;
    transition: all var(--duration-base) var(--ease-smooth);
}

.login-input::placeholder {
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-size: 0.82rem;
}

.login-input:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(110, 231, 183, 0.1), 0 0 20px rgba(110, 231, 183, 0.08);
}

.login-input:focus+.login-input-icon,
.login-input:focus~.login-input-icon {
    color: var(--accent-primary);
}

.login-input-wrapper:focus-within .login-input-icon {
    color: var(--accent-primary);
}

.login-error {
    font-size: 0.75rem;
    color: var(--accent-danger);
    opacity: 0;
    height: 0;
    overflow: hidden;
    transition: all var(--duration-base) var(--ease-smooth);
}

.login-error.visible {
    opacity: 1;
    height: auto;
    padding-top: 2px;
}

.login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    width: 100%;
    padding: 14px;
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--bg-deep);
    background: var(--grad-primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--duration-base) var(--ease-smooth);
    margin-top: var(--space-sm);
}

.login-btn:hover {
    box-shadow: 0 0 30px rgba(110, 231, 183, 0.3);
    transform: translateY(-2px);
}

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

.login-btn-icon {
    width: 18px;
    height: 18px;
    transition: transform var(--duration-base) var(--ease-smooth);
}

.login-btn:hover .login-btn-icon {
    transform: translateX(3px);
}

.login-footer {
    margin-top: var(--space-lg);
    font-size: 0.68rem;
    color: var(--text-muted);
    opacity: 0.5;
    letter-spacing: 0.05em;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-4px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(4px);
    }
}

.login-card.shake {
    animation: shake 0.5s var(--ease-smooth);
}

/* ─── Glass Panel Mixin ──────────────────────────────────────────────────── */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

/* ─── Header ─────────────────────────────────────────────────────────────── */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 14, 26, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-md) var(--space-xl);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-group {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon svg {
    width: 36px;
    height: 36px;
}

.logo-text h1 {
    font-size: 1.35rem;
    font-weight: 800;
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
    line-height: 1;
}

.logo-subtitle {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-weight: 500;
}

.header-status {
    display: flex;
    gap: var(--space-sm);
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.73rem;
    font-weight: 500;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: background var(--duration-base) var(--ease-smooth);
}

.status-pill.online .status-dot {
    background: var(--accent-success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
    animation: pulse-dot 2s ease-in-out infinite;
}

.status-pill.offline .status-dot {
    background: var(--accent-danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ─── Main ───────────────────────────────────────────────────────────────── */
main {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

/* ─── Stats Grid ─────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    transition: all var(--duration-base) var(--ease-smooth);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad-primary);
    opacity: 0;
    transition: opacity var(--duration-base) var(--ease-smooth);
}

.stat-card:hover {
    border-color: var(--border-active);
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    background: rgba(110, 231, 183, 0.08);
    color: var(--accent-primary);
    flex-shrink: 0;
}

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

.stat-allowed .stat-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
}

.stat-denied .stat-icon {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
}

.stat-root .stat-icon {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-secondary);
}

.stat-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-bright);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.stat-value.stat-hash {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--accent-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.stat-label {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 2px;
}

/* ─── Section Headers ────────────────────────────────────────────────────── */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.section-icon {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
}

.section-actions {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.tree-depth {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
}

/* ─── Buttons ────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    font-size: 0.78rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
    font-family: var(--font-sans);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--border-active);
}

.btn-primary {
    background: var(--grad-primary);
    color: var(--bg-deep);
    font-weight: 700;
}

.btn-primary:hover {
    box-shadow: 0 0 20px rgba(110, 231, 183, 0.3);
    transform: translateY(-1px);
}

.btn-verify {
    background: transparent;
    border: 1px solid rgba(110, 231, 183, 0.25);
    color: var(--accent-primary);
    font-size: 0.7rem;
    padding: 4px 10px;
    border-radius: 100px;
}

.btn-verify:hover {
    background: rgba(110, 231, 183, 0.08);
    border-color: var(--accent-primary);
    box-shadow: 0 0 12px rgba(110, 231, 183, 0.15);
}

.btn-verify.verifying {
    pointer-events: none;
    opacity: 0.6;
}

/* ─── Auto-Refresh Toggle ────────────────────────────────────────────────── */
.toggle-auto {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.73rem;
    color: var(--text-muted);
    cursor: pointer;
}

.toggle-auto input[type="checkbox"] {
    appearance: none;
    width: 32px;
    height: 18px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    position: relative;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.toggle-auto input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-muted);
    transition: all var(--duration-fast) var(--ease-spring);
}

.toggle-auto input[type="checkbox"]:checked {
    background: rgba(110, 231, 183, 0.15);
    border-color: var(--accent-primary);
}

.toggle-auto input[type="checkbox"]:checked::before {
    left: 16px;
    background: var(--accent-primary);
}

/* ─── Merkle Visualization ───────────────────────────────────────────────── */
.merkle-visual {
    padding: var(--space-lg);
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.merkle-empty {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.merkle-tree-container {
    width: 100%;
    overflow-x: auto;
}

.merkle-level {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
    position: relative;
}

.merkle-node {
    font-family: var(--font-mono);
    font-size: 0.6rem;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    transition: all var(--duration-fast) var(--ease-smooth);
}

.merkle-node.root {
    background: rgba(110, 231, 183, 0.1);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    font-weight: 600;
}

.merkle-node.leaf {
    background: rgba(59, 130, 246, 0.08);
    border-color: rgba(59, 130, 246, 0.3);
    color: var(--accent-secondary);
}

.merkle-node:hover {
    border-color: var(--accent-primary);
    transform: scale(1.05);
}

/* ─── Batch Verification Progress ────────────────────────────────────────── */
.batch-progress {
    position: relative;
    height: 28px;
    margin: 0 var(--space-lg) var(--space-sm);
    background: var(--bg-elevated);
    border-radius: 100px;
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.batch-progress-fill {
    height: 100%;
    background: var(--grad-success);
    border-radius: 100px;
    width: 0%;
    transition: width 0.6s var(--ease-smooth);
}

.batch-progress-fill.has-failures {
    background: var(--grad-danger);
}

.batch-progress-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    color: var(--text-bright);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* ─── Oath List ──────────────────────────────────────────────────────────── */
.oath-list {
    max-height: 600px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(100, 116, 139, 0.3) transparent;
}

.oath-list::-webkit-scrollbar {
    width: 6px;
}

.oath-list::-webkit-scrollbar-track {
    background: transparent;
}

.oath-list::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 100px;
}

.oath-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-2xl);
    color: var(--text-muted);
    gap: var(--space-sm);
}

.empty-icon svg {
    width: 48px;
    height: 48px;
    opacity: 0.3;
}

.empty-hint {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
    opacity: 0.6;
}

.oath-item {
    display: grid;
    grid-template-columns: auto 1fr auto auto;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    transition: background var(--duration-fast) var(--ease-smooth);
    animation: slideIn var(--duration-slow) var(--ease-spring);
}

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

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

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

.oath-item:hover {
    background: var(--bg-hover);
}

.oath-decision {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.oath-decision.allow {
    background: rgba(16, 185, 129, 0.12);
    color: var(--accent-success);
}

.oath-decision.deny {
    background: rgba(239, 68, 68, 0.12);
    color: var(--accent-danger);
}

.oath-decision svg {
    width: 18px;
    height: 18px;
}

.oath-details {
    min-width: 0;
}

.oath-tool {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--text-bright);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.oath-agent-badge {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    padding: 2px 7px;
    border-radius: 100px;
    background: rgba(167, 139, 250, 0.1);
    border: 1px solid rgba(167, 139, 250, 0.2);
    color: var(--accent-tertiary);
    font-weight: 500;
}

.oath-meta {
    display: flex;
    gap: var(--space-md);
    margin-top: 3px;
    font-size: 0.72rem;
    color: var(--text-muted);
}

.oath-meta span {
    display: flex;
    align-items: center;
    gap: 3px;
}

.oath-hash {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-muted);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
}

.oath-actions {
    display: flex;
    gap: var(--space-xs);
}

/* ─── Anchor List ────────────────────────────────────────────────────────── */
.anchor-list {
    max-height: 300px;
    overflow-y: auto;
}

.anchor-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

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

.anchor-chain-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-secondary);
}

.anchor-chain-icon svg {
    width: 16px;
    height: 16px;
}

.anchor-details {
    min-width: 0;
}

.anchor-root {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-primary);
    font-weight: 500;
}

.anchor-meta {
    font-size: 0.68rem;
    color: var(--text-muted);
    margin-top: 2px;
    display: flex;
    gap: var(--space-md);
}

.anchor-tx {
    font-family: var(--font-mono);
    font-size: 0.62rem;
    color: var(--accent-secondary);
    text-align: right;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ─── Modal ──────────────────────────────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-smooth);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal {
    width: 90%;
    max-width: 560px;
    max-height: 80vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(10px);
    transition: transform var(--duration-base) var(--ease-spring);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.modal-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-bright);
}

.btn-close {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-smooth);
}

.btn-close:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-lg);
}

/* ─── Verification Result ────────────────────────────────────────────────── */
.verify-result {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.verify-status {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
}

.verify-status.valid {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.verify-status.invalid {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.verify-status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.verify-status.valid .verify-status-icon {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-success);
}

.verify-status.invalid .verify-status-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-danger);
}

.verify-status-icon svg {
    width: 24px;
    height: 24px;
}

.verify-status-text h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.verify-status.valid .verify-status-text h4 {
    color: var(--accent-success);
}

.verify-status.invalid .verify-status-text h4 {
    color: var(--accent-danger);
}

.verify-status-text p {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.verify-detail {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.verify-detail-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.verify-detail-value {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-primary);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-elevated);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    word-break: break-all;
}

.verify-proof {
    margin-top: var(--space-sm);
}

.verify-proof-step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--text-secondary);
    border-left: 2px solid var(--border-subtle);
    margin-left: var(--space-md);
}

.proof-direction {
    font-size: 0.6rem;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: 100px;
    font-weight: 600;
}

.proof-direction.left {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-secondary);
}

.proof-direction.right {
    background: rgba(167, 139, 250, 0.1);
    color: var(--accent-tertiary);
}

/* ─── Toast ──────────────────────────────────────────────────────────────── */
.toast-container {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-elevated);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    font-size: 0.82rem;
    color: var(--text-primary);
    animation: toastIn var(--duration-slow) var(--ease-spring);
    min-width: 280px;
}

.toast.success {
    border-color: rgba(16, 185, 129, 0.3);
}

.toast.error {
    border-color: rgba(239, 68, 68, 0.3);
}

.toast-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

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

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

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(40px);
    }

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

@keyframes toastOut {
    to {
        opacity: 0;
        transform: translateX(40px);
    }
}

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

    .oath-item {
        grid-template-columns: auto 1fr auto;
    }

    .oath-hash {
        display: none;
    }

    .header-inner {
        padding: var(--space-md);
    }

    main {
        padding: var(--space-md);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--space-sm);
    }

    .header-status {
        display: none;
    }
}