/* CSS reset and variable declarations */
:root {
    /* Fonts */
    --font-thai: 'Prompt', 'Outfit', sans-serif;
    --font-eng: 'Outfit', 'Prompt', sans-serif;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);

    /* Priority Colors (HSL tailored for dark/light) */
    --priority-high-hsl: 0, 84%, 60%;     /* Red */
    --priority-normal-hsl: 217, 91%, 60%; /* Blue */
    --priority-low-hsl: 38, 92%, 50%;     /* Amber */
    --completed-hsl: 142, 70%, 45%;       /* Green */

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.15);
}

/* Dark Theme Variables */
body.dark-theme {
    --bg-app: #090d16;
    --bg-gradient: radial-gradient(circle at 50% 0%, #1e1b4b 0%, #0f0f18 60%, #090d16 100%);
    --surface: rgba(22, 28, 45, 0.6);
    --surface-solid: #131929;
    --surface-hover: rgba(30, 41, 59, 0.8);
    --surface-active: rgba(47, 58, 82, 0.9);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(255, 255, 255, 0.15);
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #6366f1;
    --accent-gradient: linear-gradient(135deg, #6366f1, #a855f7);
    --accent-hover: #4f46e5;
    
    --shadow-color: rgba(0, 0, 0, 0.4);
    --glass-blur: blur(16px);
}

/* Light Theme Variables */
body.light-theme {
    --bg-app: #f4f6fc;
    --bg-gradient: radial-gradient(circle at 50% 0%, #e0e7ff 0%, #f1f5f9 60%, #f4f6fc 100%);
    --surface: rgba(255, 255, 255, 0.7);
    --surface-solid: #ffffff;
    --surface-hover: rgba(241, 245, 249, 0.9);
    --surface-active: rgba(226, 232, 240, 1);
    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #4f46e5;
    --accent-gradient: linear-gradient(135deg, #4f46e5, #7c3aed);
    --accent-hover: #4338ca;
    
    --shadow-color: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(16px);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-thai);
}

body {
    background: var(--bg-app);
    background-image: var(--bg-gradient);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    transition: background var(--transition-normal), color var(--transition-normal);
    overflow-x: hidden;
}

button, input, select, textarea {
    font-family: var(--font-thai);
    outline: none;
}

/* App Container Layout */
.app-container {
    width: 100%;
    max-width: 1400px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 100vh;
}

/* Main Header */
.main-header {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-gradient);
    color: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.logo-area h1 {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Dashboard Stats */
.dashboard-stats {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.stat-card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 10px 16px;
    min-width: 90px;
    text-align: center;
    transition: transform var(--transition-fast), border-color var(--transition-fast);
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.stat-num {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Color codes on Stats Card */
.stat-card.urgent { border-left: 4px solid hsl(var(--priority-high-hsl)); }
.stat-card.urgent .stat-num { color: hsl(var(--priority-high-hsl)); }

.stat-card.normal { border-left: 4px solid hsl(var(--priority-normal-hsl)); }
.stat-card.normal .stat-num { color: hsl(var(--priority-normal-hsl)); }

.stat-card.flexible { border-left: 4px solid hsl(var(--priority-low-hsl)); }
.stat-card.flexible .stat-num { color: hsl(var(--priority-low-hsl)); }

.stat-card.completed { border-left: 4px solid hsl(var(--completed-hsl)); }
.stat-card.completed .stat-num { color: hsl(var(--completed-hsl)); }

.header-actions {
    display: flex;
    gap: 10px;
}

/* Icon Button style */
.icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--surface-solid);
    color: var(--text-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.icon-btn:hover {
    background: var(--surface-hover);
    color: var(--accent);
    border-color: var(--accent);
    transform: scale(1.05);
}

.icon-btn:active {
    transform: scale(0.95);
}

.hidden {
    display: none !important;
}

/* Main Content Workspace Grid */
.main-content {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
    align-items: start;
    flex-grow: 1;
}

@media (max-width: 1024px) {
    .main-content {
        grid-template-columns: 1fr;
    }
}

/* Calendar Controls Header Panel */
.calendar-controls {
    grid-column: 1 / -1;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

/* View Selector Tab style */
.view-selector {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    padding: 4px;
    border-radius: 14px;
    display: flex;
    gap: 4px;
}

.tab-btn {
    padding: 8px 18px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

/* Navigation control style */
.nav-navigator {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--surface-solid);
    color: var(--text-primary);
    border: 1px solid var(--border);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

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

.current-display {
    font-size: 18px;
    font-weight: 600;
    min-width: 160px;
    text-align: center;
}

.today-btn {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--surface-solid);
    color: var(--text-primary);
    border: 1px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.today-btn:hover {
    background: var(--surface-hover);
    border-color: var(--accent);
    color: var(--accent);
}

/* Search Filter styles */
.search-filter-panel {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-box {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 14px;
    height: 40px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 220px;
    transition: all var(--transition-fast);
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.search-box input {
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 13px;
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-box svg {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.filter-select {
    height: 40px;
    padding: 0 14px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 12px;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.filter-select:hover {
    border-color: var(--border-hover);
}

.filter-select:focus {
    border-color: var(--accent);
}

/* Calendar Display Area */
.calendar-display-area {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px var(--shadow-color);
    min-height: 520px;
    display: flex;
    flex-direction: column;
}

.view-panel {
    display: none;
    flex-direction: column;
    flex-grow: 1;
}

.view-panel.active {
    display: flex;
}

/* 1. Monthly Grid CSS */
.calendar-grid-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.calendar-grid-header div {
    padding: 8px 0;
}

/* Sunday is red-ish, Saturday is blue-ish */
.calendar-grid-header div:first-child { color: #f43f5e; }
.calendar-grid-header div:last-child { color: #3b82f6; }

.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    grid-auto-rows: 80px;
    gap: 1px;
    background: var(--border);
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-top: 1px;
}

.calendar-day-cell {
    background: var(--surface-solid);
    padding: 8px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: background var(--transition-fast);
    cursor: pointer;
    position: relative;
}

.calendar-day-cell:hover {
    background: var(--surface-hover);
}

.calendar-day-cell.active-cell {
    background: var(--surface-active);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.calendar-day-cell.other-month {
    opacity: 0.35;
}

.calendar-day-cell.today {
    background: rgba(99, 102, 241, 0.08);
}

.calendar-day-cell.today .day-number {
    background: var(--accent);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.day-number {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Dots wrapper for monthly view */
.day-dots {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    max-height: 20px;
    overflow: hidden;
}

.task-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.task-dot.high {
    background-color: hsl(var(--priority-high-hsl));
    box-shadow: 0 0 8px hsl(var(--priority-high-hsl));
    animation: pulse-red 2s infinite;
}
.task-dot.normal { background-color: hsl(var(--priority-normal-hsl)); }
.task-dot.low { background-color: hsl(var(--priority-low-hsl)); }
.task-dot.completed { background-color: hsl(var(--completed-hsl)); }

@keyframes pulse-red {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* Number of tasks banner for cell */
.cell-task-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 1px 5px;
    border-radius: 8px;
}

/* 2. Weekly View CSS */
.week-days-list {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 12px;
    flex-grow: 1;
}

@media (max-width: 900px) {
    .week-days-list {
        grid-template-columns: 1fr;
    }
}

.week-day-col {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.week-day-col.today {
    border-color: var(--accent);
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.15);
}

.week-col-header {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    background: rgba(0, 0, 0, 0.1);
}

.week-col-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.week-col-date {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: 2px;
}

.week-day-col.today .week-col-date {
    color: var(--accent);
}

.week-col-tasks {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-grow: 1;
    overflow-y: auto;
    max-height: 380px;
}

/* Micro-card for week task view */
.week-task-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
    border-left: 3px solid var(--accent);
}

.week-task-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
}

.week-task-card.high { border-left-color: hsl(var(--priority-high-hsl)); }
.week-task-card.normal { border-left-color: hsl(var(--priority-normal-hsl)); }
.week-task-card.low { border-left-color: hsl(var(--priority-low-hsl)); }
.week-task-card.completed {
    border-left-color: hsl(var(--completed-hsl));
    opacity: 0.6;
}

.week-task-subject {
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
}

.week-task-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 2px 0 4px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.week-task-time {
    font-size: 10px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 3px;
}

.week-empty-text {
    font-size: 11px;
    color: var(--text-muted);
    text-align: center;
    margin-top: 20px;
}

/* 3. Semester View CSS */
.semester-setup-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.term-picker-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
}

.term-selectors {
    display: flex;
    gap: 6px;
}

.term-select-btn {
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.term-select-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.term-select-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.semester-months-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    flex-grow: 1;
}

/* Mini Calendar Cards inside Semester View */
.mini-month-card {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.mini-month-header {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
}

.mini-month-days-hdr {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.mini-month-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mini-day-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    font-weight: 500;
}

.mini-day-cell:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.mini-day-cell.other-month {
    visibility: hidden;
}

.mini-day-cell.today {
    background: var(--accent);
    color: #fff;
    font-weight: 700;
}

.mini-day-cell.has-tasks {
    font-weight: 700;
    color: var(--text-primary);
}

/* Small Indicator Line below day in mini-calendar */
.mini-day-indicator {
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
}
.mini-day-indicator.high { background-color: hsl(var(--priority-high-hsl)); }
.mini-day-indicator.normal { background-color: hsl(var(--priority-normal-hsl)); }
.mini-day-indicator.low { background-color: hsl(var(--priority-low-hsl)); }

/* Tasks Details Side Panel */
.tasks-details-panel {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: 100%;
    min-height: 520px;
}

.panel-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

.panel-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.date-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
    display: block;
}

.tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    max-height: 420px;
    padding-right: 4px;
}

/* Custom Scrollbar for Tasks List */
.tasks-list::-webkit-scrollbar,
.week-col-tasks::-webkit-scrollbar {
    width: 6px;
}
.tasks-list::-webkit-scrollbar-track,
.week-col-tasks::-webkit-scrollbar-track {
    background: transparent;
}
.tasks-list::-webkit-scrollbar-thumb,
.week-col-tasks::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}
.tasks-list::-webkit-scrollbar-thumb:hover,
.week-col-tasks::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Task Item Card CSS */
.task-item {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: start;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.task-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
}

.task-item.high::before { background-color: hsl(var(--priority-high-hsl)); }
.task-item.normal::before { background-color: hsl(var(--priority-normal-hsl)); }
.task-item.low::before { background-color: hsl(var(--priority-low-hsl)); }

.task-item:hover {
    transform: translateY(-2px);
    border-color: var(--border-hover);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.task-checkbox-wrapper {
    margin-top: 2px;
}

.task-checkbox {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 2px solid var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.task-checkbox:hover {
    border-color: var(--accent);
}

.task-checkbox.checked {
    background-color: hsl(var(--completed-hsl));
    border-color: hsl(var(--completed-hsl));
    color: white;
}

.task-checkbox svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-width: 3px;
}

.task-item.completed {
    opacity: 0.65;
}

.task-item.completed .task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-item-content {
    flex-grow: 1;
    min-width: 0; /* allows word wrap */
}

.task-meta {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-bottom: 4px;
}

.task-badge-subject {
    font-size: 10px;
    font-weight: 600;
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
}

.task-badge-priority {
    font-size: 9px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 6px;
}

.task-badge-priority.high {
    background-color: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}
.task-badge-priority.normal {
    background-color: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
}
.task-badge-priority.low {
    background-color: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
}

.task-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.4;
    word-break: break-word;
}

.task-desc {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    word-break: break-word;
}

.task-time-row {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Edit & Delete Actions for task cards */
.task-actions {
    display: flex;
    gap: 4px;
    margin-top: 2px;
}

.task-actions .action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.task-actions .action-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.task-actions .action-btn.delete-btn:hover {
    color: hsl(var(--priority-high-hsl));
    background: rgba(239, 68, 68, 0.12);
}

/* Empty State styling */
.empty-tasks-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 10px;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}

.empty-tasks-state p {
    font-size: 13px;
}

.add-task-inline-btn {
    padding: 8px 16px;
    border-radius: 10px;
    background: var(--accent);
    color: white;
    border: none;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.add-task-inline-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

/* Floating Action Button */
.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-gradient);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    z-index: 100;
    transition: all var(--transition-fast);
}

.floating-btn:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 30px rgba(99, 102, 241, 0.5);
}

.floating-btn:active {
    transform: scale(0.95);
}

/* Modal Overlay Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

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

.modal-content {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 24px;
    width: 90%;
    max-width: 540px;
    padding: 24px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3);
    transform: translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

/* Form Styles */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.form-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 480px) {
    .form-group-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.required {
    color: hsl(var(--priority-high-hsl));
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.form-group textarea {
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

.btn {
    padding: 10px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
}

.btn.primary {
    background: var(--accent);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

.btn.primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.btn.secondary {
    background: var(--surface-hover);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn.secondary:hover {
    background: var(--surface-active);
    color: var(--text-primary);
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 320px;
}

.toast {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 12px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 10px;
    transform: translateX(-120%);
    transition: transform var(--transition-normal);
    pointer-events: auto;
}

.toast.active {
    transform: translateX(0);
}

.toast-content {
    flex-grow: 1;
}

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

.toast-message {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.toast-close {
    cursor: pointer;
    color: var(--text-muted);
    border: none;
    background: transparent;
    display: flex;
}

.toast-close:hover {
    color: var(--text-primary);
}

.toast.high { border-left-color: hsl(var(--priority-high-hsl)); }
.toast.normal { border-left-color: hsl(var(--priority-normal-hsl)); }
.toast.low { border-left-color: hsl(var(--priority-low-hsl)); }
.toast.info { border-left-color: var(--accent); }

/* Left Sidebar Component Styles */
.left-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    z-index: 250;
    background: var(--surface-solid);
    border-right: 1px solid var(--border);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.2);
    transform: translateX(-100%);
    transition: transform var(--transition-normal);
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}

.left-sidebar.active {
    transform: translateX(0);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
    z-index: 240;
}

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

.sidebar-header {
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.logo-icon.small {
    width: 28px;
    height: 28px;
    border-radius: 8px;
}

.icon-btn.small {
    width: 32px;
    height: 32px;
    border-radius: 8px;
}

.sidebar-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow-y: auto;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.sidebar-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-menu-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: all var(--transition-fast);
    width: 100%;
}

.sidebar-menu-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
    border-color: var(--border-hover);
}

.sidebar-menu-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.sidebar-menu-btn svg {
    flex-shrink: 0;
}

/* Adjustments for top header toggle button */
.sidebar-toggle-btn {
    margin-right: 4px;
}

/* App Modules Visibility */
.app-module-panel {
    display: none;
    width: 100%;
}

.app-module-panel.active {
    display: block;
}

/* INTERNSHIP SYSTEM STYLING */
.internship-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.internship-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 20px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.internship-term-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Classroom Grid & Cards */
.classroom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.classroom-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px var(--shadow-color);
}

.classroom-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--accent-gradient);
}

.classroom-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.15);
}

.classroom-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
}

.classroom-card-title-area {
    min-width: 0;
}

.classroom-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.classroom-card-major {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.classroom-card-code {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-solid);
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid var(--border);
    text-transform: uppercase;
}

.classroom-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    margin: 6px 0;
}

.classroom-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-grow: 1;
    text-align: center;
}

.classroom-stat-item:not(:last-child) {
    border-right: 1px solid var(--border);
}

.classroom-stat-val {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.classroom-stat-val.passed { color: #10b981; }
.classroom-stat-val.failed { color: #ef4444; }

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

.classroom-card-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    gap: 12px;
}

.classroom-card-actions .view-all-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.classroom-card-actions .view-all-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.classroom-actions-icons {
    display: flex;
    gap: 4px;
}

.classroom-actions-icons .action-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.classroom-actions-icons .action-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.classroom-actions-icons .action-btn.delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.flex-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* CLASSROOM DETAIL VIEW STYLING */
.classroom-detail-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-header-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 24px;
    box-shadow: 0 8px 24px var(--shadow-color);
}

.classroom-info-badge {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.classroom-info-badge h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.class-meta-sub {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

.class-meta-sub .divider {
    color: var(--border);
}

.classroom-split-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: stretch;
}

.student-table-panel, .analytics-panel {
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 8px 32px var(--shadow-color);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.student-table-panel h3, .analytics-panel h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

.table-scroll-wrapper {
    overflow-x: auto;
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border);
}

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

.student-table th, .student-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.student-table th {
    background: rgba(0, 0, 0, 0.15);
    color: var(--text-secondary);
    font-weight: 600;
}

.student-table tr:hover td {
    background: var(--surface-hover);
}

.student-table td {
    color: var(--text-primary);
    font-weight: 500;
}

.student-grade-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    min-width: 38px;
}

/* Thai Academic Grade Colors */
.student-grade-badge.grade-a {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}
.student-grade-badge.grade-bp, .student-grade-badge.grade-b {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}
.student-grade-badge.grade-cp, .student-grade-badge.grade-c {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}
.student-grade-badge.grade-dp, .student-grade-badge.grade-d {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.student-grade-badge.grade-f {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Student Actions styling */
.student-table .action-btn {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.student-table .action-btn:hover {
    background: var(--surface-hover);
    color: var(--text-primary);
}

.student-table .action-btn.delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

/* Evaluation stats & analytics */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
}

.run-calc-btn {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.analytics-results {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.analytics-results.empty {
    justify-content: center;
    align-items: center;
    min-height: 240px;
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 24px;
}

.empty-analytics-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    text-align: center;
    gap: 12px;
}

.empty-analytics-state p {
    font-size: 13px;
    line-height: 1.5;
}

.stat-row-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.stat-block {
    background: var(--surface-solid);
    border: 1px solid var(--border);
    padding: 14px;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.stat-block-val {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.stat-block-val.success { color: #10b981; }
.stat-block-val.danger { color: #ef4444; }

.stat-block-lbl {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Distribution list */
.grade-dist-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
}

.grade-dist-title {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.grade-dist-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.grade-dist-lbl {
    font-size: 11px;
    font-weight: 700;
    width: 28px;
    color: var(--text-primary);
}

.grade-dist-bar-wrapper {
    flex-grow: 1;
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.grade-dist-bar {
    height: 100%;
    background: var(--accent-gradient);
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

.grade-dist-val {
    font-size: 11px;
    font-weight: 600;
    width: 28px;
    text-align: right;
    color: var(--text-secondary);
}

/* Restructured Rubric Layouts in Modal */
.modal-content.large {
    max-width: 820px;
    width: 95%;
}

.student-rubric-scroll-area {
    max-height: 380px;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--bg-app);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Scrollbar for scroll areas */
.student-rubric-scroll-area::-webkit-scrollbar,
.criteria-scroller::-webkit-scrollbar {
    width: 6px;
}
.student-rubric-scroll-area::-webkit-scrollbar-track,
.criteria-scroller::-webkit-scrollbar-track {
    background: transparent;
}
.student-rubric-scroll-area::-webkit-scrollbar-thumb,
.criteria-scroller::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.rubric-part-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rubric-part-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    border-bottom: 1px solid var(--border);
    padding-bottom: 6px;
    margin-bottom: 4px;
}

.rubric-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px dashed var(--border);
    transition: background var(--transition-fast);
}

.rubric-row:hover {
    background: rgba(255, 255, 255, 0.02);
}

.rubric-row span {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    font-weight: 500;
}

.rubric-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.rubric-option-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 52px;
    text-align: center;
    transition: color var(--transition-fast);
}

.rubric-option-label:hover {
    color: var(--text-primary);
}

.rubric-option-label input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--accent);
}

/* Live Evaluation Score Preview Panel */
.evaluation-preview-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid var(--accent);
    padding: 14px 20px;
    border-radius: 14px;
    margin-top: 16px;
    gap: 12px;
    flex-wrap: wrap;
}

.preview-item {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.preview-item span {
    font-weight: 700;
    color: var(--text-primary);
}

.preview-item.total {
    font-size: 15px;
    color: var(--accent);
}

.preview-item.total span {
    font-size: 20px;
    color: var(--accent);
    text-shadow: 0 0 10px rgba(99, 102, 241, 0.3);
}

/* Criteria Manager Scroller & Parts styling */
.criteria-scroller {
    max-height: 420px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-right: 6px;
}

.criteria-part-box {
    background: var(--bg-app);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.criteria-part-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.criteria-part-header h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.weight-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
}

.weight-input-wrapper input {
    width: 70px;
    height: 32px;
    text-align: center;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-weight: 700;
}

.criteria-topic-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.criteria-topic-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 8px 14px;
    border-radius: 10px;
    gap: 12px;
}

.criteria-topic-item span {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

.criteria-topic-item .delete-btn {
    color: var(--text-muted);
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    padding: 4px;
    border-radius: 6px;
    transition: all var(--transition-fast);
}

.criteria-topic-item .delete-btn:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}

.add-topic-row {
    display: flex;
    gap: 8px;
}

.add-topic-row input {
    flex-grow: 1;
    height: 38px;
    padding: 0 12px;
    background: var(--surface-solid);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 13px;
}

.add-topic-row .btn {
    height: 38px;
    padding: 0 16px;
    font-size: 13px;
}

/* Mobile Responsiveness for Rubrics Table */
@media (max-width: 600px) {
    .rubric-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .rubric-options {
        justify-content: flex-start;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 4px;
    }
}/* Student Status Badges (Evaluated / Unevaluated) */
.student-status-badge {
    display: inline-block;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-align: center;
    width: 140px;
}

.student-status-badge.unevaluated {
    background: rgba(245, 158, 11, 0.12);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.student-status-badge.evaluated {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Modal Tab Selector for Evaluation Rounds */
.modal-tabs {
    display: flex;
    gap: 8px;
    margin: 8px 0 16px 0;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.modal-tabs .tab-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border-radius: 10px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-tabs .tab-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.modal-tabs .tab-btn.active {
    background: rgba(99, 102, 241, 0.12);
    color: var(--accent);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

