:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text: #1d2939;
    --muted: #64748b;
    --accent: #2563eb;
    --danger: #ef4444;
    --border: #e2e8f0;
}

* {
    box-sizing: border-box;
}

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

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

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-size: 1.1rem;
    font-weight: 700;
}

nav {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

nav a {
    color: var(--muted);
    padding: 8px 12px;
    border-radius: 8px;
}

nav a.active,
nav a:hover {
    background: rgba(37, 99, 235, 0.1);
    color: var(--accent);
}

nav a.logout {
    color: var(--danger);
}

.container {
    max-width: 1120px;
    margin: 24px auto;
    padding: 0 16px 48px;
}

.hero {
    padding: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 24px;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
}

.card h2 {
    margin: 0 0 8px;
    font-size: 2rem;
}

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

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 24px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

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

.data-table th {
    background: #f8fafc;
    color: var(--muted);
}

.data-table tr:last-child td {
    border-bottom: none;
}

.form-card {
    margin-bottom: 24px;
}

.form-card h2 {
    margin-top: 0;
}

label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 600;
}

input,
textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fafc;
    font: inherit;
}

textarea {
    min-height: 100px;
    resize: vertical;
}

button {
    margin-top: 16px;
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: var(--accent);
    color: white;
    font-weight: 700;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

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

.alert-success {
    background: #ecfdf5;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 16px;
    background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
}

.login-panel {
    width: min(420px, 100%);
    padding: 32px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
}

.login-panel h1 {
    margin-top: 0;
}
