:root {
    /* Professional Warm Theme */
    --primary-color: #8D6E63;   /* Warm Taupe/Brown */
    --primary-dark: #5D4037;    /* Deep Brown */
    --primary-light: #BCAAA4;   /* Light Taupe */
    --secondary-color: #8D8D8D; /* Warm Gray */
    --secondary-dark: #616161;
    --success-color: #388E3C;   /* Muted Green */
    --success-dark: #1B5E20;
    --danger-color: #D32F2F;    /* Muted Red */
    --danger-dark: #B71C1C;
    --warning-color: #FFA000;   /* Amber */
    --light-color: #F5F5F5;     /* Warm White */
    --dark-color: #3E2723;      /* Very Dark Brown */
    --border-color: #D7CCC8;    /* Light Warm Brown */
    
    /* 3D Shadows */
    --shadow-sm: 0 2px 4px rgba(62, 39, 35, 0.1);
    --shadow-md: 0 4px 8px rgba(62, 39, 35, 0.15), 0 2px 4px rgba(62, 39, 35, 0.12);
    --shadow-lg: 0 10px 20px rgba(62, 39, 35, 0.15), 0 3px 6px rgba(62, 39, 35, 0.10);
    --shadow-inset: inset 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    background-color: #FAF8F5; /* Warm Cream Background */
    color: #4E342E;            /* Dark Brown Text */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* 3D Visual Logo */
.visual-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    transition: transform 0.3s ease;
}

.visual-logo:hover {
    transform: scale(1.1) rotate(5deg);
}

.visual-logo svg {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.logo-3d-container {
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Navbar - 3D Depth */
.navbar {
    background: linear-gradient(to bottom, var(--dark-color), #2D1B18);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    z-index: 1000;
}

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

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 0.5px;
}

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

.nav-links a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    transition: all 0.3s;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 4px;
}

.nav-links a:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

/* Menu Toggle (Hamburger) */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s;
}

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.dashboard-date-info {
    text-align: right;
}

/* Cards - 3D Floating */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 2rem;
    margin-bottom: 2rem;
    border: 1px solid rgba(255,255,255,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card h2 {
    margin-bottom: 1.5rem;
    color: var(--dark-color);
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    font-weight: 700;
}

/* Forms - Inset Depth */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s;
    background-color: #FAFAFA;
    box-shadow: var(--shadow-inset);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(141, 110, 99, 0.2), var(--shadow-inset);
}

/* Buttons - 3D Pressable */
.btn {
    display: inline-block;
    padding: 0.7rem 1.4rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.1s cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    position: relative;
    
    /* Default Primary */
    background-color: var(--primary-color);
    background-image: linear-gradient(to bottom, rgba(255,255,255,0.15), rgba(0,0,0,0.1));
    box-shadow: 0 4px 0 var(--primary-dark), 0 5px 10px rgba(0,0,0,0.15);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

.btn:hover {
    transform: translateY(-1px);
    filter: brightness(110%);
    box-shadow: 0 5px 0 var(--primary-dark), 0 7px 15px rgba(0,0,0,0.2);
}

.btn:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 var(--primary-dark), 0 2px 4px rgba(0,0,0,0.2);
}

/* Button Variants */
.btn-danger {
    background-color: var(--danger-color);
    box-shadow: 0 4px 0 var(--danger-dark), 0 5px 10px rgba(0,0,0,0.15);
}
.btn-danger:hover { box-shadow: 0 5px 0 var(--danger-dark), 0 7px 15px rgba(0,0,0,0.2); }
.btn-danger:active { box-shadow: 0 1px 0 var(--danger-dark), 0 2px 4px rgba(0,0,0,0.2); }

.btn-success {
    background-color: var(--success-color);
    box-shadow: 0 4px 0 var(--success-dark), 0 5px 10px rgba(0,0,0,0.15);
}
.btn-success:hover { box-shadow: 0 5px 0 var(--success-dark), 0 7px 15px rgba(0,0,0,0.2); }
.btn-success:active { box-shadow: 0 1px 0 var(--success-dark), 0 2px 4px rgba(0,0,0,0.2); }

.btn-secondary {
    background-color: var(--secondary-color);
    box-shadow: 0 4px 0 var(--secondary-dark), 0 5px 10px rgba(0,0,0,0.15);
}
.btn-secondary:hover { box-shadow: 0 5px 0 var(--secondary-dark), 0 7px 15px rgba(0,0,0,0.2); }
.btn-secondary:active { box-shadow: 0 1px 0 var(--secondary-dark), 0 2px 4px rgba(0,0,0,0.2); }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 5px solid;
    box-shadow: var(--shadow-sm);
}

.alert-error {
    background-color: #FFEBEE;
    color: #B71C1C;
    border-color: #D32F2F;
}

.alert-success {
    background-color: #E8F5E9;
    color: #1B5E20;
    border-color: #388E3C;
}

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

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1rem;
    min-width: 600px; /* Ensure table doesn't squash too much */
}

/* Compact Table Variant */
.table-compact {
    min-width: auto;
    font-size: 0.85rem;
}

.table-compact th, 
.table-compact td {
    padding: 0.5rem 0.75rem;
}

.table-compact th {
    font-size: 0.75rem;
}

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

th {
    background-color: var(--light-color);
    font-weight: 700;
    color: var(--dark-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    border-top: 1px solid var(--border-color);
}

th:first-child { border-top-left-radius: 8px; border-left: 1px solid var(--border-color); }
th:last-child { border-top-right-radius: 8px; border-right: 1px solid var(--border-color); }
td:first-child { border-left: 1px solid var(--border-color); }
td:last-child { border-right: 1px solid var(--border-color); }
tr:last-child td:first-child { border-bottom-left-radius: 8px; }
tr:last-child td:last-child { border-bottom-right-radius: 8px; }

/* Profile Dropdown */
.profile-dropdown {
    position: relative;
    display: inline-block;
}

.profile-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.2);
    transition: transform 0.2s;
}

.profile-icon:hover {
    transform: scale(1.05);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background-color: white;
    color: var(--dark-color);
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
    animation: fadeIn 0.2s ease-out;
}

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

.dropdown-content.show {
    display: block;
}

.dropdown-header {
    padding: 16px;
    background-color: #FAFAFA;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-content a {
    color: var(--dark-color);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: linear-gradient(to top, #2D1B18, var(--dark-color));
    color: rgba(255,255,255,0.7);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-text {
    line-height: 1.6;
    letter-spacing: 0.5px;
}

.footer-name {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
    display: inline-block;
    margin-bottom: 4px;
}

.footer-dept {
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    font-style: italic;
}

/* Utilities */
.text-muted { color: var(--secondary-color); }
.text-center { text-align: center; }

/* Status Badges - 3D Pill */
.status-badge {
    padding: 0.35em 0.8em;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    border: 1px solid rgba(255,255,255,0.2);
    text-shadow: 0 1px 1px rgba(0,0,0,0.1);
    letter-spacing: 0.5px;
}
.status-pending { background: linear-gradient(135deg, #FFC107, #FFA000); color: #3E2723; }
.status-approved { background: linear-gradient(135deg, #66BB6A, #43A047); color: white; }
.status-rejected { background: linear-gradient(135deg, #EF5350, #E53935); color: white; }
.status-cancelled { background: linear-gradient(135deg, #BDBDBD, #9E9E9E); color: white; }

/* 3D Campus Badges */
.campus-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 0 rgba(0,0,0,0.15), 0 4px 8px rgba(0,0,0,0.15);
    transition: all 0.15s ease;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.campus-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 0 rgba(0,0,0,0.15), 0 5px 10px rgba(0,0,0,0.2);
}

.campus-male {
    background: linear-gradient(135deg, #42A5F5, #1565C0);
    border-bottom: 1px solid #0D47A1;
}

.campus-female {
    background: linear-gradient(135deg, #EC407A, #C2185B);
    border-bottom: 1px solid #880E4F;
}

/* Badge Count - 3D Orb */
.badge-count {
    background: radial-gradient(circle at 30% 30%, #EF5350, #C62828);
    color: white;
    padding: 2px 6px;
    border-radius: 50%;
    font-size: 0.75rem;
    vertical-align: top;
    margin-left: 5px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    animation: pulse 2s infinite;
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 83, 80, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 5px rgba(239, 83, 80, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 83, 80, 0); }
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    /* Navbar */
    .menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--dark-color);
        flex-direction: column;
        padding: 1rem 0;
        text-align: center;
        box-shadow: 0 5px 10px rgba(0,0,0,0.2);
        gap: 0;
        z-index: 1001; /* Ensure it sits above everything */
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.05);
    }
    
    .nav-links a:hover {
        background-color: rgba(255,255,255,0.05);
    }

    .profile-dropdown {
        display: block; 
        margin: 1rem auto;
    }

    /* Layout & Cards */
    .container {
        padding: 0 15px;
    }
    
    .card {
        padding: 1.25rem;
    }

    /* Dashboard Header Stack */
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .dashboard-date-info {
        text-align: left;
    }
    
    /* Tables */
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.75rem;
    }
    
    /* Ensure table horizontal scroll if too wide */
    .card {
        overflow-x: auto;
    }
    
    /* Typography */
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.4rem; }
    
    /* Buttons */
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
    
    .btn-sm {
        width: auto; 
    }
}
