* { box-sizing: border-box; }
body {
    font-family: -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    margin: 0;
    background: #f4f6f8;
    color: #1f2937;
}
.topbar {
    background: #101828;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 24px;
}
.brand { font-weight: 700; font-size: 18px; }
.nav { display: flex; align-items: center; gap: 18px; }
.nav a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.nav a:hover { color: #fff; }
.nav .logout { color: #fca5a5; }
.whoami { font-size: 13px; color: #94a3b8; }
.container { max-width: 900px; margin: 24px auto; padding: 0 16px; }
.card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
h1, h2 { margin-top: 0; }
.alert {
    background: #fee2e2; color: #991b1b;
    padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px;
}
.notice {
    background: #dcfce7; color: #166534;
    padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px;
}
.stacked-form label {
    display: block;
    margin-bottom: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.stacked-form input, .stacked-form select {
    display: block;
    width: 100%;
    max-width: 360px;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 400;
}
.stacked-form small { font-weight: 400; color: #6b7280; }
button, .btn-secondary {
    background: #2563eb; color: #fff; border: none;
    padding: 9px 18px; border-radius: 6px; font-size: 14px; cursor: pointer;
    text-decoration: none; display: inline-block; margin-top: 6px;
}
.btn-secondary { background: #6b7280; margin-left: 8px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th, .data-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #e5e7eb; }
.status-active { color: #166534; font-weight: 600; }
.status-inactive { color: #9ca3af; font-weight: 600; }
.actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline-form { display: inline; }
.link-btn {
    background: none; border: none; color: #2563eb; padding: 0;
    font-size: 14px; cursor: pointer; text-decoration: underline;
}
.link-btn.danger { color: #dc2626; }
.muted { color: #9ca3af; font-size: 13px; }

/* Login page */
.login-body {
    display: flex; align-items: center; justify-content: center;
    min-height: 100vh; margin: 0; background: #101828;
}
.login-card {
    background: #fff; padding: 32px 36px; border-radius: 12px;
    width: 320px; box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
.login-card h1 { font-size: 20px; margin-bottom: 2px; }
.login-card .subtitle { color: #6b7280; font-size: 13px; margin-top: 0; margin-bottom: 20px; }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 12px; }
.login-card input {
    display: block; width: 100%; margin-top: 4px; padding: 9px 10px;
    border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px;
}
.login-card button { width: 100%; margin-top: 6px; padding: 10px; }
