/* Assignments Lite - Dual Theme Support */
/* Console header stays dark in both themes */

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Theme Variables - Light Mode (default) */
:root {
    --assign-bg: #f6f7fb;
    --assign-card-bg: #ffffff;
    --assign-card-hover-bg: #f8f9fb;
    --assign-text-primary: #323338;
    --assign-text-secondary: #676879;
    --assign-text-muted: #9699a6;
    --assign-border: #e6e9ef;
    --assign-border-light: #f0f1f3;
    --assign-input-bg: #ffffff;
    --assign-filter-bg: #ffffff;
    --assign-stat-bg: #f0f1f3;
    --assign-shadow: rgba(0, 0, 0, 0.08);
    --assign-shadow-hover: rgba(0, 0, 0, 0.12);
    --assign-modal-bg: #ffffff;
    --assign-modal-overlay: rgba(0, 0, 0, 0.5);
}

/* Dark Mode */
[data-theme="dark"] {
    --assign-bg: #1a1d21;
    --assign-card-bg: #23272b;
    --assign-card-hover-bg: #2d3135;
    --assign-text-primary: #ffffff;
    --assign-text-secondary: #9fadbc;
    --assign-text-muted: #676879;
    --assign-border: #3d4349;
    --assign-border-light: #3d4349;
    --assign-input-bg: #2d3135;
    --assign-filter-bg: #23272b;
    --assign-stat-bg: #2d3135;
    --assign-shadow: rgba(0, 0, 0, 0.3);
    --assign-shadow-hover: rgba(0, 0, 0, 0.4);
    --assign-modal-bg: #23272b;
    --assign-modal-overlay: rgba(0, 0, 0, 0.7);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--assign-bg);
    color: var(--assign-text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.app { display: flex; min-height: 100vh; }

.main-content {
    flex: 1;
    margin-left: 250px;
    background: var(--assign-bg);
}

.container {
    padding: 24px;
    max-width: 1600px;
    margin: 0 auto;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 100px;
    color: var(--assign-text-secondary);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--assign-border);
    border-top-color: #0073ea;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Console Header Section - Always Dark Mode */
.console-header {
    background: #1e2228;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid #2d3339;
}

.console-left {
    flex: 1;
    min-width: 0;
}

.console-divider {
    width: 1px;
    align-self: stretch;
    background: #3d4349;
    margin: -20px 8px;
}

.console-right {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    flex-shrink: 0;
}

.console-top-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.console-stats {
    display: flex;
    align-items: center;
    gap: 10px;
}

.console-stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: #2d3135;
    color: #9fadbc;
    white-space: nowrap;
}

.console-stat-pill i {
    font-size: 10px;
}

.console-stat-pill.progress {
    background: rgba(0, 200, 117, 0.2);
    color: #00c875;
}

.console-stat-pill.progress i {
    color: #00c875;
}

.console-stat-pill.review {
    background: rgba(253, 171, 61, 0.2);
    color: #fdab3d;
}

.console-stat-pill.review i {
    color: #fdab3d;
}

.console-stat-pill.done {
    background: rgba(0, 115, 234, 0.2);
    color: #0073ea;
}

.console-stat-pill.done i {
    color: #0073ea;
}

.console-create-btn {
    background: linear-gradient(180deg, #0073ea 0%, #005bb5 100%);
    color: white;
    border: 1px solid #0060c2;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.console-create-btn:hover { 
    background: linear-gradient(180deg, #0084ff 0%, #0073ea 100%);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.console-create-btn:active {
    background: linear-gradient(180deg, #005bb5 0%, #004a94 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.console-create-btn i {
    font-size: 11px;
}

/* Switcher Section */
.switcher-section { margin-bottom: 20px; }

.console-header .switcher-section { margin-bottom: 16px; }
.console-header .switcher-section:last-child { margin-bottom: 0; }

.switcher-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #9fadbc;
    margin-bottom: 8px;
}

.console-header .switcher-label {
    color: #9fadbc;
}

/* Section Divider */
.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--assign-border), transparent);
    margin: 24px 0;
}

.switcher-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}

/* ATEM Switcher Grid - 6 per row, 2 rows */
.atem-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 400px;
}

/* ATEM Switcher Button Style - Physical Hardware Look */
.atem-btn {
    width: 58px;
    height: 48px;
    border: none;
    border-radius: 4px;
    background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 50%, #b0b0b0 100%);
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    position: relative;
    box-shadow: 
        0 3px 0 #666666,
        0 4px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}

.atem-btn:hover { 
    background: linear-gradient(180deg, #f0f0f0 0%, #d8d8d8 50%, #c0c0c0 100%);
}

.atem-btn:active {
    background: linear-gradient(180deg, #b0b0b0 0%, #a0a0a0 50%, #909090 100%);
    box-shadow: 
        0 1px 0 #666666,
        0 2px 2px rgba(0, 0, 0, 0.3),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    transform: translateY(2px);
}

.atem-btn.atem-empty { 
    background: linear-gradient(180deg, #d0d0d0 0%, #b8b8b8 50%, #a0a0a0 100%);
    color: #888888; 
    cursor: default;
    box-shadow: 
        0 3px 0 #666666,
        0 4px 4px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.atem-btn.atem-empty:hover { 
    background: linear-gradient(180deg, #d0d0d0 0%, #b8b8b8 50%, #a0a0a0 100%);
    color: #888888; 
}

.atem-btn.active { 
    background: linear-gradient(180deg, #ff4444 0%, #cc0000 50%, #aa0000 100%);
    color: white; 
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 3px 0 #660000,
        0 4px 4px rgba(0, 0, 0, 0.4),
        0 0 20px rgba(255, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.atem-btn.status-live { 
    background: linear-gradient(180deg, #e8e8e8 0%, #c8c8c8 50%, #b0b0b0 100%);
    color: #1a1a1a;
    position: relative;
}

.atem-btn.status-live::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #00c875;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(0, 200, 117, 0.8);
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {
    0%, 100% { box-shadow: 0 0 6px rgba(0, 200, 117, 0.8); }
    50% { box-shadow: 0 0 12px rgba(0, 200, 117, 1); }
}

.atem-btn.status-ready::after {
    content: '';
    position: absolute;
    top: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    background: #ffcc00;
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(255, 204, 0, 0.8);
}

.atem-btn.status-empty {
    opacity: 0.5;
    cursor: default;
}

.atem-callsign { 
    font-size: 10px; 
    font-weight: 700; 
    letter-spacing: 0.5px;
}

.atem-btn.active .atem-callsign {
    color: #ffffff;
}

.atem-meta { 
    font-size: 8px; 
    opacity: 0.7; 
    margin-top: 1px; 
}

.atem-btn.active .atem-meta {
    color: rgba(255,255,255,0.9);
}

/* Selected Program Title Display */
.selected-program-title {
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(0,115,234,0.15);
    border: 1px solid rgba(0,115,234,0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    display: none;
    letter-spacing: 0.5px;
}

.selected-program-title.visible {
    display: block;
}

/* Switcher Buttons - Compact for 10 max */
.switcher-btn {
    padding: 10px 8px;
    background: white;
    border: 2px solid #e6e9ef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s;
    position: relative;
}

.console-header .switcher-btn {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.2);
}

.switcher-btn:hover {
    border-color: #0073ea;
    box-shadow: 0 4px 12px rgba(0,115,234,0.15);
    transform: translateY(-2px);
}

.console-header .switcher-btn:hover {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.4);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.switcher-btn.active {
    border-color: #0073ea;
    background: #e6f2ff;
}

.console-header .switcher-btn.active {
    background: rgba(0,115,234,0.3);
    border-color: #0073ea;
}

.switcher-btn.status-live {
    border-color: #00c875;
    background: #e6fff3;
}

.switcher-btn.status-live::after {
    content: 'LIVE';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #00c875;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

.switcher-btn.status-ready {
    border-color: #ff3b5c;
    background: #fff0f3;
}

.switcher-btn.status-ready::after {
    content: 'READY';
    position: absolute;
    top: 4px;
    right: 4px;
    background: #ff3b5c;
    color: white;
    font-size: 8px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
}

.switcher-btn.status-empty {
    opacity: 0.5;
    cursor: default;
}

.switcher-icon {
    font-size: 18px;
    color: #676879;
}

.console-header .switcher-icon { color: rgba(255,255,255,0.7); }
.switcher-btn.active .switcher-icon { color: #0073ea; }
.console-header .switcher-btn.active .switcher-icon { color: #fff; }
.switcher-btn.status-live .switcher-icon { color: #00c875; }
.switcher-btn.status-ready .switcher-icon { color: #ff3b5c; }

.switcher-name {
    font-size: 11px;
    font-weight: 600;
    color: #323338;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0 4px;
    line-height: 1.2;
}

.console-header .switcher-name { color: #fff; }

.switcher-meta {
    font-size: 9px;
    color: #9699a6;
}

.console-header .switcher-meta { color: rgba(255,255,255,0.5); }

/* Stats Row */
.stats-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--assign-card-bg);
    border-radius: 10px;
    box-shadow: 0 1px 3px var(--assign-shadow);
}

.stat-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--assign-stat-bg);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--assign-text-primary);
}

.stat-pill.progress { background: rgba(255, 244, 229, 0.9); color: #bf5f00; }
.stat-pill.review { background: rgba(255, 224, 230, 0.9); color: #c62828; }
.stat-pill.done { background: rgba(224, 247, 233, 0.9); color: #1b5e20; }
[data-theme="dark"] .stat-pill.progress { background: rgba(191, 95, 0, 0.2); color: #fdab3d; }
[data-theme="dark"] .stat-pill.review { background: rgba(198, 40, 40, 0.2); color: #ff6b6b; }
[data-theme="dark"] .stat-pill.done { background: rgba(0, 200, 117, 0.2); color: #00c875; }

.create-btn {
    margin-left: auto;
    background: #0073ea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.create-btn:hover { background: #0060c2; }

/* Filter Row */
.filter-row {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.filter-btn {
    background: var(--assign-filter-bg);
    border: 1px solid var(--assign-border);
    color: var(--assign-text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover { border-color: #0073ea; color: #0073ea; }
.filter-btn.active { background: #0073ea; border-color: #0073ea; color: white; }

/* Episode Folders - Compact */
.episode-folder {
    background: var(--assign-card-bg);
    border-radius: 8px;
    margin-bottom: 8px;
    box-shadow: 0 1px 3px var(--assign-shadow);
    overflow: hidden;
    border: 1px solid var(--assign-border-light);
}

.folder-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid transparent;
}

.folder-header:hover { background: var(--assign-card-hover-bg); }

.episode-folder.open .folder-header { border-bottom-color: var(--assign-border); }

.folder-icon {
    width: 36px;
    height: 36px;
    background: #0073ea;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.folder-info { flex: 1; }

.folder-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--assign-text-primary);
}

.folder-meta {
    font-size: 11px;
    color: var(--assign-text-secondary);
}

.folder-meta i {
    margin-right: 4px;
    opacity: 0.7;
}

.folder-status {
    margin-right: 8px;
}

.episode-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.episode-status-badge.planning {
    background: var(--assign-stat-bg);
    color: var(--assign-text-secondary);
}

.episode-status-badge.pre-production {
    background: #fff3cd;
    color: #856404;
}

.episode-status-badge.production {
    background: #cce5ff;
    color: #004085;
}

.episode-status-badge.post-production {
    background: #e2d5f1;
    color: #6f42c1;
}

.episode-status-badge.ready {
    background: #d4edda;
    color: #155724;
}

.episode-status-badge.live {
    background: #ff3b5c;
    color: white;
    animation: pulse-status 1.5s infinite;
}

@keyframes pulse-status {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.episode-status-badge.aired {
    background: #00c875;
    color: white;
}

.episode-status-badge.archived {
    background: #9699a6;
    color: white;
}

.folder-stats {
    display: flex;
    gap: 16px;
}

.folder-stat { text-align: center; }

.folder-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--assign-text-primary);
}

.folder-stat-label {
    font-size: 9px;
    color: var(--assign-text-muted);
    text-transform: uppercase;
}

.folder-toggle {
    color: var(--assign-text-muted);
    transition: transform 0.2s;
}

.episode-folder.open .folder-toggle { transform: rotate(180deg); }

/* Assignment List - Table Layout */
.assignment-list { display: none; }
.episode-folder.open .assignment-list { display: block; }

.assignment-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 100px 110px 100px 100px;
    gap: 8px;
    padding: 8px 16px;
    background: var(--assign-stat-bg);
    border-bottom: 1px solid var(--assign-border);
    font-size: 11px;
    font-weight: 600;
    color: var(--assign-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.assignment-row {
    display: grid;
    grid-template-columns: 2fr 1fr 100px 110px 100px 100px;
    gap: 8px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid var(--assign-border-light);
}

.assignment-row:last-child { border-bottom: none; }
.assignment-row:hover { background: var(--assign-card-hover-bg); }

.col-name {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.col-segment, .col-due {
    font-size: 13px;
    color: var(--assign-text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.col-format, .col-status { display: flex; align-items: center; }
.col-actions { display: flex; gap: 4px; justify-content: flex-end; }

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot.not_started { background: #c5c7d0; }
.status-dot.in_progress { background: #0073ea; }
.status-dot.pending_review { background: #ff9f00; }
.status-dot.completed { background: #00c875; }

.assignment-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--assign-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.format-badge {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--assign-stat-bg);
    color: var(--assign-text-secondary);
}

.format-badge.anchor-read, .format-badge.ar { background: rgba(21, 101, 192, 0.15); color: #579bfc; }
.format-badge.package, .format-badge.pkg { background: rgba(0, 200, 117, 0.15); color: #00c875; }
.format-badge.vo-sot, .format-badge.vosot { background: rgba(253, 171, 61, 0.15); color: #fdab3d; }
.format-badge.live { background: rgba(232, 67, 83, 0.15); color: #e84353; }
.format-badge.reader, .format-badge.rdr { background: rgba(0, 131, 143, 0.15); color: #26c6da; }

.status-badge {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
}

.status-badge.not_started { background: var(--assign-stat-bg); color: var(--assign-text-secondary); }
.status-badge.in_progress { background: rgba(0, 115, 234, 0.15); color: #579bfc; }
.status-badge.pending_review { background: rgba(253, 171, 61, 0.15); color: #fdab3d; }
.status-badge.completed { background: rgba(0, 200, 117, 0.15); color: #00c875; }

.action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 12px;
}

.action-btn.primary { background: #0073ea; color: white; }
.action-btn.primary:hover { background: #0060c2; }
.action-btn.open { background: #00c875; color: white; }
.action-btn.open:hover { background: #00a65a; }
.action-btn.secondary { background: var(--assign-stat-bg); color: var(--assign-text-secondary); }
.action-btn.secondary:hover { background: var(--assign-card-hover-bg); }
.action-btn.danger { background: rgba(198, 40, 40, 0.1); color: #c62828; }
.action-btn.danger:hover { background: rgba(198, 40, 40, 0.2); }
[data-theme="dark"] .action-btn.danger { background: rgba(198, 40, 40, 0.2); color: #ff6b6b; }
[data-theme="dark"] .action-btn.danger:hover { background: rgba(198, 40, 40, 0.3); }

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px;
    background: var(--assign-card-bg);
    border-radius: 12px;
    border: 1px solid var(--assign-border-light);
}

.empty-state i { font-size: 48px; color: var(--assign-text-muted); margin-bottom: 16px; }
.empty-state h3 { font-size: 18px; color: var(--assign-text-primary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; color: var(--assign-text-secondary); }

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--assign-modal-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal {
    background: var(--assign-modal-bg);
    border-radius: 16px;
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--assign-border);
}

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

.modal-header h2 { 
    font-size: 18px; 
    font-weight: 600; 
    color: var(--assign-text-primary); 
}

[data-theme="light"] .modal-header h2 {
    color: #323338;
}

[data-theme="dark"] .modal-header h2 {
    color: #ffffff;
}

.modal-close {
    width: 32px;
    height: 32px;
    background: var(--assign-stat-bg);
    border: none;
    border-radius: 6px;
    font-size: 18px;
    cursor: pointer;
    color: var(--assign-text-secondary);
}

.modal-close:hover {
    background: var(--assign-card-hover-bg);
    color: var(--assign-text-primary);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--assign-border);
    background: var(--assign-stat-bg);
}

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 6px; color: var(--assign-text-primary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--assign-border);
    border-radius: 6px;
    font-size: 14px;
    background: var(--assign-input-bg);
    color: var(--assign-text-primary);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #0073ea;
}

.form-group input[readonly] {
    background: var(--assign-stat-bg);
    cursor: not-allowed;
    color: var(--assign-text-secondary);
}

.form-group small {
    color: var(--assign-text-secondary);
    font-size: 11px;
}

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

.btn-primary {
    background: #0073ea;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.btn-primary:hover { background: #0060c2; }

.btn-secondary {
    background: var(--assign-card-bg);
    color: var(--assign-text-primary);
    border: 1px solid var(--assign-border);
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--assign-card-hover-bg);
}

/* Notices Panel - Inside console header stays with its own styling */
.notices-panel {
    margin-top: 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    width: 100%;
}

.notices-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    border-bottom: 1px solid #e6e9ef;
    background: #f8f9fb;
    border-radius: 8px 8px 0 0;
}

.notices-title {
    font-size: 12px;
    font-weight: 600;
    color: #323338;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notices-title i { color: #0073ea; }

.mark-read-link {
    font-size: 11px;
    color: #0073ea;
    text-decoration: none;
}

.mark-read-link:hover { text-decoration: underline; }

.notices-scroll {
    max-height: 140px;
    overflow-y: auto;
}

.notice-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-bottom: 1px solid #f0f1f3;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.15s;
}

.notice-row:hover { background: #f8f9fb; }
.notice-row:last-child { border-bottom: none; }

.notice-row.unread { background: #e8f4fd; }
.notice-row.unread:hover { background: #d6ebfa; }

.notice-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    flex-shrink: 0;
}

.notice-icon.info { background: #e3f2fd; color: #1565c0; }
.notice-icon.warning { background: #fff3e0; color: #ef6c00; }
.notice-icon.success { background: #e8f5e9; color: #2e7d32; }
.notice-icon.critical { background: #ffebee; color: #c62828; }

.notice-content { flex: 1; min-width: 0; }
.notice-title { font-weight: 500; color: #323338; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notice-time { color: #676879; font-size: 10px; }

.notice-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.notice-actions button {
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: #676879;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    transition: all 0.15s;
}

.notice-actions button:hover {
    background: #e6e9ef;
    color: #323338;
}

.notice-link-btn:hover { color: #0073ea !important; }
.notice-view-btn:hover { color: #0073ea !important; }
.notice-read-btn:hover { background: #e8f5e9 !important; color: #2e7d32 !important; }

/* Notice Detail Modal */
.notice-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.notice-detail-modal {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.notice-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e6e9ef;
}

.notice-detail-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #323338;
}

.notice-detail-close {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--assign-text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.notice-detail-close:hover {
    background: var(--assign-card-hover-bg);
    color: var(--assign-text-primary);
}

.notice-detail-body {
    padding: 20px;
    color: var(--assign-text-primary);
    line-height: 1.6;
    max-height: 60vh;
    overflow-y: auto;
    white-space: pre-wrap;
}

/* Wide Modal - Two Column Layout */
.modal.modal-wide {
    max-width: 1100px;
    width: 95%;
}

.modal-two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.modal-panel {
    background: var(--assign-stat-bg);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
    border: 1px solid var(--assign-border-light);
}

.modal-panel:last-child { margin-bottom: 0; }

.modal-panel-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--assign-text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-panel-title i { font-size: 16px; }
.modal-panel-title.title-purple { color: #0073ea; }
.modal-panel-title.title-purple i { color: #0073ea; }
.modal-panel-title.title-orange { color: #fdab3d; }
.modal-panel-title.title-orange i { color: #fdab3d; }
.modal-panel-title.title-red { color: #e84353; }
.modal-panel-title.title-red i { color: #e84353; }

.form-hint {
    font-size: 11px;
    color: var(--assign-text-secondary);
    margin-top: 4px;
}

.modal-footer.modal-footer-full {
    display: flex;
    gap: 12px;
    padding: 16px 24px;
}

.btn-full { flex: 1; }

@media (max-width: 768px) {
    .modal-two-col {
        grid-template-columns: 1fr;
    }
}

.notices-empty {
    padding: 20px;
    text-align: center;
    color: var(--assign-text-secondary);
    font-size: 12px;
}

.notices-loading {
    padding: 20px;
    text-align: center;
    color: var(--assign-text-secondary);
    font-size: 12px;
}

/* Responsive */
@media (max-width: 1200px) { .switcher-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 900px) { 
    .switcher-grid { grid-template-columns: repeat(3, 1fr); }
    .modal-two-col { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .main-content { margin-left: 0; }
    .switcher-grid { grid-template-columns: repeat(2, 1fr); }
    .stats-row { flex-wrap: wrap; }
    .assignment-row { padding-left: 20px; }
}
