* {
    box-sizing: border-box;
}

:root {
    --bg: #f4f7fb;
    --sidebar: #07182e;
    --sidebar2: #0a2342;
    --primary: #146ee8;
    --primary-dark: #0d57b8;
    --text: #15243a;
    --muted: #77869b;
    --border: #e3e9f1;
    --white: #ffffff;
    --success: #13ad69;
}

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

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
}

.login-brand {
    background:
        radial-gradient(circle at 10% 10%, #1558a9 0%, transparent 36%),
        radial-gradient(circle at 90% 90%, #087ef0 0%, transparent 32%),
        #07182e;
    color: white;
    padding: 70px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.login-brand h1 {
    font-size: 54px;
    margin: 0;
    letter-spacing: -2px;
}

.login-brand p {
    color: #adc4e0;
    max-width: 550px;
    font-size: 18px;
    line-height: 1.6;
}

.brand-chip {
    display: inline-block;
    width: fit-content;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.13);
    border-radius: 50px;
    padding: 9px 14px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1px;
}

.login-box-wrap {
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 35px;
}

.login-box {
    width: 100%;
    max-width: 410px;
}

.login-box h2 {
    font-size: 32px;
    margin: 0 0 8px;
}

.login-box .subtitle {
    color: var(--muted);
    margin-bottom: 32px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin: 0 0 8px;
}

input {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid var(--border);
    border-radius: 11px;
    outline: none;
    font-size: 15px;
    margin-bottom: 18px;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20,110,232,.09);
}

button {
    cursor: pointer;
    border: 0;
}

.btn-primary {
    width: 100%;
    background: var(--primary);
    color: white;
    font-size: 15px;
    font-weight: 800;
    padding: 15px;
    border-radius: 11px;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.alert {
    padding: 13px 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    background: #fff0f0;
    color: #bb3535;
    border: 1px solid #ffd8d8;
    font-size: 14px;
}

.layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar2));
    padding: 28px 18px;
    color: white;
}

.logo {
    padding: 0 13px 30px;
}

.logo strong {
    font-size: 24px;
    display: block;
}

.logo span {
    color: #7da6d4;
    font-size: 12px;
}

.nav-title {
    color: #6984a5;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.5px;
    padding: 20px 12px 8px;
}

.nav a {
    display: flex;
    align-items: center;
    padding: 12px 13px;
    color: #bdcce0;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 14px;
}

.nav a.active,
.nav a:hover {
    background: rgba(255,255,255,.09);
    color: white;
}

.main {
    padding: 35px 40px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.topbar h1 {
    margin: 0;
    font-size: 28px;
}

.topbar p {
    color: var(--muted);
    margin: 6px 0 0;
}

.user-menu {
    background: white;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 13px;
}

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

.card {
    background: white;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 17px;
    box-shadow: 0 4px 20px rgba(20,50,80,.04);
}

.card .label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.card .number {
    font-size: 34px;
    font-weight: 800;
    margin-top: 12px;
}

.card .status {
    color: var(--success);
    font-size: 12px;
    margin-top: 8px;
}

.section {
    margin-top: 24px;
    background: white;
    border: 1px solid var(--border);
    border-radius: 17px;
    padding: 24px;
}

.section h3 {
    margin: 0 0 6px;
}

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

.modules {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.module {
    border: 1px solid var(--border);
    border-radius: 13px;
    padding: 18px;
    font-weight: 700;
}

.logout-form {
    margin-top: 35px;
}

.logout-button {
    width: 100%;
    padding: 11px;
    border-radius: 10px;
    background: rgba(255,255,255,.08);
    color: #bfcfe2;
}

@media(max-width: 1000px) {
    .cards, .modules {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media(max-width: 760px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }

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

    .sidebar {
        display: none;
    }

    .main {
        padding: 20px;
    }

    .cards, .modules {
        grid-template-columns: 1fr;
    }
}
