:root {
    --bg: #0f172a;
    --panel: #111827;
    --panel2: #1f2937;
    --text: #f9fafb;
    --muted: #9ca3af;
    --line: #374151;
    --primary: #facc15;
    --primaryText: #111827;
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg);
    color: var(--text);
}

a { color: inherit; text-decoration: none; }

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 20px 80px rgba(0,0,0,.35);
}

.auth-card h1 { margin: 0 0 8px; font-size: 28px; }
.auth-card p { margin: 0 0 24px; color: var(--muted); }

label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 700;
}

input, select, textarea {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #020617;
    color: var(--text);
    padding: 12px 14px;
    font-size: 16px;
}

textarea { min-height: 100px; }

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 18px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--panel2);
    color: var(--text);
    font-weight: 800;
    cursor: pointer;
}

.button.primary {
    background: var(--primary);
    color: var(--primaryText);
    border-color: var(--primary);
}

.button.full { width: 100%; margin-top: 22px; }

.button.small {
    min-height: 36px;
    padding: 8px 10px;
    border-radius: 10px;
    font-size: 13px;
}

.alert {
    padding: 12px 14px;
    border-radius: 14px;
    margin: 12px 0;
    font-weight: 700;
}

.alert.error {
    background: rgba(239, 68, 68, .15);
    border: 1px solid rgba(239, 68, 68, .4);
}

.alert.success {
    background: rgba(34, 197, 94, .15);
    border: 1px solid rgba(34, 197, 94, .4);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    min-height: 64px;
    padding: 12px 18px;
    background: rgba(17, 24, 39, .96);
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar span {
    display: block;
    color: var(--muted);
    font-size: 14px;
    margin-top: 2px;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 22px;
}

.hero {
    background: linear-gradient(135deg, #1f2937, #111827);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 22px;
    margin-bottom: 20px;
}

.hero h1 { margin: 0 0 8px; font-size: 32px; }
.hero p { margin: 0; color: var(--muted); }

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.grid.two {
    grid-template-columns: repeat(2, 1fr);
}

.card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 18px;
}

.card h2 { margin: 0 0 12px; font-size: 24px; }
.grid .card h2 { margin: 0; font-size: 34px; }
.card p { margin: 10px 0; color: var(--text); }

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.notice {
    background: rgba(250, 204, 21, .12);
    border: 1px solid rgba(250, 204, 21, .35);
    border-radius: 18px;
    padding: 16px;
    color: #fde68a;
}

.table-wrap { width: 100%; overflow-x: auto; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 780px;
}

.data-table th, .data-table td {
    text-align: left;
    border-bottom: 1px solid var(--line);
    padding: 12px;
    vertical-align: top;
}

.data-table th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.data-table small { color: var(--muted); }

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    display: inline-flex;
    padding: 6px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.badge.success {
    background: rgba(34, 197, 94, .15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, .35);
}

.badge.danger {
    background: rgba(239, 68, 68, .15);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, .35);
}

.badge.warning {
    background: rgba(245, 158, 11, .15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, .35);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--panel2);
    border: 1px solid var(--line);
    padding: 12px;
    border-radius: 14px;
}

.check-row input {
    width: 22px;
    min-height: 22px;
}

.hint-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin: 12px 0 20px;
}

.hint-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #020617;
    border: 1px solid var(--line);
    padding: 12px;
    border-radius: 14px;
    margin: 0;
}

.hint-chip input {
    width: 22px;
    min-height: 22px;
}

.hint-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 18px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.detail-grid div {
    background: #020617;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
}

.detail-grid span {
    display: block;
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 5px;
}

.detail-grid strong {
    word-break: break-word;
}

@media (max-width: 760px) {
    .grid,
    .grid.two,
    .detail-grid,
    .hint-grid {
        grid-template-columns: 1fr;
    }

    .container { padding: 14px; }
    .hero h1 { font-size: 26px; }
    .actions .button { width: 100%; }
    .topbar { gap: 12px; }
}