/* 
    TEACHER EVALUATION SYSTEM - MODERN UI OVERHAUL (GOLD STANDARD)
    Features: Glassmorphism, Floating Navigation, and Dynamic Animations.
*/

:root {
    --primary-color: #4f46e5; /* Indigo 600 */
    --primary-hover: #4338ca; 
    --secondary-color: #0ea5e9; /* Sky 500 */
    --accent-color: #818cf8;
    
    --bg-main: #f8fafc; /* Slate 50 */
    --sidebar-bg: #0f172a; /* Slate 900 */
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.4);
    
    --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* BASE RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: #1e293b;
    overflow-x: hidden;
    line-height: 1.6;
}

/* --- ANIMATIONS --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in {
    animation: fadeInUp 0.5s ease-out forwards;
}

/* --- LAYOUT --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    padding: 15px; /* Floating look */
    gap: 15px;
}

/* --- MODERN FLOATING SIDEBAR --- */
.sidebar {
    width: 280px;
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    height: calc(100vh - 30px); /* Floating height */
    position: fixed;
    border-radius: var(--radius-xl);
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    padding: 30px 0;
    box-shadow: var(--shadow-lg);
    overflow-y: auto;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.sidebar-header {
    padding: 0 30px 40px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 25px;
}

.sidebar-menu {
    list-style: none;
    padding: 0 15px;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.2s;
    font-weight: 600;
    font-size: 0.95rem;
}

.menu-link i {
    width: 24px;
    margin-right: 15px;
    font-size: 1.2rem;
    transition: transform 0.2s;
}

.menu-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}

.menu-link:hover i { transform: translateX(3px); }

.menu-link.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--sidebar-active);
    box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.4);
}

.sidebar-footer {
    margin-top: auto;
    padding: 20px 25px;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* --- MAIN CONTENT --- */
.main-content {
    flex-grow: 1;
    margin-left: 295px; /* Offset for floating sidebar */
    padding: 20px 30px;
    width: 100%;
}

/* --- MOBILE HEADER (Hidden on Desktop) --- */
.mobile-header {
    display: none;
    padding: 15px 25px;
    align-items: center;
    justify-content: space-between;
}

@media (max-width: 991px) {
    .app-wrapper { padding: 0; }
    .sidebar { left: -300px; height: 100vh; border-radius: 0; }
    .sidebar.open { left: 0; }
    .main-content { margin-left: 0; padding: 20px; }
    .mobile-header { display: flex; }
}

/* --- GLASSMORPHISM COMPONENTS --- */
.card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0,0,0,0.03);
    margin-bottom: 30px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.glass-container {
    background: var(--glass-bg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

/* --- BUTTONS --- */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
}

/* --- FORMS --- */
.form-group label {
    font-weight: 700;
    color: #475569;
    margin-bottom: 10px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-control {
    background: rgba(241, 245, 249, 0.5);
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 18px;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1e293b;
}

.form-control:focus {
    background: #fff;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 5px rgba(79, 70, 229, 0.1), 0 10px 15px -3px rgba(0,0,0,0.05);
    outline: none;
    transform: translateY(-1px);
}

.form-control::placeholder {
    color: #94a3b8;
    font-weight: 500;
}

/* --- LOGIN REDESIGN --- */
.login-body {
    background: radial-gradient(circle at top left, #4f46e5, #0ea5e9, #0f172a);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* --- TABLES --- */
.table-responsive {
    border-radius: 12px;
    overflow: hidden;
}

table { border-spacing: 0; width: 100%; }
th { background: #f8fafc; color: #64748b; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; padding: 20px; }
td { padding: 20px; border-bottom: 1px solid #f1f5f9; }

/* DATA TABLES POLISH */
.dataTables_wrapper .dataTables_filter input {
    background: #f1f5f9;
    border: none !important;
    border-radius: 10px !important;
    padding: 8px 15px !important;
}

/* ALERTS */
.msg-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #d1fae5;
    border-left: 5px solid #10b981;
    padding: 20px;
    border-radius: 12px;
}

/* --- MODERN MODAL SYSTEM --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; 
    width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: #fff;
    width: 100%;
    max-width: 650px;
    border-radius: var(--radius-xl);
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: zoomIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes zoomIn { from { transform: scale(0.95); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.modal-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-family: 'Outfit';
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--sidebar-bg);
}

/* --- FORM GRID SYSTEM --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.form-full { grid-column: span 2; }

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 800;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    margin-left: 4px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}
