/* ============================================================
   Student Project Board — Design tokens
   Matches the planning-hub tool: dark navy sidebar, teal accent,
   warm off-white text, full light/dark theme support.
   ============================================================ */

:root {
  --sidebar-collapsed: 56px;
  --sidebar-expanded: 220px;
  --transition: 0.18s ease;

  /* Dark theme (default) */
  --bg-app:         #10141B;
  --bg-surface:     #171C26;
  --bg-elevated:    #1E2430;
  --border-subtle:  rgba(255,255,255,0.08);

  --text-primary:   #EDE8E0;
  --text-secondary: #8FA5B0;
  --text-muted:     #6B8590;
  --text-faint:     #4A6570;

  --accent:         #29B6C8;
  --accent-soft:    rgba(41,182,200,0.15);

  --success: #4CAF7D;
  --warning: #E0A83E;
  --danger:  #D96C6C;

  --sidebar-bg: #1A1F2E;
}

[data-theme="light"] {
  --bg-app:         #F6F4F0;
  --bg-surface:     #FFFFFF;
  --bg-elevated:    #FBFAF8;
  --border-subtle:  rgba(20,20,20,0.08);

  --text-primary:   #1A1F2E;
  --text-secondary: #4A5560;
  --text-muted:     #6B7580;
  --text-faint:     #97A0A8;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-app);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}

a { color: var(--accent); text-decoration: none; }

/* ---------- Layout shell ---------- */

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

.sidebar {
  width: var(--sidebar-collapsed);
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  transition: width var(--transition);
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar:hover, .sidebar.expanded { width: var(--sidebar-expanded); }

.sidebar .brand {
  padding: 18px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.sidebar .brand-mark {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: var(--accent);
  flex-shrink: 0;
}
.sidebar .brand-label {
  color: #EDE8E0;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.sidebar:hover .brand-label, .sidebar.expanded .brand-label { opacity: 1; }

.nav-section-label {
  color: rgba(255,255,255,0.28);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 14px 16px 6px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.sidebar:hover .nav-section-label, .sidebar.expanded .nav-section-label { opacity: 1; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
  white-space: nowrap;
}
.nav-item .nav-icon { color: rgba(255,255,255,0.35); flex-shrink: 0; width: 18px; text-align: center; }
.nav-item .nav-label {
  color: rgba(255,255,255,0.5);
  opacity: 0;
  transition: opacity 0.12s ease;
}
.sidebar:hover .nav-item .nav-label, .sidebar.expanded .nav-item .nav-label { opacity: 1; }
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item:hover .nav-icon, .nav-item:hover .nav-label { color: rgba(255,255,255,0.7); }
.nav-item.active { background: var(--accent-soft); }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-item.active .nav-label { color: #EDE8E0; font-weight: 600; }

.sidebar-footer {
  margin-top: auto;
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.user-avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  flex-shrink: 0;
}
.user-name {
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.user-role {
  color: rgba(255,255,255,0.3);
  font-size: 11px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.sidebar:hover .user-name, .sidebar.expanded .user-name,
.sidebar:hover .user-role, .sidebar.expanded .user-role { opacity: 1; }

.main-content {
  flex: 1;
  margin-left: var(--sidebar-collapsed);
  transition: margin-left var(--transition);
  padding: 28px 32px;
  max-width: 100%;
}

/* ---------- Top bar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.topbar h1 { font-size: 20px; margin: 0; font-weight: 600; }
.theme-toggle {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 12px;
}
.theme-toggle:hover { color: var(--text-primary); }

/* ---------- Cards / surfaces ---------- */
.surface {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  background: var(--accent);
  color: #06222A;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--text-faint); }

/* ---------- Kanban board ---------- */
.board-columns {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.board-column {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  min-width: 260px;
  max-width: 260px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.board-column-header {
  padding: 12px 14px;
  font-weight: 600;
  font-size: 12.5px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.board-column-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 60px;
  flex: 1;
}
.card-tile {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  font-size: 13px;
}
.card-tile:hover { border-color: var(--accent); }
.card-tile .card-title { font-weight: 500; margin-bottom: 4px; }
.card-tile .card-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 11px;
  color: var(--text-muted);
}
.card-tile.dragging { opacity: 0.4; }
.board-column-body.drag-over { background: var(--accent-soft); border-radius: 8px; }

.add-card-btn {
  background: none;
  border: 1px dashed var(--border-subtle);
  border-radius: 8px;
  padding: 8px;
  color: var(--text-muted);
  font-size: 12.5px;
  cursor: pointer;
  margin: 0 10px 10px;
}
.add-card-btn:hover { color: var(--text-primary); border-color: var(--text-faint); }

/* ---------- Staff dashboard grid ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
}
.dashboard-card:hover { border-color: var(--accent); }
.dashboard-card .team-name { font-weight: 600; margin-bottom: 2px; }
.dashboard-card .project-name { color: var(--text-muted); font-size: 12px; margin-bottom: 10px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.status-green { background: var(--success); }
.status-amber { background: var(--warning); }
.status-red { background: var(--danger); }

/* ---------- Auth page ---------- */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
}
.auth-box {
  width: 340px;
  padding: 28px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
}
.auth-box h1 { font-size: 18px; margin: 0 0 4px; }
.auth-box p.sub { color: var(--text-muted); font-size: 12.5px; margin: 0 0 20px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.field input {
  width: 100%;
  padding: 9px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 13px;
}
.field input:focus { outline: none; border-color: var(--accent); }
.auth-error { color: var(--danger); font-size: 12px; margin-top: 10px; }
.btn-full { width: 100%; padding: 10px; margin-top: 6px; }
