/*
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
Click nbfs://nbhost/SystemFileSystem/Templates/JSP_Servlet/CascadeStyleSheet.css to edit this template
*/
/* Created on : Dec 31, 2025, 2:55:03 PM
    Author     : nadhi
*/
:root {
    --primary: #8A70D6;        /* Deep Lavender */
    --primary-hover: #775BC7;
    --secondary: #C3B1E1;      /* Soft Lilac */
    --bg-body: #F9F8FF;        /* Pale Mist */
    --surface: #FFFFFF;        /* Pure White */
    --text-main: #2D2C35;
    --text-light: #7A7A85;
    --success: #A8D5BA;
    --danger: #F2A2A2;
    --shadow: 0 4px 20px rgba(138, 112, 214, 0.1);
    --radius: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    display: flex;
    min-height: 100vh;
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: var(--surface);
    padding: 2rem;
    position: fixed;
    height: 100%;
    border-right: 1px solid #EFEFEF;
    z-index: 10;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover, .nav-link.active {
    background-color: rgba(138, 112, 214, 0.1);
    color: var(--primary);
    font-weight: 500;
}

/* --- Main Content --- */
.main-content {
    margin-left: 260px;
    flex: 1;
    padding: 2rem;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* --- Cards & Grid --- */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.card {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}
.card:hover {
    transform: translateY(-4px);
}

/* --- Tables --- */
.table-container {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-top: 2rem;
}
table {
    width: 100%;
    border-collapse: collapse;
}
th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #F0F0F0;
}
th {
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.9rem;
}

/* Row Action Buttons Styling */
table td button {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    margin: 0 6px;
    transition: transform 0.2s;
}
table td button:hover {
    transform: scale(1.2);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.status-confirmed {
    background: #E8F5E9;
    color: #2E7D32;
}
.status-approvedbylecturer{
    background: #FFF8E1;
    color: #F57F17;
}
.status-pending {
    background: #FFFDE7;
    color: #FFD600;
}
.status-rejected {
    background: #FFEBEE;
    color: #C62828;
}
.status-cancelled {
    background: #F5F5F5;
    color: #757575;
}

/* --- Role Badges --- */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.role-student {
    background-color: #e3f2fd;
    color: #0d47a1;
}
.role-lecturer {
    background-color: #f3e5f5;
    color: #7b1fa2;
}
.role-labstaff, .role-staff {
    background-color: #fff3e0;
    color: #e65100;
}
.role-guest {
    background-color: #f5f5f5;
    color: #616161;
}
.role-unknown {
    background-color: #eceff1;
    color: #455a64;
}

/* --- Forms & Modals --- */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
}
.btn-primary {
    background: var(--primary);
    color: white;
}
.btn-primary:hover {
    background: var(--primary-hover);
}
.btn-secondary {
    background: #EFEFEF;
    color: var(--text-main);
}
.btn-secondary:hover {
    background: #E5E5E5;
}
.btn-outline {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    width: 100%;
    margin-top: 10px;
    transition: all 0.2s ease-in-out;
}
.btn-outline:hover {
    background: var(--primary-hover);
    color: white;
    border-color: var(--primary-hover);
}

.btn-action {
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease-in-out;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
    color: white;
}
.btn-approve {
    background-color: #A8D5BA;
    box-shadow: 0 4px 10px rgba(168, 213, 186, 0.3);
}
.btn-approve:hover {
    background-color: #96c4a7;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(168, 213, 186, 0.4);
}
.btn-reject {
    background-color: #F2A2A2;
    box-shadow: 0 4px 10px rgba(242, 162, 162, 0.3);
}
.btn-reject:hover {
    background-color: #e09191;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(242, 162, 162, 0.4);
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    width: 500px;
    max-width: 90%;
    position: relative;
}
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* FIX: Filter out radios/checkboxes and include textareas */
.form-group input:not([type="radio"]):not([type="checkbox"]),
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
}
.form-group input:not([type="radio"]):not([type="checkbox"]):focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
}

/* Utility classes for text coloring */
.text-primary {
    color: var(--primary) !important;
}
.text-danger {
    color: var(--danger) !important;
}

/* --- Login Specific --- */
.login-container {
    display: flex;
    height: 100vh;
    width: 100%;
    background: white;
}
.login-left {
    width: 50%;
    background: linear-gradient(135deg, #F9F8FF 0%, #ECE6FF 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-right {
    width: 50%;
    padding: 4rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* --- Centered Auth Layout (Login/Register) --- */
.auth-body {
    background: linear-gradient(135deg, #F9F8FF 0%, #E6E1FF 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    position: relative;
    overflow-y: auto;
    padding: 40px 20px;
}
.circle-bg {
    position: absolute;
    border-radius: 50%;
    background: rgba(138, 112, 214, 0.05);
    z-index: 0;
}
.c1 {
    width: 400px;
    height: 400px;
    top: -100px;
    left: -100px;
}
.c2 {
    width: 300px;
    height: 300px;
    bottom: -50px;
    right: -50px;
}

/* FIXED: Added closing brace here */
.auth-card {
    background: var(--surface);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(138, 112, 214, 0.15);
    position: relative;
    z-index: 1;
    text-align: center;
    margin: auto;
}

.logo-container {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -65px auto 20px auto;
    box-shadow: 0 4px 15px rgba(138, 112, 214, 0.2);
    border: 2px solid #F9F8FF;
}
.logo-icon {
    font-size: 2.5rem;
    color: var(--primary);
    animation: spin 5s linear infinite;
}
@keyframes spin {
    100% {
        transform: rotate(360deg);
    }
}

.auth-input {
    background: #F9F8FF;
    border: 1px solid transparent;
    transition: 0.3s;
}
.auth-input:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(138, 112, 214, 0.1);
}
.divider {
    margin: 1.5rem 0;
    border-top: 1px solid #eee;
    position: relative;
}
.divider span {
    background: white;
    padding: 0 10px;
    color: var(--text-light);
    font-size: 0.8rem;
    position: relative;
    top: -10px;
}

.role-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 8px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: var(--text-light);
}
.active-role {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    color: var(--primary);
    font-weight: 500;
}

.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 1.5rem;
    background: #F9F8FF;
    padding: 10px;
    border-radius: 12px;
}
.role-label {
    cursor: pointer;
    margin: 0;
}
.role-label input {
    display: none;
}
.role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    transition: all 0.2s ease;
    border: 1px solid transparent;
}
.role-card i {
    font-size: 1.2rem;
    margin-bottom: 4px;
}
.active-role {
    background: white;
    color: var(--primary);
    box-shadow: 0 4px 10px rgba(138, 112, 214, 0.15);
    border: 1px solid var(--primary);
    font-weight: 600;
}

.slot-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
}
.time-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
}
.time-card:hover {
    transform: translateY(-2px);
    border-color: var(--primary);
    box-shadow: 0 5px 12px rgba(138, 112, 214, 0.15);
}
.time-card i {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 2px;
}
.time-card span {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}
.time-card.selected {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(138, 112, 214, 0.3);
}
.time-card.selected i, .time-card.selected span {
    color: white;
}
.time-card.booked {
    background-color: #F9F9F9;
    border-color: #EEE;
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}
.time-card.booked:hover {
    transform: none;
    border-color: #EEE;
}
.time-card.booked span {
    text-decoration: line-through;
    color: #CCC;
}

.details-section {
    display: none;
    border-top: 1px solid #eee;
    margin-top: 2rem;
    padding-top: 1.5rem;
    animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.summary-card {
    background: white;
    border: 1px solid #E0E0E0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    gap: 20px;
}
.summary-icon-box {
    width: 50px;
    height: 50px;
    background: #F4F1FD;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.4rem;
    flex-shrink: 0;
}
.summary-details h4 {
    margin: 0;
    color: var(--text-main);
    font-size: 1.1rem;
    font-weight: 700;
}
.summary-details p {
    margin: 5px 0 0 0;
    color: var(--text-light);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Approval Page Specific Styles --- */
.section-header {
    margin: 2rem 0 1rem 0;
    border-bottom: 1px solid #ddd;
    padding-bottom: 0.5rem;
    color: #333;
}
.section-header i {
    margin-right: 8px;
}

.btn-action {
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 4px;
}
.btn-action:hover {
    transform: scale(1.1);
}
.btn-approve {
    background-color: #E8F5E9;
    color: #2E7D32;
}
.btn-reject {
    background-color: #FFEBEE;
    color: #C62828;
}
.inline-form {
    display: inline;
}
.action-cell {
    white-space: nowrap;
    min-width: 100px;
}

.alert {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}
.alert i {
    margin-right: 10px;
    font-size: 1.1rem;
}
.alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
    border-left: 5px solid #2E7D32;
}
.alert-error {
    background-color: #FFEBEE;
    color: #C62828;
    border-left: 5px solid #C62828;
}
.history-section {
    margin-top: 3rem;
    opacity: 0.9;
}

.action-buttons-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}
.action-buttons-container form {
    margin: 0;
    padding: 0;
    display: block;
}

/* =========================================
   --- Maintenance Page Specific --- 
   ========================================= */
.header-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}
.alert-banner {
    background-color: #fff3cd;
    color: #856404;
    padding: 15px;
    border-left: 5px solid #ffeeba;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.alert-btn {
    background-color: #ffc107;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    color: #333;
    transition: 0.2s;
}
.alert-btn:hover {
    background-color: #e0a800;
}

.bg-scheduled {
    background-color: #E3F2FD;
    color: #1976D2;
}
.bg-ongoing {
    background-color: #FFF3E0;
    color: #F57C00;
}
.bg-completed {
    background-color: #E8F5E9;
    color: #388E3C;
}
.bg-cancelled {
    background-color: #F5F5F5;
    color: #757575;
}

.close-btn {
    float: right;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-light);
    line-height: 1;
    transition: 0.2s;
}
.close-btn:hover {
    color: var(--text-main);
}