:root {
    --primary-color: #1e40af; /* Deep Indigo Blue */
    --primary-hover: #1e3a8a;
    --bg-color: #f1f5f9; /* Soft Slate */
    --card-bg: #ffffff;
    --text-main: #0f172a;
    --text-muted: #475569;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius: 8px;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(30, 64, 175, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(30, 64, 175, 0.05) 0px, transparent 50%);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--primary-color);
    backdrop-filter: none;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    letter-spacing: -0.5px;
}

.navbar-logo {
    display: none;
}

.nav-links {
    color: white;
    font-weight: 500;
}

.nav-links a, .btn-logout {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-left: 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-family: inherit;
}

.nav-links a:hover, .btn-logout:hover {
    color: white;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
    padding: 2rem;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 20px 25px -5px rgba(30, 64, 175, 0.1), 0 10px 10px -5px rgba(30, 64, 175, 0.04);
    width: 100%;
    max-width: 420px;
    border: 2px solid var(--primary-color);
    animation: fadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(20px);
    opacity: 0;
}

.auth-card h2 {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.auth-card p.subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 1rem;
    font-weight: 500;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: #fff;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.error-message {
    background: #fef2f2;
    border-left: 4px solid #ef4444;
    color: #991b1b;
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.dashboard-container {
    padding: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.dashboard-full {
    width: 100%;
    max-width: none;
    padding: 0;
}

.banner-section {
    width: 100%;
    margin-bottom: 0;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
}

.dashboard-banner {
    width: 100%;
    height: auto;
    display: block;
}

/* Secondary Navigation Bar */
.secondary-nav {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 72px;
    z-index: 900;
}

.user-info-chip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.user-info-chip i {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.nav-items {
    display: flex;
    gap: 0.5rem;
}

.secondary-nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 1.25rem 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.secondary-nav a i {
    font-size: 1rem;
    opacity: 0.8;
}

.secondary-nav a:hover {
    color: var(--primary-color);
    background: #f0f7ff;
}

.secondary-nav a.staff-link {
    color: #0369a1;
    background: #f0f9ff;
}

.secondary-nav a.staff-link:hover {
    background: #e0f2fe;
}

.logout-form {
    margin: 0;
}

.logout-btn {
    background: none;
    border: none;
    color: #ef4444;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border-radius: 6px;
}

.logout-btn:hover {
    background: #fef2f2;
}

.dashboard-banner:hover {
    transform: none;
}

/* Mapping System Styles */
.badge {
    padding: 0.35rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
}

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

.badge-warning {
    background: #fef9c3;
    color: #854d0e;
}

.mapping-table th {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.mapping-table tr:hover {
    background-color: rgba(248, 250, 252, 0.5);
}

.btn-primary-sm {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Staff Portal Styles */
.staff-portal-container {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.5rem;
}

.portal-header h1 {
    font-size: 2.2rem;
    color: var(--primary-color);
    margin: 0;
    font-weight: 800;
    letter-spacing: -1px;
}

.portal-header p {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

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

.stat-card {
    background: white;
    border-radius: 20px;
    padding: 1.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-right: 1.5rem;
}

.stat-card.blue .stat-icon { background: #eff6ff; color: #2563eb; }
.stat-card.green .stat-icon { background: #f0fdf4; color: #16a34a; }
.stat-card.purple .stat-icon { background: #faf5ff; color: #9333ea; }

.stat-info h3 {
    font-size: 2rem;
    margin: 0;
    color: var(--text-main);
    font-weight: 700;
}

.stat-info p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
    font-weight: 500;
}

.stat-progress, .stat-status {
    width: 100%;
    margin-top: 1.5rem;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px;
    transition: width 1s ease-out;
}

.stat-card.green .fill { background: #16a34a; }

.status-badge {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.status-badge::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #16a34a;
    border-radius: 50%;
    display: inline-block;
}

.quick-actions-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 700;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.action-item {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.action-item:hover {
    background: #f8fafc;
    border-color: var(--primary-color);
    transform: translateX(5px);
}

.action-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1.5rem;
    font-size: 1.4rem;
}

.action-icon.blue { background: #eff6ff; color: #2563eb; }
.action-icon.green { background: #f0fdf4; color: #16a34a; }
.action-icon.orange { background: #fff7ed; color: #ea580c; }
.action-icon.dark { background: #f1f5f9; color: #475569; }

.action-text h3 { 
    margin: 0; 
    font-size: 1.2rem; 
    color: var(--text-main); 
    font-weight: 700;
}

.action-text p { 
    margin: 0.35rem 0 0; 
    font-size: 0.9rem; 
    color: var(--text-muted);
}

.action-arrow { 
    margin-left: auto; 
    color: #cbd5e1; 
    font-size: 1.2rem;
    transition: transform 0.2s ease;
}

.action-item:hover .action-arrow {
    transform: translateX(3px);
    color: var(--primary-color);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

.pulse {
    animation: pulse 2s infinite ease-in-out;
}
