/* ============================================================
   IDS Daily Reporting System — Stylesheet
   Aesthetic: Clean institutional with warm, human accents
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #F7F5F0;
  --surface:   #FFFFFF;
  --border:    #E2DDD6;
  --border-focus: #7B6EA6;
  --text:      #1C1A17;
  --muted:     #6B6560;
  --accent:    #7B6EA6;
  --accent-light: #EDE9F7;
  --success:   #3D8C6F;
  --success-light: #E6F4EE;
  --warning:   #C4793A;
  --warning-light: #FDF0E6;
  --danger:    #B84646;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);
  --radius:    10px;
  --radius-lg: 16px;
  --transition: 0.18s ease;
}

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

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

h1, h2, h3, h4 {
  font-family: 'DM Serif Display', serif;
  line-height: 1.2;
  font-weight: 400;
}

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

/* ── Layout ─────────────────────────────────────────────────── */
.app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.main-content.wide {
  max-width: 1100px;
}

/* ── Topbar / Nav ───────────────────────────────────────────── */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'DM Serif Display', serif;
  font-size: 1.1rem;
}

.brand-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-top: -2px;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-btn {
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  transition: all var(--transition);
  font-family: inherit;
}

.nav-btn:hover { background: var(--bg); color: var(--text); }
.nav-btn.active { background: var(--accent-light); color: var(--accent); }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.25rem 0.75rem 0.25rem 0.35rem;
  font-size: 0.8rem;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  flex-shrink: 0;
}

.role-badge {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-light);
  color: var(--accent);
}

.role-badge.manager { background: var(--success-light); color: var(--success); }

.btn-signout {
  padding: 0.35rem 0.8rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.btn-signout:hover { border-color: var(--danger); color: var(--danger); }

/* ── Login Screen ───────────────────────────────────────────── */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 60% 50% at 20% 20%, rgba(123,110,166,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 40% 60% at 80% 80%, rgba(61,140,111,0.06) 0%, transparent 60%);
  padding: 2rem;
}

.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 3rem 2.5rem;
  max-width: 400px;
  width: 100%;
  text-align: center;
}

.login-logo {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent), #5C4E9E);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'DM Serif Display', serif;
  font-size: 1.8rem;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 20px rgba(123,110,166,0.3);
}

.login-card h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.login-card p { color: var(--muted); font-size: 0.9rem; margin-bottom: 2rem; }

.btn-microsoft {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.btn-microsoft:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 12px rgba(123,110,166,0.15);
  transform: translateY(-1px);
}

.ms-logo { width: 20px; height: 20px; flex-shrink: 0; }

.login-note {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.page-header h2 { font-size: 1.8rem; margin-bottom: 0.3rem; }
.page-header p { color: var(--muted); font-size: 0.9rem; }

/* ── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-header h3 { font-size: 1rem; font-family: 'DM Sans', sans-serif; font-weight: 600; }
.card-body { padding: 1.25rem; }

.section-label {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.section-label h3 {
  font-size: 1rem;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  color: var(--text);
}

.section-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--accent-light);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* ── Form Elements ──────────────────────────────────────────── */
.form-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 1rem; }
.form-group:last-child { margin-bottom: 0; }

label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.35rem;
  letter-spacing: 0.01em;
}

.label-hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.78rem;
  margin-left: 0.3rem;
}

input[type="text"],
input[type="date"],
input[type="email"],
select,
textarea {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  -webkit-appearance: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(123,110,166,0.1);
}

textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

select {
  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 d='M1 1l5 5 5-5' stroke='%236B6560' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2.2rem;
  cursor: pointer;
}

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

@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

/* Radio / Checkbox groups */
.radio-group, .check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.radio-option, .check-option {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.75rem;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all var(--transition);
  background: var(--bg);
  user-select: none;
}

.radio-option:hover, .check-option:hover { border-color: var(--accent); background: var(--accent-light); }
.radio-option.selected, .check-option.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 500;
}

.radio-option input, .check-option input { display: none; }

/* ── Signature Pad ───────────────────────────────────────────── */
.signature-wrap {
  border: 1.5px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #FAFAFA;
}

.signature-wrap canvas {
  display: block;
  width: 100%;
  cursor: crosshair;
  touch-action: none;
}

.signature-controls {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 7px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(123,110,166,0.25);
}
.btn-primary:hover {
  background: #6B5E96;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(123,110,166,0.3);
}

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

.btn-ghost {
  background: transparent;
  color: var(--muted);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); }

.btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--border);
}
.btn-danger:hover { background: #FEF2F2; border-color: var(--danger); }

.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
.btn-lg { padding: 0.85rem 1.75rem; font-size: 1rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ── Alerts / Toasts ────────────────────────────────────────── */
.alert {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.alert-success { background: var(--success-light); color: var(--success); border: 1px solid #B6DDD0; }
.alert-warning { background: var(--warning-light); color: var(--warning); border: 1px solid #F0CFA8; }
.alert-error { background: #FEF2F2; color: var(--danger); border: 1px solid #FECACA; }
.alert-info { background: var(--accent-light); color: var(--accent); border: 1px solid #C4BAE8; }

.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.toast {
  background: var(--text);
  color: white;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.2s ease;
  max-width: 300px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }

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

/* ── Loading ────────────────────────────────────────────────── */
.loading-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.875rem;
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

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

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead th {
  text-align: left;
  padding: 0.65rem 0.85rem;
  background: var(--bg);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

tbody td {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--bg); }

/* ── Status Pills ───────────────────────────────────────────── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.pill-success { background: var(--success-light); color: var(--success); }
.pill-warning { background: var(--warning-light); color: var(--warning); }
.pill-neutral { background: var(--bg); color: var(--muted); border: 1px solid var(--border); }
.pill-accent  { background: var(--accent-light); color: var(--accent); }

/* ── Form Submit Area ───────────────────────────────────────── */
.form-actions {
  position: sticky;
  bottom: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 -1px;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 -4px 12px rgba(0,0,0,0.04);
}

/* ── Person selector card ───────────────────────────────────── */
.person-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.person-card {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}
.person-card:hover { border-color: var(--accent); box-shadow: 0 2px 8px rgba(123,110,166,0.1); }
.person-card.selected { border-color: var(--accent); background: var(--accent-light); }

.person-card-name { font-weight: 600; font-size: 0.9rem; margin-bottom: 0.2rem; }
.person-card-id { font-size: 0.75rem; color: var(--muted); }

/* ── Goal tags ──────────────────────────────────────────────── */
.goal-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.goal-tag {
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  font-size: 0.8rem;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: all var(--transition);
  background: var(--surface);
}
.goal-tag:hover { border-color: var(--success); color: var(--success); }
.goal-tag.active { border-color: var(--success); background: var(--success-light); color: var(--success); font-weight: 500; }

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

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
}

.stat-value { font-size: 1.8rem; font-family: 'DM Serif Display', serif; line-height: 1; }
.stat-label { font-size: 0.75rem; color: var(--muted); margin-top: 0.3rem; font-weight: 500; }

/* ── Print styles ───────────────────────────────────────────── */
@media print {
  .topbar, .no-print { display: none !important; }
  body { background: white; }
  .card, .form-section { box-shadow: none; border: 1px solid #ddd; }
  .main-content { max-width: 100%; padding: 0; }
}

/* ── Utility ────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.85rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* ============================================================
   Responsive Styles — Tablet (≤768px) and Mobile (≤480px)
   ============================================================ */

/* ── Tablet (≤768px) ─────────────────────────────────────────── */
@media (max-width: 768px) {

  /* Topbar: stack brand on top, nav+user below */
  .topbar-inner {
    height: auto;
    flex-wrap: wrap;
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }

  .topbar-brand {
    flex: 1 0 100%;
    justify-content: flex-start;
  }

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

  .topbar-user {
    flex-shrink: 0;
  }

  .nav-btn {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
  }

  /* Main content */
  .main-content {
    padding: 1.25rem 1rem 3rem;
  }

  /* Stat grid: 2 columns on tablet */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Form actions: wrap on tablet */
  .form-actions {
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  /* Admin tabs: wrap */
  .admin-tab {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
  }

  /* Page header */
  .page-header h2 { font-size: 1.5rem; }

  /* Login card */
  .login-card {
    padding: 2.5rem 2rem;
  }
}

/* ── Mobile (≤480px) ─────────────────────────────────────────── */
@media (max-width: 480px) {

  html { font-size: 15px; }

  /* Topbar: compact single-column */
  .topbar-inner {
    padding: 0.5rem 0.75rem;
  }

  .brand-sub { display: none; }

  /* Nav: horizontal scroll on very small screens */
  .topbar-nav {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: calc(100vw - 120px);
  }
  .topbar-nav::-webkit-scrollbar { display: none; }

  .nav-btn {
    white-space: nowrap;
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    flex-shrink: 0;
  }

  /* Hide sign out text on very small screens, keep button */
  .btn-signout {
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
  }

  /* User chip: compact */
  .user-chip {
    padding: 0.2rem 0.5rem 0.2rem 0.3rem;
    font-size: 0.75rem;
  }
  #userName { display: none; }

  /* Main content */
  .main-content {
    padding: 1rem 0.75rem 5rem;
  }

  /* Page header */
  .page-header { margin-bottom: 1.25rem; }
  .page-header h2 { font-size: 1.3rem; }
  .page-header p  { font-size: 0.8rem; }

  /* Form sections */
  .form-section {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  /* All two-column form rows stack */
  .form-row {
    grid-template-columns: 1fr !important;
  }

  /* Stat grid: 2 columns still, but smaller */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.6rem;
  }
  .stat-value { font-size: 1.5rem; }
  .stat-label { font-size: 0.7rem; }

  /* Cards */
  .card-header { padding: 0.75rem 1rem; }
  .card-body   { padding: 1rem; }

  /* Tables: horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  table { min-width: 480px; }
  thead th, tbody td {
    padding: 0.55rem 0.65rem;
    font-size: 0.8rem;
  }

  /* Form actions: stack vertically */
  .form-actions {
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1rem;
    gap: 0.5rem;
  }
  .form-actions .flex {
    flex-direction: column;
    gap: 0.5rem;
  }
  .form-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .btn-lg {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }

  /* Modals: full screen */
  #vrModal { padding: 0 !important; }
  #vrModalBody {
    border-radius: 0 !important;
    min-height: 100vh;
    margin: 0 !important;
    max-width: 100% !important;
  }
  #editPersonModal > div,
  #editManagerModal > div,
  #editRTModal > div {
    border-radius: 0 !important;
    max-width: 100% !important;
    max-height: 100vh !important;
    margin: 0 !important;
  }

  /* Login screen */
  .login-screen { padding: 1rem; }
  .login-card {
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
  }
  .login-logo { width: 52px; height: 52px; font-size: 1.5rem; }
  .login-card h1 { font-size: 1.4rem; }

  /* Admin tabs: wrap and shrink */
  .admin-tab {
    font-size: 0.75rem;
    padding: 0.3rem 0.55rem;
  }

  /* Person cards grid */
  .person-cards {
    grid-template-columns: 1fr 1fr;
  }

  /* Radio/check groups: wrap tighter */
  .radio-group, .check-group {
    gap: 0.35rem;
  }
  .radio-option, .check-option {
    padding: 0.35rem 0.6rem;
    font-size: 0.8rem;
  }

  /* Toast: full width at bottom */
  .toast-container {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 1rem;
  }
  .toast { max-width: 100%; }

  /* Submit confirm modal */
  #submitConfirmModal > div {
    border-radius: var(--radius) !important;
    margin: 1rem !important;
    max-width: calc(100% - 2rem) !important;
  }
}

/* ============================================================
   Urehca Platform — Additional Styles
   ============================================================ */

/* ── Org-driven theme variables (set dynamically via JS) ───── */
/* These override the defaults above when an org has custom colors */
:root {
  --org-primary:  var(--accent);
  --org-accent:   var(--warning);
}

/* ── Super Admin Panel ──────────────────────────────────────── */
.superadmin-badge {
  background: #B84646;
  color: white;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 20px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.org-status-active   { color: var(--success); font-weight: 600; }
.org-status-trial    { color: var(--warning); font-weight: 600; }
.org-status-disabled { color: var(--danger);  font-weight: 600; }
.org-status-expired  { color: var(--danger);  font-weight: 600; }

/* ── New Report Form — Section headers ──────────────────────── */
.form-section-title {
  font-family: 'DM Serif Display', serif;
  font-size: 1rem;
  color: var(--accent);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.4rem;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Repeating table rows (assessments, activities, visitors) ─ */
.repeating-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}
.repeating-table th {
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
  padding: 0.5rem 0.65rem;
  text-align: left;
  border: 1px solid var(--border);
  font-size: 0.8rem;
}
.repeating-table td {
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  vertical-align: top;
}
.repeating-table td input,
.repeating-table td select,
.repeating-table td textarea {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 0.875rem;
  font-family: inherit;
  padding: 0.2rem;
  resize: none;
}
.repeating-table td input:focus,
.repeating-table td select:focus,
.repeating-table td textarea:focus {
  outline: 1px solid var(--border-focus);
  border-radius: 4px;
  background: var(--surface);
}
.repeating-table .row-delete {
  color: var(--danger);
  cursor: pointer;
  background: none;
  border: none;
  font-size: 1rem;
  padding: 0.2rem 0.4rem;
}

/* ── Goal rows ───────────────────────────────────────────────── */
.goal-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  background: var(--surface);
}
.goal-row-header {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.goal-row-text {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
  line-height: 1.5;
}
.goal-row-fields {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.5rem 1rem;
  align-items: start;
}
.goal-checkboxes {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.goal-checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  cursor: pointer;
}

/* ── Login screen org branding ───────────────────────────────── */
.login-org-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: contain;
  margin: 0 auto 1rem;
  display: block;
}
.login-org-tagline {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* ── Status badges for reports ───────────────────────────────── */
.badge-draft     { background: var(--border);         color: var(--muted);   }
.badge-submitted { background: var(--success-light);  color: var(--success); }
.badge-locked    { background: var(--accent-light);   color: var(--accent);  }

/* ── Section number bubbles ──────────────────────────────────── */
.section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}
