/* Infinium Backend — DaVinci School aesthetic
   Cormorant Garamond + Outfit · warm cream / green / gold palette
   ======================================= */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Outfit:wght@300;400;500;600&display=swap');

:root {
  /* dark site palette (30 Oct 2026, Heike: branding consistent with davincischool.net / the Hello Geometry app) */
  --bg-primary: #0B1312;     /* night — page */
  --bg-secondary: #121C1A;   /* nav, panels */
  --bg-card: #121C1A;        /* cards */
  --bg-input: #0B1312;
  --bg-chat: #18231F;        /* hover fills */
  --border: rgba(244,239,230,.12);
  --border-light: rgba(244,239,230,.07);
  --text-primary: #F4EFE6;   /* paper */
  --text-secondary: #C9C3B6;
  --text-muted: #9AA39F;
  --accent: #5FC4BA;         /* turquoise */
  --accent-glow: #7FD3CA;
  --accent-dim: rgba(95,196,186,.14);
  --on-accent: #0B1312;      /* text on turquoise */
  --success: #5FC4BA;
  --error: #E58A7E;
  --link: #5FC4BA;
  --soft-green: rgba(95,196,186,.14);
  --bronze: #D2A872;
  --teal-deep: #0F2A26;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Outfit', system-ui, sans-serif;
  --nav-height: 48px;
  --chat-width: 320px;
  --radius: 10px;
  --radius-lg: 18px;
  --radius-msg: 16px;
}

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

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
}

/* Serif display face for headings & brand, à la davincischool.net */
h1, h2, h3, .nav-logo, .auth-header h1, .page-header h1 {
  font-family: var(--font-serif);
  letter-spacing: 0.2px;
}
h1 { font-weight: 600; }

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

a:hover {
  color: var(--accent);
}

/* ─── Top Nav ─── */
.top-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
}

.nav-left, .nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-logo {
  color: var(--accent);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.5px;
}

.logo-mark {
  display: inline-block;
  color: var(--accent);
}

img.logo-mark {
  object-fit: contain;
}

.logo-mark.large {
  font-size: 48px;
  line-height: 1;
}

img.logo-mark.large {
  width: 64px;
  height: 64px;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--radius);
  transition: color 0.15s, background 0.15s;
}

.nav-link:hover, .nav-link.active {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.nav-search {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 5px 12px;
  color: var(--text-primary);
  font-size: 13px;
  width: 200px;
}

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

.nav-user {
  color: var(--text-secondary);
  font-size: 13px;
}

/* ─── App Layout (chat left + main right) ─── */
.app-layout {
  display: flex;
  position: fixed;
  top: var(--nav-height);
  bottom: 0;
  left: 0;
  right: 0;
}

/* ─── Chat Panel (left, WhatsApp style) ─── */
.chat-panel {
  width: var(--chat-width);
  background: var(--bg-chat);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: width 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
}

.chat-panel.collapsed {
  width: 0;
  border-right: none;
}

.chat-toggle {
  position: fixed;
  top: calc(var(--nav-height) + 8px);
  left: var(--chat-width);
  z-index: 101;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
  padding: 6px 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: left 0.25s ease, color 0.15s;
}

.chat-toggle:hover {
  color: var(--accent);
}

.chat-panel.collapsed ~ .chat-toggle {
  left: 0;
}

/* Chat header */
.chat-header {
  display: flex;
  align-items: center;
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
}

.chat-tabs {
  display: flex;
  flex: 1;
}

.chat-tab {
  flex: 1;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 500;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s;
  border-bottom: 2px solid transparent;
}

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

.chat-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--accent);
}

/* Chat messages — WhatsApp style */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.chat-msg {
  max-width: 85%;
  padding: 8px 12px;
  font-size: 13px;
  line-height: 1.4;
  word-wrap: break-word;
}

.chat-msg.ai {
  background: var(--bg-card);
  border-radius: var(--radius-msg) var(--radius-msg) var(--radius-msg) 4px;
  align-self: flex-start;
  color: var(--text-primary);
}

.chat-msg.user {
  background: var(--accent-dim);
  border-radius: var(--radius-msg) var(--radius-msg) 4px var(--radius-msg);
  align-self: flex-end;
  color: var(--text-primary);
}

.chat-msg.human {
  background: var(--soft-green, #E8F0EB);
  border-radius: var(--radius-msg) var(--radius-msg) var(--radius-msg) 4px;
  align-self: flex-start;
  color: var(--text-primary);
}

.chat-msg .msg-sender {
  font-size: 11px;
  color: var(--accent);
  margin-bottom: 2px;
}

.chat-msg .msg-time {
  font-size: 10px;
  color: var(--text-muted);
  text-align: right;
  margin-top: 2px;
}

.chat-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
}

/* Chat input */
.chat-input {
  display: flex;
  padding: 10px 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
  align-items: flex-end;
}

.chat-input input {
  flex: 1;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.15s;
}

.chat-input input:focus {
  outline: none;
  border-color: var(--accent);
}

.chat-input button {
  background: var(--accent);
  color: var(--bg-primary);
  border: none;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s;
}

.chat-input button:hover {
  background: var(--accent-glow);
}

/* ─── Main Content ─── */
.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 36px;
}

/* ─── Dashboard ─── */
.dashboard h1 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.dash-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
}

.dash-card-cover {
  display: block;
  width: calc(100% + 48px);
  height: 140px;
  object-fit: cover;
  margin: -24px -24px 16px;
}

.dash-card h3 {
  font-size: 15px;
  color: var(--accent);
  margin-bottom: 8px;
}

.dash-card p {
  color: var(--text-secondary);
  font-size: 13px;
  margin-bottom: 16px;
}

.dash-card .stat {
  font-size: 32px;
  font-weight: 600;
  color: var(--accent);
}

/* ─── Auth Pages ─── */
.ttc-auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,164,76,0.06) 0%, transparent 50%),
    var(--bg-primary);
}

.auth-container {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  text-align: center;
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
}

.auth-header {
  margin-bottom: 32px;
}

.auth-header h1 {
  font-size: 20px;
  font-weight: 500;
  margin-top: 12px;
  color: var(--text-primary);
}

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

.auth-error {
  background: rgba(207,92,92,0.12);
  border: 1px solid rgba(207,92,92,0.3);
  color: var(--error);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
}

.auth-notice {
  background: rgba(92,150,120,0.12);
  border: 1px solid rgba(92,150,120,0.3);
  color: var(--text-primary);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
  text-align: left;
}

.auth-footnote {
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
}

.auth-footnote a {
  color: var(--text-secondary);
}

.auth-form {
  text-align: left;
}

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

.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  margin-bottom: 16px;
}

.settings-card h3 {
  margin: 0 0 4px;
}

.form-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 4px 0 0;
}

.form-error {
  background: rgba(192,86,58,0.12);
  border: 1px solid rgba(192,86,58,0.3);
  color: var(--error);
  padding: 10px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  transition: border-color 0.15s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
}

.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 16px 0 24px;
}

.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.avatar-placeholder {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  flex-shrink: 0;
}

.avatar-upload-btn {
  cursor: pointer;
}

.social-link-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-link-icon {
  display: flex;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.social-link-label {
  flex: 0 0 100px;
  margin-bottom: 0 !important;
  font-size: 13px;
  color: var(--text-secondary);
}

.social-link-row input {
  flex: 1;
  min-width: 0;
}

.public-profile-link {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 12px 0 0;
}

.password-field {
  position: relative;
}

.password-field input {
  padding-right: 42px;
}

.password-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: none;
  border: none;
  border-radius: var(--radius);
  color: var(--text-secondary);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--accent);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

/* ─── Buttons ─── */
.btn {
  display: inline-block;
  padding: 8px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  text-align: center;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-primary);
}

.btn-primary:hover {
  background: var(--teal-deep);
  color: var(--bg-primary);
}

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

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

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

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-full {
  width: 100%;
  padding: 12px;
}

.cf-turnstile {
  margin: 16px 0;
  display: flex;
  justify-content: center;
}

.auth-footer {
  margin-top: 20px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-tagline {
  margin-top: 24px;
  font-size: 12px;
  color: var(--text-muted);
  font-style: italic;
}

/* ─── Admin ─── */
.admin-card {
  border-left: 3px solid var(--accent);
}

.admin-dashboard h1 {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 24px;
}

/* Page header (title + action button) */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: 22px;
  font-weight: 500;
}

.page-header .breadcrumb {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.page-header .breadcrumb a {
  color: var(--text-secondary);
}

/* Data tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.data-table th {
  text-align: left;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-primary);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background: rgba(0,0,0,0.02);
}

.data-table .row-link {
  color: var(--text-primary);
  font-weight: 500;
}

.data-table .row-link:hover {
  color: var(--accent);
}

.data-table .row-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.data-table code {
  font-size: 12px;
  color: var(--text-secondary);
  font-family: 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

.data-table .empty-row {
  text-align: center;
  color: var(--text-muted);
  padding: 32px;
  font-style: italic;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-published {
  background: rgba(76,175,124,0.15);
  color: var(--success);
}

.badge-draft {
  background: rgba(123,163,207,0.15);
  color: var(--link);
}

.badge-archived {
  background: rgba(90,101,119,0.15);
  color: var(--text-muted);
}

.badge-active {
  background: rgba(76,175,124,0.15);
  color: var(--success);
}

.badge-pending {
  background: rgba(201,164,76,0.15);
  color: var(--accent);
}

.badge-suspended {
  background: rgba(207,92,92,0.15);
  color: var(--error);
}

.badge-new {
  background: rgba(123,163,207,0.15);
  color: var(--link);
}

.badge-reviewed {
  background: rgba(201,164,76,0.15);
  color: var(--accent);
}

.badge-accepted {
  background: rgba(76,175,124,0.15);
  color: var(--success);
}

.badge-declined {
  background: rgba(207,92,92,0.15);
  color: var(--error);
}

.badge-unsubscribed, .badge-bounced, .badge-failed {
  background: rgba(207,92,92,0.15);
  color: var(--error);
}

.badge-sending {
  background: rgba(201,164,76,0.15);
  color: var(--accent);
}

.badge-completed, .badge-sent {
  background: rgba(76,175,124,0.15);
  color: var(--success);
}

.field-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Button variants */
.btn-sm {
  padding: 4px 12px;
  font-size: 11px;
}

/* Course view */
.page-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

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

.course-meta {
  display: flex;
  gap: 32px;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: 20px;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.meta-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

.meta-value {
  font-size: 14px;
  color: var(--text-primary);
}

.course-description {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 28px;
}

.section-header {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* Week strip — grid of week cards */
.week-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.week-card {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.15s, transform 0.1s;
}

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

.week-num {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent);
  margin-bottom: 4px;
}

.week-title {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
  margin-bottom: 8px;
  line-height: 1.3;
  min-height: 36px;
}

.week-count {
  font-size: 12px;
  color: var(--text-muted);
}

/* 7-day grid */
.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  min-height: 400px;
}

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

.day-header {
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  font-weight: 500;
}

.day-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

/* Task cards inside day columns */
.task-card {
  display: block;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: var(--radius);
  padding: 8px 10px;
  text-decoration: none;
  transition: border-color 0.15s;
}

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

.task-card .task-type {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.task-card .task-title {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.3;
  margin-bottom: 4px;
}

.task-card .task-meta {
  display: flex;
  gap: 6px;
  font-size: 10px;
  color: var(--text-muted);
}

.task-dur {
  background: rgba(0,0,0,0.04);
  padding: 1px 5px;
  border-radius: 3px;
}

.task-span {
  background: rgba(201,164,76,0.15);
  color: var(--accent);
  padding: 1px 5px;
  border-radius: 3px;
}

.task-optional {
  background: rgba(123,163,207,0.15);
  color: var(--link);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Type-coloured task left borders */
.task-card.type-drawing       { border-left-color: #c9a44c; }
.task-card.type-video         { border-left-color: #7ba3cf; }
.task-card.type-reading       { border-left-color: #8b7fc4; }
.task-card.type-construction  { border-left-color: #d97757; }
.task-card.type-workshop_plan { border-left-color: #4caf7c; }
.task-card.type-workshop_perform { border-left-color: #4caf7c; }
.task-card.type-quiz          { border-left-color: #cf8c5c; }
.task-card.type-assignment_form { border-left-color: #cf8c5c; }
.task-card.type-conversation  { border-left-color: #5cb8b0; }
.task-card.type-meditation    { border-left-color: #b87fc4; }
.task-card.type-download      { border-left-color: #6a7588; }
.task-card.type-profile       { border-left-color: #c4807f; }
.task-card.type-live_session  { border-left-color: #cf5c5c; }

/* "+ Add task" button at bottom of day column */
.day-add {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  border: 1px dashed var(--border-light);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 14px;
  text-decoration: none;
  margin-top: auto;
  transition: all 0.15s;
}

.day-add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(201,164,76,0.05);
}

/* Task form */
.task-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 32px;
  max-width: 800px;
}

.task-form .form-group {
  margin-bottom: 18px;
}

.task-form textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
  min-height: 100px;
}

.task-form select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 14px;
  color: var(--text-primary);
  font-size: 14px;
}

.task-form textarea:focus,
.task-form select:focus,
.task-form input:focus {
  outline: none;
  border-color: var(--accent);
}

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

.form-row .form-group {
  margin-bottom: 0;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check input[type=checkbox] {
  width: auto;
  margin: 0;
}

.form-check label {
  margin: 0;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.inline-form {
  display: inline;
  margin-left: auto;
}

.delete-form {
  margin-top: 12px;
  max-width: 800px;
  display: flex;
  justify-content: flex-end;
}

.btn-danger {
  background: transparent;
  border: 1px solid rgba(207,92,92,0.4);
  color: var(--error);
}

.btn-danger:hover {
  background: rgba(207,92,92,0.12);
  border-color: var(--error);
}

.form-section-header {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin: 28px 0 14px 0;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Resources section */
.resources-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 800px;
}

.resource-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--bg-input);
  border-radius: var(--radius);
}

.resource-link {
  flex: 1;
  color: var(--text-primary);
  font-size: 13px;
}

.resource-link:hover {
  color: var(--accent);
}

.resource-empty {
  color: var(--text-muted);
  font-size: 13px;
  font-style: italic;
  text-align: center;
  padding: 16px;
}

.resource-add-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 16px;
  max-width: 800px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Badges for resource kinds */
.badge-link, .badge-doc { background: rgba(123,163,207,0.15); color: var(--link); }
.badge-video, .badge-video_external { background: rgba(207,124,92,0.15); color: #cf8c5c; }
.badge-form { background: rgba(207,140,92,0.15); color: #cf8c5c; }
.badge-zoom { background: rgba(207,92,92,0.15); color: var(--error); }
.badge-tool { background: rgba(76,175,124,0.15); color: var(--success); }
.badge-slides { background: rgba(184,127,196,0.15); color: #b87fc4; }
.badge-drive_folder { background: rgba(201,164,76,0.15); color: var(--accent); }
.badge-image { background: rgba(123,163,207,0.15); color: var(--link); }
.badge-audio { background: rgba(184,127,196,0.15); color: #b87fc4; }
.badge-pdf { background: rgba(207,92,92,0.15); color: var(--error); }
.badge-other { background: rgba(90,101,119,0.15); color: var(--text-muted); }
.badge-whatsapp { background: rgba(76,175,124,0.15); color: var(--success); }

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .chat-panel {
    width: 0;
    border-right: none;
  }

  .chat-panel.open {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    bottom: 0;
    width: 100%;
    z-index: 99;
    border-right: none;
  }

  .chat-toggle {
    left: 0;
  }

  .chat-panel.open ~ .chat-toggle {
    left: calc(100% - 32px);
  }

  .main-content {
    padding: 16px;
  }

  .nav-search {
    width: 120px;
  }
}

/* ───────────────────────────────────────────────
   Readability — bump base + common sizes up a notch
   (appended last so it wins the cascade)
   ─────────────────────────────────────────────── */
body { font-size: 17.5px; }
.data-table td { font-size: 16px; }
.data-table th { font-size: 13px; }
.nav-link, .nav-user, .nav-search { font-size: 15px; }
.nav-logo { font-size: 20px; }
.btn { font-size: 15px; }
.btn-sm { font-size: 13px; }
.form-group label { font-size: 15px; }
.form-group input, .form-group select, .form-group textarea,
input[type="text"], input[type="date"], input[type="number"],
input[type="email"], input[type="password"], select, textarea { font-size: 16px; }
.data-table .row-sub { font-size: 14px; }
.page-subtitle { font-size: 16px; }
.badge { font-size: 12px; }
.dashboard h1, .page-header h1 { font-size: 34px; }
h2.section-header, .section-header { font-size: 24px; }
.auth-header h1 { font-size: 40px; }

/* ─── Sign-in pages in the dark site colours (30 Oct 2026, Heike: "more like current
   branding, logo bigger") — login, forgot/reset password, claim, invite ─── */
.ttc-auth {
  background: linear-gradient(180deg, rgba(11,19,18,.80), rgba(11,19,18,.94)),
    url('/static/images/auth-bg.webp') center / cover no-repeat fixed, #0B1312;
  color: #F4EFE6;
}
.ttc-auth .auth-container { max-width: 440px; }
.ttc-auth .auth-card {
  background: rgba(18,28,26,.92); border: 1px solid #26332F; border-top: 2px solid #5FC4BA;
  border-radius: 18px; padding: 44px 36px 36px; box-shadow: 0 30px 70px rgba(0,0,0,.5);
}
.ttc-auth img.logo-mark.large { width: 132px; height: 132px; filter: drop-shadow(0 6px 18px rgba(0,0,0,.5)); }
.ttc-auth .auth-header { margin-bottom: 28px; }
.ttc-auth .auth-header h1 { font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; font-size: 36px; color: #F4EFE6; margin-top: 14px; }
.ttc-auth .auth-subtitle { color: #C9C3B6; font-size: 14.5px; line-height: 1.6; }
.ttc-auth .auth-subtitle strong { color: #5FC4BA; }
.ttc-auth .form-group label { color: #C9C3B6; }
.ttc-auth .form-group input {
  background: #0B1312; border: 1px solid #2E3D39; color: #F4EFE6; border-radius: 10px; padding: 12px 14px;
}
.ttc-auth .form-group input::placeholder { color: #7E8A86; }
.ttc-auth .form-group input:focus { border-color: #5FC4BA; outline: none; box-shadow: 0 0 0 3px rgba(95,196,186,.18); }
.ttc-auth .password-toggle { color: #C9C3B6; }
.ttc-auth .btn-primary {
  background: #5FC4BA; color: #0B1312; border: none; border-radius: 999px; padding: 13px 20px;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; font-size: 13px;
}
.ttc-auth .btn-primary:hover { background: #7FD3CA; color: #0B1312; }
.ttc-auth a, .ttc-auth .auth-footnote a { color: #5FC4BA; }
.ttc-auth .auth-footnote, .ttc-auth p { color: #C9C3B6; }
.ttc-auth .auth-tagline { color: #C9C3B6; opacity: .8; }
.ttc-auth .auth-notice { color: #F4EFE6; }
