:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel-2: #1f2937;
    --line: #334155;
    --text: #e5e7eb;
    --muted: #94a3b8;
    --accent: #22c55e;
    --accent-2: #38bdf8;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 20px 35px rgba(0, 0, 0, 0.35);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 24px;
    font-family: Inter, Pretendard, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, #020617 0%, var(--bg) 100%);
    color: var(--text);
}

.simple-body {
    padding-top: 60px;
}

.simple-wrap {
    max-width: 720px;
    margin: 0 auto;
}

.layout {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

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

.card {
    background: rgba(17, 24, 39, 0.94);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.login-card {
    margin-top: 40px;
}

.topbar {
    max-width: 1280px;
    margin: 0 auto 20px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.topbar h1,
.card h1,
.card h2 {
    margin: 0 0 10px;
}

.card h2 {
    font-size: 1.1rem;
}

p {
    margin-top: 0;
}

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

.small {
    font-size: 0.92rem;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    font-size: 0.82rem;
    color: #cbd5e1;
    background: rgba(148, 163, 184, 0.08);
}

.badge.success {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.25);
    background: rgba(34, 197, 94, 0.12);
}

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

.form-grid.compact {
    gap: 14px;
}

.form-grid label,
.login-form label {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

input,
textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.74);
    color: var(--text);
    border-radius: 12px;
    padding: 12px 14px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

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

textarea {
    resize: vertical;
}

input[readonly] {
    color: #cbd5e1;
    background: rgba(15, 23, 42, 0.86);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.1);
    color: var(--text);
    padding: 0 14px;
    border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: transform .06s ease, opacity .15s ease, background .15s ease;
}

.btn:hover {
    background: rgba(148, 163, 184, 0.16);
}

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

.btn[disabled] {
    cursor: wait;
    opacity: 0.65;
}

.btn.primary {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.95), rgba(14, 165, 233, 0.9));
    border-color: transparent;
    color: white;
}

.btn.danger {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fecaca;
}

.btn.ghost {
    background: transparent;
}

.full-width {
    width: 100%;
}

.actions,
.button-row {
    display: flex;
    gap: 10px;
}

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

.inline-inputs {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid transparent;
}

.alert.error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.24);
    color: #fecaca;
}

.info-grid {
    display: grid;
    gap: 12px;
}

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

.info-box {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(148, 163, 184, 0.14);
    background: rgba(15, 23, 42, 0.8);
}

.table-wrap {
    overflow: auto;
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

th,
 td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    text-align: left;
    vertical-align: top;
}

th {
    background: rgba(15, 23, 42, 0.85);
    color: #cbd5e1;
    font-weight: 600;
}

tr:last-child td {
    border-bottom: 0;
}

.mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
    word-break: break-all;
}

.log-box {
    min-height: 240px;
    max-height: 420px;
    overflow: auto;
    background: rgba(2, 6, 23, 0.74);
    border: 1px solid rgba(148, 163, 184, 0.14);
    border-radius: 14px;
    padding: 14px;
}

.log-line {
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 8px;
    border: 1px solid rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.84);
    white-space: pre-wrap;
    word-break: break-word;
}

.log-line.info {
    color: #e2e8f0;
}

.log-line.success {
    color: #bbf7d0;
    border-color: rgba(34, 197, 94, 0.18);
}

.log-line.error {
    color: #fecaca;
    border-color: rgba(239, 68, 68, 0.22);
}

.login-form {
    display: grid;
    gap: 14px;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

@media (max-width: 960px) {
    body {
        padding: 16px;
    }

    .layout,
    .form-grid,
    .info-grid.two {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
    }

    .button-row,
    .actions {
        flex-wrap: wrap;
    }

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