:root {
    --primary: #00C4B4;
    --primary-hover: #00a89a;
    --primary-dim: rgba(0, 196, 180, 0.15);
    --secondary: #1a3558;
    --secondary-hover: #1f3f6a;
    --navy-dark: #0A1929;
    --navy-sidebar: #0D2240;
    --navy-header: #0e2647;
    --background: #0A1929;
    --surface: #ffffff;
    --surface-border: rgba(255, 255, 255, 0.08);
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-on-dark: #ccd8e8;
    --text-on-dark-muted: #7a94b0;
    --error: #ef4444;
    --error-bg: #fef2f2;
    --success: #10b981;
    --border-radius: 12px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.15);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.35);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--text-primary);
    line-height: 1.5;
}

/* --- Login Page --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(160deg, #0A1929 0%, #0D2240 60%, #0e3060 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 2.5rem;
    background: #ffffff;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy-sidebar);
    margin-bottom: 0.5rem;
}

.login-header .brand-accent {
    color: var(--primary);
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* --- Forms & Inputs --- */
.input-group {
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

input[type="text"],
input[type="password"],
input[type="date"],
select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background-color: white;
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--text-primary);
    transition: var(--transition);
}

input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.18);
}

.helper-text {
    display: block;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    min-height: 1.1rem;
}

/* --- Buttons --- */
button {
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.btn-primary {
    background-color: var(--primary);
    color: #0A1929;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0, 196, 180, 0.35);
}

.btn-secondary {
    background-color: var(--secondary);
    color: var(--text-on-dark);
    border: 1px solid rgba(255,255,255,0.1);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--secondary-hover);
    color: white;
}

button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Alerts --- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    font-size: 0.875rem;
    animation: fadeIn 0.3s ease;
}

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

.hidden {
    display: none !important;
}

/* --- Dashboard Layout --- */
.dashboard-body {
    background: var(--background);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 2rem;
    background: var(--navy-header);
    border-bottom: 1px solid rgba(255,255,255,0.07);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.nav-brand {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--primary);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.username {
    font-weight: 500;
    color: var(--text-on-dark);
    font-size: 0.9rem;
}

.btn-logout {
    color: var(--text-on-dark-muted);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.12);
}

.btn-logout:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-dim);
}

/* Dashboard grid */
.dashboard-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    flex: 1;
    min-height: calc(100vh - 56px);
}

/* --- Sidebar --- */
.sidebar {
    background: var(--navy-sidebar);
    padding: 1.75rem 1.25rem;
    border-right: 1px solid rgba(255,255,255,0.06);
    min-height: 100%;
}

.sidebar h3 {
    margin-bottom: 1.5rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-on-dark-muted);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 0.75rem;
}

.sidebar label {
    color: var(--text-on-dark);
    font-size: 0.8rem;
}

.sidebar input[type="text"],
.sidebar input[type="password"],
.sidebar input[type="date"],
.sidebar select {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    border-radius: 7px;
}

.sidebar input:focus,
.sidebar select:focus {
    border-color: var(--primary);
    background: rgba(0,196,180,0.07);
    box-shadow: 0 0 0 3px rgba(0, 196, 180, 0.12);
    color: white;
}

.sidebar select option {
    background: var(--navy-sidebar);
    color: #e2e8f0;
}

.sidebar .helper-text {
    color: var(--text-on-dark-muted);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 2rem;
}

/* --- Main Content & Table --- */
.main-content {
    background: #f4f7fb;
    padding: 2rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

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

.content-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navy-sidebar);
}

.badge {
    background-color: var(--primary);
    color: #0A1929;
    font-size: 0.65rem;
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.3px;
}

.table-container {
    overflow-x: auto;
    border: 1px solid #dde4ef;
    border-radius: 10px;
    background: white;
    box-shadow: var(--shadow-sm);
    flex: 1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    white-space: nowrap;
}

.data-table th, .data-table td {
    padding: 0.75rem 1.1rem;
    text-align: left;
    border-bottom: 1px solid #e8eef6;
}

.data-table th {
    background-color: #eef2f8;
    font-weight: 600;
    color: #4a5e7a;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
}

.data-table tbody tr:hover {
    background-color: #f0f7ff;
}

.data-table tbody tr td a,
.data-table tbody tr td {
    color: #1d3a5f;
}

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

/* --- Spinner --- */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 196, 180, 0.2);
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
    .dashboard-container {
        grid-template-columns: 1fr;
    }
    .sidebar {
        min-height: auto;
    }
}
