:root {
    --bg: #f6f4ef;
    --surface: #fffdf8;
    --surface-strong: #ffffff;
    --ink: #202124;
    --muted: #68635b;
    --line: #ded8cc;
    --accent: #1f6f5b;
    --accent-strong: #155245;
    --warm: #d66b2c;
    --error: #b3261e;
    --success: #146c43;
    --shadow: 0 18px 48px rgba(39, 35, 27, 0.12);
    --radius: 8px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(180deg, rgba(31,111,91,.10), transparent 340px),
        var(--bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", Arial, sans-serif;
    line-height: 1.6;
}

a {
    color: inherit;
}

.skip-link {
    position: absolute;
    left: 16px;
    top: -48px;
    z-index: 10;
    background: var(--ink);
    color: #fff;
    padding: 8px 12px;
    border-radius: 4px;
}

.skip-link:focus {
    top: 12px;
}

.navbar {
    width: min(1040px, calc(100% - 32px));
    margin: 18px auto 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border: 1px solid rgba(222, 216, 204, .9);
    background: rgba(255, 253, 248, .86);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
}

.brand {
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
}

.nav-actions {
    display: flex;
    gap: 14px;
    color: var(--muted);
    font-size: 14px;
}

.nav-actions a {
    text-decoration: none;
}

.page {
    width: min(1040px, calc(100% - 32px));
    margin: 32px auto;
}

.login-shell {
    min-height: 68vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    align-items: center;
    gap: 48px;
}

.login-copy h1,
.dashboard-head h1 {
    margin: 0;
    font-size: clamp(34px, 7vw, 68px);
    line-height: 1.03;
    letter-spacing: 0;
}

.login-copy p:not(.eyebrow) {
    max-width: 560px;
    color: var(--muted);
    font-size: 18px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.login-panel {
    padding: 24px;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.panel-head h2 {
    margin: 0;
    font-size: 18px;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--accent);
    box-shadow: 0 0 0 6px rgba(31, 111, 91, .12);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-strong);
    color: var(--ink);
    font: inherit;
}

input:focus,
button:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(31, 111, 91, .28);
    outline-offset: 2px;
}

.btn,
button {
    min-height: 40px;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 9px 14px;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    text-decoration: none;
    transition: transform .18s var(--ease), background-color .18s var(--ease), border-color .18s var(--ease);
}

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

.btn:disabled,
button:disabled {
    cursor: not-allowed;
    opacity: .62;
    transform: none;
}

.primary {
    width: 100%;
    margin-top: 16px;
    background: var(--accent);
    color: #fff;
}

.primary:hover {
    background: var(--accent-strong);
}

.secondary,
.copy-btn {
    width: auto;
    margin: 0;
    background: #f1ece3;
    color: var(--ink);
    border-color: var(--line);
}

.info-row .primary {
    width: auto;
    margin: 0;
}

.alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 6px;
    font-weight: 700;
}

.alert.error {
    background: #fce8e6;
    color: var(--error);
}

.alert.success {
    background: #e8f5ee;
    color: var(--success);
}

.dashboard {
    display: grid;
    gap: 18px;
}

.dashboard-head {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 20px;
}

.badge {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(31, 111, 91, .12);
    color: var(--accent-strong);
    font-weight: 800;
    white-space: nowrap;
}

.tabs {
    display: inline-flex;
    width: fit-content;
    padding: 4px;
    gap: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.52);
}

.tab-btn {
    background: transparent;
    color: var(--muted);
}

.tab-btn.active {
    background: var(--ink);
    color: #fff;
}

.tab-content {
    display: none;
}

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

.dashboard .panel {
    padding: 22px;
}

.notice {
    display: flex;
    gap: 12px;
    padding: 14px;
    border-left: 4px solid var(--warm);
    background: #fff5ec;
    border-radius: 6px;
    color: #5d4030;
}

.empty-state {
    padding: 48px 12px 32px;
    text-align: center;
}

.empty-state h2 {
    margin: 0 0 8px;
}

.empty-state p {
    margin: 0 auto 8px;
    color: var(--muted);
}

.info-table {
    margin-top: 18px;
    display: grid;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.info-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    min-height: 58px;
    padding: 12px 14px;
    background: var(--surface-strong);
    border-bottom: 1px solid var(--line);
}

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

.info-row span {
    color: var(--muted);
    font-weight: 800;
}

.info-row strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.credential-value {
    color: #c62828;
    font-weight: 900;
}

.compact .info-row {
    grid-template-columns: 120px minmax(0, 1fr);
}

.verification-box {
    margin-top: 22px;
}

.verification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.verification-head h2 {
    margin: 0;
    font-size: 18px;
}

.warning {
    margin: 10px 0 14px;
    color: var(--warm);
    font-weight: 700;
}

.empty-line,
.code-item {
    padding: 14px;
    border: 1px dashed var(--line);
    border-radius: 6px;
    background: rgba(255,255,255,.55);
}

.code-item {
    display: flex;
    justify-content: space-between;
    border-style: solid;
}

.not-found {
    padding: 40px;
    text-align: center;
}

.not-found .primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
}

.footer {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto 24px;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

@media (max-width: 760px) {
    .login-shell {
        grid-template-columns: 1fr;
        gap: 24px;
        align-items: stretch;
    }

    .dashboard-head {
        align-items: start;
        flex-direction: column;
    }

    .tabs {
        width: 100%;
    }

    .tab-btn {
        flex: 1;
    }

    .info-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .info-row .btn,
    .info-row .copy-btn,
    .verification-head .btn {
        width: 100%;
    }

    .verification-head {
        align-items: stretch;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
