/* File: /public/assets/style.css */

:root {
    --bg: #eef2f7;
    --card: #ffffff;
    --text: #111827;
    --muted: #6b7280;
    --border: #d1d5db;
    --primary: #1d4ed8;
    --primary-dark: #1e40af;
    --danger: #b91c1c;
    --danger-bg: #fee2e2;
    --shadow: 0 14px 40px rgba(15, 23, 42, 0.08);
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

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

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 32px;
    box-shadow: var(--shadow);
}

.brand {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 28px;
}

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

.brand h1 {
    margin: 0;
    font-size: 24px;
}

.brand p {
    margin: 4px 0 0;
    color: var(--muted);
}

label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 650;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    background: white;
    color: var(--text);
}

textarea {
    resize: vertical;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 12px;
    padding: 11px 18px;
    margin-top: 18px;
    background: var(--primary);
    color: white;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

button:hover,
.button:hover {
    background: var(--primary-dark);
    text-decoration: none;
}

.button.secondary {
    background: #e5e7eb;
    color: #111827;
}

.button.secondary:hover {
    background: #d1d5db;
}

.alert {
    padding: 12px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger);
    border: 1px solid #fecaca;
}

.small-note {
    margin-top: 22px;
    color: var(--muted);
    font-size: 13px;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 28px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(10px);
}

.topbar nav {
    display: flex;
    gap: 16px;
}

.container {
    width: min(1180px, calc(100% - 40px));
    margin: 28px auto 60px;
}

.container.narrow {
    width: min(860px, calc(100% - 40px));
}

.hero,
.profile-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.hero h1,
.profile-header h1 {
    margin: 0;
    font-size: 34px;
    letter-spacing: -0.03em;
}

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

.hero-actions {
    display: flex;
    gap: 10px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card,
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.stat-card {
    padding: 22px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.stat-label {
    color: var(--muted);
    margin-top: 4px;
}

.card {
    padding: 24px;
    margin-bottom: 22px;
}

.card h2 {
    margin-top: 0;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    border-bottom: 1px solid #e5e7eb;
    padding: 11px 8px;
    text-align: left;
    vertical-align: top;
}

th {
    color: #374151;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

tbody tr:hover {
    background: #f9fafb;
}

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

.checkbox-row {
    display: flex;
    gap: 24px;
    margin-top: 18px;
}

.checkbox-row label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.checkbox-row input {
    width: auto;
}

.form-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
}

@media (max-width: 800px) {
    .topbar,
    .hero,
    .profile-header {
        flex-direction: column;
        align-items: flex-start;
    }

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

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

@media print {
    body {
        background: white;
    }

    .topbar,
    .hero-actions,
    .button,
    button {
        display: none !important;
    }

    .container {
        width: 100%;
        margin: 0;
    }

    .card,
    .stat-card {
        box-shadow: none;
        border-color: #ccc;
    }
}

.topbar nav a.active {
    background: #eef2ff;
    color: #1d4ed8;
    border-radius: 999px;
    padding: 6px 10px;
    font-weight: 700;
}

.button.danger,
button.danger {
    background: #dc2626;
    border-color: #dc2626;
    color: #ffffff;
}

.button.danger:hover,
button.danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
}
