@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:wght@700&display=swap');

:root {
    --primary: #002147; /* St. Bernard Navy */
    --gold: #D4AF37;    /* Classic Gold */
    --light-bg: #F4F7F6;
    --text: #333;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', sans-serif; background: var(--light-bg); color: var(--text); }
h1, h2, h3, h4 { font-family: 'Playfair Display', serif; color: var(--primary); }

/* --- Login & Gateway --- */
.login-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background-size: cover; background-position: center;
}
.login-card {
    background: rgba(255, 255, 255, 0.96);
    padding: 3rem; border-radius: 12px;
    width: 100%; max-width: 420px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    text-align: center; border-top: 5px solid var(--gold);
}
.gateway-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px; max-width: 800px; margin: 0 auto;
}
.gateway-card {
    background: white; padding: 2rem; border-radius: 10px;
    text-decoration: none; color: inherit; transition: transform 0.3s;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}
.gateway-card:hover { transform: translateY(-5px); }

.form-input {
    width: 100%; padding: 12px; margin: 8px 0 20px;
    border: 1px solid #ccc; border-radius: 6px; font-size: 1rem;
}
.btn {
    width: 100%; padding: 12px; border: none; border-radius: 6px;
    background: var(--primary); color: white; font-weight: 600; cursor: pointer;
    transition: 0.3s;
}
.btn:hover { background: var(--gold); color: var(--primary); }

/* --- Dashboard --- */
.wrapper { display: flex; min-height: 100vh; }
.sidebar {
    width: 260px; background: var(--primary); color: white;
    padding: 2rem; display: flex; flex-direction: column;
    position: fixed; height: 100%; top: 0; left: 0;
}
.nav-link {
    display: block; color: rgba(255,255,255,0.7); text-decoration: none;
    padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1);
}
.nav-link:hover, .nav-link.active { color: var(--gold); padding-left: 10px; }
.main { margin-left: 260px; flex: 1; padding: 2rem; }

/* --- Components --- */
.header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.5rem; }
.card {
    background: var(--white); padding: 1.5rem; border-radius: 10px;
    box-shadow: var(--shadow); border-left: 4px solid var(--gold);
}
.stat { font-size: 2rem; font-weight: 700; color: var(--primary); }

table { width: 100%; border-collapse: collapse; margin-top: 1rem; background: white; }
th, td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f9fa; font-weight: 600; }
.tag { padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.tag.compulsory { background: #ffeeba; color: #856404; }

/* Responsive */
@media(max-width: 768px) {
    .sidebar { display: none; }
    .main { margin-left: 0; }
}

/* --- PROFESSIONAL DASHBOARD LAYOUT --- */

/* Main Layout Fix */
.main {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #f4f6f9;
    padding: 0;
    margin-left: 260px; /* Matches Sidebar Width */
    transition: all 0.3s;
}

/* 1. PROFESSIONAL TOP HEADER BAR */
.top-header {
    background: #ffffff;
    height: 70px;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    /* The Professional Touch: Shadow + Gold Top Border */
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); 
    border-top: 4px solid var(--gold); 
}

/* Header Text Styling */
.header-left h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Playfair Display', serif;
}

.header-left .breadcrumb {
    font-size: 0.8rem;
    color: #999;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header Right Section (Profile & Date) */
.header-right {
    display: flex;
    align-items: center;
    gap: 25px;
}

.date-badge {
    background: #f8f9fa;
    color: var(--primary);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-left: 20px;
    border-left: 1px solid #eee;
}

.user-info {
    text-align: right;
}

.user-name {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: #333;
}

.user-role {
    display: block;
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 700;
}

.user-avatar {
    width: 42px;
    height: 42px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
    box-shadow: 0 4px 10px rgba(0, 33, 71, 0.2);
}

/* 2. CONTENT AREA (Pushes footer down) */
.dashboard-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
}

/* 3. PROFESSIONAL FOOTER BAR */
.dashboard-footer {
    background: var(--primary); /* Navy Background */
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 15px 0;
    font-size: 0.85rem;
    margin-top: auto; /* Ensures it stays at bottom */
    border-top: 4px solid var(--gold); /* Matching Gold Border */
}

.dashboard-footer strong {
    color: #fff;
    font-weight: 600;
}

/* Responsive Fix for Sidebar overlap */
@media(max-width: 768px) {
    .main { margin-left: 0; }
}