* {
    box-sizing: border-box;
}

:root {
    color-scheme: dark;
    --bg: #101114;
    --surface: #191b20;
    --surface-hover: #22252c;
    --border: #2c3038;
    --text: #f1f3f5;
    --muted: #9298a3;
    --accent: #6ea8fe;
    --accent-hover: #8bb9ff;
    --danger: #ff7b7b;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.container {
    width: min(680px, calc(100% - 32px));
    margin: 0 auto;
    padding: 72px 0 40px;
}

header {
    margin-bottom: 32px;
}

h1 {
    margin: 0;
    font-size: 2.1rem;
    letter-spacing: -0.04em;
}

header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 28px;
}

.stat {
    padding: 18px 12px;
    text-align: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 1.55rem;
    font-weight: 700;
}

.stat-label {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: .82rem;
}

.links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.service-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 17px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    text-decoration: none;
    transition: background .15s, border-color .15s, transform .15s;
}

.service-card:hover {
    background: var(--surface-hover);
    border-color: #3a404b;
    transform: translateY(-1px);
}

.service-card.primary {
    border-color: #3d5f91;
}

.service-icon {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 10px;
    background: #273a58;
    color: var(--accent);
    font-size: 1.2rem;
    font-weight: 600;
}

.service-card strong,
.service-card small {
    display: block;
}

.service-card small {
    margin-top: 3px;
    color: var(--muted);
}

.arrow {
    margin-left: auto;
    color: var(--muted);
    font-size: 1.2rem;
}

.admin-toggle {
    align-self: center;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font: inherit;
    font-size: .85rem;
}

.admin-toggle:hover {
    color: var(--text);
}

.service-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hidden {
    display: none !important;
}

footer {
    margin-top: 42px;
    text-align: center;
    color: #686e78;
    font-size: .75rem;
}

.modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(0, 0, 0, .7);
}

.modal-box {
    width: min(400px, 100%);
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .4);
}

.modal-box h2 {
    margin: 0 0 8px;
}

.modal-box p {
    color: var(--muted);
    font-size: .9rem;
}

#password-input {
    width: 100%;
    padding: 11px 12px;
    background: var(--bg);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    font: inherit;
}

#password-input:focus {
    border-color: var(--accent);
}

.error {
    margin: 7px 0 0 !important;
    color: var(--danger) !important;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 18px;
}

.button {
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #101114;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

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

.button.secondary {
    background: #2a2d34;
    color: var(--text);
}

@media (max-width: 520px) {
    .container {
        padding-top: 40px;
    }

    .stats {
        gap: 8px;
    }

    .stat {
        padding: 14px 8px;
    }

    .stat-value {
        font-size: 1.3rem;
    }
}
