@import url("../../vendor/keenicons/outline/style.css");
@import url("../../vendor/keenicons/solid/style.css");

:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #f8fafc;
    --border: #e5e7eb;
    --text: #172033;
    --muted: #667085;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --success: #16a34a;
    --warning: #d97706;
    --danger: #dc2626;
    --sidebar: #111827;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 460px) 1fr;
    background: #0f172a;
}

.auth-panel {
    background: var(--surface);
    padding: 56px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    padding: 72px;
    background:
        radial-gradient(circle at 28% 30%, rgba(37, 99, 235, .38), transparent 28%),
        linear-gradient(135deg, #111827 0%, #0f172a 52%, #1e293b 100%);
}

.auth-visual h1 {
    max-width: 720px;
    font-size: 52px;
    line-height: 1.02;
    margin: 0;
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
}

.sidebar {
    background: var(--sidebar);
    color: #d1d5db;
    padding: 24px 18px;
    position: sticky;
    top: 0;
    height: 100vh;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 28px;
}

.brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    background: var(--primary);
    color: white;
    font-weight: 800;
}

.nav-section {
    margin: 22px 0 10px;
    color: #8a94a6;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
}

.nav-link {
    min-height: 40px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255, 255, 255, .08);
    color: white;
}

.main {
    min-width: 0;
}

.topbar {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

.content {
    padding: 28px;
}

.page-title {
    margin: 0 0 22px;
    font-size: 26px;
    line-height: 1.2;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}

.metric-card,
.panel-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.metric-card {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.metric-label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.metric-value {
    font-size: 30px;
    font-weight: 750;
}

.icon-box {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: var(--primary);
    font-size: 20px;
}

.toolbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    margin-bottom: 16px;
}

.button {
    border: 0;
    border-radius: 8px;
    min-height: 38px;
    padding: 0 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 650;
    font-size: 13px;
    cursor: pointer;
}

.button-primary {
    background: var(--primary);
    color: white;
}

.button-danger {
    background: #fee2e2;
    color: var(--danger);
}

.button-soft {
    background: var(--surface-muted);
    color: var(--text);
    border: 1px solid var(--border);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    background: var(--surface-muted);
}

.data-table th,
.data-table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    border-radius: 6px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 700;
    background: #eef2ff;
    color: #3730a3;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

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

.field label {
    display: block;
    font-size: 13px;
    font-weight: 650;
    margin-bottom: 7px;
}

.input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font: inherit;
}

.manual-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 22px;
}

.manual-nav {
    position: sticky;
    top: 92px;
}

pre {
    overflow: auto;
    background: #0f172a;
    color: #dbeafe;
    border-radius: 8px;
    padding: 18px;
    font-size: 13px;
    line-height: 1.55;
}

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

.text-danger {
    color: var(--danger);
}

@media (max-width: 980px) {
    .auth-shell,
    .app-shell,
    .manual-grid {
        grid-template-columns: 1fr;
    }

    .auth-visual {
        display: none;
    }

    .sidebar {
        position: relative;
        height: auto;
    }

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

@media (max-width: 640px) {
    .content,
    .topbar,
    .auth-panel {
        padding: 20px;
    }

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