:root {
    --bg: #070912;
    --surface: #111426;
    --surface-strong: #171a31;
    --border: #2d3150;
    --text: #f4f1ff;
    --muted: #b8b2cf;
    --muted-strong: #d6d1e8;
    --purple: #8b5cf6;
    --purple-strong: #a78bfa;
    --danger-bg: #341a2a;
    --danger-border: #7f3158;
    --danger-text: #ffd7e5;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 64px;
    --content-width: 960px;
    --page-top-space: 2rem;
    --page-side-space: 1.5rem;
    --page-header-height: 2.5rem;
    --page-section-gap: 1rem;
    --font-sans: "Inter", "Söhne", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scrollbar-color: rgba(167, 139, 250, 0.45) rgba(7, 9, 18, 0.7);
    scrollbar-width: thin;
}

* {
    scrollbar-color: rgba(167, 139, 250, 0.45) rgba(7, 9, 18, 0.7);
    scrollbar-width: thin;
}

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

*::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(7, 9, 18, 0.72);
}

*::-webkit-scrollbar-thumb {
    border: 2px solid rgba(7, 9, 18, 0.72);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(196, 181, 253, 0.72), rgba(139, 92, 246, 0.5));
}

*::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(180deg, rgba(216, 203, 255, 0.86), rgba(167, 139, 250, 0.68));
}

*::-webkit-scrollbar-corner {
    background: rgba(7, 9, 18, 0.72);
}

body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(139, 92, 246, 0.16), transparent 34rem),
        linear-gradient(135deg, #060711 0%, #0b1020 58%, #090715 100%);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
}

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

button,
input {
    font: inherit;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    clip-path: inset(50%);
}

.login-page {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
    background:
        linear-gradient(rgba(167, 139, 250, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(167, 139, 250, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 50% 18%, rgba(139, 92, 246, 0.2), transparent 22rem),
        linear-gradient(145deg, #03040a 0%, #090b18 48%, #05030b 100%);
    background-size: 42px 42px, 42px 42px, auto, auto;
}

.login-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(circle at center, transparent 0 26%, rgba(0, 0, 0, 0.38) 72%),
        repeating-linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            transparent 1px,
            transparent 8px
        );
    pointer-events: none;
}

.login-card {
    width: min(100%, 420px);
    padding: 2.25rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 38, 0.94);
    box-shadow: var(--shadow);
}

.secret-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(167, 139, 250, 0.26);
    background:
        linear-gradient(180deg, rgba(20, 24, 45, 0.96), rgba(8, 10, 21, 0.98)),
        var(--surface);
}

.secret-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 1px solid rgba(167, 139, 250, 0.42);
    background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.1), transparent);
    pointer-events: none;
}

.secret-card > * {
    position: relative;
    z-index: 1;
}

.access-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-bottom: 1.35rem;
    color: var(--purple-strong);
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.access-status span {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--purple-strong);
    box-shadow: 0 0 16px rgba(167, 139, 250, 0.8);
    animation: accessPulse 3.8s ease-in-out infinite;
}

.access-status strong {
    animation: accessTextPulse 3.8s ease-in-out infinite;
}

@keyframes accessPulse {
    0%,
    100% {
        opacity: 0.42;
        box-shadow: 0 0 6px rgba(167, 139, 250, 0.35);
        transform: scale(0.92);
    }

    50% {
        opacity: 1;
        box-shadow: 0 0 20px rgba(167, 139, 250, 0.95);
        transform: scale(1);
    }
}

@keyframes accessTextPulse {
    0%,
    100% {
        color: #8f80d8;
        text-shadow: 0 0 4px rgba(167, 139, 250, 0.18);
    }

    50% {
        color: #f4f1ff;
        text-shadow:
            0 0 8px rgba(167, 139, 250, 0.62),
            0 0 18px rgba(139, 92, 246, 0.42);
    }
}

.login-heading {
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-mark,
.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid rgba(167, 139, 250, 0.5);
    border-radius: 8px;
    background: #1c1831;
    color: var(--purple-strong);
    font-weight: 800;
}

.secret-card .login-mark {
    width: 3.25rem;
    height: 3.25rem;
    background: #0a0c19;
    color: #ffffff;
    box-shadow: inset 0 0 24px rgba(139, 92, 246, 0.22);
}

.login-overline {
    margin: 1rem 0 0;
    color: var(--purple-strong);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.login-heading h1 {
    margin: 0.45rem 0 0.4rem;
    font-size: 2.15rem;
    line-height: 1.2;
}

.login-heading p,
.page-header p,
.muted-text {
    color: var(--muted);
}

.message-list {
    margin-bottom: 1rem;
}

.message {
    margin: 0;
    padding: 0.85rem 1rem;
    border: 1px solid var(--danger-border);
    border-radius: 8px;
    background: var(--danger-bg);
    color: var(--danger-text);
    line-height: 1.5;
}

.flash-list {
    display: grid;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.flash {
    margin: 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(167, 139, 250, 0.32);
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.13);
    color: var(--text);
}

.login-form {
    display: grid;
    gap: 0.75rem;
}

.login-form label,
.search-form label {
    color: var(--muted-strong);
    font-weight: 700;
}

.login-form input,
.search-form input {
    width: 100%;
    min-height: 3rem;
    padding: 0 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090c19;
    color: var(--text);
    outline: none;
}

.login-form input {
    color-scheme: dark;
    caret-color: var(--purple-strong);
}

.login-form input:-webkit-autofill,
.login-form input:-webkit-autofill:hover,
.login-form input:-webkit-autofill:focus {
    border-color: rgba(167, 139, 250, 0.45);
    -webkit-box-shadow: 0 0 0 1000px #090c19 inset;
    box-shadow: 0 0 0 1000px #090c19 inset;
    -webkit-text-fill-color: var(--text);
    caret-color: var(--purple-strong);
    transition: background-color 9999s ease-out;
}

.login-form input:focus,
.search-form input:focus {
    border-color: var(--purple-strong);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

.login-options {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.15rem;
}

.login-check {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: fit-content;
    color: var(--muted-strong);
    font-size: 0.88rem;
    font-weight: 650;
    cursor: pointer;
}

.login-form .login-check input {
    width: 1rem;
    min-height: 1rem;
    margin: 0;
    accent-color: var(--purple-strong);
}

.login-form button,
.search-form button {
    min-height: 3rem;
    margin-top: 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.42);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.22), rgba(139, 92, 246, 0.14)),
        rgba(17, 20, 38, 0.96);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.16);
    font-weight: 650;
    cursor: pointer;
}

.login-form button:hover,
.search-form button:hover {
    border-color: rgba(196, 181, 253, 0.7);
    background:
        linear-gradient(180deg, rgba(196, 181, 253, 0.26), rgba(139, 92, 246, 0.18)),
        rgba(20, 23, 43, 0.98);
}

.access-note {
    margin: 1rem 0 0;
    color: #8e88aa;
    font-size: 0.86rem;
    line-height: 1.55;
    text-align: center;
}

.app-shell {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    overflow: hidden;
    transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) minmax(0, 1fr);
}

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    width: var(--sidebar-width);
    height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.45rem 0.75rem 0.75rem;
    border-right: 1px solid var(--border);
    background: rgba(8, 10, 22, 0.96);
    overflow-y: auto;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    padding-top: 0;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.brand {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    margin: 0;
    padding: 0;
}

.brand strong,
.brand small {
    display: block;
}

.brand-text {
    min-width: 0;
}

.brand strong {
    font-size: 0.92rem;
    line-height: 1.2;
}

.sidebar-graph {
    width: 4rem;
    height: 1.35rem;
    flex: 0 0 auto;
    opacity: 0.9;
}

.sidebar-graph svg {
    display: block;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.heartbeat-track,
.heartbeat-pulse {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.heartbeat-track {
    stroke: rgba(167, 139, 250, 0.2);
}

.heartbeat-pulse {
    stroke: #a78bfa;
    filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
    stroke-dasharray: 96;
    stroke-dashoffset: 96;
    animation: heartbeatTrace 2.4s ease-in-out infinite;
}

@keyframes heartbeatTrace {
    0% {
        stroke-dashoffset: 96;
        opacity: 0.15;
    }

    42% {
        stroke-dashoffset: 0;
        opacity: 1;
    }

    76%,
    100% {
        stroke-dashoffset: -96;
        opacity: 0.2;
    }
}

.sidebar-graph-signal_scanner {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 0.1rem 0;
}

.sidebar-graph-signal_scanner span,
.sidebar-graph-mini_bar_telemetry span {
    display: block;
    width: 0.28rem;
    border-radius: 999px;
    background: linear-gradient(180deg, #d8cbff, #8b5cf6);
    box-shadow: 0 0 9px rgba(167, 139, 250, 0.46);
}

.sidebar-graph-signal_scanner span {
    height: 0.35rem;
    animation: signalScan 1.4s ease-in-out infinite;
}

.sidebar-graph-signal_scanner span:nth-child(2) { animation-delay: 0.1s; }
.sidebar-graph-signal_scanner span:nth-child(3) { animation-delay: 0.2s; }
.sidebar-graph-signal_scanner span:nth-child(4) { animation-delay: 0.3s; }
.sidebar-graph-signal_scanner span:nth-child(5) { animation-delay: 0.4s; }
.sidebar-graph-signal_scanner span:nth-child(6) { animation-delay: 0.5s; }

@keyframes signalScan {
    0%,
    100% {
        height: 0.35rem;
        opacity: 0.38;
    }

    45% {
        height: 1.25rem;
        opacity: 1;
    }
}

.spectrum-line {
    fill: none;
    stroke-linecap: round;
    stroke-width: 2;
}

.spectrum-line-a {
    stroke: #a78bfa;
    filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.7));
    animation: spectrumDrift 2.2s ease-in-out infinite;
}

.spectrum-line-b {
    stroke: #67e8f9;
    opacity: 0.72;
    animation: spectrumDrift 2.2s ease-in-out infinite reverse;
}

@keyframes spectrumDrift {
    0%,
    100% {
        transform: translateX(-1px);
    }

    50% {
        transform: translateX(2px);
    }
}

.sidebar-graph-pulse_grid {
    display: grid;
    grid-template-columns: repeat(4, 0.38rem);
    grid-template-rows: repeat(2, 0.38rem);
    align-content: center;
    justify-content: center;
    gap: 0.28rem;
}

.sidebar-graph-pulse_grid span {
    border-radius: 999px;
    background: #a78bfa;
    opacity: 0.28;
    box-shadow: 0 0 8px rgba(167, 139, 250, 0.55);
    animation: gridPulse 1.8s ease-in-out infinite;
}

.sidebar-graph-pulse_grid span:nth-child(2) { animation-delay: 0.1s; }
.sidebar-graph-pulse_grid span:nth-child(3) { animation-delay: 0.2s; }
.sidebar-graph-pulse_grid span:nth-child(4) { animation-delay: 0.3s; }
.sidebar-graph-pulse_grid span:nth-child(5) { animation-delay: 0.4s; }
.sidebar-graph-pulse_grid span:nth-child(6) { animation-delay: 0.5s; }
.sidebar-graph-pulse_grid span:nth-child(7) { animation-delay: 0.6s; }
.sidebar-graph-pulse_grid span:nth-child(8) { animation-delay: 0.7s; }

@keyframes gridPulse {
    0%,
    100% {
        opacity: 0.25;
        transform: scale(0.85);
    }

    44% {
        opacity: 1;
        transform: scale(1.12);
    }
}

.sidebar-graph-mini_bar_telemetry {
    display: flex;
    align-items: end;
    justify-content: space-between;
    padding: 0.12rem 0;
}

.sidebar-graph-mini_bar_telemetry span {
    height: 0.6rem;
    animation: telemetryBars 1.3s ease-in-out infinite;
}

.sidebar-graph-mini_bar_telemetry span:nth-child(1) { animation-delay: 0s; }
.sidebar-graph-mini_bar_telemetry span:nth-child(2) { animation-delay: -0.2s; }
.sidebar-graph-mini_bar_telemetry span:nth-child(3) { animation-delay: -0.35s; }
.sidebar-graph-mini_bar_telemetry span:nth-child(4) { animation-delay: -0.1s; }
.sidebar-graph-mini_bar_telemetry span:nth-child(5) { animation-delay: -0.45s; }
.sidebar-graph-mini_bar_telemetry span:nth-child(6) { animation-delay: -0.25s; }
.sidebar-graph-mini_bar_telemetry span:nth-child(7) { animation-delay: -0.55s; }

@keyframes telemetryBars {
    0%,
    100% {
        height: 0.42rem;
        opacity: 0.45;
    }

    50% {
        height: 1.25rem;
        opacity: 1;
    }
}

.brand small {
    margin-top: 0.2rem;
    color: var(--muted);
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    flex: 0 0 auto;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-strong);
    cursor: pointer;
}

.icon-button:hover {
    border-color: rgba(167, 139, 250, 0.36);
    background: rgba(139, 92, 246, 0.12);
    color: var(--text);
}

.icon-button svg,
.nav-link svg,
.logout-link svg,
.user-card svg,
.user-menu-item svg,
.user-popover-head svg {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.nav-list {
    display: grid;
    gap: 0;
}

.nav-separator {
    height: 1px;
    margin: 0;
    background: var(--border);
}

.nav-link {
    --nav-accent: rgba(196, 181, 253, 0.72);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted-strong);
    font-size: 0.92rem;
    transition: color 260ms ease, background 320ms ease;
}

.nav-link::before,
.nav-link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
}

.nav-link::before {
    background:
        linear-gradient(100deg, rgba(139, 92, 246, 0.3), rgba(103, 232, 249, 0.1) 58%, rgba(216, 203, 255, 0.07)),
        rgba(139, 92, 246, 0.055);
    opacity: 0;
    transform: translateX(-58%);
    transition: opacity 360ms ease, transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link::after {
    background: linear-gradient(100deg, transparent 0 32%, rgba(255, 255, 255, 0.13) 48%, transparent 64% 100%);
    opacity: 0;
    transform: translateX(-120%);
    transition: opacity 420ms ease, transform 820ms cubic-bezier(0.16, 1, 0.3, 1);
}

.alert-badge,
.update-badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.25rem;
    height: 1.25rem;
    margin-left: auto;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.alert-badge {
    border: 1px solid rgba(248, 113, 113, 0.48);
    background: rgba(248, 113, 113, 0.14);
    color: #ffd7e5;
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.16);
}

.update-badge {
    border: 1px solid rgba(52, 211, 153, 0.5);
    background: rgba(16, 185, 129, 0.16);
    color: #bbf7d0;
    box-shadow: 0 0 14px rgba(16, 185, 129, 0.18);
}

.nav-link:hover,
.nav-link.active {
    background: rgba(139, 92, 246, 0.05);
    color: var(--text);
}

.nav-link:hover::before,
.nav-link.active::before {
    opacity: 1;
    transform: translateX(0);
}

.nav-link:hover::after,
.nav-link.active::after {
    opacity: 1;
    transform: translateX(95%);
}

.sidebar-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    margin-top: auto;
    display: grid;
    gap: 0.5rem;
    padding-top: 0.5rem;
    background: linear-gradient(180deg, rgba(8, 10, 22, 0), rgba(8, 10, 22, 0.96) 32%);
}

.user-menu {
    position: relative;
}

.security-chip {
    display: grid;
    gap: 0.35rem;
    padding: 0.7rem 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.84), rgba(7, 9, 18, 0.9)),
        rgba(9, 12, 25, 0.94);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 12px 34px rgba(0, 0, 0, 0.2);
}

.security-chip-head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    color: rgba(216, 203, 255, 0.94);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.security-dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 999px;
    background: #a78bfa;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.72);
}

.security-chip p {
    margin: 0;
    color: rgba(214, 209, 232, 0.72);
    font-size: 0.76rem;
    line-height: 1.45;
}

.security-ip {
    width: fit-content;
    padding: 0.22rem 0.5rem;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.08);
    color: #f4f1ff;
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    font-size: 0.72rem;
}

.user-card,
.user-popover-head,
.user-menu-item {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
}

.user-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    min-height: 3.25rem;
    padding: 0.45rem 0.55rem;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    background: #1f1f22;
    text-align: left;
}

.user-card:hover {
    background: #29292d;
}

.user-avatar {
    display: inline-grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    overflow: hidden;
    border-radius: 999px;
    background: #ffffff;
    color: #090a12;
}

.user-avatar svg {
    width: 1.55rem;
    height: 1.55rem;
    fill: currentColor;
    stroke: currentColor;
}

.user-meta {
    min-width: 0;
}

.user-meta strong,
.user-meta small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-meta strong {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
}

.user-meta small {
    margin-top: 0;
    color: #a8a8ad;
    font-size: 0.8rem;
}

.user-popover {
    position: absolute;
    right: 0;
    bottom: calc(100% + 0.5rem);
    width: min(248px, calc(100vw - 2rem));
    padding: 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    background: #343434;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
}

.user-popover[hidden] {
    display: none;
}

.user-popover-head,
.user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 2.25rem;
    padding: 0.3rem 0.45rem;
    border-radius: 8px;
    text-align: left;
}

.user-popover-head {
    padding-bottom: 0.45rem;
}

.user-popover-head:hover,
.user-menu-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.user-menu-item svg {
    color: #f4f4f5;
}

.user-menu-item span {
    flex: 1;
    min-width: 0;
    color: #f5f5f5;
    font-size: 0.92rem;
}

.user-menu-separator {
    height: 1px;
    margin: 0.35rem 0;
    background: rgba(255, 255, 255, 0.15);
}

.profile-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.profile-summary-avatar {
    display: inline-grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    background: #ffffff;
    color: #090a12;
}

.profile-summary-avatar svg {
    width: 2.15rem;
    height: 2.15rem;
    fill: currentColor;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.profile-summary strong,
.profile-summary span {
    display: block;
}

.profile-summary strong {
    font-size: 1.05rem;
}

.profile-summary span {
    color: var(--muted);
    font-size: 0.86rem;
}

.logout-form {
    margin: 0;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--muted-strong);
    cursor: pointer;
}

.logout-link:hover {
    border-color: var(--purple-strong);
    color: var(--text);
}

.app-shell.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed-width);
    gap: 0.65rem;
    padding: 0.45rem 0.45rem 0.55rem;
}

.nav-link-interpretation {
    --nav-accent: #a78bfa;
}

.nav-link-issue {
    --nav-accent: #38bdf8;
}

.nav-link-praise {
    --nav-accent: #facc15;
}

.nav-link-info {
    --nav-accent: #34d399;
}

.nav-link-research {
    --nav-accent: #fb7185;
}

.nav-link svg {
    color: color-mix(in srgb, var(--nav-accent) 72%, var(--muted-strong));
    opacity: 0.78;
    filter: drop-shadow(0 0 8px color-mix(in srgb, var(--nav-accent) 18%, transparent));
}

.nav-link:hover svg,
.nav-link.active svg {
    color: var(--nav-accent);
    opacity: 0.95;
}

.app-shell.sidebar-collapsed .sidebar-header {
    display: grid;
    justify-items: center;
    gap: 0.5rem;
    padding-bottom: 0.65rem;
}

.app-shell.sidebar-collapsed .brand {
    flex: 0 0 auto;
    justify-content: center;
    width: 100%;
}

.app-shell.sidebar-collapsed .brand-mark {
    width: 2.25rem;
    height: 2.25rem;
    font-size: 0.72rem;
}

.app-shell.sidebar-collapsed .brand-text,
.app-shell.sidebar-collapsed .sidebar-graph,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .logout-label,
.app-shell.sidebar-collapsed .user-meta,
.app-shell.sidebar-collapsed .security-chip {
    display: none;
}

.app-shell.sidebar-collapsed .icon-button,
.app-shell.sidebar-collapsed .nav-link,
.app-shell.sidebar-collapsed .logout-link {
    width: 2.4rem;
    height: 2.4rem;
    min-height: 2.4rem;
    padding: 0;
    justify-content: center;
}

.app-shell.sidebar-collapsed .nav-list {
    justify-items: center;
}

.app-shell.sidebar-collapsed .sidebar-footer {
    justify-items: center;
    width: 100%;
}

.app-shell.sidebar-collapsed .user-menu {
    width: 100%;
}

.app-shell.sidebar-collapsed .user-card {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    min-height: 2.4rem;
    padding: 0;
}

.app-shell.sidebar-collapsed .user-popover {
    left: calc(100% + 0.6rem);
    right: auto;
    bottom: 0;
}

.content {
    grid-column: 2;
    width: min(100%, var(--content-width));
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    padding: var(--page-top-space) var(--page-side-space) 2rem;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.page-header {
    max-width: none;
    min-height: var(--page-header-height);
    margin: 0 0 var(--page-section-gap);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.board-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: none;
}

.board-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.compact-button {
    min-height: 2.25rem;
    padding: 0 0.75rem;
}

.eyebrow,
.card-kicker {
    margin: 0 0 0.45rem;
    color: var(--purple-strong);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.page-header h1 {
    margin: 0;
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 650;
}

.content > .page-header:first-child + .admin-panel,
.content > .page-header:first-child + .admin-stat-grid,
.content > .page-header:first-child + .admin-grid {
    margin-top: 0;
}

.page-header p {
    margin: 0.5rem 0 0;
    line-height: 1.55;
}

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

.menu-card,
.panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 38, 0.9);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28);
}

.menu-card {
    min-height: 128px;
    padding: 1.4rem;
}

.menu-card:hover {
    border-color: rgba(167, 139, 250, 0.65);
    background: rgba(24, 27, 50, 0.96);
}

.menu-card h2 {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
}

.menu-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.panel {
    padding: 1rem;
}

.search-form {
    display: grid;
    gap: 0.55rem;
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    gap: 0.5rem;
}

.search-form button {
    margin-top: 0;
}

.search-hero {
    display: grid;
    align-content: center;
    gap: 1.55rem;
    min-height: 52vh;
    padding: 3rem 0 2.5rem;
}

.search-hero-results {
    align-content: start;
    gap: 0;
    min-height: auto;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem 0 0.75rem;
}

.search-hero-results .search-command {
    width: 100%;
}

.search-brand {
    display: grid;
    justify-items: center;
    gap: 0.3rem;
    text-align: center;
}

.search-brand p {
    margin: 0;
    color: rgba(214, 209, 232, 0.72);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.search-brand h1 {
    margin: 0;
    color: transparent;
    font-size: clamp(3rem, 8vw, 6.25rem);
    font-weight: 760;
    line-height: 0.92;
    background:
        linear-gradient(110deg, #ffffff 8%, #d8cbff 34%, #a78bfa 56%, #f4f1ff 82%);
    background-clip: text;
    -webkit-background-clip: text;
    text-shadow:
        0 0 28px rgba(167, 139, 250, 0.22),
        0 20px 60px rgba(0, 0, 0, 0.5);
}

.search-command {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    width: min(100%, 760px);
    min-height: 3.25rem;
    margin: 0 auto;
    padding: 0.35rem 0.45rem 0.35rem 1.05rem;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.94), rgba(10, 13, 27, 0.96)),
        rgba(9, 12, 25, 0.96);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 0 1px rgba(255, 255, 255, 0.02),
        0 22px 80px rgba(0, 0, 0, 0.36),
        0 0 42px rgba(139, 92, 246, 0.08);
}

.search-command::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(90deg, rgba(139, 92, 246, 0.7), rgba(216, 203, 255, 0.86), rgba(139, 92, 246, 0.7));
    opacity: 0;
    filter: blur(0.8px);
    transition: opacity 180ms ease;
    pointer-events: none;
}

.search-command::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: inherit;
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.98), rgba(10, 13, 27, 0.98)),
        rgba(9, 12, 25, 0.98);
    pointer-events: none;
}

.search-command:focus-within {
    border-color: rgba(196, 181, 253, 0.56);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 3px rgba(139, 92, 246, 0.14),
        0 24px 86px rgba(0, 0, 0, 0.44),
        0 0 48px rgba(167, 139, 250, 0.14);
}

.search-command:focus-within::before {
    opacity: 1;
    animation: searchBorderGlow 2.2s ease-in-out infinite;
}

@keyframes searchBorderGlow {
    0%,
    100% {
        opacity: 0.62;
        filter: blur(0.6px);
    }

    50% {
        opacity: 1;
        filter: blur(1.15px);
    }
}

.search-command input {
    width: 100%;
    min-width: 0;
    min-height: 2.4rem;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.98rem;
}

.search-command input::placeholder {
    color: rgba(214, 209, 232, 0.55);
}

.search-command input::-webkit-search-cancel-button {
    filter: invert(1) opacity(0.45);
}

.search-command > button {
    display: inline-grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(196, 181, 253, 0.34);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.26), rgba(139, 92, 246, 0.16)),
        rgba(20, 23, 43, 0.96);
    color: #fff;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 10px 24px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(139, 92, 246, 0.14);
}

.search-command > button:hover {
    border-color: rgba(216, 203, 255, 0.7);
    background:
        linear-gradient(180deg, rgba(196, 181, 253, 0.32), rgba(139, 92, 246, 0.24)),
        rgba(26, 29, 51, 0.98);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 12px 28px rgba(0, 0, 0, 0.34),
        0 0 24px rgba(167, 139, 250, 0.22);
}

.search-command > button:focus-visible {
    outline: 2px solid rgba(196, 181, 253, 0.9);
    outline-offset: 3px;
}

.search-command > button svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.search-history-toggle-row {
    display: flex;
    justify-content: center;
    margin-top: -0.85rem;
}

.search-hero-results .search-history-toggle-row {
    justify-content: flex-end;
    margin-top: 0.35rem;
}

.search-history-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.55rem;
    color: rgba(214, 209, 232, 0.66);
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}

.search-history-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.search-history-toggle span {
    position: relative;
    width: 2rem;
    height: 1.05rem;
    border: 1px solid rgba(184, 178, 207, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
    transition: border-color 160ms ease, background 160ms ease;
}

.search-history-toggle span::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.13rem;
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 50%;
    background: rgba(214, 209, 232, 0.74);
    transform: translateY(-50%);
    transition: transform 160ms ease, background 160ms ease;
}

.search-history-toggle input:checked + span {
    border-color: rgba(167, 139, 250, 0.52);
    background: rgba(139, 92, 246, 0.24);
}

.search-history-toggle input:checked + span::before {
    background: #f4f1ff;
    transform: translate(0.9rem, -50%);
}

.search-history-toggle input:focus-visible + span {
    outline: 2px solid rgba(196, 181, 253, 0.85);
    outline-offset: 3px;
}

.search-history-panel {
    position: absolute;
    top: calc(100% + 0.45rem);
    left: 1rem;
    right: 3.35rem;
    z-index: 20;
    display: grid;
    gap: 0.35rem;
    padding: 0.55rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.98), rgba(9, 12, 25, 0.98)),
        rgba(9, 12, 25, 0.98);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.search-history-panel[hidden] {
    display: none;
}

.search-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0 0.1rem 0.15rem;
    color: rgba(214, 209, 232, 0.7);
    font-size: 0.74rem;
    font-weight: 800;
}

.search-history-head button {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(196, 181, 253, 0.82);
    font: inherit;
    cursor: pointer;
}

.search-history-list {
    display: grid;
    gap: 0.18rem;
}

.search-history-item {
    display: block;
    width: 100%;
    padding: 0.42rem 0.5rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    font-size: 0.84rem;
    text-align: left;
    cursor: pointer;
}

.search-history-item:hover,
.search-history-item:focus-visible {
    background: rgba(139, 92, 246, 0.16);
    outline: 0;
}

.search-history-empty {
    margin: 0;
    padding: 0.42rem 0.5rem;
    color: rgba(214, 209, 232, 0.58);
    font-size: 0.82rem;
}

.search-results-panel {
    display: grid;
    gap: 0.85rem;
    max-width: 960px;
    margin: 0 auto 1rem;
    padding: 0.35rem 1rem 1rem;
}

.search-results-head,
.search-result-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.search-results-head p,
.search-results-head h2,
.search-result-group-head h3 {
    margin: 0;
}

.search-results-head p {
    color: rgba(196, 181, 253, 0.78);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.search-results-head h2 {
    font-size: 1.15rem;
}

.search-result-total {
    padding: 0.28rem 0.6rem;
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 999px;
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

.search-result-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.45rem 0 0.2rem;
}

.search-summary-card {
    display: flex;
    align-items: center;
    min-height: 2.35rem;
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(167, 139, 250, 0.14);
    color: var(--muted-strong);
}

.search-summary-card span {
    text-shadow: 0 0 12px rgba(196, 181, 253, 0.14);
}

.search-result-groups {
    display: grid;
    gap: 0.75rem;
}

.search-result-group {
    --search-group-accent: #a78bfa;
    --search-group-bg: rgba(139, 92, 246, 0.11);
    display: grid;
    gap: 0.65rem;
    padding-top: 0.25rem;
}

.search-result-group-interpretation {
    --search-group-accent: #a78bfa;
    --search-group-bg: rgba(139, 92, 246, 0.13);
}

.search-result-group-issue {
    --search-group-accent: #38bdf8;
    --search-group-bg: rgba(14, 165, 233, 0.1);
}

.search-result-group-praise {
    --search-group-accent: #facc15;
    --search-group-bg: rgba(250, 204, 21, 0.09);
}

.search-result-group-info {
    --search-group-accent: #34d399;
    --search-group-bg: rgba(52, 211, 153, 0.09);
}

.search-result-group-research {
    --search-group-accent: #fb7185;
    --search-group-bg: rgba(251, 113, 133, 0.08);
}

.search-result-group-head h3 {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.32rem 0.62rem 0.32rem 0.72rem;
    border: 1px solid rgba(196, 181, 253, 0.16);
    border-radius: 8px;
    background:
        linear-gradient(90deg, var(--search-group-bg), rgba(17, 20, 38, 0.18));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    font-size: 0.98rem;
    line-height: 1.2;
}

.search-result-group-head h3 span {
    margin-left: 0.32rem;
    color: var(--search-group-accent);
    font-weight: 800;
    text-shadow: 0 0 14px rgba(196, 181, 253, 0.24);
}

.search-result-group-head div {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.search-result-group-head a {
    color: var(--purple-strong);
}

.search-result-list {
    display: grid;
    gap: 0.45rem;
}

.search-result-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid rgba(167, 139, 250, 0.12);
}

.search-result-item:hover {
    background:
        linear-gradient(90deg, rgba(139, 92, 246, 0.08), rgba(139, 92, 246, 0));
}

.search-result-item strong,
.search-result-item p {
    margin: 0;
}

.search-result-item strong {
    display: block;
    overflow: hidden;
    color: #fff;
    font-size: 0.92rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.search-result-item p {
    margin-top: 0.28rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.55;
}

.search-result-item mark {
    padding: 0.03rem 0.14rem;
    border-radius: 4px;
    background:
        linear-gradient(180deg, rgba(216, 203, 255, 0.2), rgba(139, 92, 246, 0.18));
    box-shadow:
        0 0 0 1px rgba(216, 203, 255, 0.16),
        0 0 10px rgba(196, 181, 253, 0.38),
        0 0 22px rgba(139, 92, 246, 0.24);
    color: #f4f1ff;
    font-weight: 900;
    text-shadow:
        0 0 6px rgba(255, 255, 255, 0.56),
        0 0 14px rgba(216, 203, 255, 0.72),
        0 0 28px rgba(139, 92, 246, 0.38);
}

.search-result-item > span {
    align-self: center;
    color: rgba(214, 209, 232, 0.62);
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}

.search-result-empty {
    margin: 0;
    padding: 0.65rem 0;
    border-bottom: 1px solid rgba(167, 139, 250, 0.1);
    color: var(--muted);
    font-size: 0.86rem;
}

.search-results-empty {
    display: grid;
    gap: 0.24rem;
    padding: 1.2rem 0.95rem;
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 8px;
    background: rgba(17, 20, 38, 0.34);
    color: var(--muted);
}

.search-results-empty strong,
.search-results-empty p {
    margin: 0;
}

.search-results-empty strong {
    color: #fff;
    font-size: 0.98rem;
}

.search-results-empty p {
    font-size: 0.84rem;
}

.news-panel {
    width: min(100%, 860px);
    margin: 0 auto 2rem;
    padding: 1rem;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.72), rgba(9, 12, 25, 0.82)),
        rgba(9, 12, 25, 0.86);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 22px 70px rgba(0, 0, 0, 0.24);
}

.news-panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.1rem 0.15rem 0.85rem;
    border-bottom: 1px solid rgba(167, 139, 250, 0.14);
}

.news-panel-head p,
.news-panel-head h2 {
    margin: 0;
}

.news-panel-head p {
    color: rgba(167, 139, 250, 0.82);
    font-size: 0.72rem;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.news-panel-head h2 {
    margin-top: 0.2rem;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
}

.news-panel-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.news-panel-actions > span {
    color: rgba(214, 209, 232, 0.58);
    font-size: 0.78rem;
    white-space: nowrap;
}

.news-refresh-button {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.12), rgba(139, 92, 246, 0.06)),
        rgba(17, 20, 38, 0.86);
    color: rgba(216, 203, 255, 0.88);
}

.news-refresh-button:hover {
    border-color: rgba(196, 181, 253, 0.48);
    background:
        linear-gradient(180deg, rgba(196, 181, 253, 0.18), rgba(139, 92, 246, 0.1)),
        rgba(20, 23, 43, 0.96);
    color: #fff;
    box-shadow: 0 0 18px rgba(139, 92, 246, 0.16);
}

.news-refresh-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.news-refresh-button.is-loading {
    pointer-events: none;
    border-color: rgba(216, 203, 255, 0.56);
    color: #fff;
    box-shadow: 0 0 22px rgba(167, 139, 250, 0.2);
}

.news-refresh-button.is-loading svg {
    animation: refreshSpin 0.8s linear infinite;
}

@keyframes refreshSpin {
    to {
        transform: rotate(360deg);
    }
}

.news-list {
    display: grid;
    padding-top: 0.45rem;
}

.news-loading {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    min-height: 8rem;
    padding: 1rem;
    color: var(--muted-strong);
    text-align: center;
}

.news-loading strong {
    color: var(--text);
    font-size: 0.94rem;
}

.news-loading small {
    color: rgba(214, 209, 232, 0.62);
    font-size: 0.78rem;
}

.news-loading-spinner {
    width: 1.75rem;
    height: 1.75rem;
    border: 2px solid rgba(167, 139, 250, 0.18);
    border-top-color: rgba(196, 181, 253, 0.94);
    border-radius: 50%;
    animation: refreshSpin 0.8s linear infinite;
}

.news-row {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr) 82px;
    align-items: center;
    gap: 0.85rem;
    min-height: 2.85rem;
    padding: 0 0.2rem;
    border-bottom: 1px solid rgba(167, 139, 250, 0.11);
}

.news-row:last-child {
    border-bottom: 0;
}

.news-row:hover {
    background:
        linear-gradient(90deg, rgba(139, 92, 246, 0.1), transparent 68%);
}

.news-source {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: #d8cbff;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.news-title {
    overflow: hidden;
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 650;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-row:hover .news-title {
    color: #fff;
}

.news-time {
    color: rgba(214, 209, 232, 0.58);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.news-empty {
    margin: 0;
    padding: 1rem 0.2rem 0.2rem;
    color: rgba(214, 209, 232, 0.62);
    font-size: 0.86rem;
}

.news-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding-top: 0.8rem;
}

.news-pagination[hidden] {
    display: none;
}

.news-page-button {
    display: inline-grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: rgba(214, 209, 232, 0.7);
    font-size: 0.78rem;
    font-weight: 750;
    cursor: pointer;
}

.news-page-button:hover {
    border-color: rgba(167, 139, 250, 0.28);
    background: rgba(139, 92, 246, 0.1);
    color: var(--text);
}

.news-page-button.active {
    border-color: rgba(196, 181, 253, 0.46);
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.18), rgba(139, 92, 246, 0.1)),
        rgba(20, 23, 43, 0.96);
    color: #fff;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.16);
}

.muted-text {
    margin: 1rem 0 0;
    line-height: 1.7;
}

.empty-list {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.empty-row {
    height: 3.75rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-strong);
}

.empty-row.short {
    width: 72%;
}

.admin-stat-grid,
.admin-grid {
    display: grid;
    gap: 0.75rem;
}

.admin-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 0.75rem;
}

.admin-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 0.75rem;
}

.device-ip-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.device-ip-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.72);
}

.device-ip-card span {
    min-width: 0;
    overflow: hidden;
    color: rgba(214, 209, 232, 0.76);
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-ip-card strong {
    color: #f4f1ff;
}

.device-alert-panel {
    border-color: rgba(248, 113, 113, 0.28);
}

.device-alert-list {
    display: grid;
    gap: 0.65rem;
}

.device-alert {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 0.3rem 0.85rem;
    padding: 0.8rem;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(248, 113, 113, 0.1), rgba(139, 92, 246, 0.04)),
        rgba(9, 12, 25, 0.78);
}

.device-alert.warning {
    border-color: rgba(250, 204, 21, 0.24);
    background:
        linear-gradient(90deg, rgba(250, 204, 21, 0.08), rgba(139, 92, 246, 0.04)),
        rgba(9, 12, 25, 0.78);
}

.device-alert span {
    color: #ffadc8;
    font-size: 0.8rem;
    font-weight: 800;
}

.device-alert.warning span {
    color: #fde68a;
}

.device-alert strong {
    min-width: 0;
    overflow: hidden;
    color: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-alert p {
    grid-column: 1 / -1;
    margin: 0;
    color: rgba(214, 209, 232, 0.76);
    font-size: 0.84rem;
}

.device-alert small {
    grid-column: 1 / -1;
    color: rgba(184, 178, 207, 0.68);
    font-size: 0.76rem;
}

.device-alert-action {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.device-alert-status-open {
    border: 1px solid rgba(248, 113, 113, 0.32);
    color: #fca5a5;
}

.device-alert-status-dismissed {
    border: 1px solid rgba(250, 204, 21, 0.32);
    color: #fde68a;
}

.device-alert-status-resolved {
    border: 1px solid rgba(74, 222, 128, 0.32);
    color: #86efac;
}

.admin-stat-card,
.admin-action-card,
.admin-panel {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(17, 20, 38, 0.9);
}

.admin-stat-card {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem;
}

.admin-stat-card span {
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-stat-card strong {
    font-size: 1.45rem;
}

.admin-action-card {
    display: grid;
    align-content: space-between;
    gap: 0.75rem;
    min-height: 5rem;
    padding: 0.85rem;
}

.sidebar-graph-form ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar-graph-form li label {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3rem;
    padding: 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.72);
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 650;
    cursor: pointer;
}

.sidebar-graph-form li label:has(input:checked) {
    border-color: rgba(167, 139, 250, 0.68);
    background: rgba(139, 92, 246, 0.16);
    color: var(--text);
}

.sidebar-graph-form input[type="radio"] {
    width: 0.9rem;
    height: 0.9rem;
    margin: 0;
    accent-color: var(--purple-strong);
}

.admin-action-card h2,
.admin-panel h2 {
    margin: 0;
    font-size: 0.98rem;
    font-weight: 650;
}

.admin-panel {
    margin-bottom: 0.75rem;
    padding: 1rem;
}

.elevated-panel {
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.94), rgba(12, 15, 30, 0.94)),
        var(--surface);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22);
}

.admin-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.admin-panel-head a,
.table-link {
    color: var(--purple-strong);
    font-weight: 700;
}

.narrow-panel {
    max-width: 680px;
}

.admin-form {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.polished-form {
    gap: 0.9rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

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

.wide-field {
    grid-column: 1 / -1;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.field-block {
    display: grid;
    gap: 0.35rem;
    color: var(--muted-strong);
    font-weight: 700;
}

.field-block > span {
    font-size: 0.82rem;
}

.field-block input,
.field-block select,
.field-block textarea,
.admin-filter input,
.admin-filter select,
.inline-form input {
    width: 100%;
    min-height: 2.45rem;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090c19;
    color: var(--text);
    font-size: 0.92rem;
}

.field-block textarea {
    min-height: 7rem;
    padding: 0.85rem;
    resize: vertical;
    line-height: 1.5;
}

.field-block input[type="checkbox"] {
    width: auto;
    min-height: auto;
}

.field-block ul {
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.field-block li label {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 500;
}

.field-block small {
    color: var(--muted);
    font-weight: 400;
}

.switch-field {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    width: fit-content;
    cursor: pointer;
}

.switch-field input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.switch-track {
    position: relative;
    width: 3.35rem;
    height: 1.8rem;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.98), rgba(7, 9, 18, 0.98));
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.52),
        inset 0 0 0 1px rgba(255, 255, 255, 0.025);
    transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.switch-thumb {
    position: absolute;
    top: 0.22rem;
    left: 0.22rem;
    width: 1.26rem;
    height: 1.26rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at 34% 28%, #ffffff 0 18%, #d8cbff 42%, #8f80d8 100%);
    box-shadow:
        0 5px 14px rgba(0, 0, 0, 0.46),
        0 0 0 1px rgba(255, 255, 255, 0.18);
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.switch-field input:checked + .switch-track {
    border-color: rgba(196, 181, 253, 0.58);
    background:
        linear-gradient(180deg, rgba(58, 42, 102, 0.96), rgba(31, 24, 62, 0.98)),
        rgba(17, 20, 38, 0.98);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.38),
        inset 0 0 0 1px rgba(255, 255, 255, 0.035),
        0 0 18px rgba(139, 92, 246, 0.2);
}

.switch-field input:checked + .switch-track .switch-thumb {
    transform: translateX(1.52rem);
    background:
        radial-gradient(circle at 34% 28%, #ffffff 0 18%, #eadfff 38%, #a78bfa 100%);
    box-shadow:
        0 5px 16px rgba(0, 0, 0, 0.44),
        0 0 16px rgba(167, 139, 250, 0.34),
        0 0 0 1px rgba(255, 255, 255, 0.22);
}

.switch-field input:focus-visible + .switch-track {
    outline: 0;
    border-color: rgba(216, 203, 255, 0.78);
    box-shadow:
        inset 0 1px 3px rgba(0, 0, 0, 0.44),
        0 0 0 3px rgba(139, 92, 246, 0.16),
        0 0 24px rgba(167, 139, 250, 0.18);
}

.switch-field:hover .switch-track {
    border-color: rgba(196, 181, 253, 0.42);
}

.switch-field strong {
    color: rgba(214, 209, 232, 0.86);
    font-size: 0.88rem;
    font-weight: 700;
}

.choice-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.choice-pill {
    position: relative;
    display: inline-flex;
    align-items: center;
    cursor: pointer;
}

.choice-pill input {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.choice-pill span {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: rgba(9, 12, 25, 0.9);
    color: var(--muted-strong);
    font-size: 0.86rem;
    transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.choice-pill input:checked + span {
    border-color: rgba(167, 139, 250, 0.72);
    background: rgba(139, 92, 246, 0.2);
    color: var(--text);
}

.choice-pill input:focus-visible + span {
    outline: 2px solid var(--purple-strong);
    outline-offset: 3px;
}

.board-search-panel,
.board-filter-panel {
    margin-bottom: 0.75rem;
}

.board-filter-form {
    display: grid;
    gap: 0.75rem;
}

.board-search-row {
    display: grid;
    grid-template-columns: 9rem minmax(0, 1fr) auto auto;
    gap: 0.5rem;
    align-items: center;
}

.board-search-row select,
.board-search-row input {
    width: 100%;
    min-height: 2.45rem;
    padding: 0 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090c19;
    color: var(--text);
}

input[type="file"] {
    width: 100%;
    min-height: 2.55rem;
    padding: 0.32rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(11, 14, 28, 0.96), rgba(7, 9, 18, 0.98));
    color: rgba(232, 229, 255, 0.88);
    font: inherit;
    font-size: 0.92rem;
    line-height: 1.4;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    min-height: 1.9rem;
    margin-right: 0.7rem;
    padding: 0 0.8rem;
    border: 1px solid rgba(167, 139, 250, 0.5);
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(52, 39, 93, 0.95), rgba(31, 24, 62, 0.98));
    color: #ffffff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.22);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

input[type="file"]::-webkit-file-upload-button {
    min-height: 1.9rem;
    margin-right: 0.7rem;
    padding: 0 0.8rem;
    border: 1px solid rgba(167, 139, 250, 0.5);
    border-radius: 7px;
    background:
        linear-gradient(180deg, rgba(52, 39, 93, 0.95), rgba(31, 24, 62, 0.98));
    color: #ffffff;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 750;
    cursor: pointer;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 8px 18px rgba(0, 0, 0, 0.22);
    transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

input[type="file"]:hover {
    border-color: rgba(167, 139, 250, 0.5);
}

input[type="file"]:hover::file-selector-button,
input[type="file"]:hover::-webkit-file-upload-button {
    border-color: rgba(216, 203, 255, 0.72);
    background:
        linear-gradient(180deg, rgba(70, 52, 123, 0.98), rgba(43, 33, 82, 0.98));
}

input[type="file"]:focus-visible {
    outline: none;
    border-color: var(--purple-strong);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.file-drop-zone {
    position: relative;
    display: grid;
    gap: 0.65rem;
    min-height: 5.5rem;
    padding: 0.9rem;
    border: 1px dashed rgba(167, 139, 250, 0.46);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(13, 16, 33, 0.94), rgba(7, 9, 18, 0.98));
    color: var(--text);
    cursor: pointer;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.file-drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    opacity: 0;
    cursor: pointer;
}

.file-drop-zone input[type="file"]::file-selector-button,
.file-drop-zone input[type="file"]::-webkit-file-upload-button {
    cursor: pointer;
}

.file-drop-zone:hover,
.file-drop-zone.is-dragging,
.file-drop-zone:focus-within {
    border-color: rgba(216, 203, 255, 0.76);
    background:
        linear-gradient(180deg, rgba(28, 22, 54, 0.96), rgba(12, 14, 30, 0.98));
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.14);
}

.file-drop-copy {
    pointer-events: none;
    display: grid;
    gap: 0.28rem;
}

.file-drop-copy strong {
    font-size: 0.95rem;
    color: #ffffff;
}

.file-drop-copy span {
    color: var(--muted-strong);
    font-size: 0.88rem;
}

.file-drop-list {
    pointer-events: none;
    display: grid;
    gap: 0.35rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.file-drop-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.42rem 0.55rem;
    border: 1px solid rgba(63, 52, 108, 0.9);
    border-radius: 7px;
    background: rgba(8, 10, 22, 0.82);
    color: var(--text);
    font-size: 0.88rem;
}

.file-drop-list span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-drop-list small {
    flex: 0 0 auto;
    color: var(--muted);
}

.board-search-row input:focus,
.board-search-row select:focus {
    outline: none;
    border-color: var(--purple-strong);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.category-filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.segmented-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.segmented-tabs .active {
    background: rgba(124, 92, 255, 0.28);
    border-color: rgba(167, 139, 250, 0.72);
    color: #ffffff;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.source-url-list {
    display: grid;
    gap: 0.65rem;
}

.source-url-row {
    display: grid;
    grid-template-columns: minmax(10rem, 15rem) minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.42);
}

.source-url-row label {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
}

.source-url-row label span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.source-url-row input {
    width: 100%;
    min-width: 0;
}

.empty-note {
    margin: 0;
    color: var(--muted);
}

.errorlist {
    margin: 0;
    padding: 0;
    color: var(--danger-text);
    list-style: none;
}

.primary-button,
.secondary-button,
.danger-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.45rem;
    padding: 0 0.85rem;
    border-radius: 8px;
    font-weight: 650;
    font-size: 0.92rem;
    line-height: 1;
    cursor: pointer;
}

.icon-text-button {
    gap: 0.4rem;
}

.icon-text-button svg,
.icon-only-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.icon-only-button {
    width: 2.45rem;
    min-width: 2.45rem;
    height: 2.45rem;
    min-height: 2.45rem;
    padding: 0;
}

.primary-button {
    width: fit-content;
    border: 1px solid rgba(167, 139, 250, 0.44);
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.22), rgba(139, 92, 246, 0.14)),
        rgba(17, 20, 38, 0.98);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 8px 24px rgba(0, 0, 0, 0.16);
}

.primary-button:hover {
    border-color: rgba(196, 181, 253, 0.72);
    background:
        linear-gradient(180deg, rgba(196, 181, 253, 0.26), rgba(139, 92, 246, 0.18)),
        rgba(20, 23, 43, 0.98);
    color: #fff;
}

.secondary-button {
    border: 1px solid rgba(184, 178, 207, 0.22);
    background: rgba(255, 255, 255, 0.025);
    color: var(--muted-strong);
}

.secondary-button:hover {
    border-color: rgba(184, 178, 207, 0.42);
    background: rgba(255, 255, 255, 0.055);
    color: var(--text);
}

.progress-button {
    --progress: 0%;
    position: relative;
    overflow: hidden;
    min-width: 5.7rem;
    isolation: isolate;
}

.progress-button-fill {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: var(--progress);
    background:
        linear-gradient(90deg, rgba(34, 197, 94, 0.34), rgba(167, 139, 250, 0.42));
    transition: width 180ms ease;
}

.progress-button-label {
    position: relative;
    z-index: 1;
}

.progress-button[data-state="loading"] {
    border-color: rgba(167, 139, 250, 0.6);
    color: #ffffff;
}

.progress-button[data-state="success"] {
    border-color: rgba(74, 222, 128, 0.68);
    color: #dcfce7;
}

.progress-button[data-state="error"] {
    border-color: rgba(248, 113, 113, 0.7);
    color: #ffe4e6;
}

.progress-button[data-state="error"] .progress-button-fill {
    background: linear-gradient(90deg, rgba(248, 113, 113, 0.34), rgba(251, 146, 60, 0.3));
}

.danger-link {
    min-height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #ffadc8;
}

.danger-link:hover {
    color: #ffd7e5;
}

.row-actions form {
    margin: 0;
}

.form-actions,
.row-actions,
.sort-actions,
.field-inline-actions,
.inline-action-form,
.inline-form,
.admin-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inline-action-form {
    margin: 0;
}

.sort-actions {
    gap: 0.35rem;
}

.continue-registration-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.45rem;
    margin-left: 0.15rem;
    padding: 0 0.7rem;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.58);
    color: var(--muted-strong);
    cursor: pointer;
    user-select: none;
}

.continue-registration-toggle input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.continue-registration-toggle strong {
    font-size: 0.88rem;
}

.toggle-track {
    position: relative;
    width: 2.5rem;
    height: 1.25rem;
    border: 1px solid rgba(196, 181, 253, 0.26);
    border-radius: 999px;
    background: rgba(4, 7, 18, 0.9);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.toggle-track span {
    position: absolute;
    top: 50%;
    left: 0.18rem;
    width: 0.84rem;
    height: 0.84rem;
    border-radius: 50%;
    background: rgba(214, 209, 232, 0.82);
    transform: translateY(-50%);
    transition: transform 0.2s ease, background 0.2s ease;
}

.continue-registration-toggle input:checked + .toggle-track {
    border-color: rgba(167, 139, 250, 0.74);
    background: linear-gradient(90deg, rgba(34, 211, 238, 0.3), rgba(139, 92, 246, 0.58));
}

.continue-registration-toggle input:checked + .toggle-track span {
    background: #fff;
    transform: translate(1.22rem, -50%);
}

.continue-registration-toggle:has(input:checked) {
    color: var(--text);
}

.icon-actions {
    gap: 0.4rem;
}

.sort-actions form {
    margin: 0;
}

.sort-button,
.icon-action-link,
.icon-action-button {
    display: inline-grid;
    place-items: center;
    width: 1.8rem;
    height: 1.8rem;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.13), rgba(139, 92, 246, 0.06)),
        rgba(17, 20, 38, 0.9);
    color: var(--purple-strong);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    cursor: pointer;
}

.icon-action-link {
    padding: 0;
}

.icon-action-button {
    padding: 0;
}

.sort-button:hover,
.icon-action-link:hover,
.icon-action-button:hover {
    border-color: rgba(196, 181, 253, 0.58);
    background:
        linear-gradient(180deg, rgba(196, 181, 253, 0.18), rgba(139, 92, 246, 0.1)),
        rgba(20, 23, 43, 0.98);
    color: var(--text);
}

.icon-action-button.danger {
    border-color: rgba(248, 113, 113, 0.28);
    color: #ffadc8;
}

.icon-action-button.danger:hover {
    border-color: rgba(248, 113, 113, 0.68);
    background: rgba(248, 113, 113, 0.12);
}

.sort-button svg,
.icon-action-link svg,
.icon-action-button svg {
    width: 1rem;
    height: 1rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.inline-form input {
    max-width: 320px;
}

.admin-filter {
    margin-bottom: 0.75rem;
}

.admin-filter input {
    max-width: 240px;
}

.admin-filter select {
    max-width: 220px;
}

.table-wrap {
    overflow-x: auto;
    scrollbar-color: rgba(167, 139, 250, 0.58) rgba(9, 12, 25, 0.96);
    scrollbar-width: thin;
}

.table-wrap::-webkit-scrollbar {
    height: 12px;
}

.table-wrap::-webkit-scrollbar-track {
    margin: 0.35rem 0;
    border: 1px solid rgba(167, 139, 250, 0.1);
    border-radius: 999px;
    background:
        linear-gradient(180deg, rgba(15, 19, 37, 0.96), rgba(7, 9, 18, 0.96));
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.table-wrap::-webkit-scrollbar-thumb {
    border: 3px solid rgba(9, 12, 25, 0.96);
    border-radius: 999px;
    background:
        linear-gradient(90deg, rgba(124, 58, 237, 0.52), rgba(196, 181, 253, 0.76));
    box-shadow: 0 0 14px rgba(139, 92, 246, 0.16);
}

.table-wrap::-webkit-scrollbar-thumb:hover {
    background:
        linear-gradient(90deg, rgba(139, 92, 246, 0.7), rgba(216, 203, 255, 0.86));
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.24);
}

.table-wrap::-webkit-scrollbar-corner {
    background: rgba(9, 12, 25, 0.96);
}

.admin-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    border-spacing: 0;
}

.board-table {
    min-width: 0;
    table-layout: fixed;
}

.board-table th,
.board-table td {
    text-align: center;
}

.board-table th:nth-child(1),
.board-table td:nth-child(1) {
    width: 4rem;
}

.board-table th:nth-child(2),
.board-table td:nth-child(2) {
    width: 9rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-table th:nth-child(4),
.board-table td:nth-child(4) {
    width: 6.75rem;
}

.board-table th:nth-child(5),
.board-table td:nth-child(5) {
    width: 6.5rem;
}

.board-table th:nth-child(3),
.board-table td:nth-child(3) {
    text-align: left;
    white-space: nowrap;
}

.note-table th:nth-child(4),
.note-table td:nth-child(4) {
    width: 5rem;
}

.note-table th:nth-child(5),
.note-table td:nth-child(5) {
    width: 6.5rem;
}

.note-table th:nth-child(6),
.note-table td:nth-child(6) {
    width: 6.75rem;
}

.info-note-table th:nth-child(4),
.info-note-table td:nth-child(4) {
    width: 6.5rem;
}

.info-note-table th:nth-child(5),
.info-note-table td:nth-child(5) {
    width: 6.75rem;
}

.board-title-link {
    position: relative;
    display: block;
    overflow: visible;
    max-width: 100%;
    color: var(--text);
    font-weight: 650;
}

.board-title-text {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-title-link:hover {
    color: #d8cbff;
}

.board-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding-top: 1rem;
}

.board-page-button {
    display: inline-grid;
    place-items: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.45rem;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.66);
    color: rgba(214, 209, 232, 0.72);
    font-size: 0.82rem;
    font-weight: 800;
}

.board-page-button:hover {
    border-color: rgba(196, 181, 253, 0.48);
    color: #fff;
}

.board-page-button.active {
    border-color: rgba(167, 139, 250, 0.72);
    background: rgba(139, 92, 246, 0.24);
    color: #fff;
}

.board-title-tooltip {
    position: fixed;
    z-index: 80;
    width: min(40rem, 72vw);
    max-height: 18rem;
    padding: 1rem 1.05rem;
    overflow-y: auto;
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.98);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
    color: var(--muted-strong);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.75;
    overflow-wrap: anywhere;
    overscroll-behavior: contain;
}

.board-title-tooltip section + section {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(167, 139, 250, 0.16);
}

.board-title-tooltip strong {
    display: block;
    margin-bottom: 0.35rem;
    color: #d8cbff;
    font-size: 0.78rem;
    font-weight: 800;
}

.board-title-tooltip p {
    margin: 0;
    white-space: pre-wrap;
}

.board-title-tooltip::-webkit-scrollbar {
    width: 8px;
}

.board-title-tooltip::-webkit-scrollbar-track {
    border-radius: 999px;
    background: rgba(7, 9, 18, 0.65);
}

.board-title-tooltip::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(167, 139, 250, 0.45);
}

.board-detail {
    display: grid;
    gap: 1rem;
}

.detail-actions {
    align-items: center;
}

.detail-actions form {
    margin: 0;
}

.detail-actions-bottom {
    justify-content: flex-end;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.danger-action {
    border-color: rgba(248, 113, 113, 0.34);
    color: #ffadc8;
}

.danger-action:hover {
    border-color: rgba(248, 113, 113, 0.62);
    background: rgba(248, 113, 113, 0.11);
    color: #ffd7e5;
}

.board-detail-head {
    display: grid;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.board-detail-head span {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 0.45rem;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(167, 139, 250, 0.28);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.12);
    color: #d8cbff;
    font-size: 0.78rem;
    font-weight: 750;
}

.board-detail-head h2 {
    margin: 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.board-detail-head dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    margin: 0;
}

.board-detail-head dl div {
    padding: 0.65rem;
    border: 1px solid rgba(167, 139, 250, 0.14);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.62);
}

.board-detail-head dt {
    color: var(--muted);
    font-size: 0.76rem;
}

.board-detail-head dd {
    margin: 0.2rem 0 0;
    color: var(--text);
    font-weight: 700;
}

.board-detail-section {
    display: grid;
    gap: 0.55rem;
}

.board-detail-section h3 {
    margin: 0;
    color: var(--muted-strong);
    font-size: 0.95rem;
}

.rich-text {
    min-height: 5rem;
    padding: 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.14);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.62);
    color: var(--muted-strong);
    font-weight: 400;
    line-height: 1.75;
    white-space: normal;
}

.rich-text-rendered :first-child {
    margin-top: 0;
}

.rich-text-rendered :last-child {
    margin-bottom: 0;
}

.rich-text-rendered a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    font-weight: 650;
}

.rich-text-rendered .wiki-keyword {
    color: #34d399;
    font-weight: 800;
    text-shadow: 0 0 12px rgba(16, 185, 129, 0.24);
}

.press-release-content [style] {
    background-color: transparent !important;
    color: inherit !important;
}

.press-release-content * {
    max-width: 100%;
}

.rich-text-rendered img,
.rich-editor-surface img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0.75rem 0;
    border-radius: 6px;
}

.rich-editor-surface img {
    cursor: nwse-resize;
}

.rich-text-rendered hr {
    height: 1px;
    margin: 1rem 0;
    border: 0;
    background: rgba(167, 139, 250, 0.28);
}

.rich-text-rendered blockquote {
    margin: 0.75rem 0;
    padding-left: 0.85rem;
    border-left: 3px solid rgba(167, 139, 250, 0.42);
    color: var(--muted);
}

.attachment-list {
    display: grid;
    gap: 0.45rem;
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

.attachment-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.52);
}

.attachment-list a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.attachment-list span {
    color: var(--muted);
    white-space: nowrap;
}

.rich-text-rendered table,
.rich-editor-surface table {
    width: 100%;
    margin: 0.75rem 0;
    border-collapse: collapse;
    table-layout: fixed;
}

.rich-text-rendered th,
.rich-text-rendered td,
.rich-editor-surface th,
.rich-editor-surface td {
    min-width: 4rem;
    min-height: 2.25rem;
    padding: 0.5rem;
    border: 1px solid rgba(167, 139, 250, 0.38);
    vertical-align: top;
}

.rich-text-rendered th,
.rich-editor-surface th {
    background: rgba(167, 139, 250, 0.12);
    font-weight: 700;
}

.editor-mode-row {
    display: grid;
    grid-template-columns: auto minmax(12rem, 18rem);
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.55rem;
}

.editor-mode-label {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
}

.editor-mode-select {
    width: 100%;
    min-height: 2.35rem;
    padding: 0 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background: #090c19;
    color: var(--text);
    outline: none;
}

.editor-mode-select:focus {
    border-color: rgba(196, 181, 253, 0.68);
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.rich-editor {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090c19;
}

.rich-editor[hidden],
.code-editor-hint[hidden],
textarea[hidden] {
    display: none;
}

.rich-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem;
    border-bottom: 1px solid var(--border);
    background: rgba(17, 20, 38, 0.92);
}

.toolbar-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.45rem;
    border-right: 1px solid rgba(167, 139, 250, 0.18);
}

.toolbar-group:last-child {
    border-right: 0;
}

.rich-editor-toolbar button,
.rich-editor-tablebar button,
.rich-editor-toolbar select,
.rich-editor-toolbar input[type="color"] {
    min-height: 2rem;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 6px;
    background: rgba(9, 12, 25, 0.95);
    color: var(--text);
}

.rich-editor-toolbar button,
.rich-editor-tablebar button {
    min-width: 2.35rem;
    padding: 0 0.55rem;
    cursor: pointer;
}

.rich-editor-toolbar .editor-icon-button {
    width: 2.25rem;
    min-width: 2.25rem;
    padding: 0;
    text-align: center;
}

.rich-editor-toolbar .align-left {
    text-align: left;
    padding-left: 0.45rem;
}

.rich-editor-toolbar .align-center {
    text-align: center;
}

.rich-editor-toolbar .align-right {
    text-align: right;
    padding-right: 0.45rem;
}

.rich-editor-toolbar select {
    width: 8rem;
    padding: 0 0.5rem;
}

.rich-editor-toolbar input[type="color"] {
    width: 2.4rem;
    padding: 0.2rem;
}

.rich-editor-toolbar button:hover,
.rich-editor-tablebar button:hover,
.rich-editor-toolbar select:focus,
.rich-editor-toolbar input[type="color"]:focus {
    border-color: rgba(196, 181, 253, 0.68);
}

.rich-editor-tablebar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem;
    border-bottom: 1px solid var(--border);
    background: rgba(12, 16, 31, 0.95);
}

.tablebar-label {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    margin-right: 0.25rem;
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.rich-editor-tablebar button {
    min-width: auto;
    padding: 0 0.65rem;
    color: var(--muted-strong);
}

.table-insert-control {
    position: relative;
}

.table-picker {
    position: absolute;
    top: calc(100% + 0.35rem);
    left: 0;
    z-index: 20;
    width: max-content;
    padding: 0.55rem;
    border: 1px solid rgba(167, 139, 250, 0.32);
    border-radius: 8px;
    background: #0b1020;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.32);
}

.table-picker[hidden] {
    display: none;
}

.table-picker-size {
    margin-bottom: 0.45rem;
    color: var(--muted-strong);
    font-size: 0.82rem;
    font-weight: 700;
}

.table-picker-grid {
    display: grid;
    grid-template-columns: repeat(10, 1rem);
    gap: 0.2rem;
}

.table-picker-grid button {
    width: 1rem;
    min-width: 1rem;
    height: 1rem;
    min-height: 1rem;
    padding: 0;
    border: 1px solid rgba(167, 139, 250, 0.36);
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.04);
}

.table-picker-grid button.active {
    border-color: #f97316;
    background: rgba(249, 115, 22, 0.22);
}

.image-resize-box {
    position: absolute;
    z-index: 18;
    pointer-events: none;
    border: 2px solid #93c5fd;
    border-radius: 6px;
    box-shadow: 0 0 0 1px rgba(9, 12, 25, 0.85);
}

.image-resize-box[hidden] {
    display: none;
}

.image-resize-handle {
    position: absolute;
    width: 0.7rem;
    height: 0.7rem;
    border: 2px solid #090c19;
    border-radius: 999px;
    background: #93c5fd;
    pointer-events: auto;
}

.image-resize-handle[data-resize-handle="nw"] {
    top: -0.45rem;
    left: -0.45rem;
    cursor: nwse-resize;
}

.image-resize-handle[data-resize-handle="ne"] {
    top: -0.45rem;
    right: -0.45rem;
    cursor: nesw-resize;
}

.image-resize-handle[data-resize-handle="sw"] {
    bottom: -0.45rem;
    left: -0.45rem;
    cursor: nesw-resize;
}

.image-resize-handle[data-resize-handle="se"] {
    right: -0.45rem;
    bottom: -0.45rem;
    cursor: nwse-resize;
}

.is-resizing-image {
    cursor: nwse-resize;
    user-select: none;
}

.rich-editor-surface {
    min-height: 17rem;
    padding: 0.85rem;
    color: var(--text);
    font-weight: 400;
    line-height: 1.75;
    outline: none;
}

.rich-editor-surface a {
    color: #93c5fd;
    text-decoration: underline;
    text-underline-offset: 0.18em;
    font-weight: 650;
}

.rich-editor-surface b,
.rich-editor-surface strong {
    font-weight: 700;
}

.rich-editor-surface td:focus,
.rich-editor-surface th:focus {
    outline: 2px solid rgba(147, 197, 253, 0.75);
    outline-offset: -2px;
}

.rich-editor-surface:focus {
    box-shadow: inset 0 0 0 2px rgba(139, 92, 246, 0.24);
}

.code-editor-hint {
    margin-bottom: 0.45rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.related-records-panel {
    margin-top: 0.75rem;
}

.related-records-table {
    min-width: 680px;
}

.related-records-table th,
.related-records-table td {
    text-align: center;
}

.related-records-table th:nth-child(1),
.related-records-table td:nth-child(1) {
    width: 9rem;
    text-align: left;
}

.related-records-table th:nth-child(2),
.related-records-table td:nth-child(2) {
    text-align: left;
}

.related-records-table th:nth-child(3),
.related-records-table td:nth-child(3),
.related-records-table th:nth-child(4),
.related-records-table td:nth-child(4) {
    width: 7rem;
}

.issue-table {
    min-width: 760px;
    table-layout: fixed;
}

.issue-table th,
.issue-table td {
    text-align: center;
}

.issue-table th:nth-child(1),
.issue-table td:nth-child(1) {
    width: 4rem;
}

.issue-table th:nth-child(2),
.issue-table td:nth-child(2) {
    width: 9rem;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.issue-table th:nth-child(3),
.issue-table td:nth-child(3) {
    text-align: left;
}

.issue-table th:nth-child(4),
.issue-table td:nth-child(4) {
    width: 5rem;
}

.issue-table th:nth-child(5),
.issue-table td:nth-child(5),
.issue-table th:nth-child(6),
.issue-table td:nth-child(6) {
    width: 7rem;
}

.issue-title-link {
    display: block;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.issue-comments-panel {
    margin-top: 0.75rem;
}

.issue-comment-list {
    display: grid;
    gap: 0.65rem;
}

.issue-comment {
    display: grid;
    gap: 0.45rem;
    padding: 0.75rem;
    border: 1px solid rgba(167, 139, 250, 0.14);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.62);
}

.issue-comment header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.issue-comment header > div:first-child {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
}

.issue-comment strong {
    color: var(--text);
    font-size: 0.9rem;
}

.issue-comment span {
    color: var(--muted);
    font-size: 0.78rem;
}

.issue-comment p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.7;
}

.issue-comment-form {
    margin-top: 0.9rem;
}

.comment-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
}

.comment-actions form {
    margin: 0;
}

.text-action-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--purple-strong);
    font: inherit;
    font-size: 0.8rem;
    font-weight: 800;
    cursor: pointer;
}

.text-action-button:hover {
    color: #fff;
    text-shadow: 0 0 12px rgba(196, 181, 253, 0.36);
}

.text-action-button.danger-action {
    color: #ffadc8;
}

.comment-edit-form,
.comment-reply-form {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.65rem;
}

.comment-edit-form[hidden] {
    display: none;
}

.comment-edit-form textarea,
.comment-reply-form textarea {
    width: 100%;
    min-height: 5.25rem;
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #090c19;
    color: var(--text);
    resize: vertical;
}

.issue-reply-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(167, 139, 250, 0.2);
}

.issue-reply {
    background: rgba(9, 12, 25, 0.42);
}

.delete-confirm-panel {
    display: grid;
    gap: 0.9rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(3, 6, 18, 0.72);
    backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
    display: none;
}

.confirm-modal {
    display: grid;
    gap: 0.9rem;
    width: min(100%, 520px);
    padding: 1rem;
    border: 1px solid rgba(196, 181, 253, 0.28);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.98), rgba(10, 13, 26, 0.98)),
        var(--surface);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.46);
}

.confirm-modal h2,
.confirm-modal p {
    margin: 0;
}

.confirm-modal h2 {
    font-size: 1.05rem;
}

.confirm-modal p {
    color: var(--muted);
    line-height: 1.6;
}

.delete-confirm-panel h2,
.delete-confirm-panel p {
    margin: 0;
}

.delete-confirm-panel p {
    color: var(--muted);
}

.confirm-summary {
    display: grid;
    gap: 0.55rem;
    margin: 0;
}

.confirm-summary div {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.65rem;
    border: 1px solid rgba(167, 139, 250, 0.14);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.62);
}

.confirm-summary dt {
    color: var(--muted);
}

.confirm-summary dd {
    margin: 0;
    color: var(--text);
    font-weight: 700;
}

.trash-table {
    min-width: 920px;
}

.trash-table th,
.trash-table td {
    text-align: center;
}

.trash-table th:nth-child(2),
.trash-table td:nth-child(2),
.trash-table th:nth-child(3),
.trash-table td:nth-child(3) {
    text-align: left;
}

.trash-dday {
    display: inline-flex;
    min-width: 3.6rem;
    justify-content: center;
    padding: 0.28rem 0.5rem;
    border: 1px solid rgba(248, 113, 113, 0.32);
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.08);
    color: #ffd7e5;
    font-weight: 800;
}

.method-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.method-card {
    display: grid;
    gap: 0.55rem;
    min-height: 10rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.92), rgba(10, 13, 26, 0.94)),
        var(--surface);
    color: var(--text);
}

.method-card.active:hover {
    border-color: rgba(196, 181, 253, 0.62);
    background:
        linear-gradient(180deg, rgba(31, 27, 56, 0.96), rgba(13, 16, 31, 0.96)),
        var(--surface);
}

.method-card.disabled {
    opacity: 0.55;
}

.method-icon {
    display: inline-grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid rgba(167, 139, 250, 0.32);
    border-radius: 8px;
    background: rgba(139, 92, 246, 0.11);
    color: var(--purple-strong);
}

.method-icon svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.method-card strong {
    font-size: 1rem;
    font-weight: 700;
}

.method-card small {
    color: var(--muted);
    line-height: 1.55;
}

.manual-entry-panel {
    max-width: 860px;
}

.paste-upload-zone {
    display: grid;
    place-items: center;
    gap: 0.35rem;
    min-height: 11rem;
    padding: 1rem;
    border: 1px dashed rgba(196, 181, 253, 0.48);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(26, 29, 52, 0.72), rgba(9, 12, 25, 0.82)),
        #090c19;
    color: var(--text);
    text-align: center;
    cursor: pointer;
}

.paste-upload-zone:focus,
.paste-upload-zone:hover {
    border-color: rgba(196, 181, 253, 0.82);
    background:
        linear-gradient(180deg, rgba(42, 36, 74, 0.82), rgba(12, 15, 30, 0.9)),
        #090c19;
}

.paste-upload-zone input {
    width: 1px;
    height: 1px;
    min-height: 0;
    padding: 0;
    opacity: 0;
    pointer-events: none;
}

.paste-upload-zone strong {
    font-size: 1rem;
}

.ocr-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
    gap: 0.6rem;
}

.ocr-preview-item {
    display: grid;
    gap: 0.35rem;
    padding: 0.45rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.72);
}

.ocr-preview-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
}

.ocr-preview-item span {
    overflow: hidden;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ocr-progress-panel {
    display: grid;
    gap: 0.55rem;
    padding: 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.72);
}

.ocr-progress-panel[hidden] {
    display: none;
}

.ocr-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.ocr-progress-head strong {
    color: var(--text);
    font-size: 0.9rem;
}

.ocr-progress-track {
    overflow: hidden;
    height: 0.7rem;
    border: 1px solid rgba(196, 181, 253, 0.26);
    border-radius: 999px;
    background: rgba(4, 7, 18, 0.92);
}

.ocr-progress-fill {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, rgba(34, 211, 238, 0.92), rgba(167, 139, 250, 0.98), rgba(244, 114, 182, 0.9));
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.38);
    transition: width 0.42s ease;
}

.sync-progress-panel {
    display: grid;
    gap: 0.55rem;
    width: 100%;
    padding: 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.82);
}

.sync-progress-panel[hidden],
.sync-progress-overlay[hidden] {
    display: none;
}

.sync-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.82rem;
}

.sync-progress-head strong {
    color: var(--text);
    font-size: 0.9rem;
}

.sync-progress-track {
    overflow: hidden;
    height: 0.7rem;
    border: 1px solid rgba(196, 181, 253, 0.26);
    border-radius: 999px;
    background: rgba(4, 7, 18, 0.92);
}

.sync-progress-fill {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background:
        linear-gradient(90deg, rgba(34, 211, 238, 0.92), rgba(167, 139, 250, 0.98), rgba(244, 114, 182, 0.9));
    box-shadow: 0 0 18px rgba(167, 139, 250, 0.38);
    animation: sync-progress-slide 1.1s ease-in-out infinite;
}

.sync-progress-overlay {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: center;
    padding: 1.5rem;
    background: rgba(4, 7, 18, 0.62);
    backdrop-filter: blur(6px);
}

.sync-progress-dialog {
    max-width: 34rem;
}

@keyframes sync-progress-slide {
    0% {
        transform: translateX(-115%);
    }
    50% {
        transform: translateX(45%);
    }
    100% {
        transform: translateX(240%);
    }
}

.field-inline-actions {
    margin-top: 0.25rem;
}

.inline-status {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 500;
    line-height: 1.45;
}

.inline-status[data-state="success"] {
    color: #86efac;
}

.inline-status[data-state="error"] {
    color: #fca5a5;
}

.wide-table {
    min-width: 920px;
}

.url-cell {
    max-width: 520px;
    overflow-wrap: anywhere;
    color: rgba(214, 209, 232, 0.72);
    font-size: 0.82rem;
}

.admin-table th,
.admin-table td {
    padding: 0.65rem 0.75rem;
    border-bottom: 0;
    text-align: left;
    vertical-align: middle;
}

.admin-table thead tr,
.admin-table tbody tr {
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 650;
}

.admin-table td {
    color: var(--muted-strong);
    font-size: 0.88rem;
}

.empty-cell {
    text-align: center;
    color: var(--muted);
}

.mini-badge {
    display: inline-flex;
    margin: 0 0.25rem 0.25rem 0;
    padding: 0.2rem 0.45rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 999px;
    color: var(--purple-strong);
    font-size: 0.78rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.status-badge.active {
    border: 1px solid rgba(74, 222, 128, 0.32);
    color: #86efac;
}

.status-badge.inactive {
    border: 1px solid rgba(248, 113, 113, 0.32);
    color: #fca5a5;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

.pagination a {
    color: var(--purple-strong);
    font-weight: 700;
}

.config-status {
    width: fit-content;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.config-status.on {
    border: 1px solid rgba(74, 222, 128, 0.32);
    color: #86efac;
}

.config-status.off {
    border: 1px solid rgba(248, 113, 113, 0.32);
    color: #fca5a5;
}

.config-status.danger {
    border: 1px solid rgba(248, 113, 113, 0.42);
    background: rgba(248, 113, 113, 0.08);
    color: #ffd7e5;
}

.config-list {
    display: grid;
    gap: 0.85rem;
}

.gpt-test-form {
    margin-top: 1rem;
}

.api-test-result {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.78);
}

.api-test-result.success {
    border-color: rgba(74, 222, 128, 0.28);
    background:
        linear-gradient(90deg, rgba(74, 222, 128, 0.08), rgba(139, 92, 246, 0.04)),
        rgba(9, 12, 25, 0.78);
}

.api-test-result.error {
    border-color: rgba(248, 113, 113, 0.3);
    background:
        linear-gradient(90deg, rgba(248, 113, 113, 0.09), rgba(139, 92, 246, 0.04)),
        rgba(9, 12, 25, 0.78);
}

.api-test-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.api-test-head strong {
    color: var(--text);
}

.api-test-head span {
    color: var(--muted);
    font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
    font-size: 0.82rem;
}

.api-test-result dl {
    display: grid;
    gap: 0.45rem;
    margin: 0;
}

.api-test-result dl div {
    display: grid;
    grid-template-columns: 6rem minmax(0, 1fr);
    gap: 0.75rem;
}

.api-test-result dt {
    color: var(--muted);
    font-size: 0.82rem;
}

.api-test-result dd {
    min-width: 0;
    margin: 0;
    color: var(--muted-strong);
    overflow-wrap: anywhere;
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.config-row:last-child {
    border-bottom: 0;
}

.config-row span {
    color: var(--muted);
}

.config-row strong {
    color: var(--text);
    text-align: right;
}

.code-block {
    overflow-x: auto;
    margin: 0.75rem 0 0;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #070a14;
    color: var(--muted-strong);
    line-height: 1.5;
}

.email-settings-grid {
    grid-template-columns: minmax(28rem, 1.25fr) minmax(24rem, 1fr);
    align-items: start;
}

.email-settings-form-panel,
.email-preview-panel {
    min-width: 0;
}

.email-settings-form-panel .form-grid {
    grid-template-columns: repeat(2, minmax(11rem, 1fr));
}

.email-settings-form-panel .field-block {
    min-width: 0;
}

.email-settings-form-panel .field-help,
.email-settings-form-panel .errorlist {
    overflow-wrap: anywhere;
}

.email-settings-form-panel .field-block input[type="checkbox"] {
    justify-self: start;
}

.email-settings-form-panel .form-actions {
    justify-content: flex-start;
}

.email-preview-panel .config-row {
    align-items: start;
}

.email-preview-panel .config-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
    text-align: left;
}

.email-preview-body {
    max-height: 34rem;
    overflow: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media (max-width: 1120px) {
    .email-settings-grid,
    .email-settings-form-panel .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .source-url-row {
        grid-template-columns: 1fr;
    }

    .field-label-row {
        align-items: stretch;
        flex-direction: column;
    }

    .app-shell {
        position: static;
        inset: auto;
        width: auto;
        height: auto;
        min-height: 100vh;
        display: block;
        overflow: visible;
    }

    .app-shell.sidebar-collapsed {
        display: block;
    }

    .sidebar {
        position: static;
        inset: auto;
        width: auto;
        height: auto;
        padding: 0.45rem 0.75rem 0.75rem;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .app-shell.sidebar-collapsed .sidebar {
        width: auto;
        padding: 0.45rem 0.75rem 0.75rem;
    }

    .app-shell.sidebar-collapsed .sidebar-header {
        display: flex;
        justify-items: initial;
        gap: 0.5rem;
        padding-bottom: 0.75rem;
    }

    .app-shell.sidebar-collapsed .brand {
        flex: 1;
        justify-content: flex-start;
        width: auto;
    }

    .app-shell.sidebar-collapsed .brand-mark {
        width: 2.75rem;
        height: 2.75rem;
        font-size: 1rem;
    }

    .app-shell.sidebar-collapsed .brand-text,
    .app-shell.sidebar-collapsed .nav-label,
    .app-shell.sidebar-collapsed .logout-label,
    .app-shell.sidebar-collapsed .user-meta,
    .app-shell.sidebar-collapsed .security-chip {
        display: block;
    }

    .app-shell.sidebar-collapsed .icon-button,
    .app-shell.sidebar-collapsed .nav-link,
    .app-shell.sidebar-collapsed .logout-link {
        width: auto;
        height: auto;
        min-height: 2.5rem;
        padding: 0.55rem 0.65rem;
        justify-content: center;
    }

    .nav-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sidebar-footer {
        position: static;
        grid-template-columns: 1fr;
        align-items: center;
        background: transparent;
    }

    .app-shell.sidebar-collapsed .user-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        place-items: initial;
        width: 100%;
        height: auto;
        min-height: 3.25rem;
        padding: 0.45rem 0.55rem;
    }

    .app-shell.sidebar-collapsed .user-popover {
        left: 0;
        right: auto;
        bottom: calc(100% + 0.5rem);
    }

    .content {
        grid-column: auto;
        height: auto;
        padding: 1.5rem 1rem;
        overflow: visible;
    }

    .menu-grid,
    .search-row,
    .admin-stat-grid,
    .admin-grid,
    .device-ip-grid,
    .method-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .search-hero {
        min-height: 42vh;
        padding: 2rem 0 2rem;
    }

    .news-panel-head {
        display: grid;
        align-items: start;
    }

    .news-panel-actions {
        justify-content: space-between;
    }

    .news-row {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.35rem 0.75rem;
        min-height: auto;
        padding: 0.75rem 0.2rem;
    }

    .news-source,
    .news-time {
        font-size: 0.72rem;
    }

    .news-title {
        grid-column: 1 / -1;
        white-space: normal;
    }

    .device-alert {
        grid-template-columns: 1fr;
    }

    .device-alert p {
        grid-column: auto;
    }

    .search-history-panel {
        left: 0.65rem;
        right: 0.65rem;
    }

    .search-history-toggle-row,
    .search-hero-results .search-history-toggle-row {
        justify-content: center;
        margin-top: 0.1rem;
    }

    .search-form button {
        width: 100%;
    }
}

@media (max-width: 420px) {
    .login-card {
        padding: 1.5rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .sidebar-footer {
        grid-template-columns: 1fr;
    }
}
.page-subtitle {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.94rem;
}

.research-tabs {
    display: flex;
    gap: 8px;
    align-items: center;
    overflow-x: auto;
    margin: 0 0 16px;
    padding: 7px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.86), rgba(7, 9, 18, 0.82)),
        var(--surface);
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.research-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 14px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(31, 34, 58, 0.78), rgba(14, 17, 34, 0.74)),
        var(--surface);
    color: var(--muted-strong);
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.research-tabs a:hover {
    border-color: rgba(196, 181, 253, 0.48);
    background:
        linear-gradient(180deg, rgba(43, 38, 78, 0.84), rgba(18, 20, 40, 0.78)),
        var(--surface-strong);
    color: var(--text);
}

.research-tabs a span {
    min-width: 24px;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    background: rgba(7, 9, 18, 0.56);
    color: var(--muted);
    font-size: 0.78rem;
    text-align: center;
}

.research-tabs a.active {
    border-color: rgba(196, 181, 253, 0.72);
    background:
        linear-gradient(180deg, rgba(139, 92, 246, 0.34), rgba(80, 38, 124, 0.44)),
        var(--surface-strong);
    color: #fff;
    box-shadow:
        inset 0 -3px 0 rgba(196, 181, 253, 0.92),
        0 10px 28px rgba(139, 92, 246, 0.18);
}

.research-tabs a.active span {
    border-color: rgba(216, 203, 255, 0.44);
    background: rgba(244, 241, 255, 0.14);
    color: #f4f1ff;
}

.research-filter-grid,
.research-form-layout,
.research-graph-layout,
.research-note-field-grid {
    display: grid;
    gap: 16px;
}

.research-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 16px;
}

.research-form-layout {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
    align-items: start;
}

.research-form-main,
.research-form-side {
    display: grid;
    gap: 16px;
}

.research-form-side {
    position: sticky;
    top: 16px;
    padding: 16px;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.96), rgba(9, 12, 25, 0.96)),
        var(--surface);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

.research-rich-editor .rich-editor-surface {
    min-height: 320px;
}

.research-ai-keywords {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    background: rgba(12, 14, 28, 0.62);
}

.research-ai-keyword-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.research-ai-keyword-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.research-keyword-chip {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid rgba(196, 181, 253, 0.34);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.14);
    color: #efe8ff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 800;
    cursor: pointer;
}

.research-keyword-chip:hover,
.research-keyword-chip:focus-visible {
    border-color: rgba(216, 203, 255, 0.78);
    background: rgba(139, 92, 246, 0.26);
    outline: none;
}

.research-keyword-chip.is-applied {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.14);
    color: #dcfce7;
}

.research-visibility-field {
    max-width: 560px;
}

.visibility-slider {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    min-height: 54px;
    padding: 5px;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 999px;
    background: rgba(7, 9, 18, 0.72);
    cursor: pointer;
    overflow: hidden;
}

.visibility-slider input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.visibility-slider-track {
    position: absolute;
    inset: 5px auto 5px 5px;
    width: calc(50% - 5px);
    border-radius: 999px;
    border: 1px solid rgba(196, 181, 253, 0.38);
    background:
        linear-gradient(180deg, rgba(71, 85, 105, 0.72), rgba(30, 41, 59, 0.74)),
        var(--surface-strong);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.visibility-slider input:checked + .visibility-slider-track {
    transform: translateX(100%);
    border-color: rgba(196, 181, 253, 0.62);
    background:
        linear-gradient(180deg, rgba(139, 92, 246, 0.72), rgba(80, 38, 124, 0.78)),
        var(--surface-strong);
}

.visibility-slider-label {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 2px;
    color: var(--muted);
    font-weight: 800;
    line-height: 1.15;
}

.visibility-slider-label small {
    color: inherit;
    font-size: 0.72rem;
    font-weight: 700;
}

.visibility-slider input:not(:checked) ~ .visibility-slider-label.private,
.visibility-slider input:checked ~ .visibility-slider-label.shared {
    color: #fff;
}

.research-note-meta-line,
.research-tag-row,
.table-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.research-note-meta-line {
    margin-top: 8px;
}

.note-badge,
.research-tag-row span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.2;
}

.research-tag-row span {
    border: 1px solid rgba(167, 139, 250, 0.24);
    background: rgba(139, 92, 246, 0.12);
    color: var(--muted-strong);
}

.note-badge.visibility-private {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(100, 116, 139, 0.18);
    color: #d6dce8;
}

.note-badge.visibility-shared {
    border: 1px solid rgba(196, 181, 253, 0.42);
    background: rgba(139, 92, 246, 0.2);
    color: #eadfff;
}

.note-badge.visibility-group {
    border: 1px solid rgba(96, 165, 250, 0.38);
    background: rgba(37, 99, 235, 0.18);
    color: #bfdbfe;
}

.note-badge.visibility-public {
    border: 1px solid rgba(216, 180, 254, 0.42);
    background: rgba(109, 40, 217, 0.24);
    color: #f3e8ff;
}

.note-badge.uncertainty-confirmed {
    border: 1px solid rgba(34, 197, 94, 0.34);
    background: rgba(22, 163, 74, 0.18);
    color: #bbf7d0;
}

.note-badge.uncertainty-needs_review {
    border: 1px solid rgba(234, 179, 8, 0.38);
    background: rgba(202, 138, 4, 0.16);
    color: #fef08a;
}

.note-badge.uncertainty-needs_official_interpretation {
    border: 1px solid rgba(249, 115, 22, 0.42);
    background: rgba(234, 88, 12, 0.16);
    color: #fed7aa;
}

.note-badge.status-draft,
.note-badge.status-archived {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: rgba(71, 85, 105, 0.18);
    color: #cbd5e1;
}

.note-badge.status-published {
    border: 1px solid rgba(34, 197, 94, 0.34);
    background: rgba(22, 163, 74, 0.18);
    color: #bbf7d0;
}

.note-badge.status-review_requested {
    border: 1px solid rgba(129, 140, 248, 0.4);
    background: rgba(79, 70, 229, 0.18);
    color: #c7d2fe;
}

.note-badge.status-rejected {
    border: 1px solid rgba(248, 113, 113, 0.42);
    background: rgba(185, 28, 28, 0.18);
    color: #fecaca;
}

.research-note-table th:nth-child(3),
.research-note-table td:nth-child(3) {
    min-width: 320px;
}

.research-note-table th:nth-child(4),
.research-note-table td:nth-child(4) {
    width: 6.25rem;
}

.research-note-table th:nth-child(5),
.research-note-table td:nth-child(5) {
    width: 6.5rem;
}

.research-note-table th:nth-child(6),
.research-note-table td:nth-child(6) {
    width: 6.5rem;
}

.research-note-table th:nth-child(7),
.research-note-table td:nth-child(7) {
    width: 6.75rem;
}

.research-note-field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 18px 0;
}

.research-note-field-grid > div {
    padding: 14px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.86), rgba(9, 12, 25, 0.9)),
        var(--surface);
}

.research-note-field-grid h3,
.research-graph-detail h3 {
    margin: 0 0 8px;
    color: var(--text);
    font-size: 0.92rem;
}

.research-note-field-grid p {
    margin: 0;
    color: var(--muted-strong);
    line-height: 1.7;
}

.research-link-list {
    display: grid;
    gap: 8px;
    margin: 0;
    padding-left: 18px;
}

.research-admin-actions {
    display: grid;
    gap: 12px;
}

.research-admin-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 16px;
}

.research-admin-head h3 {
    margin: 0;
}

.research-admin-head span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 650;
}

.research-admin-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.55fr);
    gap: 12px;
}

.research-admin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 78px;
    padding: 14px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.82), rgba(9, 12, 25, 0.88)),
        var(--surface);
}

.research-admin-card.is-danger {
    border-color: rgba(248, 113, 113, 0.22);
    background:
        linear-gradient(180deg, rgba(46, 16, 28, 0.48), rgba(12, 15, 30, 0.88)),
        var(--surface);
}

.research-admin-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.research-admin-copy strong {
    color: var(--text);
    font-size: 0.94rem;
}

.research-admin-copy span {
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
}

.research-admin-control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.research-admin-control select {
    min-width: 180px;
    min-height: 2.45rem;
    padding: 0 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.3);
    border-radius: 8px;
    background: #090c19;
    color: var(--text);
    font: inherit;
    font-size: 0.9rem;
}

.research-admin-control select:focus {
    border-color: rgba(196, 181, 253, 0.62);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.research-graph-shell {
    min-height: 620px;
}

.research-graph-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.research-graph-toolbar input[type="search"] {
    max-width: 280px;
    border: 1px solid rgba(167, 139, 250, 0.28);
    background: rgba(9, 12, 25, 0.92);
    color: #f4f1ff;
    color-scheme: dark;
}

.research-graph-toolbar input[type="search"]::placeholder {
    color: rgba(216, 203, 255, 0.58);
}

.research-graph-toolbar input[type="search"]:focus {
    border-color: rgba(196, 181, 253, 0.7);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.research-graph-controls {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.graph-background-select {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid rgba(167, 139, 250, 0.22);
    border-radius: 8px;
    background: rgba(18, 21, 38, 0.78);
    color: #d8cbff;
    font-size: 0.85rem;
    font-weight: 750;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.graph-background-select select {
    min-width: 8.5rem;
    height: 30px;
    border: 1px solid rgba(167, 139, 250, 0.34);
    border-radius: 7px;
    background: #111427;
    color: #f4f1ff;
    color-scheme: dark;
    font-weight: 750;
}

.graph-background-select select option {
    background: #111427;
    color: #f4f1ff;
}

.graph-glass-toggle {
    min-height: 38px;
    border-color: rgba(167, 139, 250, 0.28);
    background: rgba(18, 21, 38, 0.78);
}

.research-graph-layout {
    grid-template-columns: minmax(0, 1fr) 280px;
}

#researchGraphCanvas {
    width: 100%;
    height: 640px;
    border: 1px solid rgba(129, 102, 214, 0.28);
    border-radius: 8px;
    background:
        radial-gradient(ellipse at 52% 47%, rgba(167, 139, 250, 0.2), transparent 17rem),
        radial-gradient(ellipse at 34% 34%, rgba(76, 29, 149, 0.22), transparent 14rem),
        radial-gradient(ellipse at 68% 62%, rgba(59, 130, 246, 0.08), transparent 18rem),
        linear-gradient(180deg, #121523 0%, #0c1020 54%, #070a14 100%);
    cursor: move;
    touch-action: none;
}

.research-graph-detail {
    min-height: 640px;
    padding: 16px;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(20, 23, 43, 0.96), rgba(9, 12, 25, 0.96)),
        var(--surface);
}

.research-graph-detail strong {
    display: block;
    margin-bottom: 8px;
    color: var(--purple-strong);
    font-size: 1.05rem;
}

.research-graph-detail dl {
    display: grid;
    gap: 8px;
    margin: 12px 0;
}

.research-graph-detail dl div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(167, 139, 250, 0.14);
    padding-bottom: 6px;
}

.research-graph-detail ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.research-graph-detail li {
    display: grid;
    gap: 3px;
}

.research-graph-detail li span {
    color: var(--muted);
    font-size: 0.82rem;
}

.research-version-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.research-version-list {
    display: grid;
    gap: 8px;
    margin: 12px 0 0;
    padding-left: 0;
    list-style: none;
}

.research-version-list li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    color: var(--muted);
}

.research-version-list strong {
    color: var(--text);
}

.research-version-meta {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.research-version-meta div {
    display: grid;
    gap: 6px;
    padding: 12px;
    border: 1px solid rgba(167, 139, 250, 0.18);
    border-radius: 8px;
    background: rgba(9, 12, 25, 0.48);
}

.research-version-meta span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.revision-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.revision-legend span {
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 800;
}

.revision-legend .deleted,
.revision-line.deleted {
    color: #fecaca;
    background: rgba(185, 28, 28, 0.18);
}

.revision-legend .added,
.revision-line.added {
    color: #bfdbfe;
    background: rgba(37, 99, 235, 0.18);
}

.revision-legend .equal {
    color: var(--muted);
    background: rgba(148, 163, 184, 0.12);
}

.revision-diff {
    display: grid;
    gap: 3px;
    padding: 12px;
    border: 1px solid rgba(167, 139, 250, 0.16);
    border-radius: 8px;
    background: rgba(5, 7, 16, 0.72);
}

.revision-line {
    min-height: 1.55rem;
    padding: 4px 8px;
    border-radius: 5px;
    white-space: pre-wrap;
    line-height: 1.5;
}

.revision-line.equal {
    color: var(--text);
    background: rgba(255, 255, 255, 0.018);
}

.danger-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(248, 113, 113, 0.38);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(127, 29, 29, 0.4), rgba(69, 10, 10, 0.34));
    color: #fecaca;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.danger-button.compact-button {
    min-height: 34px;
    padding: 6px 12px;
}

.text-button {
    border: 0;
    background: transparent;
    color: var(--purple-strong);
    font-weight: 800;
    cursor: pointer;
}

.comments-panel,
.comment-list {
    display: grid;
    gap: 14px;
}

.comments-panel .comment-form {
    display: grid;
    gap: 12px;
}

.comments-panel .comment-form textarea {
    width: 100%;
    min-height: 5.25rem;
    padding: 0.85rem;
    border: 1px solid rgba(167, 139, 250, 0.24);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(9, 12, 25, 0.96), rgba(7, 9, 18, 0.96)),
        var(--surface);
    color: var(--text);
    caret-color: var(--purple-strong);
    line-height: 1.55;
    resize: vertical;
}

.comments-panel .comment-form textarea::placeholder {
    color: rgba(216, 209, 232, 0.62);
}

.comments-panel .comment-form textarea:focus {
    border-color: rgba(196, 181, 253, 0.62);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16);
}

.comment-item {
    padding: 14px;
    border: 1px solid rgba(167, 139, 250, 0.2);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(17, 20, 38, 0.88), rgba(9, 12, 25, 0.9)),
        var(--surface);
}

.comment-item.reply {
    margin-top: 10px;
    margin-left: 22px;
    background: rgba(7, 9, 18, 0.42);
}

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

.comment-item header span {
    color: var(--muted);
    font-size: 0.82rem;
}

.comment-item p {
    margin: 0 0 8px;
    color: var(--muted-strong);
    line-height: 1.65;
}

@media (max-width: 980px) {
    .research-form-layout,
    .research-graph-layout,
    .research-note-field-grid,
    .research-admin-grid {
        grid-template-columns: 1fr;
    }

    .research-form-side {
        position: static;
    }

    .research-admin-card {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .research-admin-control {
        display: grid;
        align-items: stretch;
    }

    .research-admin-control select {
        width: 100%;
    }

    .research-graph-detail,
    #researchGraphCanvas {
        min-height: 360px;
        height: 420px;
    }
}
