:root {
    --sf-primary: #2563eb;
    --sf-primary-dark: #1e40af;
    --sf-bg: #f8fafc;
    --sf-text: #1e293b;
    --sf-border: #e2e8f0;
    --sf-danger: #dc2626;
    --sf-success: #16a34a;
}

* {
    box-sizing: border-box;
}

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

.page-minimal {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.error-box {
    max-width: 480px;
    text-align: center;
}

.auth-box {
    max-width: 380px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 10px;
    padding: 2rem;
}

.auth-box h1 {
    font-size: 1.4rem;
    margin-top: 0;
}

.field {
    margin-bottom: 1rem;
}

.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
}

.field input, .field select, .field textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--sf-border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.field-note {
    margin: 0.3rem 0 0;
    font-size: 0.8rem;
    color: #64748b;
}

.btn {
    display: inline-block;
    background: var(--sf-primary);
    color: #fff;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
}

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

.btn-danger {
    background: var(--sf-danger);
}

.btn-secondary {
    background: #64748b;
}

.alert {
    padding: 0.7rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

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

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

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

.app-sidebar {
    width: 230px;
    background: #0f172a;
    color: #cbd5e1;
    padding: 1.5rem 1rem;
}

.app-sidebar a {
    display: block;
    color: #cbd5e1;
    text-decoration: none;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    margin-bottom: 0.2rem;
}

.app-sidebar a:hover, .app-sidebar a.active {
    background: #1e293b;
    color: #fff;
}

.app-content {
    flex: 1;
    padding: 2rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

table th, table td {
    text-align: left;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid var(--sf-border);
    font-size: 0.9rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-active {
    background: #dcfce7;
    color: #166534;
}

.badge-suspended {
    background: #fee2e2;
    color: #991b1b;
}

.badge-expired {
    background: #fef3c7;
    color: #92400e;
}

.card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 10px;
    padding: 1.2rem 1.5rem;
    margin-bottom: 1.2rem;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border: 1px solid var(--sf-border);
    border-radius: 10px;
    padding: 1rem 1.2rem;
}

.stat-card .value {
    font-size: 1.6rem;
    font-weight: 700;
}

.stat-card .label {
    font-size: 0.8rem;
    color: #64748b;
}
