/* ==========================================================================
   Stiftulap – Modernes Stylesheet
   ========================================================================== */

/* ---------- CSS Custom Properties ---------- */
:root {
  --blue-primary: #3b5bd6;
  --blue-dark: #2f49b8;
  --blue-light: #e8ecfa;
  --accent: #FFE239;
  --accent-hover: #e6cb00;
  --text: #1a1a2e;
  --text-light: #555;
  --bg: #f4f6fb;
  --bg-card: #ffffff;
  --bg-input: #ffffff;
  --border: #d4d8e8;
  --border-light: #e8ecf1;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-sm: 4px;
  --sidebar-width: 220px;
  --header-height: 56px;
  --transition: 0.2s ease;

  /* Noten-Farben */
  --grade-good: #2ecc71;
  --grade-ok: #f39c12;
  --grade-bad: #e74c3c;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #e4e4e4;
    --text-light: #aaa;
    --bg: #1a1a2e;
    --bg-card: #262640;
    --bg-input: #2a2a44;
    --border: #3a3a5c;
    --border-light: #333355;
    --blue-primary: #6e8aff;
    --blue-dark: #5070e8;
    --blue-light: #2a3a5c;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.4);
  }
}

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

html {
  font-size: 15px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

/* ---------- Page Transitions ---------- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.content > * {
  animation: fadeIn 0.25s ease-out both;
}

.content > *:nth-child(1) { animation-delay: 0.02s; }
.content > *:nth-child(2) { animation-delay: 0.06s; }
.content > *:nth-child(3) { animation-delay: 0.10s; }
.content > *:nth-child(4) { animation-delay: 0.14s; }
.content > *:nth-child(5) { animation-delay: 0.18s; }
.content > *:nth-child(n+6) { animation-delay: 0.20s; }

a { color: var(--blue-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ---------- Top Header ---------- */
.top-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-height);
  background: var(--blue-primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-left, .header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  text-decoration: none;
}

.logo { height: 32px; width: auto; }

.app-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.user-greeting {
  font-size: 0.9rem;
  opacity: 0.9;
}

.btn-logout {
  background: rgba(255,255,255,0.15);
  color: #fff;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  text-decoration: none;
  transition: background var(--transition);
}
.btn-logout:hover {
  background: rgba(255,255,255,0.25);
  text-decoration: none;
}

/* ---------- Hamburger / Nav Toggle ---------- */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: var(--transition);
}

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

.nav-list {
  list-style: none;
  padding: 0.5rem 0;
  flex: 1;
}

.nav-list li a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
  border-radius: 0;
  transition: background var(--transition);
}
.nav-list li a:hover {
  background: var(--blue-light);
  text-decoration: none;
}
.nav-list li a.active {
  background: var(--blue-primary);
  color: #fff;
}

.nav-icon {
  font-size: 1.1rem;
  width: 1.4em;
  text-align: center;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

.nav-section {
  padding: 0.4rem 1rem 0.2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  font-weight: 600;
}

.badge-nav {
  background: #e74c3c;
  color: #fff;
  font-size: 0.7rem;
  padding: 0.1rem 0.45rem;
  border-radius: 10px;
  font-weight: 700;
  margin-left: auto;
}

.nav-footer {
  padding: 1rem;
  text-align: center;
  border-top: 1px solid var(--border);
}
.nav-logo { height: 24px; opacity: 0.6; }

/* ---------- Main Content ---------- */
.content {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  padding: 1.5rem 2rem;
  min-height: calc(100vh - var(--header-height));
}

/* ---------- Cards ---------- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  transition: box-shadow var(--transition);
}

.card-header {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--blue-primary);
}

/* Collapsible card */
.card-collapsible {
  padding: 0;
}

.card-collapsible > .card-toggle {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 0.9rem 1.25rem;
  border-bottom: 2px solid var(--blue-primary);
  user-select: none;
  transition: background var(--transition);
}

.card-collapsible > .card-toggle:hover {
  background: var(--blue-light);
}

.card-collapsible > .card-toggle::-webkit-details-marker { display: none; }
.card-collapsible > .card-toggle::marker { display: none; content: ''; }

.card-collapsible > .card-toggle::after {
  content: '▸';
  font-size: 0.9rem;
  color: var(--text-light);
  transition: transform 0.2s ease;
}

.card-collapsible[open] > .card-toggle::after {
  transform: rotate(90deg);
}

.card-collapsible[open] > .card-toggle {
  border-radius: 0;
}

.card-collapsible > .category-list {
  margin: 0;
}

/* ---------- Dashboard Tiles ---------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.tile {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.tile:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.tile-icon { font-size: 2rem; }
.tile-label { font-weight: 600; font-size: 0.95rem; }
.tile-info { font-size: 0.8rem; color: var(--text-light); }

.tile-lerndoku { border-top: 3px solid #3b5bd6; }
.tile-noten    { border-top: 3px solid #A9BCF5; }
.tile-datei    { border-top: 3px solid #B5E0FF; }
.tile-mail     { border-top: 3px solid #C2AFF0; }
.tile-user     { border-top: 3px solid #FFD6A5; }
.tile-lerndoku-admin { border-top: 3px solid #FFADAD; }
.tile-noten-admin    { border-top: 3px solid #C1FFD7; }

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

table.data-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

table.data-table th {
  background: var(--blue-primary);
  color: #fff;
  padding: 0.6rem 0.8rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.88rem;
  white-space: nowrap;
}

table.data-table td {
  padding: 0.55rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.9rem;
  vertical-align: middle;
  transition: background var(--transition);
}

table.data-table tbody tr {
  transition: background var(--transition);
}

table.data-table tbody tr:hover {
  background: var(--blue-light);
}

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

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
}

.form-control {
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  background: var(--bg-input);
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus {
  outline: none;
  border-color: var(--blue-primary);
  box-shadow: 0 0 0 3px rgba(59, 91, 214, 0.15);
}

select.form-control {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23555' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  background-size: 10px;
  padding-right: 2rem;
  min-height: 2.4rem;
}

select.form-control:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%233b5bd6' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23aaa' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  }
  select.form-control:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%237a9bff' d='M1.4 0L6 4.6 10.6 0 12 1.4l-6 6-6-6z'/%3E%3C/svg%3E");
  }
}

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

.form-inline {
  display: flex;
  gap: 0.75rem;
  align-items: end;
  flex-wrap: wrap;
}

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

.form-check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
}

.form-error {
  border-color: #e74c3c !important;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.15) !important;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-dark); color: #fff; }

.btn-accent {
  background: var(--accent);
  color: #000;
}
.btn-accent:hover { background: var(--accent-hover); }

.btn-secondary {
  background: var(--border);
  color: var(--text);
}
.btn-secondary:hover { background: #bbb; }

.btn-danger {
  background: #e74c3c;
  color: #fff;
}
.btn-danger:hover { background: #c0392b; }

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

.btn-block {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---------- Alerts / Messages ---------- */
.alert {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  animation: fadeInFast 0.3s ease-out;
}

.alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.alert-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

@media (prefers-color-scheme: dark) {
  .alert-success { background: #1a3d2a; color: #8dd5a0; border-color: #2a5c3e; }
  .alert-error   { background: #3d1a1a; color: #e8a0a0; border-color: #5c2a2a; }
  .alert-warning { background: #3d3a1a; color: #e8d88a; border-color: #5c5a2a; }
  .alert-info    { background: #1a2d3d; color: #8ac0d5; border-color: #2a4c5c; }
}

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  background: var(--blue-light);
  color: var(--blue-primary);
  font-size: 0.75rem;
  padding: 0.1rem 0.5rem;
  border-radius: 10px;
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .badge { background: #3a3a5c; color: #a0b0ff; }
}

/* ---------- Category List (Lerndoku) ---------- */
.category-list {
  list-style: none;
  padding: 0;
}

.category-list li {
  border-bottom: 1px solid var(--border-light);
}

.category-list li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.55rem 0.8rem;
  color: var(--text);
  text-decoration: none;
  transition: background var(--transition);
}
.category-list li a:hover { background: var(--blue-light); text-decoration: none; }

/* Collapsible parent categories */
.category-parent { border-bottom: none; }

.category-parent details {
  border-bottom: 1px solid var(--border-light);
}

.category-summary {
  display: flex;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 0;
}

.category-summary::-webkit-details-marker { display: none; }
.category-summary::marker { display: none; content: ''; }

.category-summary::before {
  content: '▸';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-light);
  transition: transform 0.2s ease;
  margin-left: 0.4rem;
}

details[open] > .category-summary::before {
  transform: rotate(90deg);
}

.category-summary a {
  flex: 1;
  font-weight: 600;
}

.category-children {
  list-style: none;
  padding: 0;
  background: var(--bg);
  border-top: 1px solid var(--border-light);
}

.category-children li { border-bottom: 1px solid var(--border-light); }
.category-children li:last-child { border-bottom: none; }

.category-children li a {
  padding-left: 2.2rem;
  font-weight: 400;
  font-size: 0.88rem;
}

.category-active a {
  background: var(--blue-light);
  font-weight: 600 !important;
  border-left: 3px solid var(--blue-primary);
}

/* ---------- Icons (für alte Bilder) ---------- */
.icon-20 { width: 20px; height: 20px; vertical-align: middle; }
.icon-30 { width: 30px; height: 30px; vertical-align: middle; }

.actions {
  white-space: nowrap;
}
.actions a { margin-right: 0.3rem; }

/* ---------- Mail Layout ---------- */
.mail-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 1rem;
  min-height: 400px;
}

.mail-folders {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.mail-folders .folder-list {
  list-style: none;
}

.mail-folders .folder-list li a {
  display: block;
  padding: 0.65rem 1rem;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}
.mail-folders .folder-list li a:hover { background: var(--blue-light); }
.mail-folders .folder-list li a.active {
  background: var(--blue-primary);
  color: #fff;
}

.mail-content {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.mail-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background var(--transition);
}
.mail-list-item:hover { background: var(--blue-light); }
.mail-list-item.unread { font-weight: 700; }

.mail-meta { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; }

.mail-detail-header {
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.mail-detail-body {
  line-height: 1.6;
}

/* ---------- Semester-Tabs ---------- */
.semester-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.semester-tabs a {
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: background var(--transition);
}
.semester-tabs a:hover { background: var(--blue-light); }
.semester-tabs a.active {
  background: var(--blue-primary);
  color: #fff;
  border-color: var(--blue-primary);
}

/* ---------- Eintrag-Inhalt (TinyMCE HTML) ---------- */
.entry-content {
  line-height: 1.6;
}

.entry-content ul,
.entry-content ol {
  padding-left: 2rem !important;
  margin: 0.5rem 0 !important;
  list-style-position: outside !important;
}

.entry-content ul { list-style-type: disc !important; }
.entry-content ol { list-style-type: decimal !important; }

.entry-content ul ul { list-style-type: circle !important; }
.entry-content ul ul ul { list-style-type: square !important; }

.entry-content li {
  margin-bottom: 0.25rem;
  display: list-item !important;
}

/* Word/Office Paste-Listen mit text-indent: -18pt kompensieren */
.entry-content p[class*="MsoList"] {
  padding-left: 36pt !important;
}

.entry-content p { margin: 0.5rem 0; }
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin: 1rem 0 0.5rem;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.entry-content table {
  border-collapse: collapse;
  margin: 0.5rem 0;
}

.entry-content table td,
.entry-content table th {
  border: 1px solid var(--border);
  padding: 0.4rem 0.6rem;
}

.entry-content blockquote {
  border-left: 3px solid var(--blue-primary);
  padding-left: 1rem;
  margin: 0.5rem 0;
  color: var(--text-light);
}

.entry-content pre,
.entry-content code {
  background: var(--blue-light);
  padding: 0.2rem 0.4rem;
  border-radius: var(--radius-sm);
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
}

.entry-content pre {
  padding: 0.75rem;
  overflow-x: auto;
}

/* ---------- Fach-Tabelle (gleiche Spaltenbreiten) ---------- */
.fach-table { table-layout: fixed; }
.fach-table .col-pruefung { width: auto; }
.fach-table .col-note     { width: 90px; }
.fach-table .col-datum    { width: 110px; }
.fach-table .col-aktionen { width: 200px; }
/* In der Durchschnitts-Tabelle: dritte Spalte spannt Datum + Aktionen */
.fach-table .col-aktionen-merged { width: 310px; }

.fach-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .fach-table .col-aktionen        { width: 140px; }
  .fach-table .col-datum           { width: 90px; }
  .fach-table .col-aktionen-merged { width: 230px; }
}

/* ---------- Grade Coloring ---------- */
.grade { font-weight: 700; }
.grade-good { color: var(--grade-good); }
.grade-ok { color: var(--grade-ok); }
.grade-bad { color: var(--grade-bad); }

/* ---------- Filter / Toolbar ---------- */
.toolbar {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

/* ---------- Editor Container ---------- */
.editor-wrap {
  margin-bottom: 1rem;
}

.editor-timer {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 0.5rem;
}

/* ---------- Password Change ---------- */
.pw-change-form {
  max-width: 400px;
}

/* ---------- User Info Table ---------- */
.info-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.4rem 1rem;
  font-size: 0.9rem;
}
.info-grid dt { font-weight: 600; }
.info-grid dd { margin: 0; }

/* ---------- Login Page (kein Sidebar) ---------- */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--blue-primary) 0%, #1a237e 100%);
}

.login-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 400px;
  margin: 1rem;
}

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

.login-box .logo-section img { height: 48px; margin-bottom: 0.5rem; }
.login-box .logo-section h1 {
  font-size: 1.5rem;
  color: var(--blue-primary);
  margin: 0;
}

.login-box .form-group { margin-bottom: 1.2rem; }

.login-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-light);
}
.login-footer a { color: var(--blue-primary); }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .sidebar {
    transform: translateX(-100%);
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .content {
    margin-left: 0;
    padding: 1rem;
  }

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

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

  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }

  table.data-table {
    font-size: 0.82rem;
  }
  table.data-table th,
  table.data-table td {
    padding: 0.4rem 0.5rem;
  }
}

@media (max-width: 480px) {
  .app-title { display: none; }
  .dashboard-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-light); }
.text-small { font-size: 0.82rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.hidden { display: none; }
