/* Self-hosted Inter font (variable, weights 100-900) */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --midnight-900: #0a1320;
  --midnight-700: #152a3e;
  --midnight-600: #1f3c57;
  --midnight-500: #2c5779;
  --midnight-400: #3f7095;
  --mist-200: #d8e4ef;
  --mist-100: #eef4f9;
  --slate-600: #5f6c7f;
  --slate-400: #7a889c;
  --accent-red: #c63c4a;

  --primary: var(--midnight-500);
  --primary-dark: var(--midnight-700);
  --primary-light: var(--midnight-400);
  --accent: var(--accent-red);
  --danger: #b42318;
  --text: #0d1621;
  --text-muted: var(--slate-600);
  --bg: var(--mist-100);
  --card: #ffffff;
  --border: rgba(12, 21, 32, 0.08);
  --shadow-sm: 0 10px 30px rgba(12, 21, 32, 0.08);
  --shadow: 0 40px 80px rgba(12, 21, 32, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: radial-gradient(circle at 20% 20%, #fff, var(--bg)) fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(0px);
}

body::before {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, rgba(47, 96, 145, 0.25), transparent 60%);
}

body::after {
  width: 460px;
  height: 460px;
  bottom: -140px;
  right: -110px;
  background: radial-gradient(circle, rgba(198, 60, 74, 0.14), transparent 65%);
}

/* Layout shell */
.app-shell {
  width: min(1100px, 92%);
  margin: 0 auto;
  padding: 3rem 0 2.25rem;
}

/* Container */
.container {
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* TopBar */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(20px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(20, 24, 40, 0.05);
  box-shadow: 0 10px 30px rgba(13, 15, 26, 0.08);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

.top-nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s ease;
}

.dropdown-arrow {
  font-size: 0.75rem;
  transition: transform 0.2s ease;
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(13, 15, 26, 0.15);
  border: 1px solid rgba(20, 24, 40, 0.08);
  padding: 0.5rem 0;
  min-width: 180px;
  z-index: 50;
  animation: slideDown 0.2s ease;
}

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

.nav-dropdown-item {
  display: block;
  padding: 0.65rem 1.25rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-dropdown-item:hover {
  background: rgba(43, 45, 66, 0.06);
  color: var(--primary);
}

.nav-dropdown-divider {
  height: 1px;
  background: rgba(20, 24, 40, 0.08);
  margin: 0.5rem 0;
}

.logout-link {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
  color: var(--text-muted);
  font-weight: 600;
  transition: color 0.2s ease;
}

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

.mobile-menu-toggle {
  display: none;
  border: none;
  background: rgba(17, 18, 26, 0.06);
  color: var(--text);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  font-size: 1.1rem;
  cursor: pointer;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  transition: opacity 0.2s;
}

.brand:hover {
  opacity: 0.75;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(209, 75, 0, 0.08);
  color: var(--rust-700);
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: inset 0 0 0 1px rgba(209, 75, 0, 0.15);
}

.logo {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

.topbar .link {
  color: var(--text);
  font-weight: 600;
}

.topbar .link:hover {
  color: var(--primary-dark);
}

.title {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text);
  line-height: 1.2;
}

.subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.2;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: none;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: white;
  padding: 0.65rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
  box-shadow: 0 14px 30px rgba(43, 45, 66, 0.25);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 40px rgba(43, 45, 66, 0.25);
}

.btn-primary {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.8);
  color: var(--text);
  border: 1px solid rgba(20, 24, 40, 0.1);
  box-shadow: none;
}

.btn-secondary:hover {
  border-color: rgba(20, 24, 40, 0.3);
}

.btn-ghost {
  background: rgba(43, 45, 66, 0.08);
  color: var(--primary);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(43, 45, 66, 0.12);
}

.btn-danger {
  background: linear-gradient(130deg, var(--accent), var(--danger));
  color: #fff;
  box-shadow: 0 12px 30px rgba(198, 60, 74, 0.24);
}

.btn-danger:hover {
  transform: translateY(-2px);
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  font-size: 1.125rem;
  line-height: 1;
}

/* Tabs */
.nav-tabs {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.nav-tabs .nav-item {
  margin: 0;
}

.nav-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.25rem;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav-tabs .nav-link:hover {
  color: var(--primary);
}

.nav-tabs .nav-link.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* Cards */
.card {
  background: var(--card);
  border-radius: 8px;
  padding: 1.4rem;
  border: 1px solid rgba(20, 24, 40, 0.08);
  box-shadow: 0 10px 24px rgba(13, 15, 26, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 18px 36px rgba(13, 15, 26, 0.08);
  transform: translateY(-1px);
}

.card + .card {
  margin-top: 1rem;
}

/* Forms */
.input, .field, select.input, .form-input {
  width: 100%;
  padding: 0.875rem 1.1rem;
  border-radius: 6px;
  border: 1px solid rgba(17, 18, 26, 0.08);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.input:focus, .field:focus, select.input:focus, .form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 8px 25px rgba(43, 45, 66, 0.2);
}

select.input, select.form-input {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--primary-dark) 50%),
    linear-gradient(135deg, var(--primary-dark) 50%, transparent 50%),
    linear-gradient(to right, rgba(17, 18, 26, 0.04), rgba(17, 18, 26, 0.04));
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%,
    calc(100% - 36px) 50%;
  background-size: 7px 7px, 7px 7px, 1px 60%;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

.textarea {
  min-height: 140px;
  resize: vertical;
  font-family: inherit;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.muted {
  color: var(--text-muted);
  font-weight: 400;
}

/* Alerts */
.error, .alert-error {
  margin-top: 1rem;
  border: 1px solid rgba(220, 38, 38, 0.2);
  background: rgba(220, 38, 38, 0.05);
  color: #991b1b;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.success, .alert-success {
  margin-top: 1rem;
  border: 1px solid rgba(22, 163, 74, 0.2);
  background: rgba(22, 163, 74, 0.05);
  color: #065f46;
  padding: 0.875rem 1rem;
  border-radius: 6px;
  font-size: 0.9375rem;
}

/* Spinner */
.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 3px solid #e2e8f0;
  border-top-color: var(--primary);
  animation: spin 0.6s linear infinite;
}

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

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  z-index: 100;
  animation: fadeIn 0.2s;
}

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

.modal {
  width: 100%;
  max-width: 640px;
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: var(--shadow);
  border: none;
}

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

/* Utility */
.row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

.actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
}

/* Link */
.link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.link:hover {
  color: var(--primary-dark);
}

/* Checkbox */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid var(--border);
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background 0.2s ease;
}

input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
}

input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1);
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3.5rem 2rem;
  color: var(--text-muted);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow-sm);
}

.empty-state-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  color: var(--primary-dark);
}

.empty-state-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.empty-state-description {
  color: var(--text-muted);
  font-size: 1rem;
}

/* Page Header */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.75rem 2rem;
  margin-bottom: 2rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(20, 24, 40, 0.08);
}

.page-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--primary);
}

.page-description {
  font-size: 0.98rem;
  color: var(--text-muted);
}

/* Footer */
.footer {
  border-top: 1px solid rgba(12, 21, 32, 0.08);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  margin-top: 2rem;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.footer-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-size: 1.35rem;
  box-shadow: 0 12px 28px rgba(12, 21, 32, 0.18);
}

.footer-title {
  font-weight: 700;
  color: var(--text);
}

.footer-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.footer-links {
  color: var(--text-muted);
  font-weight: 600;
  text-align: right;
  display: flex;
  align-items: center;
  gap: 1rem;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.footer-link {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--text);
}

.page-header-actions {
  display: flex;
  gap: 0.5rem;
}

/* Form Field */
.form-field {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.required {
  color: var(--danger);
  margin-left: 0.25rem;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

.form-hint-success {
  color: #065f46;
}

.form-hint-warning {
  color: #854d0e;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 500;
}

.checkbox-input {
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.checkbox-text {
  color: var(--text);
}

/* Modal Title */
.modal-title {
  font-size: 1.375rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.auth-page {
  width: min(1100px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3rem;
  align-items: center;
}

.auth-page .auth-copy h1 {
  font-size: 3.2rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
}

.auth-page .auth-copy p {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 420px;
}

.auth-card {
  background: #fff;
  border-radius: 8px;
  padding: 2.75rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(20, 24, 40, 0.04);
}

/* Card variants */
.card-highlighted {
  background: linear-gradient(135deg, rgba(43,45,66,0.05), rgba(43,45,66,0));
  border-color: rgba(43, 45, 66, 0.15);
  box-shadow: var(--shadow);
}

/* Post styles */
.post-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.post-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.post-body {
  color: var(--text-muted);
  line-height: 1.8;
}

/* Markdown Content Styling */
.markdown-content {
  color: var(--text);
  line-height: 1.8;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
  color: var(--primary);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  font-weight: 600;
}

.markdown-content h1 { font-size: 1.875rem; }
.markdown-content h2 { font-size: 1.5rem; }
.markdown-content h3 { font-size: 1.25rem; }
.markdown-content h4 { font-size: 1.125rem; }

.markdown-content p {
  margin-bottom: 1rem;
}

.markdown-content ul,
.markdown-content ol {
  margin-bottom: 1rem;
  padding-left: 1.75rem;
}

.markdown-content li {
  margin-bottom: 0.375rem;
}

.markdown-content a {
  color: var(--primary);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-light);
  transition: border-color 0.2s ease;
}

.markdown-content a:hover {
  border-bottom-color: var(--primary);
}

.markdown-content code {
  background: rgba(43, 45, 66, 0.08);
  padding: 0.2rem 0.4rem;
  border-radius: 3px;
  font-size: 0.9em;
  font-family: 'Courier New', monospace;
}

.markdown-content pre {
  background: rgba(43, 45, 66, 0.06);
  padding: 1rem;
  border-radius: 6px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.markdown-content pre code {
  background: none;
  padding: 0;
}

.markdown-content blockquote {
  border-left: 3px solid var(--primary-light);
  padding-left: 1rem;
  margin-left: 0;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

.markdown-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
}

.markdown-content th,
.markdown-content td {
  border: 1px solid var(--border);
  padding: 0.5rem 0.75rem;
  text-align: left;
}

.markdown-content th {
  background: rgba(43, 45, 66, 0.05);
  font-weight: 600;
}

.markdown-content strong {
  font-weight: 600;
  color: var(--text);
}

.markdown-content em {
  font-style: italic;
}

.markdown-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

/* Markdown Preview Styling */
.markdown-preview-container {
  margin-top: 1rem;
  padding: 1rem;
  background: rgba(43, 45, 66, 0.03);
  border-radius: 6px;
  border: 1px solid rgba(43, 45, 66, 0.08);
}

.markdown-preview-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.markdown-preview-content {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  border: 1px solid rgba(43, 45, 66, 0.08);
  max-height: 260px;
  overflow-y: auto;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.bulletin-body-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.badge-pinned {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(237, 35, 60, 0.1);
  color: var(--punch-red-500);
  padding: 0.4rem 0.9rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

/* Absence Report Styling */
.absence-report-group {
  background: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid rgba(20, 24, 40, 0.06);
}

.absence-report-child-name {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.absence-report-group-badge {
  display: inline-flex;
  align-items: center;
  background: var(--primary-light);
  color: white;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.absence-report-dates {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 0.875rem;
  flex-wrap: wrap;
}

.absence-report-date-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.absence-report-date-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.absence-report-date-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--primary);
}

.absence-report-reason {
  background: rgba(43, 45, 66, 0.04);
  padding: 0.875rem 1rem;
  border-radius: 6px;
  margin-bottom: 0.875rem;
  color: var(--text);
  line-height: 1.6;
}

.absence-report-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  padding-top: 0.75rem;
  border-top: 1px solid rgba(20, 24, 40, 0.06);
  flex-wrap: wrap;
}

.absence-report-status {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
  background: rgba(22, 163, 74, 0.1);
  color: #065f46;
}

.absence-report-status.status-reported {
  background: rgba(43, 45, 66, 0.1);
  color: var(--primary);
}

.absence-report-status.status-acknowledged,
.absence-report-status.status-success {
  background: rgba(22, 163, 74, 0.1);
  color: #065f46;
}

.absence-report-status.status-warning {
  background: rgba(234, 179, 8, 0.15);
  color: #854d0e;
}

.absence-report-status.status-danger {
  background: rgba(220, 38, 38, 0.1);
  color: #991b1b;
}

.absence-report-status.status-primary {
  background: rgba(43, 45, 66, 0.1);
  color: var(--primary);
}

.absence-report-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.75rem;
}

.absence-report-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.absence-report-type {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(43, 45, 66, 0.08);
  color: var(--text-muted);
  border-radius: 4px;
}

.absence-report-created {
  font-weight: 500;
}

.absence-report-past,
.absence-report-future {
  opacity: 0.5;
  filter: grayscale(0.3);
}

.absence-report-past .absence-report-date-value,
.absence-report-past .absence-report-child-name,
.absence-report-future .absence-report-date-value,
.absence-report-future .absence-report-child-name {
  color: var(--text-muted);
}

.absence-report-section {
  margin-top: 0.75rem;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.absence-report-section-toggle {
  flex: 1;
  padding: 0.75rem 1rem;
  background: rgba(43, 45, 66, 0.04);
  border: 1px solid rgba(43, 45, 66, 0.08);
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: background 0.2s ease, border-color 0.2s ease;
  font-family: inherit;
}

.absence-report-section-toggle:hover {
  background: rgba(43, 45, 66, 0.08);
  border-color: rgba(43, 45, 66, 0.15);
}

.absence-report-section-toggle span:first-child {
  font-size: 0.75rem;
  color: var(--primary);
}

.collapsible-title {
  font-weight: 700;
}

.collapsible-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.absence-report-section-content {
  margin-top: 0.6rem;
  padding: 1rem;
  background: #fff;
  border: 1px solid rgba(43, 45, 66, 0.08);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(13, 15, 26, 0.08);
}

.collapsible-subtitle {
  margin: 0 0 0.6rem;
  color: var(--text-muted);
  font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
  .topbar-inner {
    padding: 0.875rem 1rem;
  }

  .container {
    padding: 0 1rem;
  }

  .logo {
    width: 40px;
    height: 40px;
    font-size: 1.125rem;
  }

  .title {
    font-size: 1rem;
  }

  .subtitle {
    font-size: 0.75rem;
  }

  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .card {
    padding: 1.25rem;
  }

  .modal {
    padding: 1.25rem;
  }

  .page-header {
    padding: 2rem;
    grid-template-columns: 1fr;
  }

  .page-header-content {
    max-width: 100%;
  }

  .page-header-actions {
    justify-content: flex-start;
  }

  .auth-page {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .auth-page .auth-copy h1 {
    font-size: 2.25rem;
  }

  .auth-page .auth-copy p {
    margin: 0 auto;
  }

  .collapsible-header {
    flex-direction: column;
    align-items: stretch;
  }

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

  .collapsible-actions .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 0.9375rem;
  }

  h1 {
    font-size: 1.75rem !important;
  }

  h2 {
    font-size: 1.25rem !important;
  }

  .btn {
    font-size: 0.8125rem;
  }

  .card {
    padding: 1rem;
  }
}

/* Group plan */
.group-plan-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.group-plan-board .card + .card {
  margin-top: 0;
}

.group-plan-group {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.group-plan-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-bottom: 0.65rem;
  border-bottom: 1px solid rgba(13, 22, 33, 0.08);
}

.group-plan-group-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  background: var(--mist-100);
  border-radius: 999px;
}

.group-plan-entries {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.group-plan-entry {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid rgba(13, 22, 33, 0.06);
}

.group-plan-entry:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.group-plan-entry-override {
  border-radius: 10px;
  border: 1px solid rgba(198, 60, 74, 0.2);
  background: rgba(198, 60, 74, 0.06);
  padding: 0.75rem;
  border-bottom: none;
}

.group-plan-entry-override + .group-plan-entry {
  padding-top: 0.75rem;
}

.group-plan-entry-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.group-plan-entry-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.group-name {
  margin: 0;
}

.teacher-name {
  font-weight: 700;
  color: var(--text);
}

.teacher-email {
  color: var(--text-muted);
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.override-reason {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* Impressum */
.impressum-shell {
  padding: 3rem 0 4rem;
}

.impressum-header {
  position: relative;
  overflow: hidden;
  padding: 2rem 2.2rem;
  border-radius: 16px;
  border: 1px solid rgba(13, 22, 33, 0.08);
  background: linear-gradient(130deg, #ffffff 0%, #f1f6fb 70%);
  box-shadow: 0 20px 40px rgba(13, 15, 26, 0.08);
  margin-bottom: 1.6rem;
}

.impressum-header::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  top: -80px;
  right: -80px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(63, 112, 149, 0.35), transparent 70%);
}

.impressum-kicker {
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.impressum-title {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

.impressum-subtitle {
  max-width: 640px;
  color: var(--text-muted);
}

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

.impressum-card {
  position: relative;
  border-radius: 14px;
  padding-left: 1.8rem;
}

.impressum-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.25rem;
  bottom: 1.25rem;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--primary), rgba(63, 112, 149, 0.2));
}

.impressum-card-title {
  font-size: 1.1rem;
  margin-bottom: 0.8rem;
}

.impressum-address p {
  margin: 0;
}

.impressum-contact {
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.impressum-note {
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  background: rgba(63, 112, 149, 0.08);
  color: var(--text-muted);
  border: 1px dashed rgba(63, 112, 149, 0.25);
}

.override-reason .label {
  font-weight: 600;
  color: var(--text);
}

.admin-panels {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 2rem;
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.item-stack {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.admin-panels .card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-panels .card .item-stack {
  flex: 1;
}

.admin-card {
  background: radial-gradient(circle at 20% 20%, rgba(109, 113, 160, 0.06), rgba(255, 255, 255, 0.94));
  border: 1px solid rgba(17, 18, 26, 0.05);
  box-shadow: 0 18px 36px rgba(13, 15, 26, 0.08);
  padding: 1.25rem;
}

.admin-card .card-header {
  align-items: center;
  margin-bottom: 0.25rem;
}

.admin-card .card-header h3 {
  margin-bottom: 0.15rem;
}

.admin-card .card-header .muted {
  margin-bottom: 0;
}

.admin-card .card-header .btn {
  box-shadow: 0 12px 26px rgba(43, 45, 66, 0.28);
}

.admin-card .item-stack > .card {
  box-shadow: inset 0 0 0 1px rgba(17, 18, 26, 0.05);
  background: #fff;
}

/* SuperAdmin */
.superadmin-page {
  width: min(1200px, 92%);
  margin: 0 auto;
  padding: 2.75rem 0 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.superadmin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.superadmin-stat {
  position: relative;
  overflow: hidden;
}

.superadmin-stat::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top right, rgba(43, 45, 66, 0.08), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.superadmin-stat > * {
  position: relative;
  z-index: 1;
}

.stat-label {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.3rem;
}

.stat-value--success {
  color: #0f766e;
}

.stat-value--danger {
  color: var(--danger);
}

.stat-value--primary {
  color: var(--primary);
}

.stat-value--accent {
  color: var(--accent);
}

.stat-meta {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.superadmin-table-card {
  padding: 1.5rem;
}

.superadmin-table-wrap {
  overflow-x: auto;
}

.superadmin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.75rem;
}

.superadmin-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 1rem 0.5rem;
}

.superadmin-table tbody tr {
  background: #fff;
  box-shadow: 0 12px 24px rgba(13, 15, 26, 0.08);
}

.superadmin-table tbody td {
  padding: 0.95rem 1rem;
  vertical-align: middle;
}

.superadmin-table tbody td:first-child {
  border-top-left-radius: 14px;
  border-bottom-left-radius: 14px;
}

.superadmin-table tbody td:last-child {
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.tenant-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.tenant-name {
  font-weight: 700;
  color: var(--text);
}

.tenant-slug {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.tenant-domain {
  color: var(--text-muted);
}

.tenant-limits {
  display: grid;
  gap: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-pill--active {
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
}

.status-pill--inactive {
  background: rgba(239, 68, 68, 0.12);
  color: #b91c1c;
}

.superadmin-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.checkbox-field {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.checkbox-field input {
  width: 1rem;
  height: 1rem;
}

.superadmin-credentials {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.credentials-grid {
  display: grid;
  gap: 1rem;
}

.credential-code {
  display: block;
  margin-top: 0.35rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  background: rgba(43, 45, 66, 0.06);
  font-size: 0.9rem;
  word-break: break-all;
}

.credential-code--danger {
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.credential-warning {
  color: var(--danger);
  font-weight: 600;
}

.credential-note {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--danger);
}

/* Responsive tweaks */
@media (max-width: 960px) {
  .app-shell {
    width: 96%;
    padding: 2.5rem 0 2.75rem;
  }

  .topbar-inner {
    gap: 0.75rem;
  }

  .topbar nav {
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .card {
    padding: 1.1rem;
  }

  .page-header {
    padding: 2.5rem 1.4rem;
  }

  .group-plan-board {
    gap: 0.85rem;
  }

  .admin-card {
    padding: 1rem;
  }

  .admin-card .card-header .btn {
    padding: 0.55rem 1.1rem;
  }

  .mobile-menu-toggle {
    display: block;
  }

  .top-nav {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    display: none;
  }

  .top-nav[data-open="true"] {
    display: flex;
  }

  .top-nav .btn {
    padding: 0.5rem 0.9rem;
  }

  .nav-dropdown {
    width: 100%;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
    padding: 0.5rem 0;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0.5rem 0 0.5rem 1rem;
    background: rgba(43, 45, 66, 0.03);
    border-radius: 4px;
    margin-top: 0.5rem;
  }

  .nav-dropdown-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
  }

  .logout-link {
    width: 100%;
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

@media (max-width: 640px) {
  .page-header {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .page-header-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .group-plan-entry-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .impressum-title {
    font-size: 2rem;
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .modal-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .btn {
    padding: 0.6rem 1.1rem;
  }
}

@media (max-width: 480px) {
  .app-shell {
    padding: 2rem 0 2.5rem;
  }

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

  .impressum-header {
    padding: 1.6rem;
  }

  .topbar nav .link {
    font-size: 0.95rem;
  }

  .card {
    padding: 1rem;
  }

  .admin-panels {
    gap: 0.75rem;
  }
}

.list-title {
  font-weight: 700;
  color: var(--text);
}

.list-subtitle {
  color: var(--text-muted);
}

.list-note {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1rem;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.teacher-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.teacher-card-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.teacher-profile {
  padding: 0.75rem;
  background: var(--platinum-900);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.teacher-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* Onboarding Page Specific Styles */

/* Container variants */
.container-narrow {
  max-width: 800px;
  padding-top: 2rem;
}

/* Form section titles */
.section-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
  color: var(--primary);
}

.section-title-divider {
  padding-top: 1rem;
  border-top: 1px solid rgba(20, 24, 40, 0.08);
}

/* Form grid layouts */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.form-grid-2-lg {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

/* Content boxes */
.content-box {
  background: rgba(43, 45, 66, 0.04);
  padding: 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

.toggle-box {
  padding: 1rem;
  background: rgba(43, 45, 66, 0.04);
  border-radius: 6px;
  margin-bottom: 2rem;
}

/* Credentials display */
.credentials-box {
  background: white;
  padding: 1rem;
  border-radius: 4px;
  font-family: monospace;
}

.credentials-item {
  margin-bottom: 0.5rem;
}

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

.credentials-value {
  user-select: all;
}

.credentials-value-accent {
  user-select: all;
  color: var(--accent);
  font-weight: 600;
}

.credentials-parent {
  margin-bottom: 1.5rem;
}

.credentials-parent:last-child {
  margin-bottom: 0;
}

.credentials-section-header {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.section-header {
  font-size: 1.125rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

/* Spinner variants */
.spinner-sm {
  width: 16px;
  height: 16px;
  border-width: 2px;
  margin-right: 0.5rem;
}

/* Modal variants */
.modal-md {
  max-width: 600px;
}

/* Spacing utilities */
.mb-lg {
  margin-bottom: 1.5rem;
}

.mt-xl {
  margin-top: 2rem;
}

/* Responsive grid adjustments */
@media (max-width: 768px) {
  .form-grid-2,
  .form-grid-2-lg,
  .form-grid-3 {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .container-narrow {
    padding-top: 1.5rem;
  }

  .section-title {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
  }
}

/* Calendar grid */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.calendar-weekday {
  padding: 0.5rem;
  background: var(--mist-100);
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  color: var(--text-muted);
}

.calendar-day {
  min-height: 2.5rem;
  background: transparent;
  border-radius: 4px;
  transition: background-color 0.15s;
  padding: 0.35rem;
  text-align: center;
}

.calendar-day--active {
  background: white;
  border: 1px solid var(--border);
}

.calendar-day--active:hover {
  background-color: var(--mist-100);
}

.calendar-day.has-events {
  background-color: rgba(47, 96, 145, 0.08);
}

.calendar-day .day-number {
  font-weight: 500;
}

.calendar-day .event-dot {
  font-size: 0.65rem;
  padding: 0.1rem 0.35rem;
}

@media (max-width: 768px) {
  .calendar-grid {
    gap: 1px;
  }

  .calendar-day {
    min-height: 2rem;
    padding: 0.25rem !important;
  }

  .calendar-day .event-dot {
    display: block;
    margin-left: 0;
    margin-top: 0.125rem;
  }
}

/* Dashboard Grid */
.dashboard-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.dashboard-row-wide {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 960px) {
  .dashboard-row,
  .dashboard-row-wide {
    grid-template-columns: 1fr;
  }
}

/* Panel Header */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.panel-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
}

.panel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.panel-indicator--danger {
  background: var(--accent-red);
  box-shadow: 0 0 8px rgba(198, 60, 74, 0.3);
}

.panel-indicator--warning {
  background: #d97706;
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.3);
}

.panel-indicator--info {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(44, 87, 121, 0.3);
}

.panel-indicator--success {
  background: #0f766e;
  box-shadow: 0 0 8px rgba(15, 118, 110, 0.3);
}

.panel-count {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--mist-100);
  color: var(--text-muted);
}

/* Design system table */
.ds-table {
  width: 100%;
  border-collapse: collapse;
}

.ds-table thead th {
  text-align: left;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0.5rem 0.75rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.ds-table thead th.text-center {
  text-align: center;
}

.ds-table tbody td {
  padding: 0.6rem 0.75rem;
  vertical-align: middle;
  border-bottom: 1px solid rgba(20, 24, 40, 0.04);
}

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

.ds-table tbody tr:hover {
  background: rgba(43, 45, 66, 0.03);
}

.ds-table .text-center {
  text-align: center;
}

.ds-table .fw-bold {
  font-weight: 700;
}

.ds-table .row-total {
  border-top: 1px solid var(--border);
  font-weight: 700;
}

/* Dashboard item (list entry in panel) */
.panel-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(20, 24, 40, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.panel-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.panel-item:first-child {
  padding-top: 0;
}

.panel-item-note {
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: rgba(43, 45, 66, 0.04);
  border-radius: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Stat cards grid (for check-in summary) */
.stat-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.stat-card-mini {
  flex: 0 0 auto;
  padding: 0.75rem 1.25rem;
  text-align: center;
}

.stat-card-mini .stat-value {
  font-size: 1.5rem;
  margin-bottom: 0.1rem;
}

.stat-card-mini .stat-label {
  font-size: 0.75rem;
  margin-bottom: 0;
}

/* Checkin list styles */
.checkin-group {
  margin-bottom: 0.5rem;
}

.checkin-group:last-child {
  margin-bottom: 0;
}

.checkin-group-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.75rem;
  background: var(--mist-100);
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.checkin-group-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.checkin-group-count {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}

.checkin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.checkin-row:hover {
  background: rgba(43, 45, 66, 0.04);
}

.checkin-row--checked {
  background: rgba(15, 118, 110, 0.06);
}

.checkin-row--checked:hover {
  background: rgba(15, 118, 110, 0.1);
}

.checkin-row-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.checkin-undo-hint {
  font-size: 1rem;
  line-height: 1;
  color: var(--color-teal-700, #0f766e);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  font-weight: 600;
}

.checkin-row--checked:hover .checkin-undo-hint {
  opacity: 0.7;
}

/* Missing child entry */
.missing-child-entry {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(20, 24, 40, 0.06);
}

.missing-child-entry:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.missing-child-entry:first-child {
  padding-top: 0;
}

.missing-child-name {
  font-weight: 700;
  color: var(--text);
}

.missing-child-group {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.missing-child-parents {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.parent-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  flex-wrap: wrap;
}

.parent-contact-name {
  font-weight: 600;
  color: var(--text);
}

.parent-contact-email {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}

.parent-contact-email:hover {
  color: var(--primary-dark);
}

/* Segmented Control (toggle switch) */
.segmented-control {
  display: inline-flex;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(43, 45, 66, 0.04);
}

.segmented-control-option {
  padding: 0.4rem 1.1rem;
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
  font-family: inherit;
}

.segmented-control-option:hover {
  color: var(--text);
}

.segmented-control-option--active {
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: white;
}

.segmented-control-option--active:hover {
  color: white;
}

/* Calendar navigation */
.calendar-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.calendar-nav-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

/* Event row (year view) */
.event-row {
  position: relative;
  padding: 0.75rem 0 0.75rem 1rem;
  border-left: 3px solid var(--primary);
  margin-bottom: 0.75rem;
}

.event-row:last-child {
  margin-bottom: 0;
}

.event-row-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.event-row-main {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.event-row-date {
  color: var(--text-muted);
  font-size: 0.875rem;
  min-width: 100px;
}

.event-row-title {
  font-weight: 700;
  color: var(--text);
}

.event-row-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.event-row-description {
  margin-top: 0.5rem;
  padding-left: 0.5rem;
  color: var(--text-muted);
}

.event-row-expand {
  color: var(--text-muted);
  font-size: 0.75rem;
  cursor: pointer;
}

/* Calendar event card */
.event-card {
  margin-bottom: 0.75rem;
}

.event-card:last-child {
  margin-bottom: 0;
}

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

.event-card-title {
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.event-card-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Calendar month view event dot */
.event-dot {
  display: inline-block;
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 700;
  min-width: 1rem;
  height: 1rem;
  line-height: 1rem;
  text-align: center;
  padding: 0 0.25rem;
  margin-left: 2px;
  vertical-align: middle;
}

/* Month section in year view */
.month-section {
  margin-bottom: 1.5rem;
}

.month-section:last-child {
  margin-bottom: 0;
}

.month-section-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 0.75rem;
}

.month-section-title {
  font-weight: 700;
  color: var(--text);
}

/* Calendar layout (month view + events side by side) */
.calendar-layout {
  display: grid;
  grid-template-columns: 2fr 3fr;
  gap: 1.5rem;
  align-items: start;
}

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

/* Calendar event list header */
.event-list-header {
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-list-header .link {
  font-size: 0.875rem;
  font-weight: 500;
}
