/* ══════════════════════════════════════════════════════
   CLASSESS HUB — MAIN STYLESHEET
   ══════════════════════════════════════════════════════ */

/* ── Variables ── */
:root {
  --bg: #0f0f0f;
  --card: #1a1a1a;
  --card2: #222222;
  --border: #2a2a2a;
  --border2: #333333;
  --primary: #fa5f2b;
  --primary-d: #e04a18;
  --secondary: #f7774c;
  --text: #f0f0f0;
  --text2: #999999;
  --text3: #666666;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --info: #3498db;
  --purple: #9b59b6;
  --sidebar-w: 230px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --bg: #f2f4f7;
  --card: #ffffff;
  --card2: #f8f9fa;
  --border: #e1e4e8;
  --border2: #d0d4da;
  --text: #1a1a1a;
  --text2: #555555;
  --text3: #888888;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.6;
  transition: background 0.3s, color 0.3s;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
}

input,
select,
textarea {
  font-family: inherit;
}

::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border2);
  border-radius: 3px;
}

/* ── App Layout ── */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  padding: 1.5rem 2rem;
  max-width: calc(100vw - var(--sidebar-w));
}

/* ── Sidebar ── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  z-index: 100;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.1rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.logo-badge {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 15px;
}

.logo-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.logo-sub {
  font-size: 10px;
  color: var(--text2);
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.user-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
}

.user-email {
  font-size: 11px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-search {
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 6px;
  padding: 0.4rem 0.7rem 0.4rem 2rem;
  color: var(--text);
  font-size: 12px;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 8px center;
  transition: border-color 0.2s;
}

.sidebar-search input:focus {
  border-color: var(--primary);
}

.search-results {
  position: absolute;
  left: 8px;
  right: 8px;
  top: 100%;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 8px;
  box-shadow: var(--shadow);
  z-index: 200;
  max-height: 300px;
  overflow-y: auto;
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--card2);
}

.search-result-type {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.search-result-text {
  font-size: 12px;
  color: var(--text);
}

.nav-label {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0.8rem 1rem 0.3rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0.55rem 1rem;
  color: var(--text2);
  font-size: 12.5px;
  border-left: 2px solid transparent;
  transition: all 0.18s;
}

.nav-item:hover {
  color: var(--text);
  background: var(--card2);
}

.nav-item.active {
  color: var(--primary);
  background: rgba(250, 95, 43, 0.08);
  border-left-color: var(--primary);
  font-weight: 600;
}

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

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}

.sidebar-nav {
  flex: 1;
  padding: 0.5rem 0;
}

.sidebar-footer {
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-signout {
  background: none;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text2);
  padding: 0.4rem 0.8rem;
  font-size: 11.5px;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-signout:hover {
  border-color: var(--danger);
  color: var(--danger);
}

.btn-theme {
  background: none;
  border: 1px solid var(--border2);
  border-radius: 6px;
  color: var(--text2);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  transition: all 0.2s;
}

.btn-theme:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ── Page Header ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.page-title-wrap h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.page-title-wrap p {
  font-size: 12.5px;
  color: var(--text2);
  margin-top: 2px;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.5rem 1rem;
  border-radius: 7px;
  border: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
}

.btn-primary:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(250, 95, 43, 0.3);
}

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--text2);
}

.btn-ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  opacity: 0.85;
}

.btn-sm {
  padding: 0.3rem 0.7rem;
  font-size: 11.5px;
}

.btn-icon {
  background: none;
  border: none;
  color: var(--text2);
  padding: 0.3rem;
  border-radius: 5px;
  font-size: 13px;
  transition: all 0.15s;
}

.btn-icon:hover {
  background: var(--card2);
  color: var(--text);
}

.btn-icon.danger:hover {
  color: var(--danger);
}

/* ── Cards ── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--border2);
}

.card-clickable {
  cursor: pointer;
}

.card-clickable:hover {
  border-color: rgba(250, 95, 43, 0.4);
  box-shadow: 0 0 0 1px rgba(250, 95, 43, 0.1);
}

/* ── Stat Cards ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color 0.2s;
}

.stat-card:hover {
  border-color: rgba(250, 95, 43, 0.3);
}

.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.stat-icon.orange {
  background: rgba(250, 95, 43, 0.12);
  color: var(--primary);
}

.stat-icon.blue {
  background: rgba(52, 152, 219, 0.12);
  color: var(--info);
}

.stat-icon.green {
  background: rgba(46, 204, 113, 0.12);
  color: var(--success);
}

.stat-icon.red {
  background: rgba(231, 76, 60, 0.12);
  color: var(--danger);
}

.stat-icon.purple {
  background: rgba(155, 89, 182, 0.12);
  color: var(--purple);
}

.stat-num {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 11.5px;
  color: var(--text2);
}

/* ── Badges ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-inprogress {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.badge-completed {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.badge-blocked {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.badge-notstarted {
  background: rgba(153, 153, 153, 0.12);
  color: #999;
}

.badge-high {
  background: rgba(231, 76, 60, 0.15);
  color: #e74c3c;
}

.badge-medium {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
}

.badge-low {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.badge-student {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.badge-teacher {
  background: rgba(250, 95, 43, 0.15);
  color: var(--primary);
}

.badge-parent {
  background: rgba(155, 89, 182, 0.15);
  color: #9b59b6;
}

.badge-admin {
  background: rgba(243, 156, 18, 0.15);
  color: #f39c12;
}

.deadline-ok {
  color: var(--success);
}

.deadline-warning {
  color: var(--warning);
}

.deadline-overdue {
  color: var(--danger);
}

/* ── Forms ── */
.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.55rem 0.8rem;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(250, 95, 43, 0.12);
}

select.form-control {
  cursor: pointer;
}

textarea.form-control {
  resize: vertical;
  min-height: 80px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.form-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 0.3rem;
}

select.form-control option {
  background: #1e1e2e;
  color: #ffffff;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

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

.modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 12px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform 0.2s;
}

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

.modal-lg {
  max-width: 700px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card);
  z-index: 1;
}

.modal-title {
  font-size: 15px;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text2);
  font-size: 18px;
  cursor: pointer;
  padding: 0.2rem;
  transition: color 0.15s;
  line-height: 1;
}

.modal-close:hover {
  color: var(--danger);
}

.modal-body {
  padding: 1.2rem 1.4rem;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.6rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
}

/* ── Table ── */
.table-wrap {
  overflow-x: auto;
}

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

thead th {
  background: var(--card2);
  padding: 0.65rem 1rem;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text2);
}

tbody td:first-child {
  color: var(--text);
  font-weight: 500;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover td {
  background: var(--card2);
}

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

/* ── Filter Bar ── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 0.35rem 0.9rem;
  border-radius: 20px;
  border: 1px solid var(--border2);
  color: var(--text2);
  font-size: 12px;
  background: transparent;
  transition: all 0.15s;
  cursor: pointer;
}

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

.filter-tab.active {
  background: rgba(250, 95, 43, 0.12);
  border-color: rgba(250, 95, 43, 0.4);
  color: var(--primary);
  font-weight: 600;
}

.filter-select {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.35rem 0.8rem;
  color: var(--text2);
  font-size: 12px;
  outline: none;
  cursor: pointer;
}

.filter-search {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.35rem 0.8rem;
  color: var(--text);
  font-size: 12px;
  outline: none;
  min-width: 180px;
  transition: border-color 0.2s;
}

.filter-search:focus {
  border-color: var(--primary);
}

.filter-spacer {
  flex: 1;
}

/* ── Feature Grid ── */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.feature-card:hover {
  border-color: rgba(250, 95, 43, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.feature-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.feature-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.feature-desc {
  font-size: 12px;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.feature-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: auto;
}

.feature-employees {
  display: flex;
  gap: -4px;
}

.emp-chip {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin-left: -4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border: 2px solid var(--card);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-tasks-count {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 3px;
}

/* ── Feature Detail ── */
.feature-detail-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 1.2rem;
  min-height: calc(100vh - 120px);
}

.feature-list-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.feature-list-header {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.feature-list-items {
  flex: 1;
  overflow-y: auto;
}

.feature-list-item {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.feature-list-item:hover {
  background: var(--card2);
}

.feature-list-item.active {
  background: rgba(250, 95, 43, 0.08);
  border-left: 2px solid var(--primary);
}

.feature-list-item .fl-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.feature-list-item .fl-mod {
  font-size: 11px;
  color: var(--text2);
}

.feature-list-item .fl-meta {
  display: flex;
  align-items: center;
  gap: 5px;
}

.feature-detail-panel {
  overflow-y: auto;
}

.feature-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.feature-detail-header {
  padding: 1.2rem 1.4rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.feature-detail-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.feature-detail-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
}

.detail-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 1.4rem;
}

.detail-tab {
  padding: 0.7rem 1rem;
  font-size: 13px;
  color: var(--text2);
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.15s;
}

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

.detail-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.detail-tab-content {
  padding: 1.2rem 1.4rem;
}

.tab-pane {
  display: none;
}

.tab-pane.active {
  display: block;
}

/* ── Kanban ── */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  align-items: start;
}

.kanban-col {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.kanban-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--card2);
  z-index: 1;
}

.kanban-col-title {
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.dot-notstarted {
  background: var(--text3);
}

.dot-inprogress {
  background: var(--info);
}

.dot-blocked {
  background: var(--danger);
}

.dot-completed {
  background: var(--success);
}

.kanban-count {
  background: var(--border);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 11px;
  color: var(--text2);
  font-weight: 600;
}

.kanban-items {
  padding: 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  min-height: 60px;
}

.task-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 0.8rem;
  transition: all 0.15s;
  cursor: pointer;
}

.task-card:hover {
  border-color: rgba(250, 95, 43, 0.4);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.task-feature {
  font-size: 10px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 3px;
}

.task-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.task-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px;
}

.task-emp {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text2);
}

.task-emp-avatar {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-deadline {
  font-size: 10px;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 3px;
}

.task-status-select {
  width: 100%;
  margin-top: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 5px;
  padding: 0.3rem 0.5rem;
  color: var(--text2);
  font-size: 11px;
  outline: none;
  cursor: pointer;
}

/* ── Employee Grid ── */
.employee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.employee-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.employee-card:hover {
  border-color: rgba(250, 95, 43, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.emp-avatar-lg {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 0 auto 0.7rem;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 22px;
}

.emp-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.emp-role {
  font-size: 11.5px;
  color: var(--text2);
  margin-bottom: 0.8rem;
}

.emp-stats {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  border-top: 1px solid var(--border);
  padding-top: 0.8rem;
}

.emp-stat-num {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
}

.emp-stat-label {
  font-size: 10px;
  color: var(--text2);
}

/* ── Employee Detail Sidebar ── */
.employee-detail {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.4rem;
}

.emp-detail-header {
  text-align: center;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.progress-bar-wrap {
  background: var(--border);
  border-radius: 3px;
  height: 5px;
  overflow: hidden;
  margin: 0.5rem 0;
}

.progress-bar {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}

/* ── Timeline ── */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

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

.timeline-date-group {
  margin-bottom: 1.5rem;
}

.timeline-date-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-date-label::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  position: absolute;
  left: 0;
}

.timeline-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  margin-bottom: 0.6rem;
  transition: border-color 0.2s;
}

.timeline-item:hover {
  border-color: var(--border2);
}

.timeline-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.timeline-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
}

.timeline-desc {
  font-size: 12.5px;
  color: var(--text2);
  line-height: 1.5;
}

.timeline-tags {
  display: flex;
  gap: 6px;
  margin-top: 0.5rem;
  flex-wrap: wrap;
}

.timeline-creator {
  font-size: 11px;
  color: var(--text3);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── AI Chat ── */
.ai-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1rem;
  height: calc(100vh - 120px);
}

.chat-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chat-header {
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-bot-icon {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(135deg, #9b59b6, #6c5ce7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.chat-msg {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}

.chat-msg.ai {
  flex-direction: row;
}

.chat-msg.user {
  flex-direction: row-reverse;
}

.chat-bubble {
  max-width: 70%;
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.chat-msg.ai .chat-bubble {
  background: var(--card2);
  border: 1px solid var(--border);
  border-top-left-radius: 2px;
  color: var(--text);
}

.chat-msg.user .chat-bubble {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  border-top-right-radius: 2px;
}

.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0.4rem 0;
}

.typing-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text2);
  animation: typing 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {

  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.8);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

.chat-input-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 0.55rem 0.9rem;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--primary);
}

.quick-chips-panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  overflow-y: auto;
}

.quick-chips-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 0.3rem;
}

.chip {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.8rem;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--text2);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(250, 95, 43, 0.05);
}

/* ── Screenshot Gallery ── */
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 0.6rem;
}

.screenshot-thumb {
  aspect-ratio: 16/9;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.15s;
  width: 100%;
}

.screenshot-thumb:hover {
  border-color: var(--primary);
  transform: scale(1.02);
}

.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text2);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(250, 95, 43, 0.04);
}

.upload-zone i {
  font-size: 22px;
  margin-bottom: 0.4rem;
}

.upload-zone p {
  font-size: 12px;
}

/* ── Toast ── */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 1rem;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  box-shadow: var(--shadow);
  transform: translateX(calc(100% + 2rem));
  transition: transform 0.3s ease;
  pointer-events: all;
  min-width: 220px;
}

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

.toast.success {
  border-left: 3px solid var(--success);
}

.toast.error {
  border-left: 3px solid var(--danger);
}

.toast.info {
  border-left: 3px solid var(--info);
}

.toast i {
  flex-shrink: 0;
}

.toast.success i {
  color: var(--success);
}

.toast.error i {
  color: var(--danger);
}

.toast.info i {
  color: var(--info);
}

/* ── Login Page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 1rem;
  background-image: radial-gradient(circle at 20% 50%, rgba(250, 95, 43, 0.05) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(155, 89, 182, 0.04) 0%, transparent 50%);
}

.login-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.login-logo {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-logo .logo-badge {
  margin: 0 auto 0.7rem;
  width: 48px;
  height: 48px;
  font-size: 20px;
  border-radius: 12px;
}

.login-logo h1 {
  font-size: 20px;
  font-weight: 800;
}

.login-logo p {
  font-size: 12.5px;
  color: var(--text2);
  margin-top: 3px;
}

.login-error {
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  font-size: 12.5px;
  color: var(--danger);
  margin-bottom: 1rem;
  display: none;
}

.login-error.show {
  display: block;
}

.login-btn {
  width: 100%;
  padding: 0.65rem;
  margin-top: 0.5rem;
  font-size: 14px;
  justify-content: center;
}

/* ── Module Cards ── */
.module-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.module-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.module-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
}

.module-card.student::before {
  background: linear-gradient(90deg, #3498db, #2980b9);
}

.module-card.teacher::before {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.module-card.parent::before {
  background: linear-gradient(90deg, #9b59b6, #8e44ad);
}

.module-card.admin::before {
  background: linear-gradient(90deg, #f39c12, #e67e22);
}

.module-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 0.8rem;
}

.student .module-icon {
  background: rgba(52, 152, 219, 0.12);
  color: #3498db;
}

.teacher .module-icon {
  background: rgba(250, 95, 43, 0.12);
  color: var(--primary);
}

.parent .module-icon {
  background: rgba(155, 89, 182, 0.12);
  color: #9b59b6;
}

.admin .module-icon {
  background: rgba(243, 156, 18, 0.12);
  color: #f39c12;
}

.module-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.module-desc {
  font-size: 12px;
  color: var(--text2);
  margin-bottom: 0.8rem;
}

.module-stats {
  display: flex;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--border);
}

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

.mod-stat-num {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.mod-stat-label {
  font-size: 10px;
  color: var(--text2);
}

/* ── Empty State ── */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text2);
}

.empty-state i {
  font-size: 36px;
  opacity: 0.3;
  margin-bottom: 0.8rem;
}

.empty-state h3 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 0.3rem;
}

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

/* ── Loading ── */
.loading-spinner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text2);
  gap: 0.8rem;
}

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

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

/* ── Multi-select Chips Input ── */
.chips-input-wrap {
  min-height: 42px;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: 7px;
  padding: 0.3rem 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  cursor: text;
  transition: border-color 0.2s;
}

.chips-input-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(250, 95, 43, 0.12);
}

.chip-tag {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(250, 95, 43, 0.15);
  color: var(--primary);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11.5px;
  font-weight: 600;
}

.chip-tag button {
  background: none;
  border: none;
  color: inherit;
  font-size: 12px;
  cursor: pointer;
  padding: 0 1px;
  opacity: 0.7;
}

.chip-tag button:hover {
  opacity: 1;
}

/* ── Lightbox ── */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.lightbox-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* ── Section Label ── */
.section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text2);
  margin-bottom: 0.7rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── Two-col layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.three-col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
}

/* ── Info rows ── */
.info-row {
  display: flex;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row .info-key {
  color: var(--text2);
  min-width: 130px;
  font-size: 12px;
}

.info-row .info-val {
  color: var(--text);
  font-weight: 500;
}

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

  .main-content {
    margin-left: 0;
  }

  .kanban-board {
    grid-template-columns: 1fr 1fr;
  }

  .feature-detail-layout {
    grid-template-columns: 1fr;
  }

  .ai-layout {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .three-col {
    grid-template-columns: 1fr 1fr;
  }
}