:root {
    --brand: #0f766e;
    --brand-dark: #134e4a;
    --accent: #2563eb;
    --ink: #111827;
    --muted: #6b7280;
    --line: #d8dee8;
    --bg: #f4f7fb;
    --panel: #ffffff;
    --danger: #b42318;
    --ok: #087443;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
}

.app-shell {
    min-height: 100vh;
    display: flex;
}

.sidebar {
    width: 260px;
    min-height: 100vh;
    background: #10201f;
    color: #ffffff;
    padding: 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    top: 0;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0;
    text-decoration: none;
}

.sidebar nav {
    display: grid;
    gap: 7px;
}

.sidebar nav a,
.sidebar-logout,
.sidebar-profile {
    border-radius: 8px;
    padding: 10px 12px;
    text-decoration: none;
}

.sidebar nav a:hover,
.sidebar-logout:hover {
    background: rgba(255, 255, 255, .10);
}

.sidebar-profile {
    margin-top: auto;
    display: flex;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, .08);
}

.sidebar-profile small {
    display: block;
    color: #cbd5e1;
    overflow-wrap: anywhere;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--brand);
    font-weight: 800;
    flex: 0 0 auto;
}

.main-shell {
    flex: 1;
    min-width: 0;
}

.topbar {
    min-height: 66px;
    padding: 14px 28px;
    display: flex;
    align-items: center;
    background: #ffffff;
    border-bottom: 1px solid var(--line);
}

.topbar span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

.content {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.page-heading {
    margin-bottom: 22px;
}

.page-heading h1 {
    font-size: 30px;
    margin: 0 0 6px;
}

.page-heading p {
    color: var(--muted);
    margin: 0;
}

.grid {
    display: grid;
    gap: 16px;
}

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

.card,
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .05);
}

.dashboard-card {
    padding: 18px;
    text-decoration: none;
}

.metric {
    display: block;
    font-size: 34px;
    font-weight: 800;
    line-height: 1;
    color: var(--brand);
}

.panel {
    padding: 20px;
    margin-top: 18px;
}

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

.table-wrap {
    overflow-x: auto;
}

.table {
    vertical-align: middle;
}

.badge-state {
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 700;
}

.badge-ok {
    background: #dcfce7;
    color: var(--ok);
}

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

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #10201f, #0f766e 48%, #f4f7fb 48%);
}

.login-wrap {
    min-height: 100vh;
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 420px;
    align-items: center;
    gap: 36px;
}

.login-copy {
    color: #ffffff;
}

.login-copy h1 {
    font-size: 56px;
    font-weight: 800;
    margin: 0 0 12px;
}

.login-copy p {
    max-width: 580px;
    font-size: 19px;
}

.login-box {
    background: #ffffff;
    border-radius: 8px;
    padding: 26px;
    box-shadow: 0 22px 60px rgba(15, 23, 42, .24);
}

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

label .form-control,
label .form-select {
    margin-top: 6px;
    font-weight: 400;
}

.alert {
    border-radius: 8px;
}

.app-footer {
    color: var(--muted);
    padding: 0 28px 22px;
    font-size: 13px;
}

@media (max-width: 900px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

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

    .login-wrap {
        grid-template-columns: 1fr;
        padding: 34px 0;
    }

    .login-copy h1 {
        font-size: 42px;
    }
}

@media (max-width: 560px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}

.login-brand-logo {
    display: block;
    width: min(210px, 68%);
    height: auto;
    margin: 0 0 18px;
}
