* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
}

body {
    background: radial-gradient(circle at top left, #e0f0ff, #f8f9ff 40%, #fdf7ff);
    color: #111827;
    min-height: 100vh;
}

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

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    color: white;
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    margin-bottom: 24px;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.04em;
}

.logo-sub {
    font-size: 0.75rem;
    opacity: 0.7;
}

.user-info {
    margin-top: 12px;
    font-size: 0.8rem;
    opacity: 0.85;
}

/* Nav */
.nav {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav a {
    padding: 10px 12px;
    border-radius: 999px;
    font-size: 0.9rem;
    display: block;
    color: #e5e7eb;
    opacity: 0.9;
}

.nav a.active,
.nav a:hover {
    background: linear-gradient(135deg, #22c1c3, #4f46e5);
    color: #ffffff;
    opacity: 1;
}

/* Main content */
.main {
    flex: 1;
    padding: 24px 32px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
}

.topbar-title {
    font-size: 1.4rem;
    font-weight: 600;
}

.badge {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #4b5563;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 18px;
    padding: 18px 20px;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(148, 163, 184, 0.2);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
}

.card-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Button */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    transition: transform 0.06s ease, box-shadow 0.06s ease, opacity 0.1s;
}

.btn-primary {
    background: linear-gradient(135deg, #4f46e5, #22c1c3);
    color: white;
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.4);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 38px rgba(79, 70, 229, 0.5);
    opacity: 0.96;
}

.btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: #111827;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

/* Table */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
}

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

.badge-status {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 999px;
}

.badge-active {
    background: rgba(22, 163, 74, 0.12);
    color: #15803d;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

/* Forms */
.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 4px;
    color: #374151;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.9);
}

.form-control-textarea {
    border-radius: 14px;
    min-height: 80px;
    resize: vertical;
}

/* Login */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 380px;
}

/* Utility */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.flex { display: flex; }
.justify-between { justify-content: space-between; }
.items-center { align-items: center; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }

.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; color: #6b7280; }

.text-right { text-align: right; }

/* Responsive */
@media (max-width: 768px) {
    .layout {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 18px;
    }
    .nav {
        flex-direction: row;
        overflow-x: auto;
    }
    .main {
        padding: 16px;
    }
}
