
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

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

:root {
  --font-heading: Georgia, 'Times New Roman', Times, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --hw-charcoal: #1e1e1e;
  --hw-graphite: #656f77;
  --hw-wrought-iron: #4a4a4a;
  --hw-white: #ffffff;
  --hw-off-white: #f8f9fa;
  --hw-light-gray: #e9ecef;
  
  --accent-graphite: #656f77;
  --accent-hover: rgba(101, 111, 119, 0.1);
  --accent-active: rgba(101, 111, 119, 0.15);
  --accent-border: rgba(101, 111, 119, 0.3);
  
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-out-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
  
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;
  --duration-slower: 600ms;
  
  --primary-color: #1e1e1e;
  --primary-light: #4a4a4a;
  --primary-dark: #1e1e1e;
  --secondary-color: #656f77;
  --accent-color: #656f77;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --text-primary: #1e1e1e;
  --text-secondary: #495057;
  --text-light: #6c757d;
  --bg-gradient: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  --bg-light: #f8f9fa;
  --bg-white: #ffffff;
  --border-color: #dee2e6;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-hover: 0 8px 25px rgba(101, 111, 119, 0.15);
  --shadow-active: 0 2px 8px rgba(101, 111, 119, 0.2);
  --transition: all 0.25s var(--ease-smooth);
  --transition-fast: all 0.15s var(--ease-smooth);
  --transition-slow: all 0.4s var(--ease-smooth);
}

body.dark-mode {
  --primary-color: #3291FF;
  --hw-charcoal: #1a202c;
  --hw-graphite: #a0aec0;
  --hw-wrought-iron: #2d3748;
  --hw-white: #e4e7eb;
  --hw-off-white: #2d3748;
  --hw-light-gray: #4a5568;
  
  --primary-color: #a0aec0;
  --primary-light: #cbd5e0;
  --primary-dark: #1a202c;
  --secondary-color: #a0aec0;
  --accent-color: #a0aec0;
  --success-color: #68d391;
  --warning-color: #f6ad55;
  --danger-color: #fc8181;
  --text-primary: #e4e7eb;
  --text-secondary: #cbd5e0;
  --text-light: #a0aec0;
  --bg-gradient: #1a202c;
  --bg-light: #2d3748;
  --bg-white: #1a202c;
  --border-color: rgba(203, 213, 224, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode {
  background: var(--bg-white);
  color: var(--text-primary);
}

body.dark-mode .classroom-container {
  background: var(--bg-gradient);
}

body.dark-mode .classroom-header {
  background: #1a202c;
  border-bottom-color: rgba(203, 213, 224, 0.1);
}

body.dark-mode .card,
body.dark-mode .task-card,
body.dark-mode .grade-card {
  background: var(--bg-light);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #1a202c;
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .modal-content {
  background: var(--bg-light);
  color: var(--text-primary);
}

body.dark-mode .modal-config-container {
  background: var(--bg-light);
}

body.dark-mode .modal-config-header {
  background: #1a202c;
}

body.dark-mode .config-tabs-sidebar {
  background: #1a202c;
  border-right-color: rgba(203, 213, 224, 0.1);
}

body.dark-mode .config-content-area {
  background: var(--bg-white);
}

body.dark-mode .config-tab-btn {
  color: var(--text-secondary);
}

body.dark-mode .config-tab-btn:hover,
body.dark-mode .config-tab-btn.active {
  color: var(--hw-white);
}

body.dark-mode .config-toggle-item {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .config-select,
body.dark-mode .config-input {
  background: #1a202c;
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .btn-config-action {
  background: #2d3748;
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .modal-config-footer {
  background: var(--bg-light);
  border-top-color: var(--border-color);
}

body.dark-mode .theme-card,
body.dark-mode .font-size-btn {
  background: #1a202c;
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .activity-card {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .activity-card.announcement.importante {
  background: linear-gradient(to right, #2d2410 0%, var(--bg-light) 100%);
}

body.dark-mode .card-title {
  color: var(--text-primary);
}

body.dark-mode .card-meta,
body.dark-mode .course-name,
body.dark-mode .separator {
  color: var(--text-light);
}

body.dark-mode .card-icon {
  color: var(--text-secondary);
}

body.dark-mode .card-content h4 {
  color: var(--text-primary);
}

body.dark-mode .card-content p {
  color: var(--text-secondary);
}

body.dark-mode .due-date,
body.dark-mode .task-points {
  background: rgba(122, 155, 189, 0.1);
  color: var(--text-secondary);
}

body.dark-mode .due-date i,
body.dark-mode .task-points i {
  color: var(--text-light);
}

body.dark-mode .file-item {
  background: rgba(122, 155, 189, 0.08);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

body.dark-mode .file-item:hover {
  background: rgba(122, 155, 189, 0.15);
  border-color: var(--primary-color);
}

body.dark-mode .avatar-circle {
  color: var(--text-primary) !important;
  border-color: var(--border-color);
  background: rgba(122, 155, 189, 0.1) !important;
}

body.dark-mode .poll-options {
  background: rgba(122, 155, 189, 0.05);
}

body.dark-mode .poll-option {
  background: var(--bg-white);
  border-color: var(--border-color);
  color: var(--text-primary);
}

body.dark-mode .poll-option:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
}

body.dark-mode .poll-option.selected {
  background: rgba(122, 155, 189, 0.2);
  border-color: var(--primary-color);
}

body.dark-mode .poll-bar {
  background: rgba(122, 155, 189, 0.1);
}

body.dark-mode .poll-bar-fill {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
}

body.dark-mode .poll-percentage {
  color: var(--text-primary);
}

body.dark-mode .comments-section {
  background: rgba(122, 155, 189, 0.05);
  border-color: var(--border-color);
}

body.dark-mode .comment-item {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .comment-author {
  color: var(--text-primary);
}

body.dark-mode .comment-text {
  color: var(--text-secondary);
}

body.dark-mode .comment-time {
  color: var(--text-light);
}

body.dark-mode .class-card {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .class-card-body {
  background: var(--bg-light);
}

body.dark-mode .class-info-item {
  color: var(--text-secondary);
}

body.dark-mode .class-info-item i {
  color: var(--text-light);
}

body.dark-mode .class-card-footer {
  border-top-color: var(--border-color);
  background: var(--bg-light);
}

body.dark-mode .task-card {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .task-status {
  color: var(--text-secondary);
}

body.dark-mode .task-title {
  color: var(--text-primary);
}

body.dark-mode .task-description {
  color: var(--text-secondary);
}

body.dark-mode .grade-card {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .grade-value {
  color: var(--text-primary);
}

body.dark-mode .grade-label {
  color: var(--text-secondary);
}

body.dark-mode .btn-primary {
  background: var(--hw-charcoal);
  color: white;
}

body.dark-mode .btn-secondary {
  background: var(--bg-light);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .btn-outline {
  background: transparent;
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .btn-outline:hover {
  background: rgba(122, 155, 189, 0.1);
  border-color: var(--primary-color);
}

body.dark-mode .filter-btn {
  background: var(--bg-light);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

body.dark-mode .filter-btn.active {
  background: var(--hw-charcoal);
  color: white;
  border-color: var(--hw-charcoal);
}

body.dark-mode .search-bar {
  background: var(--bg-light);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .search-bar::placeholder {
  color: var(--text-light);
}

body.dark-mode .classroom-sidebar {
  background: var(--bg-light);
  border-right-color: var(--border-color);
}

body.dark-mode .menu-item {
  color: var(--text-secondary);
}

body.dark-mode .menu-item:hover {
  background: rgba(122, 155, 189, 0.1);
  color: var(--text-primary);
}

body.dark-mode .menu-item.active {
  background: rgba(122, 155, 189, 0.15);
  color: var(--primary-light);
  border-left-color: var(--primary-light);
}

body.dark-mode .menu-item i {
  color: var(--text-light);
}

body.dark-mode .menu-item.active i {
  color: var(--primary-light);
}

body.dark-mode .stat-card {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .stat-value {
  color: var(--text-primary);
}

body.dark-mode .stat-label {
  color: var(--text-secondary);
}

body.dark-mode table {
  background: var(--bg-light);
  color: var(--text-primary);
}

body.dark-mode th {
  background: rgba(122, 155, 189, 0.1);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode td {
  color: var(--text-secondary);
  border-color: var(--border-color);
}

body.dark-mode tr:hover {
  background: rgba(122, 155, 189, 0.05);
}

body.dark-mode .dropdown-menu {
  background: var(--bg-light);
  border-color: var(--border-color);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

body.dark-mode .dropdown-item {
  color: var(--text-secondary);
}

body.dark-mode .dropdown-item:hover {
  background: rgba(122, 155, 189, 0.1);
  color: var(--text-primary);
}

body.dark-mode .calendar-view {
  background: var(--bg-light);
  color: var(--text-primary);
}

body.dark-mode .calendar-header {
  color: var(--text-primary);
  background: var(--bg-light);
}

body.dark-mode .calendar-controls {
  background: var(--bg-light);
}

body.dark-mode .current-month {
  color: var(--text-primary);
}

body.dark-mode .btn-nav,
body.dark-mode button[onclick*="cambiarMes"],
body.dark-mode button[onclick*="irHoy"] {
  background: rgba(122, 155, 189, 0.15) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .btn-nav:hover,
body.dark-mode button[onclick*="cambiarMes"]:hover,
body.dark-mode button[onclick*="irHoy"]:hover {
  background: rgba(122, 155, 189, 0.25) !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .calendar-grid {
  background: var(--bg-light);
}

body.dark-mode .calendar-grid > div:first-child,
body.dark-mode .calendar-grid > div:nth-child(2),
body.dark-mode .calendar-grid > div:nth-child(3),
body.dark-mode .calendar-grid > div:nth-child(4),
body.dark-mode .calendar-grid > div:nth-child(5),
body.dark-mode .calendar-grid > div:nth-child(6),
body.dark-mode .calendar-grid > div:nth-child(7) {
  background: rgba(122, 155, 189, 0.2) !important;
  color: white !important;
  font-weight: 600;
}

body.dark-mode .calendar-day,
body.dark-mode .calendar-grid > div {
  background: var(--bg-white);
  color: var(--text-primary) !important;
  border-color: var(--border-color);
}

body.dark-mode .calendar-day:hover,
body.dark-mode .calendar-grid > div:hover {
  background: rgba(122, 155, 189, 0.1);
  border-color: var(--primary-color);
}

body.dark-mode .calendar-day.today,
body.dark-mode .calendar-grid > div.today {
  border-color: var(--primary-light) !important;
  background: rgba(122, 155, 189, 0.15) !important;
  color: var(--primary-light) !important;
}

body.dark-mode .calendar-day.other-month {
  color: var(--text-light) !important;
  opacity: 0.3;
}

body.dark-mode .event-dot {
  background: var(--primary-light);
}

body.dark-mode .calendar-event-item {
  background: rgba(122, 155, 189, 0.15);
  color: var(--text-primary);
  border-left-color: var(--primary-light);
}

body.dark-mode .calendar-event-item:hover {
  background: rgba(122, 155, 189, 0.25);
}

body.dark-mode .event-task-label {
  background: rgba(255, 165, 0, 0.2) !important;
  color: var(--warning-color) !important;
  border-left-color: var(--warning-color) !important;
}

body.dark-mode .event-exam-label {
  background: rgba(239, 83, 80, 0.2) !important;
  color: var(--danger-color) !important;
  border-left-color: var(--danger-color) !important;
}

body.dark-mode .event-class-label {
  background: rgba(91, 155, 213, 0.2) !important;
  color: var(--secondary-color) !important;
  border-left-color: var(--secondary-color) !important;
}

body.dark-mode .calendar-view-selector,
body.dark-mode .vista-selector {
  background: var(--bg-light);
}

body.dark-mode .calendar-view-selector button,
body.dark-mode .vista-selector button,
body.dark-mode button[data-vista] {
  background: rgba(122, 155, 189, 0.15) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .calendar-view-selector button:hover,
body.dark-mode .vista-selector button:hover,
body.dark-mode button[data-vista]:hover {
  background: rgba(122, 155, 189, 0.25) !important;
  color: var(--text-primary) !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .calendar-view-selector button.active,
body.dark-mode .vista-selector button.active,
body.dark-mode button[data-vista].active {
  background: var(--hw-charcoal) !important;
  color: white !important;
  border-color: var(--hw-charcoal) !important;
}

body.dark-mode h2[style*="calendar"],
body.dark-mode .calendar-title,
body.dark-mode .view-title {
  color: var(--text-primary) !important;
}

body.dark-mode .calendar-title i,
body.dark-mode .view-title i {
  color: var(--text-secondary) !important;
}

body.dark-mode .calendar-nav-btn,
body.dark-mode .month-nav-btn {
  background: rgba(122, 155, 189, 0.15) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

body.dark-mode .calendar-nav-btn:hover,
body.dark-mode .month-nav-btn:hover {
  background: rgba(122, 155, 189, 0.25) !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .calendar-nav-btn i,
body.dark-mode .month-nav-btn i {
  color: var(--text-primary) !important;
}

body.dark-mode .today-btn,
body.dark-mode .btn-hoy {
  background: rgba(122, 155, 189, 0.2) !important;
  color: var(--primary-light) !important;
  border: 1px solid var(--primary-color) !important;
}

body.dark-mode .today-btn:hover,
body.dark-mode .btn-hoy:hover {
  background: rgba(122, 155, 189, 0.3) !important;
}

body.dark-mode .calendar-wrapper,
body.dark-mode .calendario-wrapper {
  background: var(--bg-light);
  border-color: var(--border-color);
}

body.dark-mode .calendar-day-number,
body.dark-mode .day-number {
  color: var(--text-primary) !important;
}

body.dark-mode .calendar-day.other-month .day-number,
body.dark-mode .calendar-day.other-month .calendar-day-number {
  color: var(--text-light) !important;
  opacity: 0.3;
}

body.dark-mode .calendar-day-events {
  background: transparent;
}

body.dark-mode .calendar-mini-event {
  background: rgba(122, 155, 189, 0.3) !important;
  color: var(--text-primary) !important;
  border-left-color: var(--primary-light) !important;
}

body.dark-mode .calendar-mini-event:hover {
  background: rgba(122, 155, 189, 0.4) !important;
}

body.dark-mode .calendar-grid {
  background: var(--bg-light);
}

body.dark-mode .calendar-grid > div:first-child,
body.dark-mode .calendar-grid > div:nth-child(2),
body.dark-mode .calendar-grid > div:nth-child(3),
body.dark-mode .calendar-grid > div:nth-child(4),
body.dark-mode .calendar-grid > div:nth-child(5),
body.dark-mode .calendar-grid > div:nth-child(6),
body.dark-mode .calendar-grid > div:nth-child(7) {
  background: rgba(122, 155, 189, 0.15);
  color: var(--text-primary);
  font-weight: 600;
}

body.dark-mode .calendar-day {
  background: var(--bg-white);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode .calendar-day:hover {
  background: rgba(122, 155, 189, 0.1);
  border-color: var(--primary-color);
}

body.dark-mode .calendar-day.today {
  border-color: var(--primary-light);
  background: rgba(122, 155, 189, 0.1);
}

body.dark-mode .calendar-day.other-month {
  color: var(--text-light);
  opacity: 0.4;
}

body.dark-mode .event-dot {
  background: var(--primary-light);
}

body.dark-mode .calendar-event-item {
  background: rgba(122, 155, 189, 0.15);
  color: var(--text-primary);
  border-left-color: var(--primary-light);
}

body.dark-mode .upcoming-events {
  background: var(--bg-light);
}

body.dark-mode .upcoming-events h3 {
  color: var(--text-primary);
}

body.dark-mode .event-item {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
}

body.dark-mode .event-item:hover {
  background: rgba(122, 155, 189, 0.1);
  border-color: var(--primary-color);
}

body.dark-mode .event-details h4 {
  color: var(--text-primary);
}

body.dark-mode .event-details p {
  color: var(--text-secondary);
}

body.dark-mode .modal-overlay {
  background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .modal-card {
  background: var(--bg-light);
  color: var(--text-primary);
}

body.dark-mode .modal-header {
  background: var(--hw-charcoal);
  color: white;
}

body.dark-mode .modal-body {
  background: var(--bg-light);
  color: var(--text-primary);
}

body.dark-mode .modal-footer {
  background: var(--bg-light);
  border-top-color: var(--border-color);
}

body.dark-mode .detail-section {
  background: var(--bg-white);
  border-color: var(--border-color);
}

body.dark-mode .detail-label {
  color: var(--text-light);
}

body.dark-mode .detail-value {
  color: var(--text-primary);
}

body.dark-mode .grade-display {
  background: var(--success-color);
}

body.dark-mode .comment-box {
  background: rgba(255, 193, 7, 0.15);
  border-color: var(--warning-color);
}

body.dark-mode .comment-label {
  color: var(--warning-color);
}

body.dark-mode .comment-text {
  color: var(--text-primary);
}

body.dark-mode .submission-info {
  background: rgba(122, 155, 189, 0.1);
  color: var(--text-secondary);
}

body.dark-mode .file-link {
  color: var(--primary-light);
}

body.dark-mode .file-link:hover {
  color: var(--accent-color);
}

body.dark-mode .task-list {
  background: var(--bg-light);
}

body.dark-mode .task-item {
  background: var(--bg-white);
  border-color: var(--border-color);
}

body.dark-mode .task-item:hover {
  background: rgba(122, 155, 189, 0.05);
  border-color: var(--primary-color);
}

body.dark-mode .task-header {
  color: var(--text-primary);
}

body.dark-mode .task-meta {
  color: var(--text-light);
}

body.dark-mode .task-status-badge {
  background: rgba(122, 155, 189, 0.2);
  color: var(--text-primary);
}

body.dark-mode .task-status-badge.entregada {
  background: rgba(102, 187, 106, 0.2);
  color: var(--success-color);
}

body.dark-mode .task-status-badge.pendiente {
  background: rgba(255, 167, 38, 0.2);
  color: var(--warning-color);
}

body.dark-mode .task-status-badge.vencida {
  background: rgba(239, 83, 80, 0.2);
  color: var(--danger-color);
}

body.dark-mode .loader {
  background: rgba(26, 32, 44, 0.95);
}

body.dark-mode .spinner {
  border-color: var(--border-color);
  border-top-color: var(--primary-light);
}

body.dark-mode .view-selector button {
  background: var(--bg-light);
  color: var(--text-secondary);
  border-color: var(--border-color);
}

body.dark-mode .view-selector button.active {
  background: var(--hw-charcoal);
  color: white;
  border-color: var(--hw-charcoal);
}

body.dark-mode .view-selector button:hover {
  background: rgba(122, 155, 189, 0.15);
  border-color: var(--primary-color);
}

body.dark-mode .section-header {
  color: var(--text-primary);
}

body.dark-mode .section-title {
  color: var(--text-primary);
}

body.dark-mode .section-subtitle {
  color: var(--text-secondary);
}

body.dark-mode .badge {
  background: rgba(122, 155, 189, 0.2);
  color: var(--text-primary);
}

body.dark-mode .badge-success {
  background: rgba(102, 187, 106, 0.2);
  color: var(--success-color);
}

body.dark-mode .badge-warning {
  background: rgba(255, 167, 38, 0.2);
  color: var(--warning-color);
}

body.dark-mode .badge-danger {
  background: rgba(239, 83, 80, 0.2);
  color: var(--danger-color);
}

body.dark-mode .badge-info {
  background: rgba(91, 155, 213, 0.2);
  color: var(--secondary-color);
}

body.dark-mode input[type="text"],
body.dark-mode input[type="email"],
body.dark-mode input[type="password"],
body.dark-mode input[type="number"],
body.dark-mode input[type="date"],
body.dark-mode input[type="time"],
body.dark-mode input[type="file"] {
  background: var(--bg-white);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode input::placeholder {
  color: var(--text-light);
}

body.dark-mode input:focus {
  border-color: var(--primary-light);
  background: var(--bg-light);
}

body.dark-mode textarea {
  background: var(--bg-white);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode textarea::placeholder {
  color: var(--text-light);
}

body.dark-mode textarea:focus {
  border-color: var(--primary-light);
  background: var(--bg-light);
}

body.dark-mode select {
  background: var(--bg-white);
  color: var(--text-primary);
  border-color: var(--border-color);
}

body.dark-mode select:focus {
  border-color: var(--primary-light);
}

body.dark-mode option {
  background: var(--bg-light);
  color: var(--text-primary);
}

body.dark-mode input[type="checkbox"],
body.dark-mode input[type="radio"] {
  border-color: var(--border-color);
}

body.dark-mode input[type="checkbox"]:checked,
body.dark-mode input[type="radio"]:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

body.dark-mode .swal2-popup {
  background: var(--bg-light) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .swal2-title {
  color: var(--text-primary) !important;
}

body.dark-mode .swal2-html-container {
  color: var(--text-secondary) !important;
}

body.dark-mode .swal2-confirm,
body.dark-mode .swal2-cancel {
  background: var(--hw-charcoal) !important;
}

body.dark-mode .swal2-styled.swal2-cancel {
  background: var(--bg-white) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

body.dark-mode .grade-section,
body.dark-mode .task-section,
body.dark-mode .comment-section {
  background: var(--bg-white) !important;
  border-color: var(--border-color) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .grade-badge {
  background: var(--danger-color) !important;
  color: white !important;
}

body.dark-mode .task-info-box {
  background: rgba(122, 155, 189, 0.15) !important;
  color: var(--text-primary) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .submission-date {
  color: var(--text-light) !important;
}

body.dark-mode .teacher-comment-box {
  background: rgba(255, 193, 7, 0.15) !important;
  border-left-color: var(--warning-color) !important;
}

body.dark-mode .teacher-comment-label {
  color: var(--warning-color) !important;
}

body.dark-mode .student-comment-box {
  background: var(--bg-white) !important;
  border-color: var(--border-color) !important;
  color: var(--text-secondary) !important;
}

body.dark-mode .file-attachment-box {
  background: rgba(122, 155, 189, 0.1) !important;
  border-color: var(--border-color) !important;
}

body.dark-mode .file-attachment-label {
  color: var(--text-secondary) !important;
}

body.dark-mode .file-link-btn {
  background: rgba(122, 155, 189, 0.2) !important;
  color: var(--primary-light) !important;
  border-color: var(--primary-color) !important;
}

body.dark-mode .file-link-btn:hover {
  background: rgba(122, 155, 189, 0.3) !important;
}

body.dark-mode .swal2-close {
  color: var(--text-light) !important;
}

body.dark-mode .swal2-close:hover {
  color: var(--text-primary) !important;
}

body.dark-mode .section-header-icon {
  color: var(--text-light) !important;
}

body.dark-mode .section-header-text {
  color: var(--text-primary) !important;
}

body.dark-mode .swal2-input,
body.dark-mode .swal2-textarea {
  background: var(--bg-white) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

body.dark-mode .swal2-input::placeholder,
body.dark-mode .swal2-textarea::placeholder {
  color: var(--text-light) !important;
}

body.dark-mode .swal2-input:focus,
body.dark-mode .swal2-textarea:focus {
  border-color: var(--primary-light) !important;
  background: var(--bg-light) !important;
}

body.dark-mode .swal2-validation-message {
  background: rgba(239, 83, 80, 0.2) !important;
  color: var(--danger-color) !important;
}

body.dark-mode .swal2-actions {
  background: var(--bg-light) !important;
}

body.dark-mode .swal2-select {
  background: var(--bg-white) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-color) !important;
}

body.dark-mode .swal2-select option {
  background: var(--bg-light) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .swal2-radio {
  background: var(--bg-white) !important;
}

body.dark-mode .swal2-radio label {
  color: var(--text-primary) !important;
}

body.dark-mode .swal2-checkbox {
  background: var(--bg-white) !important;
}

body.dark-mode .swal2-checkbox label {
  color: var(--text-primary) !important;
}

body.dark-mode .swal2-progress-steps {
  background: var(--bg-light) !important;
}

body.dark-mode .swal2-progress-step {
  background: var(--primary-color) !important;
}

body.dark-mode .swal2-progress-step.swal2-active-progress-step {
  background: var(--primary-light) !important;
}

body.dark-mode .swal2-toast {
  background: var(--bg-light) !important;
  color: var(--text-primary) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5) !important;
}

body.font-pequeño,
body.font-pequeño * {
  font-size: 14px !important;
}

body.font-normal,
body.font-normal * {
  font-size: 16px !important;
}

body.font-grande,
body.font-grande * {
  font-size: 18px !important;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif !important;
  background: var(--hw-off-white);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before {
  display: none;
}


/* SweetAlert2 backdrop blur - Múltiples selectores para forzar */
.swal2-container,
.swal2-container.swal2-backdrop-show,
.swal2-backdrop-show {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* Pseudo-elemento para compatibilidad adicional */
.swal2-container::before {
  content: '' !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: -1 !important;
  pointer-events: none !important;
}

/* Elemento backdrop de SweetAlert2 */
div.swal2-backdrop,
.swal2-backdrop {
  background: rgba(0, 0, 0, 0.3) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
}

/* Limitar altura del modal de Crear Tarea y aplicar fuente Inter */
.animated-popup,
.animated-popup * {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
}

.animated-popup {
  max-height: 900px !important;
  overflow-y: auto !important;
}

.modal-recursos-overlay {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}


@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes hatSpin {
  0%, 70% { transform: rotate(0deg) scale(1); }
  75% { transform: rotate(-10deg) scale(1.05); }
  85% { transform: rotate(370deg) scale(1.08); }
  92% { transform: rotate(355deg) scale(1.04); }
  100% { transform: rotate(360deg) scale(1); }
}

@keyframes hatWiggle {
  0%, 100% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-5deg) scale(1.02); }
  50% { transform: rotate(5deg) scale(1.04); }
  75% { transform: rotate(-3deg) scale(1.02); }
}

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

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes modalIn {
  0% {
    opacity: 0;
    transform: scale(0.7) translateY(-50px) rotateX(10deg);
  }
  50% {
    transform: scale(1.02) translateY(5px) rotateX(-2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotateX(0deg);
  }
}

@keyframes modalSlideIn {
  0% {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(147, 161, 173, 0.45); }
  50% { transform: scale(1.05); box-shadow: 0 0 0 8px rgba(147, 161, 173, 0); }
}

@keyframes pulseBig {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes bounceIn {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes popIn {
  0% { transform: scale(0.9); opacity: 0; }
  60% { transform: scale(1.03); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes wobble {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px) rotate(-1deg); }
  40% { transform: translateX(3px) rotate(1deg); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(1px); }
}

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(147, 161, 173, 0.45); }
  50% { box-shadow: 0 0 0 4px rgba(147, 161, 173, 0.15); }
}

@keyframes bellShake {
  0%, 100% { transform: rotate(0); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-12deg); }
  30% { transform: rotate(10deg); }
  40% { transform: rotate(-8deg); }
  50% { transform: rotate(0); }
}

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

@keyframes checkTick {
  0% { transform: scale(0) rotate(45deg); }
  50% { transform: scale(1.2) rotate(45deg); }
  100% { transform: scale(1) rotate(45deg); }
}

body {
  font-family: var(--font-body);
}


.classroom-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: #dee2e6;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  transition: var(--transition);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 24px;
  max-width: 100%;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-toggle {
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.menu-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
}

.menu-toggle i {
  width: 22px;
  height: 22px;
  color: var(--hw-white);
}

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

.logo-icon {
  width: 28px;
  height: 28px;
  color: var(--hw-white);
  background: none !important;
  transition: all 0.5s var(--ease-smooth);
  cursor: pointer;
  animation: hatSpin 5s var(--ease-smooth) infinite;
}

.logo-icon:hover {
  animation-play-state: paused;
  transform: scale(1.1);
  filter: drop-shadow(0 0 6px rgba(255, 255, 255, 0.4));
}

.logo-section h1 {
  font-family: var(--font-heading);
  font-size: clamp(1rem, 2vw + 0.3rem, 1.35rem);
  font-weight: 400;
  color: #495057;
  letter-spacing: -0.02em;
  transition: opacity var(--duration-fast) var(--ease-smooth);
}

.logo-section:hover h1 {
  opacity: 0.9;
}

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

.header-icon-btn {
  position: relative;
  background: none;
  border: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.35s var(--ease-out-back);
  overflow: hidden;
}

.header-icon-btn::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s var(--ease-smooth);
}

.header-icon-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.08);
  box-shadow: 0 5px 15px rgba(147, 161, 173, 0.25);
}

.header-icon-btn:hover::before {
  transform: scale(1.5);
  opacity: 0;
}

.header-icon-btn:active {
  transform: translateY(0) scale(0.92);
  transition: all 0.1s ease;
}

.header-icon-btn.has-notifications i {
  animation: bellShake 0.6s var(--ease-bounce) infinite;
  animation-iteration-count: 3;
}

.header-icon-btn i {
  width: 22px;
  height: 22px;
  color: var(--hw-white);
  transition: transform 0.3s var(--ease-out-back);
}

.header-icon-btn:hover i {
  transform: scale(1.12);
}

.notification-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--danger-color);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
  border: 2px solid var(--hw-charcoal);
  line-height: 1;
  animation: bounceIn 0.6s var(--ease-bounce);
}

.user-menu {
  position: relative;
}

.user-avatar {
  width: 38px;
  height: 38px;
  aspect-ratio: 1;
  flex-shrink: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--hw-charcoal);
  font-weight: 600;
  font-size: 13px;
  border: 2px solid transparent;
  cursor: pointer;
  display: flex;
  box-shadow: none;
  transition: all 0.35s var(--ease-out-back);
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.user-avatar::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 2px solid var(--hw-graphite);
  opacity: 0;
  transform: scale(1.3);
  transition: all 0.4s var(--ease-smooth);
}

.user-avatar #userInitials {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--hw-graphite);
  transition: all 0.35s var(--ease-out-back);
}

.user-avatar #userInitials img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: all 0.35s var(--ease-out-back);
}

.user-avatar:hover {
  transform: scale(1.12);
  box-shadow: 0 5px 20px rgba(147, 161, 173, 0.25);
}

.user-avatar:hover::before {
  opacity: 1;
  transform: scale(1.5);
}

.user-avatar:hover #userInitials img {
  transform: scale(1.15);
}

.user-avatar:active {
  transform: scale(0.95);
  transition: all 0.1s ease;
}

.user-dropdown {
  position: absolute;
  top: 54px;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 16px;
  border: 1px solid var(--border-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  min-width: 240px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-20px) scale(0.9) rotateX(10deg);
  transition: all 0.4s var(--ease-out-back);
  z-index: 1001;
  font-family: var(--font-body);
  overflow: hidden;
  transform-origin: top right;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1) rotateX(0deg);
  animation: fadeInDown 0.4s var(--ease-out-back);
}

.user-info {
  padding: 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--hw-off-white);
}

.user-name {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.user-role {
  font-size: 13px;
  color: var(--hw-graphite);
  margin-top: 2px;
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s var(--ease-out-back);
  position: relative;
  overflow: hidden;
}

.dropdown-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: #93a1ad;
  transform: scaleY(0);
  transition: transform 0.3s var(--ease-out-back);
}

.dropdown-item:hover {
  background: rgba(147, 161, 173, 0.12);
  transform: translateX(6px);
  color: var(--hw-charcoal);
}

.dropdown-item:hover::before {
  transform: scaleY(1);
}

.dropdown-item:hover i {
  transform: scale(1.15);
  color: var(--hw-charcoal);
}

.dropdown-item i {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
  transition: all 0.3s var(--ease-out-back);
}


.classroom-container {
  display: flex;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
}


.classroom-sidebar {
  width: 260px;
  background: var(--hw-white);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0;
  top: 64px;
  bottom: 0;
  overflow-y: auto;
  transition: transform var(--duration-slow) var(--ease-smooth);
  z-index: 999;
}

.classroom-sidebar.collapsed {
  transform: translateX(-260px);
}

.sidebar-nav {
  padding: 40px 0;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  margin: 2px 12px;
  color: var(--text-secondary);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.25s var(--ease-smooth);
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: var(--hw-graphite);
  border-radius: 0 2px 2px 0;
  transition: height 0.3s var(--ease-smooth);
}

.nav-item::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, rgba(101, 111, 119, 0.08), transparent);
  transition: width 0.3s var(--ease-smooth);
}

.nav-item:hover {
  background: var(--accent-hover);
  color: var(--hw-charcoal);
  transform: translateX(4px);
}

.nav-item:hover::before {
  height: 60%;
}

.nav-item:hover::after {
  width: 100%;
}

.nav-item:hover i {
  transform: scale(1.15);
}

.nav-item.active {
  background: #5d646b;
  color: var(--hw-off-white);
  font-weight: 500;
  transform: translateX(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-left: 3px solid #93a1ad;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.05);
  border-radius: inherit;
  pointer-events: none;
}

.nav-item.active::after {
  display: none;
}

.nav-item.active i,
.nav-item.active svg,
.nav-item.active svg path,
.nav-item.active svg line,
.nav-item.active svg polyline,
.nav-item.active svg rect,
.nav-item.active svg circle,
.nav-item.active svg polygon,
.nav-item.active .lucide,
.nav-item.active .lucide path,
.nav-item.active .lucide line,
.nav-item.active .lucide polyline,
.nav-item.active .lucide rect,
.nav-item.active .lucide circle,
.nav-item.active .lucide polygon {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
}

.nav-item i {
  width: 20px;
  height: 20px;
  color: var(--hw-graphite);
  transition: all var(--duration-fast) var(--ease-smooth);
}

.nav-item:hover i {
  color: var(--hw-charcoal);
  transform: scale(1.1);
}

.nav-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 20px;
}

.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--border-color);
}

.storage-info {
  padding: 12px;
  background: var(--hw-off-white);
  border-radius: 8px;
  font-family: var(--font-body);
}

.storage-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.storage-header i {
  width: 16px;
  height: 16px;
}

.storage-bar {
  height: 4px;
  background: var(--hw-light-gray);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
  position: relative;
}

.storage-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transform: translateX(-100%);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.storage-fill {
  height: 100%;
  background: var(--hw-graphite);
  border-radius: 2px;
  transition: width 0.8s var(--ease-smooth);
  position: relative;
}

.storage-text {
  font-size: 0.7rem;
  color: var(--text-light);
}


.classroom-main {
  flex: 1;
  margin-left: 280px;
  padding: 32px;
  max-width: calc(100% - 280px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  z-index: 1;
}

.classroom-sidebar.collapsed ~ .classroom-main {
  margin-left: 0;
  max-width: 100%;
}

.content-view {
  animation: fadeInSlide 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeInSlide {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}


.welcome-section {
  background-image: url('../../../images/cemiclassroombanner.png');
  background-size: 100% 100%;
  background-position: center;
  color: white;
  padding: 0;
  border-radius: 12px;
  margin-bottom: 28px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  width: 75%;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  aspect-ratio: 4 / 1;
  transition: box-shadow 0.5s var(--ease-smooth);
  cursor: default;
}

/* Video del banner - transición solo al salir */
.welcome-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  transition: opacity 0.6s ease-out;
}

/* Mostrar video en hover - instantáneo */
.welcome-section:hover .welcome-video {
  opacity: 1;
  transition: opacity 0s;
}

.welcome-section:hover {
  box-shadow: 0 12px 40px rgba(147, 161, 173, 0.2);
}

.welcome-banner-overlay {
  position: relative;
  z-index: 2;
  padding: 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.welcome-section h2 {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 2.5vw + 0.5rem, 1.75rem);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
  transition: all 0.4s var(--ease-out-back);
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.welcome-section:hover h2 {
  transform: translateX(12px) scale(1.02);
  text-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.welcome-section p {
  font-family: var(--font-body);
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 400;
  transition: all 0.45s var(--ease-out-back) 0.05s;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.welcome-section:hover p {
  transform: translateX(15px);
  opacity: 1;
}

.research-banner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #f0f1f3;
  border: 1px solid rgba(101, 111, 119, 0.12);
  border-left: 4px solid #f5a623;
  border-radius: 12px;
  padding: 0 32px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  transform: translateX(-30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.research-banner.visible {
  opacity: 1;
  max-height: 150px;
  padding: 24px 32px;
  margin-bottom: 24px;
  transform: translateX(0);
}

.research-banner.closing {
  opacity: 0;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  margin-bottom: 0;
  transform: translateX(-30px);
}

.research-banner:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}


.research-banner-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: #656f77;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.research-banner-close:hover {
  background: rgba(30, 30, 30, 0.08);
  color: #1e1e1e;
  transform: rotate(90deg);
}

.research-banner-close svg {
  width: 18px;
  height: 18px;
}

.research-banner-icon {
  position: relative;
  flex-shrink: 0;
  width: 64px;
  height: 64px;
}

.research-icon-bg {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #ff9500 0%, #ffb340 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(255, 149, 0, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.research-banner:hover .research-icon-bg {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 149, 0, 0.4);
}

.research-icon-bg svg {
  width: 26px;
  height: 26px;
  color: white;
}

.research-icon-accent {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #ffb84d 0%, #ffd280 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(255, 184, 77, 0.5);
  transform: rotate(12deg);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: accentBounce 2.5s ease-in-out infinite;
}

@keyframes accentBounce {
  0%, 100% { transform: rotate(12deg) scale(1); }
  25% { transform: rotate(8deg) scale(1.05); }
  50% { transform: rotate(16deg) scale(1.1); }
  75% { transform: rotate(10deg) scale(1.05); }
}

.research-icon-accent svg {
  width: 12px;
  height: 12px;
  color: white;
}

.research-banner-content {
  flex: 1;
  padding-right: 20px;
}

.research-banner-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: #1e1e1e;
  margin-bottom: 6px;
  line-height: 1.4;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.research-banner-content p {
  font-size: 13px;
  color: #656f77;
  line-height: 1.6;
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.research-banner-action {
  flex-shrink: 0;
}

.btn-research {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: #656f77;
  color: white;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 2px solid #656f77;
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.btn-research:hover {
  background: #1e1e1e;
  border-color: #1e1e1e;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(30, 30, 30, 0.2);
}

.btn-research:active {
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .research-banner {
    flex-direction: column;
    text-align: center;
    padding: 28px 24px;
    gap: 20px;
  }
  
  .research-banner-content {
    padding-right: 0;
  }
  
  .research-banner-close {
    top: 10px;
    right: 10px;
  }
  
  .btn-research {
    width: 100%;
    padding: 14px 24px;
  }
}

body.dark-mode .research-banner {
  background: #2a2a2a;
  border-color: rgba(255, 149, 0, 0.2);
  border-left-color: #ff9500;
}

body.dark-mode .research-icon-bg {
  background: linear-gradient(135deg, #ff9500 0%, #ffb340 100%);
  box-shadow: 0 4px 16px rgba(255, 149, 0, 0.25);
}

body.dark-mode .research-icon-bg svg {
  color: white;
}

body.dark-mode .research-icon-accent {
  background: linear-gradient(135deg, #ffb84d 0%, #ffd280 100%);
}

body.dark-mode .research-banner-content h3 {
  color: #f8f9fa;
}

body.dark-mode .research-banner-content p {
  color: #a0aec0;
}

body.dark-mode .btn-research {
  background: #656f77;
  color: white;
  border-color: #656f77;
}

body.dark-mode .btn-research:hover {
  background: #ff9500;
  border-color: #ff9500;
  color: white;
}

body.dark-mode .research-banner-close {
  color: #a0aec0;
}

body.dark-mode .research-banner-close:hover {
  background: rgba(248, 249, 250, 0.1);
  color: #f8f9fa;
}


.activity-stream {
  max-width: 900px;
  margin: 0 auto;
}

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

.stream-header h3 {
  font-family: var(--font-body);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--hw-charcoal);
}

.filter-select {
  padding: 8px 14px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--hw-white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

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

.filter-select:focus {
  outline: none;
  border-color: rgba(147, 161, 173, 0.55);
  box-shadow: 0 0 0 3px rgba(147, 161, 173, 0.15);
}


.activity-card {
  background: var(--hw-white);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-smooth);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--hw-graphite);
  position: relative;
  font-family: var(--font-body);
  animation: fadeInUp 0.4s var(--ease-smooth) backwards;
}

.activity-card:nth-child(1) { animation-delay: 0ms; }
.activity-card:nth-child(2) { animation-delay: 50ms; }
.activity-card:nth-child(3) { animation-delay: 100ms; }
.activity-card:nth-child(4) { animation-delay: 150ms; }
.activity-card:nth-child(5) { animation-delay: 200ms; }

.activity-card:hover {
  box-shadow: 0 6px 20px rgba(147, 161, 173, 0.18);
  border-left-color: #93a1ad;
  transform: translateY(-3px);
}

.activity-card:active {
  transform: translateY(-1px);
}

.activity-card.announcement {
  border-left-color: var(--hw-charcoal);
}

.activity-card.announcement.importante {
  border-left-color: var(--warning-color);
  background: #fffbeb;
}
.activity-card.task {
  border-left-color: #dc3545;
}

.activity-card.material {
  border-left-color: var(--hw-graphite);
}

.badge-importante {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--warning-color);
  color: var(--hw-charcoal);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  animation: fadeInScale 0.4s var(--ease-smooth) backwards;
  animation-delay: 200ms;
  display: flex;
  align-items: center;
  gap: 4px;
}

.badge-importante i {
  width: 14px;
  height: 14px;
}

.card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.avatar-circle {
  width: 44px;
  height: 44px;
  aspect-ratio: 1;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2d3748 !important;
  font-weight: 600;
  font-size: 16px;
  flex-shrink: 0;
  background: none !important;
  box-shadow: none;
  border: 2px solid var(--border-color);
  overflow: hidden;
}

.avatar-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.card-info {
  flex: 1;
}

.card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
}

.course-name {
  font-weight: 500;
}

.separator {
  color: var(--border-color);
}

.card-icon {
  width: 24px;
  height: 24px;
  color: #4a5568;
  background: none !important;
}

.card-content h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
}

.card-content p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.task-info {
  display: flex;
  gap: 24px;
  margin-top: 14px;
}

.due-date,
.task-points {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-light);
  font-weight: 500;
  padding: 6px 12px;
  background: rgba(66, 99, 140, 0.04);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
}

.due-date i,
.task-points i {
  width: 16px;
  height: 16px;
  color: #4a5568;
}

.material-files {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(66, 99, 140, 0.04);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 13px;
  transition: var(--transition);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
}

.file-item:hover {
  background: rgba(147, 161, 173, 0.1);
  border-color: rgba(147, 161, 173, 0.35);
  transform: translateX(2px);
}

.file-item i {
  width: 20px;
  height: 20px;
  color: #4a5568;
}

.file-size {
  margin-left: auto;
  color: var(--text-light);
  font-size: 11px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
}


.btn-primary {
  background: var(--hw-charcoal);
  color: var(--hw-white);
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.35s var(--ease-out-back);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.5s var(--ease-smooth), 
              height 0.5s var(--ease-smooth);
}

.btn-primary:hover {
  background: var(--hw-wrought-iron);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 25px rgba(30, 30, 30, 0.3);
}

.btn-primary:hover::before {
  width: 400px;
  height: 400px;
}

.btn-primary:active {
  transform: translateY(-1px) scale(0.98);
  box-shadow: var(--shadow-active);
  transition: all 0.1s ease;
}

.btn-primary i {
  width: 18px;
  height: 18px;
  transition: transform 0.3s var(--ease-out-back);
}

.btn-primary:hover i {
  transform: translateX(4px) scale(1.1);
}

.btn-primary-small {
  background: var(--hw-charcoal);
  color: var(--hw-white);
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-back);
  position: relative;
  overflow: hidden;
}

.btn-primary-small::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary-small:hover {
  background: var(--hw-wrought-iron);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 5px 15px rgba(30, 30, 30, 0.25);
}

.btn-primary-small:hover::after {
  left: 100%;
}

.btn-primary-small:active {
  transform: translateY(-1px) scale(0.98);
}

.btn-danger-small {
  background: var(--danger-color);
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-danger-small:hover {
  background: #c82333;
}

.btn-text {
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.btn-text:hover {
  background: rgba(66, 99, 140, 0.08);
  color: var(--primary-color);
  transform: translateY(-1px);
}

.btn-text i {
  width: 16px;
  height: 16px;
}

.btn-icon {
  background: none;
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background: var(--bg-light);
  border-color: var(--primary-color);
}

.btn-icon i {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}


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

.view-header h2 {
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--hw-charcoal);
}

.classes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  font-family: 'Inter', sans-serif;
}

.class-card {
  background: var(--hw-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s var(--ease-smooth);
  cursor: pointer;
  position: relative;
  border: 1px solid var(--border-color);
  animation: fadeInUp 0.4s var(--ease-smooth) backwards;
  font-family: 'Inter', sans-serif;
}

.class-card:nth-child(1) { animation-delay: 0ms; }
.class-card:nth-child(2) { animation-delay: 60ms; }
.class-card:nth-child(3) { animation-delay: 120ms; }
.class-card:nth-child(4) { animation-delay: 180ms; }
.class-card:nth-child(5) { animation-delay: 240ms; }
.class-card:nth-child(6) { animation-delay: 300ms; }

.class-card:hover {
  box-shadow: 0 10px 30px rgba(30, 30, 30, 0.15);
  transform: translateY(-4px);
  border-color: #93a1ad;
}

.class-card:active {
  transform: translateY(-2px);
}

.class-card-header {
  padding: 24px !important;
  color: white !important;
  position: relative;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background: #5d646b !important;
  border-radius: 8px 8px 0 0 !important;
  border-top: 3px solid #93a1ad;
}

.class-card-header h3 {
  font-family: 'Inter', sans-serif !important;
  font-size: 1.25rem !important;
  font-weight: 500 !important;
  margin: 0 0 6px 0 !important;
  color: white !important;
}

.class-card-header p {
  font-size: 0.85rem !important;
  opacity: 0.9 !important;
  color: rgba(255, 255, 255, 0.85) !important;
  margin: 0 !important;
  font-family: 'Inter', sans-serif !important;
}

.class-menu-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.class-menu-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.class-menu-btn i {
  width: 20px;
  height: 20px;
  color: white;
}

.class-card-body {
  padding: 20px;
  font-family: 'Inter', sans-serif;
}

.class-info-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 14px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
}

.class-info-item:last-child {
  margin-bottom: 0;
}

.class-info-item i {
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.class-card-footer {
  display: flex;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
}


.view-filters {
  display: flex;
  gap: 8px;
}

.filter-btn {
  background: var(--hw-white);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover {
  background: var(--hw-off-white);
  border-color: #93a1ad;
  color: #93a1ad;
}

.filter-btn.active {
  background: var(--hw-off-white);
  color: #93a1ad;
  border-color: rgba(147, 161, 173, 0.4);
  font-weight: 600;
}

.tasks-list {
  max-width: 900px;
  margin: 0 auto;
  font-family: var(--font-body);
}

.task-item {
  background: var(--hw-white);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.task-item:hover {
  box-shadow: var(--shadow-md);
}

.task-status-indicator {
  width: 4px;
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 8px 0 0 8px;
}

.task-item.pending .task-status-indicator {
  background: var(--warning-color);
}

.task-item.completed .task-status-indicator {
  background: var(--success-color);
}

.task-item.overdue .task-status-indicator {
  background: var(--danger-color);
}

.task-content {
  flex: 1;
  padding-left: 8px;
}

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

.task-header h4 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
}

.task-badge {
  padding: 5px 14px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  font-family: 'Inter', sans-serif;
}

.task-badge.due-soon {
  background: linear-gradient(135deg, rgba(255, 152, 0, 0.15), rgba(255, 183, 77, 0.15));
  color: var(--warning-color);
  border: 1px solid rgba(255, 152, 0, 0.2);
}

.task-badge.completed {
  background: linear-gradient(135deg, rgba(76, 175, 80, 0.15), rgba(129, 199, 132, 0.15));
  color: var(--success-color);
  border: 1px solid rgba(76, 175, 80, 0.2);
}

.task-badge.overdue {
  background: linear-gradient(135deg, rgba(244, 67, 54, 0.15), rgba(239, 83, 80, 0.15));
  color: var(--danger-color);
  border: 1px solid rgba(244, 67, 54, 0.2);
}

.task-description {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  line-height: 1.6;
  font-family: 'Inter', sans-serif;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
}

.task-course {
  font-weight: 600;
  color: var(--primary-color);
  font-family: 'Inter', sans-serif;
}

.task-due,
.task-grade {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
}

.task-due i,
.task-grade i {
  width: 14px;
  height: 14px;
}

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


.grades-container {
  max-width: 1100px;
}

.grades-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.summary-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

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

.summary-icon {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.summary-icon i {
  width: 28px;
  height: 28px;
  color: white;
}

.summary-content {
  flex: 1;
}

.summary-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.summary-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
}

.grades-table-container h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.course-grades {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 24px;
}

.course-grades-header {
  padding: 20px 24px;
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.course-grades-header h4 {
  font-size: 18px;
  font-weight: 600;
}

.course-average {
  font-size: 14px;
  background: rgba(255, 255, 255, 0.2);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 500;
}

.grades-table {
  width: 100%;
  border-collapse: collapse;
}

.grades-table thead {
  background: var(--bg-light);
}

.grades-table th {
  padding: 12px 24px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.grades-table td {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-primary);
}

.grade-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
}

.grade-badge.excellent {
  background: rgba(67, 160, 71, 0.1);
  color: var(--success-color);
}

.grade-badge.good {
  background: rgba(25, 118, 210, 0.1);
  color: var(--primary-color);
}

.grade-badge.regular {
  background: rgba(251, 140, 0, 0.1);
  color: var(--warning-color);
}

.grade-badge.poor {
  background: rgba(229, 57, 53, 0.1);
  color: var(--danger-color);
}


.calendar-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.current-month {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 150px;
  text-align: center;
}

.calendar-container {
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 24px;
}

.calendar-view {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-height: 500px;
}

.upcoming-events {
  background: white;
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.upcoming-events h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  font-family: 'Inter', sans-serif;
}

.event-item {
  display: flex;
  gap: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: 8px;
  margin-bottom: 12px;
  transition: var(--transition);
}

.event-item:hover {
  background: #e8f0fe;
}

.event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 56px;
  flex-shrink: 0;
}

.event-day {
  font-size: 24px;
  font-weight: 700;
  line-height: 1;
  font-family: 'Inter', sans-serif;
}

.event-month {
  font-size: 12px;
  text-transform: uppercase;
  margin-top: 2px;
  font-family: 'Inter', sans-serif;
}

.event-details h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
  font-family: 'Inter', sans-serif;
}

.event-details p {
  font-size: 13px;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
}


.loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.loader.hidden {
  opacity: 0;
  pointer-events: none;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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


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

  .classes-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

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

  .classroom-sidebar.show {
    transform: translateX(0);
  }

  .classroom-main {
    margin-left: 0;
    padding: 16px;
  }

  .welcome-section {
    background-image: url('../../../images/cemiclassroombanner800200.png');
    height: 180px;
  }

  .welcome-banner-overlay {
    padding: 24px;
  }

  .welcome-section h2 {
    font-size: clamp(18px, 5vw, 26px);
  }

  .classes-grid {
    grid-template-columns: 1fr;
  }

  .grades-summary {
    grid-template-columns: 1fr;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .view-filters {
    width: 100%;
    flex-wrap: wrap;
  }

  .filter-btn {
    flex: 1;
    min-width: 120px;
  }
}

@media (max-width: 480px) {
  .logo-section h1 {
    display: none;
  }

  .card-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .separator {
    display: none;
  }

  .task-item {
    flex-direction: column;
  }

  .task-actions {
    width: 100%;
  }

  .task-actions .btn-primary-small {
    flex: 1;
  }
}


.slide-down {
  animation: slideDown 0.3s ease-out forwards;
  transform-origin: top;
}

.slide-up {
  animation: slideUp 0.3s ease-out forwards;
  transform-origin: top;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 1;
    max-height: 500px;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    transform: translateY(-10px);
  }
}

@keyframes highlight-pulse {
  0%, 100% {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.4);
    transform: scale(1.02);
  }
}

.collapsible-content {
  overflow: hidden;
  transition: all 0.3s ease-out;
}

.collapsible-content.hidden {
  max-height: 0;
  opacity: 0;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}


.course-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  cursor: pointer;
  z-index: 9999;
  display: none;
}

.course-panel-overlay.active {
  display: block;
}

.course-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 600px;
  z-index: 10000;
  display: none;
}

.course-side-panel.active {
  display: block;
}

.course-panel-content {
  position: relative;
  width: 100%;
  height: 100%;
  background: white;
  box-shadow: -8px 0 40px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: slideInFromRight 0.5s var(--ease-smooth) forwards;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

.course-panel-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e8eaf0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: white;
  position: sticky;
  top: 0;
  z-index: 10;
}

.course-panel-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: #f0f2f5;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: #666;
}

.course-panel-close:hover {
  background: #e4e6eb;
  color: #333;
  transform: scale(1.1);
}

.course-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.course-panel-section {
  padding: 24px;
  border-bottom: 1px solid #f0f0f0;
}

.course-panel-section:last-child {
  border-bottom: none;
}

.course-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: #4a5259;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.course-detail-header {
  background: var(--hw-charcoal);
  padding: 32px 24px;
  color: white;
  border-bottom: 2px solid rgba(147, 161, 173, 0.5);
}

.course-detail-name {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 8px 0;
}

.course-detail-meta {
  font-size: 15px;
  opacity: 0.95;
  margin: 0;
}

.course-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.course-info-item {
  padding: 16px;
  background: #f8f9fa;
  border-radius: 12px;
  border-left: 3px solid rgba(147, 161, 173, 0.7);
}

.course-info-label {
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.course-info-value {
  font-size: 16px;
  color: #2c3e50;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.student-list-item {
  padding: 12px;
  background: white;
  border: 1px solid #e8eaf0;
  border-radius: 8px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s;
  cursor: pointer;
}

.student-list-item:hover {
  background: #f0f4f8;
  border-color: #93a1ad;
  transform: translateX(4px);
  box-shadow: 0 4px 12px rgba(147, 161, 173, 0.15);
}

.student-avatar {
  width: 40px;
  height: 40px;
  aspect-ratio: 1;
  border-radius: 8px;
  background: rgba(101, 111, 119, 0.15) !important;
  color: var(--hw-graphite) !important;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--border-color);
}

.student-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.student-info {
  flex: 1;
}

.student-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
  margin-bottom: 2px;
}

.student-email {
  font-size: 12px;
  color: #999;
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-light);
}

.empty-state i {
  width: 64px;
  height: 64px;
  color: var(--border-color);
  margin-bottom: 16px;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .course-panel-content {
    max-width: 100%;
  }
  
  .course-info-grid {
    grid-template-columns: 1fr;
  }
}


.notifications-dropdown {
  position: absolute;
  top: 64px;
  right: 80px;
  width: 420px;
  max-height: 540px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(25px);
  -webkit-backdrop-filter: blur(25px);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(66, 99, 140, 0.25);
  border: 1px solid rgba(66, 99, 140, 0.12);
  display: none;
  flex-direction: column;
  z-index: 9999;
  overflow: hidden;
}

.notifications-dropdown.active {
  display: flex;
  animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.notifications-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(135deg, #f5f7fa 0%, #ffffff 100%);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notifications-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.2px;
}

.mark-all-read-btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 7px 12px;
  border-radius: 8px;
  transition: var(--transition);
}

.mark-all-read-btn:hover {
  background: rgba(66, 99, 140, 0.08);
  transform: translateY(-1px);
}

.notifications-list {
  flex: 1;
  overflow-y: auto;
  max-height: 440px;
}

.notification-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
}

.notification-item:hover {
  background: rgba(101, 111, 119, 0.08);
  transform: translateX(4px);
  border-left: 2px solid var(--hw-graphite);
  padding-left: 22px;
}

.notification-item.unread {
  background: rgba(84, 113, 148, 0.04);
}

.notification-item.unread::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color), var(--primary-light));
  border-radius: 0 4px 4px 0;
}

.notification-icon {
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  background: none;
  box-shadow: none;
}

.notification-icon.entrega {
  background: none;
  color: #2d3748;
}

.notification-icon.inscripcion {
  background: none;
  color: #2d3748;
}

.notification-icon.calificacion {
  background: none;
  color: #2d3748;
}

.notification-icon.importante {
  background: none;
  color: #2d3748;
}

.notification-icon.comentario {
  background: none;
  color: #2d3748;
}

.notification-icon.nueva-tarea {
  background: none;
  color: #2d3748;
}

.notification-icon.anuncio {
  background: none;
  color: #2d3748;
}

.notification-title {
  font-weight: 600;
  font-size: 14px;
  color: #2c3e50;
  margin-bottom: 4px;
}

.notification-message {
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  line-height: 1.4;
}

.notification-time {
  font-size: 11px;
  color: #999;
}

.empty-notifications {
  text-align: center;
  padding: 60px 24px;
  color: var(--text-light);
}

.empty-notifications i {
  width: 56px;
  height: 56px;
  color: var(--border-color);
  margin-bottom: 16px;
  opacity: 0.4;
}

.empty-notifications p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-light);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ef4444;
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 6px;
  border-radius: 10px;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

@media (max-width: 768px) {
  .notifications-dropdown {
    right: 10px;
    left: 10px;
    width: auto;
  }
}

.collapsible-content.visible {
  max-height: 500px;
  opacity: 1;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  transition: all var(--duration-fast) var(--ease-smooth);
  cursor: pointer;
  position: relative;
}

input[type="checkbox"]:hover {
  transform: scale(1.1);
  box-shadow: 0 0 0 3px var(--glow-graphite);
}

input[type="checkbox"]:checked {
  accent-color: var(--hw-charcoal) !important;
  animation: checkBounce var(--duration-normal) var(--ease-bounce);
}


#btnMesAnterior,
#btnMesSiguiente {
  background: var(--hw-off-white) !important;
  color: var(--hw-charcoal) !important;
  border: 1px solid var(--border-color) !important;
}

#btnMesAnterior:hover,
#btnMesSiguiente:hover {
  background: var(--hw-light-gray) !important;
}

#btnHoy {
  background: var(--hw-charcoal) !important;
  color: var(--hw-white) !important;
}

#btnHoy:hover {
  background: var(--hw-wrought-iron) !important;
  box-shadow: 0 4px 12px rgba(66, 99, 140, 0.3) !important;
}

.calendar-grid > div:first-child,
.calendar-grid > div:nth-child(2),
.calendar-grid > div:nth-child(3),
.calendar-grid > div:nth-child(4),
.calendar-grid > div:nth-child(5),
.calendar-grid > div:nth-child(6),
.calendar-grid > div:nth-child(7) {
  color: var(--primary-color) !important;
}

[style*="667eea"],
[style*="764ba2"] {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light)) !important;
  color: white !important;
}

.class-card-header[style],
div.class-card-header[style*="background"] {
  background: var #5d646b !important;
}

.class-card-header h3[style],
.class-card-header p[style] {
  color: white !important;
}

svg,
svg[data-lucide],
.lucide {
  background: none !important;
  background-color: transparent !important;
  color: #4a5568 !important;
  stroke: currentColor !important;
}

svg path,
svg circle,
svg line,
svg polyline,
svg polygon,
svg rect {
  stroke: #4a5568 !important;
}

i,
i[data-lucide] {
  background: none !important;
  background-color: transparent !important;
  color: #4a5568 !important;
}

div[style*="40px"][style*="background: linear-gradient"],
div[style*="40px"][style*="background:linear-gradient"] {
  background: rgba(101, 111, 119, 0.15) !important;
  color: var(--hw-graphite) !important;
}

div[style*="linear-gradient"][style*="f093fb"],
div[style*="linear-gradient"][style*="f5576c"],
div[style*="linear-gradient"][style*="84fab0"],
div[style*="linear-gradient"][style*="8fd3f4"] {
  background: rgba(101, 111, 119, 0.15) !important;
  color: var(--hw-graphite) !important;
}


.btn-delete-admin {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  z-index: 10;
}

.btn-delete-admin:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-delete-admin:active {
  transform: translateY(0);
}

.btn-delete-admin-task {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
}

.btn-delete-admin-task:hover {
  background: #dc2626;
  color: white;
  border-color: #dc2626;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-delete-admin-task:active {
  transform: translateY(0);
}


.modal-overlay-config {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(5px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal-overlay-config.active {
  display: flex;
}

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

.modal-config-container {
  background: white;
  border-radius: 20px;
  width: 95%;
  max-width: 1000px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

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

.modal-config-header {
  background: #4a5259;
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  border-bottom: 3px solid #93a1ad;
}

.modal-config-title {
  display: flex;
  align-items: center;
  gap: 16px;
}

.modal-config-title i {
  width: 32px;
  height: 32px;
}

.modal-config-title h2 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.5px;
}

.btn-close-config {
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.3);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: white;
}

.btn-close-config:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(90deg) scale(1.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.btn-close-config i {
  width: 22px;
  height: 22px;
}

.modal-config-body {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.config-tabs-sidebar {
  width: 240px;
  background: linear-gradient(180deg, #f8f9fa 0%, #e9ecef 100%);
  border-right: 2px solid #dee2e6;
  padding: 24px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.config-tab-btn {
  background: transparent;
  border: none;
  padding: 16px 24px;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 15px;
  font-weight: 500;
  color: #495057;
  border-left: 4px solid transparent;
  position: relative;
}

.config-tab-btn:hover {
  background: linear-gradient(90deg, rgba(147, 161, 173, 0.08) 0%, transparent 100%);
  color: #1e1e1e;
  padding-left: 28px;
}

.config-tab-btn.active {
  background: linear-gradient(90deg, rgba(147, 161, 173, 0.12) 0%, rgba(147, 161, 173, 0.04) 100%);
  color: #1e1e1e;
  border-left-color: #93a1ad;
  font-weight: 600;
}

.config-tab-btn.active::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 60%;
  background: #93a1ad;
  border-radius: 4px 0 0 4px;
}

.config-tab-btn i {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.config-content-area {
  flex: 1;
  padding: 36px 40px;
  overflow-y: auto;
  background: white;
}

.config-tab-content {
  display: none;
  animation: fadeInContent 0.4s ease;
}

.config-tab-content.active {
  display: block;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.config-section-title {
  font-size: 18px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e9ecef;
}

.config-section-title i {
  width: 24px;
  height: 24px;
  color: #93a1ad;
}

.config-option {
  margin-bottom: 32px;
}

.config-select {
  width: 100%;
  max-width: 400px;
  padding: 14px 18px;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  font-size: 15px;
  color: #212529;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.config-select:hover {
  border-color: #3d444a;
}

.config-select:focus {
  outline: none;
  border-color: #3d444a;
  box-shadow: 0 0 0 4px rgba(30, 60, 114, 0.15);
}

.config-hint {
  margin: 12px 0 0 0;
  font-size: 13px;
  color: #6c757d;
  line-height: 1.5;
}

.config-hint.warning {
  color: #dc3545;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.config-hint.warning::before {
  content: '';
}

.config-divider {
  height: 2px;
  background: linear-gradient(90deg, #e9ecef 0%, transparent 100%);
  margin: 36px 0;
}

.config-buttons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.btn-config-action {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid #dee2e6;
  padding: 18px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #495057;
}

.btn-config-action:hover {
  background: linear-gradient(135deg, #3d444a 0%, #4a5259 100%);
  border-color: #3d444a;
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(30, 60, 114, 0.3);
}

.btn-config-action i {
  width: 22px;
  height: 22px;
}

.config-toggle-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
  margin-bottom: 16px;
  border: 2px solid transparent;
  transition: all 0.3s ease;
}

.config-toggle-item:hover {
  background: #e9ecef;
  border-color: #dee2e6;
}

.toggle-info {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  flex: 1;
}

.toggle-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #3d444a 0%, #4a5259 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.toggle-icon i {
  width: 22px;
  height: 22px;
}

.toggle-info h4 {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
  margin: 0 0 4px 0;
}

.toggle-info p {
  font-size: 14px;
  color: #6c757d;
  margin: 0;
  line-height: 1.5;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 58px;
  height: 32px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ced4da;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 32px;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 24px;
  width: 24px;
  left: 4px;
  bottom: 4px;
  background: white;
  transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

input:checked + .toggle-slider {
  background: linear-gradient(135deg, #3d444a 0%, #4a5259 100%);
}

input:checked + .toggle-slider:before {
  transform: translateX(26px);
}

.theme-selector {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.theme-card {
  background: white;
  border: 3px solid #dee2e6;
  padding: 24px 16px;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  color: #495057;
}

.theme-card:hover {
  border-color: #93a1ad;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(147, 161, 173, 0.2);
}

.theme-card.active {
  border-color: #93a1ad;
  background: linear-gradient(135deg, rgba(147, 161, 173, 0.1) 0%, rgba(101, 111, 119, 0.15) 100%);
  color: #93a1ad;
  box-shadow: 0 8px 20px rgba(147, 161, 173, 0.25);
}

.theme-card i {
  width: 32px;
  height: 32px;
}

.font-size-selector {
  display: flex;
  gap: 16px;
  align-items: stretch;
}

.font-size-btn {
  flex: 1;
  background: white;
  border: 3px solid #dee2e6;
  padding: 20px 16px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: #495057;
  font-weight: 700;
}

.font-size-btn:hover {
  border-color: #93a1ad;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(147, 161, 173, 0.15);
}

.font-size-btn.active {
  border-color: #93a1ad;
  background: linear-gradient(135deg, #93a1ad 0%, #4a5259 100%);
  color: white;
  box-shadow: 0 8px 20px rgba(147, 161, 173, 0.3);
}

.font-size-btn small {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.8;
}

.config-form {
  max-width: 500px;
}

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

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #495057;
  margin-bottom: 8px;
}

.config-input {
  width: 100%;
  padding: 14px 18px;
  border: 2px solid #dee2e6;
  border-radius: 12px;
  font-size: 15px;
  color: #212529;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.config-input:focus {
  outline: none;
  border-color: rgba(147, 161, 173, 0.55);
  box-shadow: 0 0 0 4px rgba(147, 161, 173, 0.18), 0 4px 12px rgba(147, 161, 173, 0.12);
  transform: translateY(-1px);
  background: white;
}

.config-input::placeholder {
  color: #adb5bd;
}

.password-input-wrapper {
  position: relative;
  width: 100%;
}

.password-input-wrapper .config-input {
  padding-right: 50px;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  transition: all 0.3s ease;
  border-radius: 6px;
}

.toggle-password-btn:hover {
  color: #3d444a;
  background: rgba(66, 99, 140, 0.12);
  transform: translateY(-50%) scale(1.1);
}

.toggle-password-btn i {
  width: 20px;
  height: 20px;
}

body.dark-mode .toggle-password-btn {
  color: #94a3b8;
}

body.dark-mode .toggle-password-btn:hover {
  color: #3291FF;
  background: rgba(122, 155, 189, 0.15);
}

.modal-config-footer {
  padding: 24px 36px;
  border-top: 2px solid #e9ecef;
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  background: #f8f9fa;
}

.btn-config-primary,
.btn-config-secondary {
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
}

.btn-config-primary {
  background: linear-gradient(135deg, #4a5259 0%, #4a5259 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(147, 161, 173, 0.3);
}

.btn-config-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(147, 161, 173, 0.4);
}

.btn-config-secondary {
  background: white;
  color: #6c757d;
  border: 2px solid #dee2e6;
}

.btn-config-secondary:hover {
  border-color: #3d444a;
  color: #3d444a;
  background: rgba(30, 60, 114, 0.05);
}

.btn-config-primary i,
.btn-config-secondary i {
  width: 18px;
  height: 18px;
}

@media (max-width: 768px) {
  .modal-config-container {
    width: 98%;
    max-height: 95vh;
  }

  .modal-config-body {
    flex-direction: column;
  }

  .config-tabs-sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 2px solid #dee2e6;
    flex-direction: row;
    overflow-x: auto;
    padding: 16px 12px;
    gap: 8px;
  }

  .config-tab-btn {
    white-space: nowrap;
    border-left: none;
    border-bottom: 4px solid transparent;
    padding: 12px 20px;
  }

  .config-tab-btn.active {
    border-left-color: transparent;
    border-bottom-color: #4a5259;
  }

  .config-tab-btn.active::after {
    display: none;
  }

  .config-content-area {
    padding: 24px 20px;
  }

  .theme-selector,
  .font-size-selector {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .config-buttons-grid {
    grid-template-columns: 1fr;
  }
}


.profile-avatar-modal {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4a5259, #4a5259);
  box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
}

.perfil-modal-popup {
  border-radius: 16px !important;
  padding: 32px !important;
}


.mobile-sidebar-toggle {
  display: none;
  position: fixed;
  top: 20px;
  left: 20px;
  z-index: 1001;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.mobile-sidebar-toggle:hover {
  background: var(--primary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.mobile-sidebar-toggle i {
  width: 24px;
  height: 24px;
}

.sidebar-overlay-classroom {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay-classroom.active {
  opacity: 1;
}

@media (max-width: 1024px) {
  .classroom-header {
    padding: 16px 24px;
  }

  .classroom-main-content {
    padding: 20px;
  }

  .task-card-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  }
}

@media (max-width: 768px) {
  .mobile-sidebar-toggle {
    display: flex;
  }

  .classroom-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 1000;
    width: 280px;
  }

  .classroom-sidebar.show {
    transform: translateX(0);
  }

  .classroom-main {
    margin-left: 0;
    width: 100%;
  }

  .classroom-main-content {
    padding: 80px 16px 20px 16px;
  }

  .classroom-header {
    padding: 12px 16px;
    flex-wrap: wrap;
  }

  .classroom-header h1 {
    font-size: 20px;
  }

  .header-actions {
    gap: 8px;
  }

  .header-actions .btn-secondary,
  .header-actions .btn-primary {
    padding: 8px 14px;
    font-size: 13px;
  }

  .classes-grid,
  .task-card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .class-card,
  .task-card {
    padding: 16px;
  }

  .task-modal,
  .class-modal,
  .grade-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-body {
    padding: 16px;
    max-height: calc(100vh - 140px);
  }

  .modal-footer {
    padding: 16px;
  }

  .tabs-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    padding: 10px 16px;
    font-size: 13px;
    white-space: nowrap;
  }

  .task-item {
    flex-direction: column;
    gap: 12px;
  }

  .task-info {
    width: 100%;
  }

  .task-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .calendar-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .calendar-nav {
    gap: 8px;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 60px;
    font-size: 12px;
    padding: 4px;
  }

  .grades-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .grades-table {
    font-size: 13px;
  }

  .grades-table th,
  .grades-table td {
    padding: 10px 8px;
  }

  .view-filters {
    flex-direction: column;
    width: 100%;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
  }

  .attachment-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .attachment-actions {
    width: 100%;
    margin-top: 8px;
  }
}

@media (max-width: 480px) {
  body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .classroom-container {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
  }

  .classroom-main {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    margin-left: 0 !important;
  }

  .mobile-sidebar-toggle {
    width: 44px;
    height: 44px;
    top: 15px;
    left: 15px;
    z-index: 1100;
  }

  .classroom-sidebar {
    width: 85%;
    max-width: 280px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }

  .classroom-sidebar.mobile-open {
    transform: translateX(0);
  }

  .classroom-main-content {
    padding: 70px 12px 16px 12px;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .classroom-header {
    padding: 10px 12px;
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .classroom-header h1 {
    font-size: 18px;
  }

  .header-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .header-actions .btn-secondary,
  .header-actions .btn-primary {
    padding: 6px 12px;
    font-size: 12px;
  }

  .header-actions .btn-icon {
    padding: 6px;
  }

  .class-card,
  .task-card,
  .activity-card {
    padding: 12px;
    margin: 8px 0;
    width: calc(100% - 4px) !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  .class-card-header h3,
  .task-card-title {
    font-size: 16px;
    word-wrap: break-word;
  }

  .class-card-meta,
  .task-card-meta {
    font-size: 12px;
  }

  .classes-grid,
  .tasks-grid,
  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .activity-feed {
    width: 100% !important;
    overflow-x: hidden !important;
  }

  .activity-item {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .activity-avatar {
    margin-bottom: 8px;
  }

  .activity-content {
    width: 100%;
  }

  .activity-time {
    font-size: 11px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-outline {
    padding: 8px 14px;
    font-size: 13px;
    width: auto;
  }

  .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .btn-group .btn {
    width: 100%;
    margin: 3px 0;
  }

  .btn-primary-small,
  .btn-secondary-small {
    padding: 6px 10px;
    font-size: 12px;
  }

  .modal-content {
    margin: 10px;
    max-width: calc(100vw - 20px) !important;
    width: calc(100% - 20px) !important;
  }

  .modal-header h2 {
    font-size: 18px;
  }

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

  .form-group label {
    font-size: 13px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 10px;
    font-size: 14px;
    width: 100% !important;
    box-sizing: border-box;
  }

  .calendar-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .calendar-grid {
    min-width: 300px;
  }

  .calendar-day {
    min-height: 50px;
    font-size: 11px;
    padding: 3px;
  }

  .calendar-day-number {
    font-size: 12px;
  }

  .calendar-event {
    font-size: 9px;
    padding: 2px 4px;
  }

  .task-item {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .task-checkbox {
    margin-bottom: 8px;
  }

  .task-content {
    width: 100%;
  }

  .task-title {
    font-size: 14px;
  }

  .task-meta {
    font-size: 11px;
    flex-wrap: wrap;
  }

  .task-actions {
    width: 100%;
    margin-top: 8px;
    justify-content: flex-start;
  }

  .stat-card {
    padding: 12px;
  }

  .stat-card h3 {
    font-size: 20px;
  }

  .stat-card p {
    font-size: 12px;
  }

  .tab-buttons {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .tab-button {
    padding: 8px 12px;
    font-size: 12px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .classroom-sidebar {
    width: 80%;
  }

  .logo-section {
    padding: 12px;
  }

  .logo-section h1 {
    font-size: 16px;
  }

  .sidebar-nav a {
    padding: 10px 16px;
    font-size: 13px;
  }

  .sidebar-nav a i {
    width: 18px;
    height: 18px;
  }

  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
  }

  table {
    min-width: 500px;
    font-size: 12px;
  }

  table th,
  table td {
    padding: 8px 6px;
  }

  .attachment-item {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .attachment-info {
    width: 100%;
    margin-bottom: 8px;
  }

  .attachment-actions {
    width: 100%;
    margin-top: 8px;
    display: flex;
    gap: 6px;
  }

  .messages-container {
    max-height: 50vh;
  }

  .message-bubble {
    max-width: 85%;
  }

  .message-input-container {
    padding: 8px;
  }

  .message-input {
    font-size: 14px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .classroom-sidebar {
    overflow-y: auto;
  }

  .classroom-main-content {
    padding-top: 60px;
  }

  .modal-body {
    max-height: 60vh;
  }

  .calendar-day {
    min-height: 45px;
  }
}


.resources-header {
  background: var(--hw-white);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--border-color);
}

@keyframes slideDownSmooth {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resources-title-section {
  display: flex;
  align-items: center;
  gap: 18px;
}

.resources-icon-wrapper {
  width: 56px;
  height: 56px;
  background: var(--hw-off-white);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--hw-charcoal);
  border: 1px solid var(--border-color);
}

.resources-icon-wrapper i {
  width: 28px;
  height: 28px;
  color: var(--hw-graphite);
}

.resources-title-section h2 {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--hw-charcoal);
}

.resources-title-section p {
  margin: 4px 0 0;
  color: var(--text-light);
  font-size: 0.9rem;
  font-family: 'Inter', sans-serif;
}

.resources-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.search-box-resources {
  position: relative;
  display: flex;
  align-items: center;
}

.search-box-resources i {
  position: absolute;
  left: 24px;
  width: 18px;
  height: 18px;
  color: var(--text-light);
  pointer-events: none;
  transition: var(--transition);
}

.search-box-resources input {
  padding: 12px 16px 12px 58px;
  border: 2px solid var(--border-color);
  border-radius: 14px;
  font-size: 14px;
  width: 260px;
  transition: var(--transition);
  background: var(--bg-white);
  font-family: 'Inter', sans-serif;
}

.search-box-resources input:focus {
  outline: none;
  border-color: rgba(147, 161, 173, 0.55);
  box-shadow: 0 0 0 4px rgba(147, 161, 173, 0.15);
}

.search-box-resources input:focus + i,
.search-box-resources:focus-within i {
  color: var(--primary-color);
}

.filter-select-resources {
  padding: 12px 18px;
  border: 2px solid var(--border-color);
  font-family: 'Inter', sans-serif;
  border-radius: 14px;
  font-size: 14px;
  background: var(--bg-white);
  cursor: pointer;
  transition: var(--transition);
  min-width: 160px;
}

.filter-select-resources:hover,
.filter-select-resources:focus {
  border-color: var(--primary-color);
  outline: none;
}

.btn-upload-resource {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  background: var#5d646b;
  color: var(--hw-white);
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.btn-upload-resource:hover {
  background: var(--hw-wrought-iron);
}

.btn-upload-resource i {
  width: 18px;
  height: 18px;
}

.resources-container {
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.resources-section {
  background: var(--hw-white);
  border-radius: 8px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.resources-section:hover {
  box-shadow: var(--shadow-md);
  border-color: rgba(147, 161, 173, 0.3);
}

#bibliotecaGeneral {
  border-left: 3px solid #93a1ad;
}

#bibliotecaGeneral .section-header i {
  color: #93a1ad;
}

#bibliotecaGeneral .section-badge {
  background: rgba(147, 161, 173, 0.1);
  color: #93a1ad;
}

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

.resources-section:nth-child(1) { animation-delay: 0.1s; }
.resources-section:nth-child(2) { animation-delay: 0.2s; }

.section-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--border-color);
}

.section-header i {
  width: 26px;
  height: 26px;
  color: var(--primary-color);
}

.section-header h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
  font-family: 'Inter', sans-serif;
}

.section-badge {
  padding: 6px 14px;
  background: rgba(84, 113, 148, 0.1);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  animation: badgePop 0.3s ease-out;
  font-family: 'Inter', sans-serif;
}

@keyframes badgePop {
  0% { transform: scale(0); }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.curso-folder {
  display: flex;
  flex-direction: column;
  background: var(--hw-white);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

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

.folder-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  color: white;
  background: #5d646b;
}

.folder-icon {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.folder-icon i {
  width: 26px;
  height: 26px;
}

.folder-info {
  flex: 1;
}

.folder-info h4 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.folder-info span {
  font-size: 0.85rem;
  opacity: 0.9;
}

.folder-count {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.curso-folder:hover .folder-count {
  transform: scale(1.15);
  background: rgba(255, 255, 255, 0.35);
}

.folder-content-wrapper {
  flex: 1;
  min-height: 180px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.folder-content {
  padding: 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.folder-content.empty {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.no-recursos-msg {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  color: var(--text-light);
  font-size: 14px;
}

.no-recursos-msg i {
  width: 36px;
  height: 36px;
  opacity: 0.4;
}

.btn-add-recurso-curso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px;
  background: rgba(84, 113, 148, 0.05);
  border: 2px dashed rgba(84, 113, 148, 0.25);
  border-radius: 0 0 18px 18px;
  color: var(--primary-color);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-add-recurso-curso:hover {
  background: rgba(84, 113, 148, 0.1);
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.btn-add-recurso-curso i {
  width: 18px;
  height: 18px;
}

.resources-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.recurso-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-light);
  border-radius: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 1px solid transparent;
}

.recurso-item:hover {
  background: rgba(84, 113, 148, 0.08);
  transform: translateX(6px);
  border-color: rgba(84, 113, 148, 0.15);
  box-shadow: 0 4px 12px rgba(84, 113, 148, 0.1);
}

.recurso-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--transition);
}

.recurso-item:hover .recurso-icon {
  transform: scale(1.1);
}

.recurso-icon i {
  width: 22px;
  height: 22px;
}

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

.recurso-titulo {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Inter', sans-serif;
}

.recurso-desc {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Inter', sans-serif;
}

.recurso-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 6px;
}

.recurso-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
}

.recurso-meta i {
  width: 13px;
  height: 13px;
}

.recurso-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  opacity: 0;
  transform: translateX(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.recurso-item:hover .recurso-actions {
  opacity: 1;
  transform: translateX(0);
}

.btn-recurso-action {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--bg-white);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-recurso-action:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.15);
  box-shadow: 0 4px 12px rgba(84, 113, 148, 0.3);
}

.btn-recurso-action.btn-delete:hover {
  background: var(--danger-color);
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.btn-recurso-action i {
  width: 17px;
  height: 17px;
}

.empty-resources,
.error-recursos,
.loading-resources {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 28px;
  text-align: center;
  color: var(--text-light);
  grid-column: 1 / -1;
  animation: fadeIn 0.5s ease-out;
}

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

.empty-resources i,
.error-recursos i,
.loading-resources i {
  width: 56px;
  height: 56px;
  opacity: 0.35;
  margin-bottom: 16px;
}

.empty-resources p,
.error-recursos p {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--text-secondary);
}

.empty-resources span {
  font-size: 14px;
  margin-top: 6px;
}

.loading-spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-color);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spinSmooth 0.8s linear infinite;
  margin-bottom: 16px;
}

.loading-spinner-small {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spinSmooth 0.6s linear infinite;
  display: inline-block;
}

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

.btn-retry {
  margin-top: 20px;
  padding: 12px 24px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
}

.btn-retry:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(84, 113, 148, 0.3);
}

.btn-retry i {
  width: 18px;
  height: 18px;
}

.modal-recursos-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-smooth);
}

.modal-recursos-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal-recursos-content {
  background: var(--bg-white);
  border-radius: 16px;
  width: 90%;
  max-width: 540px;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.35);
  transform: scale(0.8) translateY(40px) rotateX(10deg);
  transition: transform 0.5s var(--ease-out-back);
  perspective: 1000px;
}

.modal-recursos-overlay.show .modal-recursos-content {
  transform: scale(1) translateY(0) rotateX(0deg);
  animation: modalIn 0.5s var(--ease-out-back);
}

.modal-recursos-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  background: var#5d646b;
  color: white;
  position: relative;
  overflow: hidden;
  border-bottom: 2px solid rgba(147, 161, 173, 0.6);
}

.modal-recursos-header::before {
  display: none;
}

.modal-recursos-header h3 {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.25rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.modal-recursos-header h3 i {
  width: 24px;
  height: 24px;
}

.modal-close {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s var(--ease-out-back);
  position: relative;
  overflow: hidden;
}

.modal-close::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  transform: scale(0);
  transition: transform 0.3s var(--ease-smooth);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: rotate(180deg) scale(1.15);
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.3);
}

.modal-close:hover::before {
  transform: scale(1.5);
  opacity: 0;
}

.modal-close:active {
  transform: rotate(180deg) scale(0.9);
  transition: all 0.1s ease;
}

.modal-close i {
  width: 22px;
  height: 22px;
  transition: transform 0.3s var(--ease-smooth);
}

.modal-close:hover i {
  transform: scale(1.1);
}

.form-recursos {
  padding: 28px;
  overflow-y: auto;
  max-height: calc(90vh - 100px);
}

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

.form-group label {
  display: block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 14px;
  font-family: var(--font-body);
  transition: all var(--duration-normal) var(--ease-smooth);
  background: var(--bg-white);
  color: var(--text-primary);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgba(147, 161, 173, 0.55);
  box-shadow: 0 0 0 3px rgba(147, 161, 173, 0.18);
  animation: glowPulse 2s ease-in-out infinite;
}

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

.file-upload-area {
  border: 2px dashed var(--border-color);
  border-radius: 12px;
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
  background: var(--bg-light);
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--hw-graphite);
  background: var(--accent-hover);
  transform: scale(1.02);
}

.file-upload-area i {
  width: 44px;
  height: 44px;
  color: var(--primary-color);
  margin-bottom: 14px;
}

.file-upload-area p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
}

.file-upload-area span {
  color: var(--primary-color);
  font-weight: 600;
}

.file-upload-area input[type="file"] {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.file-name {
  display: none;
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(84, 113, 148, 0.1);
  border-radius: 10px;
  color: var(--primary-color);
  font-size: 13px;
  font-weight: 600;
  animation: fadeIn 0.3s ease;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-color);
}

.btn-cancel {
  padding: 14px 28px;
  background: var(--bg-light);
  color: var(--text-secondary);
  border: none;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-cancel:hover {
  background: var(--border-color);
  transform: translateY(-2px);
}

.btn-submit {
  padding: 14px 28px;
  background: var#5d646b;
  border: 1px solid transparent;
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all var(--duration-normal) var(--ease-smooth);
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(147, 161, 173, 0.15);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s var(--ease-smooth), height 0.6s var(--ease-smooth);
}

.btn-submit:hover {
  background: var(--hw-charcoal);
  border-color: rgba(147, 161, 173, 0.5);
  transform: translateY(var(--hover-lift));
  box-shadow: 0 8px 25px rgba(147, 161, 173, 0.2);
}

.btn-submit:hover::before {
  width: 300px;
  height: 300px;
}

.btn-submit:active {
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-submit i {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .resources-header {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 22px;
  }

  .resources-actions {
    flex-direction: column;
  }

  .search-box-resources input {
    width: 100%;
  }

  .filter-select-resources {
    width: 100%;
  }

  .btn-upload-resource {
    width: 100%;
    justify-content: center;
  }

  .resources-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-recursos-content {
    width: 95%;
    max-height: 95vh;
    border-radius: 20px;
  }

  .recurso-actions {
    opacity: 1;
    transform: translateX(0);
  }

  .resources-section {
    padding: 20px;
    border-radius: 16px;
  }
}


@media (max-width: 768px) {
  .mobile-sidebar-toggle {
    display: flex;
    position: fixed;
    z-index: 1100;
  }

  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .classroom-sidebar.mobile-open + .sidebar-overlay {
    display: block;
  }

  .classroom-header {
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 16px;
  }

  .classroom-header h1 {
    flex: 1 1 100%;
    order: 1;
    text-align: center;
    margin-bottom: 8px;
  }

  .header-actions {
    flex: 1 1 100%;
    order: 2;
    justify-content: center;
    flex-wrap: wrap;
  }

  .classes-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 0 4px;
  }

  .class-card {
    border-radius: 14px;
  }

  .class-card-header {
    padding: 16px;
  }

  .class-card-body {
    padding: 16px;
  }

  .tasks-container {
    padding: 0 4px;
  }

  .task-card {
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .modal-config-container {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .config-tabs-sidebar {
    display: none;
  }

  .config-tabs-mobile {
    display: flex;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 10px;
    gap: 8px;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
  }

  .config-tabs-mobile .tab-btn {
    flex-shrink: 0;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    white-space: nowrap;
  }

  .profile-header {
    flex-direction: column;
    text-align: center;
    gap: 16px;
  }

  .avatar-section {
    margin: 0 auto;
  }

  .profile-info {
    width: 100%;
    text-align: center;
  }

  .grades-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -12px;
    padding: 0 12px;
  }

  .grades-table {
    min-width: 600px;
    font-size: 13px;
  }

  .submissions-container {
    padding: 12px;
  }

  .submission-item {
    padding: 12px;
    border-radius: 10px;
  }

  .chat-container {
    height: calc(100vh - 140px);
  }

  .messages-area {
    padding: 12px;
  }

  .message-item {
    max-width: 90%;
  }
}

@media (max-width: 480px) {
  .classroom-sidebar {
    width: 90%;
    max-width: 300px;
  }

  .classroom-header {
    padding: 10px 12px;
  }

  .classroom-header h1 {
    font-size: 16px;
  }

  .header-actions .btn-icon {
    width: 36px;
    height: 36px;
  }

  .header-actions .btn-icon i {
    width: 18px;
    height: 18px;
  }

  .class-card-header {
    padding: 12px;
  }

  .class-card-body {
    padding: 12px;
  }

  .class-card-title {
    font-size: 15px;
  }

  .stat-card {
    padding: 14px 12px;
  }

  .stat-card h3 {
    font-size: 22px;
  }

  .stat-card p {
    font-size: 11px;
  }

  .modal-content,
  .modal-recursos-content {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    margin: 0;
    border-radius: 0;
  }

  .modal-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border-radius: 0;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    font-size: 16px !important; /* Previene zoom en iOS */
  }

  .calendar-day {
    min-height: 40px;
    padding: 2px;
  }

  .calendar-day-number {
    font-size: 11px;
  }

  .theme-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 100;
  }
}

@media (max-width: 430px) {
  html, body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
  }

  * {
    box-sizing: border-box;
  }

  .classroom-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .classroom-header {
    padding: 12px 14px;
    gap: 10px;
    height: auto;
    min-height: 56px;
    flex-wrap: nowrap;
  }

  .header-left {
    flex: 1;
    min-width: 0;
    gap: 8px;
  }

  .classroom-header .logo,
  .header-logo {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 8px;
  }

  .classroom-header h1 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
  }

  .header-actions,
  .header-right {
    gap: 6px;
  }

  .header-actions .btn-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .header-actions .btn-icon i {
    width: 18px;
    height: 18px;
  }

  .user-menu-toggle,
  .user-avatar {
    width: 34px;
    height: 34px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 50%;
  }

  .mobile-menu-btn,
  .sidebar-toggle-btn {
    width: 42px;
    height: 42px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 10px;
  }

  .classroom-sidebar {
    width: 85vw;
    max-width: 320px;
    padding: 16px 14px;
  }

  .sidebar-header {
    padding: 14px 12px 18px;
  }

  .sidebar-header h2 {
    font-size: 1.1rem;
  }

  .sidebar-close-btn {
    width: 38px;
    height: 38px;
  }

  .sidebar-nav {
    padding: 0;
  }

  .sidebar-nav a,
  .nav-item {
    padding: 14px 16px;
    font-size: 0.92rem;
    border-radius: 10px;
    min-height: 48px;
  }

  .sidebar-nav a i,
  .nav-icon {
    width: 22px;
    font-size: 1rem;
  }

  .sidebar-footer {
    padding: 14px 12px;
  }

  .classroom-main,
  .main-content {
    padding: 68px 14px 24px 14px;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .page-header,
  .content-header {
    padding: 14px;
    margin-bottom: 18px;
    border-radius: 14px;
  }

  .page-header h2,
  .page-title {
    font-size: 1.3rem;
    margin-bottom: 8px;
  }

  .page-header p,
  .page-subtitle {
    font-size: 0.88rem;
  }

  .classes-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .class-card {
    border-radius: 14px;
    overflow: hidden;
  }

  .class-card-header {
    padding: 14px;
    min-height: auto;
  }

  .class-card-header h3,
  .class-card-title {
    font-size: 1.05rem;
    line-height: 1.3;
    margin-bottom: 4px;
  }

  .class-card-header p,
  .class-card-subtitle {
    font-size: 0.8rem;
  }

  .class-card-body {
    padding: 14px;
  }

  .class-info-row {
    gap: 10px;
    font-size: 0.82rem;
  }

  .class-card-footer {
    padding: 12px 14px;
    gap: 8px;
  }

  .class-card-footer .btn,
  .class-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
    flex: 1;
    text-align: center;
  }

  .content-tabs,
  .tabs-container {
    overflow-x: auto;
    scrollbar-width: none;
    margin: 0 -14px;
    padding: 0 14px 12px;
    gap: 8px;
  }

  .tab-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    min-height: 42px;
  }

  .tasks-container,
  .activities-container {
    gap: 12px;
  }

  .task-card,
  .activity-item {
    padding: 14px;
    border-radius: 14px;
  }

  .task-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .task-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
  }

  .task-icon i {
    width: 20px;
    height: 20px;
  }

  .task-title {
    font-size: 0.98rem;
    line-height: 1.3;
  }

  .task-info {
    font-size: 0.78rem;
    gap: 6px;
  }

  .task-description {
    font-size: 0.85rem;
    margin: 10px 0;
    line-height: 1.45;
  }

  .task-meta {
    font-size: 0.75rem;
    gap: 8px;
    flex-wrap: wrap;
  }

  .task-footer {
    margin-top: 12px;
    padding-top: 12px;
    gap: 8px;
  }

  .task-btn,
  .action-btn {
    padding: 10px 14px;
    font-size: 0.82rem;
    border-radius: 8px;
  }

  .stats-row,
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }

  .stat-card {
    padding: 14px 12px;
    border-radius: 12px;
    text-align: center;
  }

  .stat-card i,
  .stat-icon {
    width: 32px;
    height: 32px;
    margin-bottom: 8px;
  }

  .stat-card h3,
  .stat-number {
    font-size: 1.6rem;
    margin-bottom: 4px;
  }

  .stat-card p,
  .stat-label {
    font-size: 0.72rem;
  }

  .announcements-container {
    gap: 12px;
  }

  .announcement-item {
    padding: 14px;
    border-radius: 14px;
  }

  .announcement-header {
    gap: 10px;
    margin-bottom: 10px;
  }

  .announcement-avatar {
    width: 40px;
    height: 40px;
    aspect-ratio: 1;
    flex-shrink: 0;
    border-radius: 50%;
  }

  .announcement-author {
    font-size: 0.9rem;
    font-weight: 600;
  }

  .announcement-date {
    font-size: 0.75rem;
  }

  .announcement-content {
    font-size: 0.88rem;
    line-height: 1.5;
  }

  .resources-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .resource-card {
    padding: 14px;
    border-radius: 12px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .resource-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
  }

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

  .resource-name {
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .resource-meta {
    font-size: 0.75rem;
  }

  .resource-action {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
  }

  .calendar-container {
    padding: 14px;
    border-radius: 14px;
  }

  .calendar-header {
    margin-bottom: 14px;
    gap: 10px;
  }

  .calendar-title {
    font-size: 1.05rem;
  }

  .calendar-nav-btn {
    width: 34px;
    height: 34px;
  }

  .calendar-grid {
    gap: 2px;
  }

  .calendar-weekday {
    font-size: 0.7rem;
    padding: 8px 0;
  }

  .calendar-day {
    min-height: 38px;
    padding: 4px;
    font-size: 0.8rem;
    border-radius: 8px;
  }

  .calendar-day-number {
    font-size: 0.78rem;
  }

  .calendar-event-dot {
    width: 5px;
    height: 5px;
  }

  .grades-container {
    margin: 0 -14px;
    border-radius: 0;
  }

  .grades-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 0 14px;
  }

  .grades-table {
    min-width: 550px;
    font-size: 0.78rem;
  }

  .grades-table th,
  .grades-table td {
    padding: 10px 8px;
    white-space: nowrap;
  }

  .profile-container {
    padding: 0;
  }

  .profile-header {
    padding: 20px 14px;
    text-align: center;
  }

  .profile-avatar-container {
    width: 80px;
    height: 80px;
    margin: 0 auto 14px;
  }

  .profile-name {
    font-size: 1.25rem;
  }

  .profile-email {
    font-size: 0.85rem;
  }

  .profile-section {
    padding: 16px 14px;
    border-radius: 14px;
    margin-bottom: 14px;
  }

  .profile-section h3 {
    font-size: 1rem;
    margin-bottom: 14px;
  }

  .modal {
    padding: 0;
  }

  .modal-content,
  .modal-recursos-content,
  .modal-config-content {
    width: 100%;
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
  }

  .modal-header {
    padding: 16px 14px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
    border-radius: 0;
  }

  .modal-header h2,
  .modal-title {
    font-size: 1.15rem;
    padding-right: 36px;
  }

  .modal-close-btn,
  .modal-close {
    width: 36px;
    height: 36px;
    top: 14px;
    right: 14px;
  }

  .modal-body {
    flex: 1;
    padding: 16px 14px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-footer {
    padding: 14px;
    background: white;
    border-top: 1px solid rgba(0,0,0,0.1);
    gap: 10px;
  }

  .modal-footer .btn {
    flex: 1;
    padding: 13px;
  }

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

  .form-group label {
    font-size: 0.88rem;
    margin-bottom: 8px;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px;
    font-size: 16px;
    border-radius: 10px;
  }

  .form-hint {
    font-size: 0.75rem;
  }

  .btn-primary {
    padding: 14px 20px;
    font-size: 0.95rem;
    border-radius: 10px;
    width: 100%;
  }

  .btn-secondary {
    padding: 12px 18px;
    font-size: 0.88rem;
    border-radius: 10px;
  }

  .btn-icon {
    min-width: 42px;
    min-height: 42px;
    border-radius: 10px;
  }

  .notifications-dropdown,
  .notifications-panel {
    width: calc(100vw - 28px);
    max-width: 340px;
    right: 14px;
    border-radius: 14px;
    max-height: 70vh;
  }

  .notification-item {
    padding: 14px;
  }

  .notification-item-title {
    font-size: 0.88rem;
  }

  .notification-item-time {
    font-size: 0.72rem;
  }

  .user-dropdown {
    width: calc(100vw - 28px);
    max-width: 280px;
    right: 14px;
    border-radius: 14px;
  }

  .user-dropdown-item {
    padding: 14px 16px;
    min-height: 48px;
  }

  .config-tabs-mobile {
    padding: 12px 14px;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .config-tabs-mobile .tab-btn {
    padding: 10px 16px;
    font-size: 0.85rem;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .empty-state {
    padding: 40px 20px;
  }

  .empty-state-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 16px;
  }

  .empty-state h3 {
    font-size: 1.15rem;
  }

  .empty-state p {
    font-size: 0.88rem;
  }

  .badge,
  .status-badge {
    padding: 5px 10px;
    font-size: 0.72rem;
    border-radius: 8px;
  }

  .file-upload-area {
    padding: 24px 16px;
    border-radius: 12px;
  }

  .file-upload-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
  }

  .file-upload-text {
    font-size: 0.9rem;
  }

  .file-list-item {
    padding: 12px;
    gap: 10px;
  }

  .theme-toggle {
    position: fixed;
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    z-index: 100;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  }
}

@media (max-width: 360px) {
  .classroom-header h1 {
    font-size: clamp(12px, 4vw, 16px);
  }

  .class-card-title {
    font-size: clamp(12px, 4vw, 16px);
  }

  .stat-card h3 {
    font-size: clamp(16px, 5vw, 22px);
  }

  .btn-primary,
  .btn-secondary {
    padding: 10px 14px;
    font-size: clamp(11px, 3.5vw, 14px);
  }
}

@media (hover: none) and (pointer: coarse) {
  .sidebar-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .class-card,
  .task-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .class-card:hover,
  .task-card:hover {
    transform: none;
  }

  .class-card:active,
  .task-card:active {
    transform: scale(0.98);
    transition: transform 0.1s;
  }

  .btn-icon,
  .btn-action {
    min-width: 44px;
    min-height: 44px;
  }

  .tasks-container,
  .classes-grid,
  .activity-feed {
    -webkit-overflow-scrolling: touch;
  }
}


.student-avatar[style*="background"],
div.student-avatar[style*="background"],
.avatar-circle[style*="background"],
div[class*="avatar"][style*="background: #"],
div[class*="avatar"][style*="background:#"] {
  background: rgba(101, 111, 119, 0.15) !important;
  color: var(--hw-graphite) !important;
  border: 1px solid var(--border-color) !important;
}

.class-card .class-card-header,
.class-card-header[style*="background"],
div.class-card-header {
  background: #5d646b !important;
  border-radius: 8px 8px 0 0 !important;
}

.class-card-header h3,
.class-card-header p,
.class-card-body,
.class-card-body span {
  font-family: 'Inter', sans-serif !important;
}

.class-card-header h3 {
  font-size: 1.125rem !important;
  font-weight: 600 !important;
}

.class-card-header p {
  font-size: 0.875rem !important;
  font-weight: 400 !important;
}

.class-card .class-card-body,
.class-card-body[style] {
  border: 1px solid var(--border-color) !important;
  border-top: none !important;
  box-shadow: none !important;
  border-radius: 0 0 8px 8px !important;
}

/* Forzar color blanco en icono del botón Enviar comentario */
#btnEnviarComentario svg,
#btnEnviarComentario svg path,
#btnEnviarComentario [data-lucide] {
  color: #ffffff !important;
  stroke: #ffffff !important;
  fill: none !important;
}

/* Ocultar botón de ayuda en toast de calendario */
.calendar-toast-popup .swal2-actions {
  display: none !important;
}

.swal2-toast.calendar-toast-popup .swal2-help,
.swal2-toast.calendar-toast-popup .swal2-question-mark {
  display: none !important;
}

.swal2-toast .swal2-help,
.swal2-toast .swal2-question-mark {
  display: none !important;
}
/* Ocultar backdrop/overlay negro del toast */
.swal2-container.swal2-top-end,
.swal2-container.swal2-top-start,
.swal2-container.swal2-top,
.swal2-container.swal2-bottom-end,
.swal2-container.swal2-bottom-start,
.swal2-container.swal2-bottom {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.swal2-backdrop-show {
  background: transparent !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.swal2-container {
  pointer-events: none !important;
}

.swal2-container .swal2-popup {
  pointer-events: auto !important;
}