:root {
    --bg-main: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --bg-alt: #f1f5f9;
    --border-color: #e2e8f0;
    
    --primary: #102938;
    --primary-hover: #1c3e54;
    --accent: #eee809;
    --accent-hover: #dcd500;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    
    --text-main: #102938;
    --text-muted: #4a6171;
    --text-light: #ffffff;
    
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Montserrat', sans-serif;
    
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    --shadow-sm: 0 4px 12px rgba(16, 41, 56, 0.05);
    --shadow-glow: 0 10px 30px rgba(16, 41, 56, 0.1);
}

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

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .font-secondary {
    font-family: var(--font-secondary);
    color: var(--text-main);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* Header & Navbar */
.header {
    background: #ffffff;
    border-bottom: 2px solid var(--accent);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(16, 41, 56, 0.06);
}

.navbar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-family: var(--font-secondary);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-accent {
    color: var(--text-main);
    background: var(--accent);
    padding: 2px 8px;
    border-radius: var(--radius-sm);
}

.nav-links {
    display: flex;
    gap: 20px;
    align-items: center;
    list-style: none;
}

.nav-link {
    font-family: var(--font-secondary);
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.92rem;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-main);
    background: var(--accent);
}

.btn-logout {
    font-family: var(--font-secondary);
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-logout:hover {
    background: var(--danger);
    color: #ffffff;
}

/* Main Layout */
.container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    flex: 1;
    width: 100%;
}

.auth-container {
    max-width: 450px;
    margin: 4rem auto;
    padding: 0 1rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(16, 41, 56, 0.07);
    margin-bottom: 2rem;
}

.card-header {
    margin-bottom: 1.5rem;
}

.card-title {
    font-family: var(--font-secondary);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-subtitle {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

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

.form-label {
    display: block;
    font-family: var(--font-secondary);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}

.form-input, .form-select {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-family: var(--font-primary);
    font-size: 0.98rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3.5px rgba(238, 232, 9, 0.5);
}

.otp-input {
    letter-spacing: 8px;
    font-size: 1.6rem;
    text-align: center;
    font-family: monospace;
    font-weight: bold;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-family: var(--font-secondary);
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 8px;
    text-decoration: none;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: var(--primary);
    color: #ffffff;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 14px rgba(16, 41, 56, 0.15);
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: var(--accent);
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-main);
    border: 2px solid var(--accent);
}

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-alt);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--primary);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.12);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: var(--danger);
    color: #ffffff;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: var(--font-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary { background: var(--primary); color: var(--accent); }
.badge-highlight { background: var(--accent); color: var(--text-main); border: 1px solid #dcd500; }
.badge-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.badge-warning { background: var(--accent); color: var(--text-main); }
.badge-danger  { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
}

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

.table th {
    font-family: var(--font-secondary);
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    transition: background 0.15s ease;
}

.table tbody tr:hover {
    background: var(--bg-card-hover);
}

/* Alerts & Banners */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    line-height: 1.5;
    word-break: break-word;
    box-sizing: border-box;
    width: 100%;
}

.alert > div {
    flex: 1;
    min-width: 0;
}

.alert-danger {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.alert-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.otp-banner {
    background: var(--accent);
    border: 2px solid #dcd500;
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

.otp-display {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: monospace;
    letter-spacing: 6px;
    color: var(--text-main);
    margin-top: 6px;
}

/* Grid & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-number {
    font-family: var(--font-secondary);
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.stat-label {
    font-family: var(--font-primary);
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

/* Modal / Actions Bar */
.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer {
    text-align: center;
    padding: 2rem 0;
    color: var(--text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
    background: #ffffff;
}
