/* Google Fonts - Inter & Material Symbols Outlined */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');

/* Material Symbols Helper */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  display: inline-block;
  line-height: 1;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: normal;
  white-space: nowrap;
  direction: ltr;
  vertical-align: middle;
}

/* --- Global Color Palette Definition --- */
:root {
    --color-dark-deep: #051821;     /* Deep Navy/Black Backgrounds & Dark Elements */
    --color-teal-dark: #1A4645;     /* Sidebar & Primary Headers */
    --color-teal-medium: #266867;   /* Secondary UI & Accent Buttons */
    --color-amber-vibrant: #F58800; /* Action Buttons & Primary Highlights */
    --color-amber-gold: #FBBC24;    /* Badges & Warning Highlights */

    --bg-main: #f0f4f5;
    --card-bg: #ffffff;
    --text-main: #051821;
    --text-muted: #536265;
    --border-color: #d1dcde;
    --sidebar-width: 260px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- User Portal Layout (Login) --- */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-dark-deep) 0%, var(--color-teal-dark) 100%);
    padding: 20px;
}

.user-container {
    background: var(--card-bg);
    padding: 35px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(5, 24, 33, 0.15);
    max-width: 800px;
    width: 100%;
    margin: 30px auto;
    border: 1px solid var(--border-color);
}

.login-card {
    width: 100%;
    max-width: 420px;
    margin: 0;
}

/* --- Admin & Student Sidebar Layout --- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: var(--bg-main);
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--color-dark-deep);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

.admin-sidebar h3 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    padding: 22px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar ul {
    list-style: none;
    margin-top: 15px;
    padding: 0 12px;
}

.admin-sidebar li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #a0b2b5;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    border-radius: 10px;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.admin-sidebar li a:hover {
    background: var(--color-teal-dark);
    color: #ffffff;
}

.admin-sidebar li a.active {
    background: var(--color-teal-medium);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(38, 104, 103, 0.3);
}

.admin-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    width: calc(100% - var(--sidebar-width));
    max-width: 1400px;
}

/* --- Form Elements --- */
label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--color-dark-deep);
    font-size: 13px;
}

input, select, textarea {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.2s ease;
    background: #f8fafb;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--color-teal-medium);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(38, 104, 103, 0.15);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--color-amber-vibrant);
    color: #ffffff;
    padding: 11px 22px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(245, 136, 0, 0.2);
}

.btn:hover {
    background: #e07900;
    box-shadow: 0 5px 15px rgba(245, 136, 0, 0.35);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--color-teal-medium);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(38, 104, 103, 0.2);
}

.btn-secondary:hover {
    background: var(--color-teal-dark);
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

th, td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

th {
    background-color: #eaf1f2;
    color: var(--color-teal-dark);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.8px;
}

/* --- Badges & Alerts --- */
.badge {
    background: #eaf1f2;
    color: var(--color-teal-dark);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.badge-amber {
    background: #fef4e5;
    color: var(--color-amber-vibrant);
}

.alert-success {
    background: #e6f5f0;
    color: #106b52;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #bce6d8;
}

.alert-error {
    background: #fce8e6;
    color: #c5221f;
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid #fad2cf;
}

/* --- Responsive Layout --- */
@media (max-width: 900px) {
    .admin-layout {
        flex-direction: column;
    }
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .admin-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
}