*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #2563eb;
    --danger: #dc2626;
    --bg: #f8fafc;
    --surface: #fff;
    --border: #e2e8f0;
    --text: #1e293b;
    --muted: #64748b;
}

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
}

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

.sidebar {
    width: 220px;
    background: var(--text);
    color: #fff;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.sidebar-brand {
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    padding: 0 .5rem;
}

.nav-link {
    display: block;
    padding: .6rem .75rem;
    border-radius: 6px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: .9rem;
}

.nav-link:hover, .nav-link.active {
    background: rgba(255,255,255,.1);
    color: #fff;
}

.content {
    flex: 1;
    padding: 2rem 2.5rem;
    max-width: 1000px;
}

h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.table th, .table td {
    padding: .75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--muted);
    font-size: .8rem;
    text-transform: uppercase;
}

.table tbody tr:hover {
    background: #f1f5f9;
}

.btn {
    display: inline-block;
    padding: .5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

    .btn-primary:hover {
        background: #1d4ed8;
    }

.btn-danger {
    background: var(--danger);
    color: #fff;
}

    .btn-danger:hover {
        background: #b91c1c;
    }

.form-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .3rem;
    margin-bottom: .75rem;
}

    .form-group label {
        font-size: .85rem;
        font-weight: 600;
    }

.form-group input, .form-group textarea, .form-group select {
    padding: .5rem .7rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-size: .9rem;
}

.form-group input:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-inline {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
}

    .form-inline textarea {
        flex: 1;
        padding: .5rem .7rem;
        border: 1.5px solid var(--border);
        border-radius: 6px;
    }

.error {
    color: var(--danger);
    font-size: .85rem;
    margin: .5rem 0;
}

.empty {
    color: var(--muted);
    text-align: center;
    padding: 2rem;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.kpi-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    text-align: center;
}

.kpi-label {
    display: block;
    font-size: .8rem;
    color: var(--muted);
    margin-bottom: .25rem;
}

.kpi-value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}

.public-auth-page {
    min-height: 100vh;
    padding: 24px;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: center;
}

.public-auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.public-auth-card h1 {
    margin-bottom: 8px;
    font-size: 1.8rem;
}

.public-auth-card p {
    color: var(--muted);
    margin-bottom: 28px;
}

.public-back-link {
    display: inline-block;
    margin-bottom: 24px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.public-form-group {
    margin-bottom: 20px;
}

    .public-form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
    }

.public-form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
}

.public-form-control:focus {
    outline: none;
    border-color: var(--primary);
}

.public-button-primary {
    display: inline-block;
    padding: 14px 24px;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.public-button-primary:hover {
    background: #1d4ed8;
}

.public-full-button {
    width: 100%;
}

.public-alert-error {
    padding: 14px;
    border-radius: 12px;
    background: #fee2e2;
    color: #991b1b;
    margin-bottom: 20px;
}

.public-landing-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
}

.public-landing-header {
    height: 76px;
    padding: 0 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    font-size: 1.4rem;
}

.public-brand-logo {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    color: white;
    display: grid;
    place-items: center;
}

.public-login-button {
    padding: 10px 18px;
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.public-login-button:hover {
    background: #eff6ff;
}

.public-landing-main {
    flex: 1;
    padding: 64px 48px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
    align-items: center;
}

.public-hero-card {
    background: var(--surface);
    border-radius: 24px;
    padding: 56px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

.public-hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.public-hero-content p {
    font-size: 1.15rem;
    line-height: 1.6;
    color: var(--muted);
    margin-bottom: 32px;
}

.public-hero-background {
    min-height: 320px;
    border-radius: 24px;
    padding: 48px;
    background: linear-gradient(135deg, var(--primary), #1e293b);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

    .public-hero-background h2 {
        font-size: 2.2rem;
        margin-bottom: 16px;
    }

    .public-hero-background p {
        font-size: 1.1rem;
        opacity: 0.9;
    }

.public-landing-footer {
    padding: 22px 48px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

@media (max-width: 900px) {
    .public-landing-main {
        grid-template-columns: 1fr;
        padding: 32px 20px;
    }

    .public-landing-header {
        padding: 0 20px;
    }

    .public-hero-card {
        padding: 32px;
    }

    .public-hero-content h1 {
        font-size: 2.2rem;
    }
}

.public-request-page {
    min-height: 100vh;
    padding: 48px 20px;
    background: var(--bg);
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.public-request-card {
    width: 100%;
    max-width: 720px;
    background: var(--surface);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

    .public-request-card h1 {
        margin-bottom: 8px;
        font-size: 2.2rem;
    }

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

.public-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.public-color-input {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    cursor: pointer;
}

.public-alert-success {
    padding: 16px;
    border-radius: 12px;
    background: #dcfce7;
    color: #166534;
    font-weight: 600;
}

.public-form-group span,
.public-form-group small {
    color: var(--muted);
    font-size: 0.85rem;
}

@media (max-width: 700px) {
    .public-form-row {
        grid-template-columns: 1fr;
    }

    .public-request-card {
        padding: 28px;
    }
}

.logout-button {
    margin-top: auto;
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
}

.logout-button:hover {
    background: rgba(255,255,255,.1);
    color: #fff;
}