/* Reset & Base Styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: auto;
    overflow: auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f7f9fc; /* light cool gray */
    color: #333;
    display: flex;
    flex-direction: column;
}

/* Layout: Sidebar + Main */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 240px;
    background: linear-gradient(180deg, #ffffff, #e3e8f1);
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 16px;
    border-right: 1px solid #ddd;
    user-select: none;
}

.sidebar-header {
    width: 100%;
    padding-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a73e8;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #ccc;
    white-space: nowrap;
}

.sidebar-header i {
    font-size: 1.8rem;
}

.sidebar-nav {
    flex-grow: 1;
    width: 100%;
    margin-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-left: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
}

.sidebar-nav a i {
    font-size: 1.3rem;
    min-width: 24px;
    text-align: center;
    color: #999;
    transition: color 0.3s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    background-color: #1a73e8;
    color: #fff;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.4);
}

.sidebar-nav a:hover i,
.sidebar-nav a.active i {
    color: #fff;
}

.sidebar-footer {
    width: 100%;
    padding: 18px 12px;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #ccc;
    text-align: center;
    white-space: nowrap;
}

.main {
    margin-left: 240px;
    padding: 32px;
    height: 100vh;
    overflow-y: auto;
    background: #ffffff;
    color: #333;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.03);
    border-radius: 8px 0 0 8px;
    transition: margin-left 0.3s ease;
    max-width: 100%;
}

/* Table Styling */
.table-responsive {
    overflow-x: hidden;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

table.dataTable td {
    white-space: nowrap;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
}

.paginate_button.page-item.active {
    z-index: 0 !important;
}

select:disabled {
    background-color: #f8f9fa;
    cursor: not-allowed;
}

.dataTables_length .form-select.form-select-sm {
    width: auto !important;
    min-width: 60px;
}


/* Navbar & Branding */
.navbar {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.navbar-brand img,
.school-brand img {
    height: 40px;
    max-height: 60px;
    object-fit: contain;
}

.site-header__logo svg {
    fill: #862633;
    transform: translateY(0);
    transition: transform 0.3s ease, fill 0.3s ease;
}

/* Forms & Inputs */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
}

.form-group input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.form-group.eye-container {
    position: relative;
}

.password-wrapper {
    position: relative;
    width: 100%;
}

input[type="password"] {
    width: 100%;
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 1em;
    top: 2.9em;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
    color: #333;
}

input[type="password"]:focus + .toggle-password {
    color: #007bff;
}

/* Buttons */
.login-btn {
    background: #0074cc;
    color: white;
    padding: 10px;
    font-size: 16px;
    width: 100%;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

.login-btn:hover {
    background: #005fa3;
}

.login-btn:disabled {
    background: #cccccc;
    color: #999999;
    cursor: not-allowed;
}

/* Login Page Layout */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 96vh;
}

.login-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-container img {
    width: 80px;
    margin-bottom: 10px;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-card {
    display: flex;
    max-width: 800px;
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.login-left {
    width: 40%;
    background: #004080;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 7px;
}

.login-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-right {
    padding: 40px 30px;
    width: 60%;
}

.login-right h2 {
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.forgot-password {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    text-decoration: none;
    color: #0074cc;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Cards and Error View */
.card {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.error-card {
    max-width: 700px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

/* Responsive Adjustments */
@media (max-width: 991px) {
    .navbar .navbar-toggler {
        display: none;
    }
}

@media (min-width: 1400px) {
    .row.g-3.align-items-center > div {
        flex: 0 0 auto;
    }
}

.dataTables_paginate .paginate_button {
    margin: 0 !important;
    padding: 0px 0px !important;
    min-width: auto !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    color: grey !important;
    border: none !important;
    border-bottom: none !important;
    background: white !important;
}
