:root {
    --blue: #1a56db;
    --blue-light: #eff4ff;
    --blue-mid: #c7d7fd;
    --blue-dark: #1e40af;
    --text: #0f172a;
    --text-mid: #475569;
    --text-dim: #94a3b8;
    --border: #e2e8f0;
    --white: #ffffff;
    --live: #16a34a;
    --live-bg: #f0fdf4;
    --live-border: #bbf7d0;
    --inactive: #ef4444;
    --inactive-bg: #fff1f2;
    --inactive-border: #fecdd3;
}

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

body {
    background: linear-gradient(180deg, #f5f8ff 0%, #ffffff 24%, #ffffff 100%);
    color: var(--text);
    font-family: "Plus Jakarta Sans", sans-serif;
    min-height: 100vh;
}

body.is-locked {
    overflow-x: hidden;
}

.main-wrap {
    position: relative;
}

body.is-locked .main {
    filter: blur(20px);
    opacity: 0.35;
    pointer-events: none;
    user-select: none;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.access-gate {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    background: rgba(248, 250, 255, 0.12);
    z-index: 300;
}

body:not(.is-locked) .access-gate {
    display: none;
}

.access-card {
    width: min(100%, 440px);
    padding: 32px;
    border-radius: 24px;
    border: 1px solid rgba(199, 215, 253, 0.9);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(16px);
}

.access-kicker {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--blue-light);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.access-title {
    margin-top: 16px;
    font-size: clamp(28px, 5vw, 38px);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.access-copy {
    margin-top: 12px;
    color: var(--text-mid);
    font-size: 15px;
    line-height: 1.6;
}

.access-label {
    display: block;
    margin-top: 24px;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
}

.access-input {
    width: 100%;
    height: 56px;
    padding: 0 16px;
    border: 1px solid var(--blue-mid);
    border-radius: 14px;
    background: #fff;
    color: var(--text);
    font-family: "JetBrains Mono", monospace;
    font-size: 20px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.access-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(26, 86, 219, 0.12);
}

.access-button {
    width: 100%;
    height: 56px;
    margin-top: 14px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-dark) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.access-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(30, 64, 175, 0.24);
}

.access-error {
    min-height: 20px;
    margin-top: 12px;
    color: var(--inactive);
    font-size: 13px;
    font-weight: 600;
}

.access-card.is-error {
    animation: shake 0.22s ease-in-out 2;
}

@keyframes shake {
    0%,
    100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-6px);
    }
    75% {
        transform: translateX(6px);
    }
}


.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 56px;
    height: 76px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-dot {
    width: 34px;
    height: 34px;
    background: var(--blue);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.brand-dot svg {
    width: 16px;
    height: 16px;
    fill: white;
}

.brand-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.02em;
}

.brand-name span {
    color: var(--blue);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.live-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--live-bg);
    border: 1px solid var(--live-border);
    color: var(--live);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
}

.live-dot {
    width: 6px;
    height: 6px;
    background: var(--live);
    border-radius: 50%;
    animation: blink 1.5s ease-in-out infinite;
}

@keyframes blink {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.2;
    }
}

.server-time {
    font-size: 13px;
    color: var(--text-dim);
    font-family: "JetBrains Mono", monospace;
}

.hero {
    background: linear-gradient(135deg, #f8faff 0%, #eef2ff 50%, #f0f7ff 100%);
    border-bottom: 1px solid var(--border);
    min-height: 30vh;
    padding: 56px 56px 40px;
    display: flex;
    align-items: center;
}

.hero-inner {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.greeting-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--white);
    border: 1px solid var(--blue-mid);
    color: var(--blue);
    font-size: 13px;
    font-weight: 600;
    padding: 7px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

h1 {
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text);
    margin-bottom: 12px;
}

h1 span {
    color: var(--blue);
}

.hero-sub {
    font-size: 16px;
    color: var(--text-mid);
    font-weight: 400;
    line-height: 1.6;
    max-width: 760px;
}

.stats-row {
    display: flex;
    gap: 14px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.stat {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 200px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.stat-icon.green {
    background: var(--live-bg);
}

.stat-icon.blue {
    background: var(--blue-light);
}

.stat-icon.red {
    background: var(--inactive-bg);
}

.stat-num {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.03em;
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-dim);
    margin-top: 2px;
    font-weight: 500;
}

.main {
    min-height: 65vh;
    max-width: 1380px;
    margin: 0 auto;
    padding: 52px 56px 48px;
}

.grid {
    display: grid;
    grid-template-columns: minmax(280px, 0.82fr) minmax(440px, 1.18fr);
    gap: 28px;
}

@media (max-width: 640px) {
    .access-card {
        padding: 26px 22px;
        border-radius: 20px;
    }

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

    .topbar {
        padding: 0 20px;
        height: 68px;
    }

    .hero {
        padding: 48px 20px 40px;
        min-height: auto;
    }

    .main {
        padding: 24px 20px 60px;
        min-height: auto;
    }

    .footer-shell {
        padding: 0 20px 60px;
    }

    .stats-row {
        flex-wrap: wrap;
    }

    .server-time {
        display: none;
    }
}

.panel {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.03);
}

.panel-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fafbff;
}

.panel-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.panel-filter {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-select {
    padding: 8px 12px;
    font-size: 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text);
    font-family: inherit;
}

.count-badge {
    background: var(--blue-light);
    color: var(--blue);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
}

.count-badge.grey {
    background: #f1f5f9;
    color: var(--text-dim);
}

.panel-body {
    min-height: 300px;
    overflow-y: auto;
    max-height: 760px;
}

.panel-body::-webkit-scrollbar {
    width: 4px;
}

.panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.panel-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.code-item {
    padding: 18px 28px;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.15s;
    animation: slideIn 0.3s ease;
    border-left: 3px solid transparent;
}

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

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

.code-item:hover {
    background: #f8faff;
}

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

.code-item.live-item {
    border-left: 3px solid #16a34a;
}

.code-item.inactive-item {
    border-left: 3px solid #ef4444;
}

.code-item.inactive-item .code-value {
    color: var(--text-dim);
    text-decoration: line-through;
}

.code-item.archived-only {
    border-left: 3px solid var(--border);
}

.code-item.archived-only .code-value {
    color: var(--text-dim);
    text-decoration: none;
}

.code-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.indicator {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.indicator.live {
    background: var(--live);
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
    animation: blink 2s ease-in-out infinite;
}

.indicator.archived {
    background: var(--text-dim);
}

.indicator.inactive {
    background: var(--inactive);
}

.code-value {
    font-family: "JetBrains Mono", monospace;
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    letter-spacing: 0.08em;
}

.code-item:hover .code-value {
    color: var(--blue);
}

.code-item.inactive-item:hover .code-value {
    color: var(--inactive);
}

.code-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.code-age {
    font-size: 12px;
    color: var(--text-dim);
    font-family: "JetBrains Mono", monospace;
}

.copy-btn {
    background: var(--blue-light);
    border: none;
    color: var(--blue);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
}

.copy-btn:hover {
    background: var(--blue);
    color: white;
}

.copy-btn.copied {
    background: var(--live-bg);
    color: var(--live);
}

.inactive-btn {
    background: var(--inactive-bg);
    border: 1px solid var(--inactive-border);
    color: var(--inactive);
    font-family: "Plus Jakarta Sans", sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.15s;
}

.inactive-btn:hover {
    background: var(--inactive);
    color: white;
}

.inactive-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.more-label {
    text-align: center;
    padding: 16px;
    font-size: 13px;
    color: var(--text-dim);
    border-top: 1px solid var(--border);
    background: #fafbff;
}

.empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 240px;
    gap: 10px;
}

.empty-icon {
    font-size: 36px;
    opacity: 0.25;
}

.empty-text {
    font-size: 15px;
    color: var(--text-dim);
    font-weight: 500;
}

.footer {
    margin-top: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-shell {
    max-width: 1380px;
    margin: 0 auto;
    padding: 0 56px 96px;
}

.footer-text {
    font-size: 13px;
    color: var(--text-dim);
}

.footer-text-spaced {
    margin-bottom: 4px;
}

.refresh-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-dim);
}

.refresh-bar {
    width: 72px;
    height: 4px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.refresh-fill {
    height: 100%;
    background: var(--blue);
    border-radius: 3px;
    animation: refill 30s linear infinite;
}

@keyframes refill {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}

.decom-text {
    color: red;
    font-weight: bold;
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.6;
    animation: slow-blink 15s infinite;
}

@keyframes slow-blink {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}
