/* ==========================================================================
   Sikkhalay Enterprise Digital School OS — Central Design System & CSS Rules
   ========================================================================== */

:root {
    /* Sikkhalay Enterprise Color Palette */
    --brand-primary: #059669; /* Emerald Primary */
    --brand-primary-hover: #047857;
    --brand-light: #ecfdf5;
    --brand-accent: #10b981;
    
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    
    --status-success: #10b981;
    --status-success-bg: #dcfce7;
    --status-warning: #f59e0b;
    --status-warning-bg: #fef3c7;
    --status-danger: #ef4444;
    --status-danger-bg: #fee2e2;
    --status-info: #3b82f6;
    --status-info-bg: #dbeafe;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.07), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    
    --sidebar-width: 260px;
    --header-height: 70px;
    --bottom-nav-height: 65px;
}

[data-theme="dark"] {
    --bg-body: #0b0f19;
    --bg-surface: #151e2e;
    --bg-elevated: #1e293b;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-light: #64748b;
    
    --border-color: #273549;
    --border-light: #1e293b;
    
    --brand-light: rgba(5, 150, 105, 0.2);
    
    --status-success-bg: rgba(16, 185, 129, 0.18);
    --status-warning-bg: rgba(245, 158, 11, 0.18);
    --status-danger-bg: rgba(239, 68, 68, 0.18);
    --status-info-bg: rgba(59, 130, 246, 0.18);
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    overflow-x: hidden;
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom, 0px));
    transition: background-color 0.25s ease, color 0.25s ease;
}

body, .sidebar, .header, .panel, .kpi-card, .modal-card, .table-card, .settings-drawer, .form-control {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
}

/* --- GLOBAL LAYOUT ARCHITECTURE --- */
#app {
    display: flex;
    min-height: 100vh;
}

/* --- SIDEBAR (Desktop & Tablet) --- */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 40;
    transition: all 0.3s ease;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 6px;
}

.sidebar-brand .logo-icon {
    width: 45px;
    height: 45px;
    background: url('/assets/images/logo.jpeg') no-repeat center center;
    background-size: cover; 
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full); 
}

.sidebar-brand .brand-text {
    display: flex;
    flex-direction: column;
}

.sidebar-brand .brand-name {
    font-weight: 700;
    font-size: 16px;
    color: var(--brand-primary);
    letter-spacing: -0.5px;
}

.sidebar-brand .portal-tag {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}

.sidebar-menu {
    padding: 20px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.nav-item:hover {
    background-color: var(--bg-elevated);
    color: var(--brand-primary);
}

.nav-item.active {
    background-color: var(--brand-light);
    color: var(--brand-primary);
}

.nav-item i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

/* --- SIDEBAR THEME SWITCHER WIDGET --- */
.sidebar-footer {
    padding: 16px 12px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.sidebar-theme-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    transition: all 0.25s ease;
}

.sidebar-theme-card:hover {
    border-color: var(--brand-primary);
    background: var(--brand-light);
}

.sidebar-theme-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.sidebar-theme-info i {
    font-size: 16px;
    color: var(--brand-primary);
    width: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.sidebar-theme-card:hover .sidebar-theme-info i {
    transform: rotate(20deg);
}

.theme-switch-track {
    width: 36px;
    height: 20px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    position: relative;
    transition: background 0.3s ease;
}

[data-theme="dark"] .theme-switch-track {
    background: var(--brand-primary);
}

.theme-switch-thumb {
    width: 16px;
    height: 16px;
    background: #ffffff;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .theme-switch-thumb {
    transform: translateX(16px);
}

/* --- MAIN WORKSPACE LAYER --- */
.workspace {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
    transition: margin-left 0.3s ease;
}

/* --- GLOBAL TOP HEADER --- */
.header {
    height: var(--header-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 30;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.mobile_header_left {
    display: none;
}

.school-identity-header {
    display: flex;
    flex-direction: column;
}

.institution-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.institution-meta {
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.header-btn {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    height: 38px;
    padding: 0 14px;
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.header-btn:hover {
    background: var(--border-color);
}

.theme-quick-toggle {
    width: 38px;
    height: 38px;
    padding: 0;
    justify-content: center;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text-main);
    border: 1px solid var(--border-color);
    transition: all 0.25s ease;
}

.theme-quick-toggle:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    transform: scale(1.05);
}

.theme-quick-toggle i {
    font-size: 15px;
    transition: transform 0.3s ease;
}

.theme-quick-toggle:hover i {
    transform: rotate(20deg);
}

.search-trigger {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    width: 220px;
}

.kbd-shortcut {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 700;
    margin-left: auto;
}

/* --- CONTENT CONTAINER --- */
.content-area {
    padding: 24px;
    flex: 1;
}

.page-view {
    animation: fadeIn 0.3s ease;
}

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

/* --- MOBILE BOTTOM NAVIGATION BAR --- */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.03);
}

.mobile-nav-items {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: space-around;
} 

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 600;
    gap: 4px;
    flex: 1;
    height: 100%;
    cursor: pointer;
}

.mobile-nav-item i {
    font-size: 13px;
}

.mobile-nav-item.active {
    color: var(--brand-primary);
}
.mobile-nav-item span {
    font-size: 10px;
    color: var(--text-muted); 
}

/* --- UI COMPONENTS --- */

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.kpi-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kpi-title {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.kpi-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.kpi-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

.kpi-footer {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Status Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.badge-live { background: var(--status-success-bg); color: var(--status-success); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); }
.badge-danger { background: var(--status-danger-bg); color: var(--status-danger); }
.badge-info { background: var(--status-info-bg); color: var(--status-info); }

.pulse-dot {
    width: 8px;
    height: 8px;
    background-color: var(--status-success);
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Layout Panels */
.panel-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.panel {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Data Tables */
.table-container {
    width: 100%;
    max-width: 80vw;
    overflow: hidden;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 13px;
}

.data-table th {
    background: var(--bg-elevated);
    padding: 12px 14px;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    vertical-align: middle;
    font-size: 11px;
}

.data-table tr:hover {
    background-color: #f8fafc;
}

.user-avatar-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Timelines */
.timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    padding-left: 20px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand-primary);
}

.timeline-time {
    font-size: 11px;
    font-weight: 700;
    color: var(--brand-primary);
}

.timeline-content {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

/* --- ADMIN MODULES ARCHITECTURE --- */
.admin-sub-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 12px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.lp_action{
    display: grid; 
    grid-template-columns: 2fr 1fr; 
    gap: 20px; 
    margin-bottom: 20px;
}

.admin-sub-btn {
    padding: 8px 16px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.admin-sub-btn.active {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
}

.form-control:focus {
    border-color: var(--brand-primary);
}

.btn-primary {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
}

/* --- MODAL SYSTEM & COMMAND PALETTE --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    padding: 24px;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 1024px) {
    .panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .workspace {
        margin-left: 0;
    }

    .mobile-bottom-nav {
        display: block;
    }

    .header-left {
        display: none;
    }
    .search-trigger{
        display: none;
    }
    .mobile_header_left {
        display: flex;
        padding: 0 0px;
    }

    .search-trigger {
        width: 140px;
    }

    .header {
        padding: 0 6px;
    }

    .content-area {
        padding: 16px;
    }
    .lp_action{
        display: flex; 
        flex-direction: column; 
        gap: 12px; 
        margin-bottom: 20px;
    }
}

/* --- FILE UPLOAD & IMAGE PREVIEW STYLES --- */
.file-upload-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all 0.2s;
}

.file-upload-box:hover {
    border-color: var(--brand-primary);
    background: var(--brand-light);
}

.file-upload-input {
    display: none;
}

.file-preview-thumb {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-top: 8px;
}

/* --- CAMPUS GALLERY STYLES --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.gallery-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.gallery-card-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
}

.gallery-card-caption {
    padding: 10px 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- CAMPUS BLOG & NEWS STYLES --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.blog-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.blog-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.blog-card-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.blog-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    line-height: 1.4;
}

.blog-card-snippet {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 14px;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 10px;
    border-top: 1px solid var(--border-light);
}

/* ==========================================================================
   SYSTEM SETTINGS & QUICK NAVIGATION DRAWER STYLES
   ========================================================================== */
.settings-drawer-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-drawer-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.settings-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    bottom: 0;
    width: 380px;
    max-width: 90vw;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-drawer-backdrop.active .settings-drawer {
    transform: translateX(-420px);
}

.settings-drawer-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-elevated);
}

.settings-drawer-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-drawer-close {
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-drawer-close:hover {
    background: var(--border-color);
    color: var(--text-main);
}

.settings-drawer-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.settings-section-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.settings-option-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.settings-option-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-option-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--brand-light);
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.settings-option-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.settings-option-subtitle {
    font-size: 11px;
    color: var(--text-muted);
}

.theme-pill-group {
    display: flex;
    background: var(--bg-body);
    padding: 3px;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-color);
    gap: 3px;
}

.theme-pill-btn {
    border: none;
    background: transparent;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.theme-pill-btn.active {
    background: var(--brand-primary);
    color: #ffffff;
    box-shadow: var(--shadow-sm);
}

.settings-nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.settings-nav-item {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--text-main);
    transition: all 0.2s;
    position: relative;
}

.settings-nav-item:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.settings-nav-item i {
    font-size: 18px;
    color: var(--brand-primary);
}

.settings-nav-item span {
    font-size: 13px;
    font-weight: 600;
}

.settings-nav-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--status-danger);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
}

.settings-user-card {
    background: linear-gradient(135deg, var(--brand-primary), #047857);
    color: white;
    padding: 16px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 12px;
}

.settings-user-avatar {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: 800;
}

/* ==========================================================================
   MOBILE & RESPONSIVE BREAKPOINT OVERRIDES (HEADER & NAVIGATION FOCUS)
   ========================================================================== */

@media (max-width: 768px) {
    .sidebar {
        display: none !important;
    }
    
    .workspace {
        margin-left: 0 !important;
    }
    
    .header {
        height: 60px;
        padding: 0 12px;
        position: sticky;
        top: 0;
        z-index: 900;
        background: var(--bg-surface);
        border-bottom: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .school-identity-header {
        display: none !important;
    }

    .mobile_header_left {
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .header-left {
        gap: 8px;
    }

    .header-right {
        gap: 6px;
    }

    .search-trigger {
        padding: 0 10px;
        height: 36px;
    }

    .search-trigger span {
        display: none !important;
    }

    .header-btn {
        height: 36px;
        padding: 0 10px;
        font-size: 12px;
    }

    .content-area {
        padding: 12px;
    }

    .page-header-row, .card-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .filter-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }
}

@media (max-width: 480px) {
    .header {
        padding: 0 8px;
    }
    
    .header-right {
        gap: 4px;
    }

    .header-btn {
        height: 34px;
        padding: 0 8px;
    }
}

/* ==========================================================================
   PRODUCTION SCHOOL PROFILE, FACULTY, SHIFTS & GALLERY DESIGN SYSTEM
   ========================================================================== */

/* --- Panel Edit / Lock System --- */
.profile-panel {
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    position: relative;
}

.profile-panel.panel-locked {
    background: var(--bg-surface);
}

.profile-panel.panel-locked .form-control:disabled,
.profile-panel.panel-locked select:disabled,
.profile-panel.panel-locked textarea:disabled {
    background-color: var(--bg-elevated) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
    cursor: not-allowed;
    opacity: 0.85;
    user-select: text;
}

.profile-panel.panel-locked .upload-dropzone {
    pointer-events: none;
    opacity: 0.6;
    background: var(--bg-elevated);
    cursor: not-allowed;
    border-style: solid;
}

.profile-panel.panel-locked .tag-input-row,
.profile-panel.panel-locked .tag-chip-remove {
    display: none !important;
}

.profile-panel.panel-locked .shift-mode-pill {
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.8;
}

.profile-panel.panel-locked input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.profile-panel.panel-editing {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.2), var(--shadow-md) !important;
    background: var(--bg-surface);
}

.profile-panel.panel-editing .form-control {
    background-color: var(--bg-surface);
    border-color: var(--brand-primary);
}

.badge-locked {
    background: var(--bg-elevated);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-sm-primary {
    background: var(--brand-primary);
    color: white;
    border: none;
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.15s ease;
}

.btn-sm-primary:hover {
    background: var(--brand-hover);
    box-shadow: var(--shadow-sm);
}

.btn-sm-cancel {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.btn-sm-cancel:hover {
    background: var(--bg-surface);
    color: var(--status-danger);
    border-color: var(--status-danger);
}

/* --- Live Profile Card Preview --- */
.live-profile-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.live-profile-card:hover {
    box-shadow: var(--shadow-lg);
}

.lpc-cover-wrap {
    height: 140px;
    position: relative;
    overflow: hidden;
    background: #0f172a;
}

.lpc-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    transition: transform 0.4s ease;
}

.live-profile-card:hover .lpc-cover-img {
    transform: scale(1.03);
}

.lpc-cover-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15,23,42,0.2) 0%, rgba(15,23,42,0.85) 100%);
}

.lpc-badge-top {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(6px);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.lpc-logo-holder {
    position: absolute;
    bottom: -22px;
    left: 16px;
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    padding: 3px;
    border: 3px solid var(--bg-surface);
    box-shadow: var(--shadow-md);
    z-index: 2;
}

.lpc-logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: calc(var(--radius-md) - 3px);
}

.lpc-body {
    padding: 32px 16px 16px 16px;
}

.lpc-name-en {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
}

.lpc-name-bn {
    font-size: 13px;
    color: var(--brand-primary);
    font-weight: 600;
    margin-top: 2px;
}

.lpc-meta-tag {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lpc-motto-box {
    margin: 12px 0;
    padding: 10px 12px;
    background: var(--bg-elevated);
    border-left: 3px solid var(--brand-primary);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.lpc-principal-row {
    background: var(--brand-light);
    border-radius: var(--radius-md);
    padding: 10px 12px;
    margin-bottom: 12px;
}

.lpc-principal-name {
    font-size: 12px;
    font-weight: 700;
    color: var(--brand-primary);
}

.lpc-principal-deg {
    font-size: 11px;
    color: var(--text-muted);
}

.lpc-principal-quote {
    font-size: 11px;
    color: var(--text-main);
    margin-top: 4px;
    font-style: italic;
}

.lpc-stats-bar {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    text-align: center;
}

.lpc-stat-item {
    display: flex;
    flex-direction: column;
}

.lpc-stat-val {
    font-size: 13px;
    font-weight: 800;
    color: var(--text-main);
}

.lpc-stat-lbl {
    font-size: 10px;
    color: var(--text-muted);
}

/* --- Shift Operations Mode Selector --- */
.shift-mode-selector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: var(--bg-elevated);
    padding: 6px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.shift-mode-pill {
    flex: 1;
    min-width: 140px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.shift-mode-pill:hover {
    background: var(--bg-surface);
    color: var(--text-main);
}

.shift-mode-pill.active {
    background: var(--brand-primary);
    color: white;
    box-shadow: var(--shadow-sm);
}

.shift-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.shift-config-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
    position: relative;
}

.shift-config-card.active-shift {
    border-color: var(--brand-primary);
}

.shift-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shift-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Multi-Degree Tag / Chip Manager --- */
.degree-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
    min-height: 32px;
}

.degree-tag-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--brand-light);
    color: var(--brand-primary);
    border: 1px solid rgba(5, 150, 105, 0.2);
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}

.tag-chip-remove {
    background: none;
    border: none;
    color: var(--brand-primary);
    font-size: 12px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    padding: 0 2px;
    transition: opacity 0.15s;
}

.tag-chip-remove:hover {
    opacity: 1;
    color: var(--status-danger);
}

.tag-input-row {
    display: flex;
    gap: 8px;
}

/* --- Faculty Team & Teachers Directory --- */
.faculty-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.faculty-dept-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.faculty-dept-btn {
    padding: 6px 14px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.faculty-dept-btn.active, .faculty-dept-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.faculty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.faculty-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.faculty-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.fc-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.fc-avatar {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-md);
    object-fit: cover;
    border: 2px solid var(--border-color);
    flex-shrink: 0;
}

.fc-info {
    flex: 1;
    min-width: 0;
}

.fc-name-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.fc-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fc-designation {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 1px;
}

.fc-dept-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: var(--brand-primary);
    font-weight: 600;
    margin-top: 4px;
}

.fc-degrees-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.degree-tag-badge {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

.fc-quote {
    font-size: 12px;
    color: var(--text-secondary);
    font-style: italic;
    background: var(--bg-elevated);
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    line-height: 1.4;
}

.fc-contact-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 11px;
    color: var(--text-muted);
    border-top: 1px dashed var(--border-color);
    padding-top: 8px;
}

.fc-contact-row span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.fc-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: auto;
    padding-top: 6px;
}

.btn-sm-outline {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sm-outline:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.btn-sm-danger {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    color: var(--status-danger);
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-sm-danger:hover {
    background: var(--status-danger-bg);
    border-color: var(--status-danger);
}

/* --- Drag-and-Drop & Media Upload Boxes --- */
.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
    background: var(--bg-elevated);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.upload-dropzone:hover {
    border-color: var(--brand-primary);
    background: var(--brand-light);
}

.upload-dropzone i {
    font-size: 28px;
    color: var(--brand-primary);
}

.upload-dropzone-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.upload-dropzone-hint {
    font-size: 11px;
    color: var(--text-muted);
}

.file-preview-thumb {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--radius-md);
    margin-top: 10px;
    border: 1px solid var(--border-color);
}

/* --- Gallery & Lightbox Styles --- */
.gallery-filter-nav {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.gallery-filter-btn {
    padding: 5px 12px;
    border-radius: var(--radius-full);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.gallery-filter-btn.active, .gallery-filter-btn:hover {
    background: var(--brand-primary);
    color: white;
    border-color: var(--brand-primary);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.gallery-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

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

.gc-img-wrap {
    height: 140px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.gallery-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.gallery-card:hover .gallery-card-img {
    transform: scale(1.05);
}

.gc-cat-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    color: white;
    padding: 2px 8px;
    border-radius: var(--radius-sm);
    font-size: 10px;
    font-weight: 600;
}

.gallery-card-caption {
    padding: 10px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gc-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
}

.btn-icon-danger {
    background: none;
    border: none;
    color: var(--status-danger);
    cursor: pointer;
    font-size: 14px;
    padding: 4px;
    transition: transform 0.15s;
}

.btn-icon-danger:hover {
    transform: scale(1.2);
}

/* Lightbox Modal */
.lightbox-card {
    max-width: 800px;
    width: 90%;
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.lightbox-img {
    width: 100%;
    max-height: 500px;
    object-fit: contain;
    background: #0b0f19;
    display: block;
}

/* Blog Cards */
.blog-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.blog-card-img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.blog-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.blog-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.35;
    margin-bottom: 6px;
}

.blog-card-snippet {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 12px;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
}

/* ==========================================================================
   ROUTINE BUILDER STUDIO STYLES
   ========================================================================== */
.routine-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    background: var(--bg-surface);
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
}

.routine-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.routine-select-control {
    padding: 8px 12px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    outline: none;
    cursor: pointer;
}

.routine-select-control:focus {
    border-color: var(--brand-primary);
}

.routine-actions-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.routine-clash-alert {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(245, 158, 11, 0.08) 100%);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.routine-clash-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--status-danger);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}

.routine-matrix-container {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
}

.routine-matrix-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.routine-matrix-table th {
    background: var(--bg-elevated);
    padding: 12px 14px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    border-bottom: 2px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    text-align: center;
}

.routine-matrix-table th:last-child {
    border-right: none;
}

.routine-matrix-table td {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    vertical-align: top;
    height: 115px;
    width: 13.5%;
}

.routine-matrix-table td:last-child {
    border-right: none;
}

.routine-day-header {
    width: 90px;
    background: var(--bg-elevated);
    font-weight: 800;
    font-size: 13px;
    color: var(--text-main);
    text-align: center;
    vertical-align: middle !important;
}

/* Routine Slot Cards */
.routine-slot-card {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 10px;
    display: flex;
    flex-direction: column;
    height: 100%;
    position: relative;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.routine-slot-card:hover {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.routine-slot-subject {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
}

.routine-slot-teacher {
    font-size: 11px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.routine-slot-room {
    font-size: 10px;
    font-weight: 600;
    color: var(--brand-primary);
    background: var(--brand-light);
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: auto;
}

.routine-slot-empty {
    height: 100%;
    min-height: 95px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    background: transparent;
    transition: all var(--transition-fast);
}

.routine-slot-empty:hover {
    background: var(--bg-elevated);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}

.routine-slot-break {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.08) 0%, rgba(245, 158, 11, 0.03) 100%);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--status-warning);
    font-size: 11px;
    font-weight: 700;
    padding: 8px;
}

/* Subject Badges */
.subject-pill {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
}

.subject-physics { background: rgba(5, 150, 105, 0.12); color: #059669; }
.subject-chemistry { background: rgba(225, 29, 72, 0.12); color: #e11d48; }
.subject-math { background: rgba(2, 132, 199, 0.12); color: #0284c7; }
.subject-biology { background: rgba(13, 148, 136, 0.12); color: #0d9488; }
.subject-ict { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.subject-bangla { background: rgba(217, 119, 6, 0.12); color: #d97706; }
.subject-english { background: rgba(6, 182, 212, 0.12); color: #0891b2; }

/* Printable Timetable Layout */
@media print {
    .sidebar, .header, .admin-sub-nav, .routine-toolbar, .routine-actions-group {
        display: none !important;
    }
    .content-area, .page-view, .panel {
        padding: 0 !important;
        margin: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    .routine-matrix-table th, .routine-matrix-table td {
        border: 1px solid #000 !important;
    }
}

/* Custom Period Manager Modal Styles */
.period-manager-row {
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
}

.period-manager-row:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-sm);
}

.period-type-badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.type-class { background: rgba(5, 150, 105, 0.15); color: #059669; }
.type-break { background: rgba(245, 158, 11, 0.15); color: #d97706; }
.type-assembly { background: rgba(59, 130, 246, 0.15); color: #2563eb; }
.type-prayer { background: rgba(139, 92, 246, 0.15); color: #7c3aed; }
.type-lab_double { background: rgba(225, 29, 72, 0.15); color: #e11d48; }

.preset-chip-btn {
    padding: 6px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.preset-chip-btn:hover {
    background: var(--brand-light);
    border-color: var(--brand-primary);
    color: var(--brand-primary);
}


