/* ══════════════════════════════════════════════════════════════
   ACen 2026 Guest Services Portal - Styles
   ══════════════════════════════════════════════════════════════ */

:root {
  --navy: #1a2744;
  --navy-dark: #111c33;
  --navy-light: #243556;
  --accent: #4a90d9;
  --accent-hover: #3a7bc8;
  --accent-light: #e8f0fe;
  --success: #2ecc71;
  --warning: #f39c12;
  --danger: #e74c3c;
  --emergency: #c0392b;
  --text: #2c3e50;
  --text-muted: #7f8c8d;
  --text-light: #bdc3c7;
  --bg: #f0f2f5;
  --bg-card: #ffffff;
  --border: #e1e4e8;
  --border-light: #f0f0f0;
  --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;
  --transition: 0.2s ease;
  --ss-cat-operations: #1565c0;
  --ss-cat-lounges: #00838f;
  --ss-cat-autographs: #4527a0;
  --ss-cat-events: #c62828;
  --ss-cat-logistics: #2e7d32;
  --ss-cat-floater: #ef6c00;
  --ss-cat-dining: #4e342e;
  --ss-cat-leadership: #37474f;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Login Page ── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
}

.login-container {
  width: 100%;
  max-width: 420px;
  padding: 1rem;
}

.login-banner {
  text-align: center;
  margin-bottom: 1.5rem;
}

.login-banner img {
  width: 100%;
  max-width: 380px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.login-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow-lg);
}

.login-card h1 {
  font-size: 1.5rem;
  color: var(--navy);
  text-align: center;
  margin-bottom: 0.25rem;
}

.login-subtitle {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

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

.login-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 1.5rem;
}

/* ── Header / Banner ── */

.site-header {
  background: var(--navy-dark);
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.banner-wrap {
  position: relative;
  width: 100%;
  max-height: 180px;
  overflow: hidden;
}

.banner-compact {
  max-height: 100px;
}

.banner-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  object-position: center;
}

.banner-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.5rem;
  background: linear-gradient(transparent, rgba(17, 28, 51, 0.85));
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.banner-overlay h1 {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  text-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.banner-year {
  color: var(--accent);
  font-size: 1.1rem;
  font-weight: 600;
}

/* ── Navigation ── */

.main-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  background: var(--navy);
  border-top: 1px solid rgba(255,255,255,0.08);
  flex-wrap: wrap;
}

.nav-tabs {
  display: flex;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.75rem 1rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  color: rgba(255,255,255,0.65);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
}

.nav-tab:hover {
  color: #fff;
  background: rgba(255,255,255,0.05);
}

.nav-tab.active {
  color: #fff;
  border-bottom-color: var(--accent);
}

.tab-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
}

.user-greeting {
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
}

.user-role-badge {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.role-admin {
  background: var(--danger);
  color: #fff;
}

.role-lead {
  background: var(--warning);
  color: #fff;
}

.role-staff {
  background: var(--accent);
  color: #fff;
}

/* ── Main Content ── */

.portal-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  min-height: calc(100vh - 300px);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.25s ease;
}

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

.tab-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.tab-header h2 {
  font-size: 1.35rem;
  color: var(--navy);
}

.department-guide-intro {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: -0.5rem 0 1rem;
  max-width: 42rem;
}

/* Guest Services Overview Training */
.guest-services-training {
  max-width: 48rem;
}

.gst-tab-intro {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: -0.35rem 0 1rem;
}

.gst-step.hidden {
  display: none;
}

.gst-card h3 {
  margin-top: 0;
}

.gst-small {
  font-size: 0.88rem;
  margin-top: 0;
}

.gst-sticky-actions {
  position: sticky;
  top: 0.5rem;
  z-index: 5;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
}

.gst-sticky-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
}

.gst-ack-label {
  flex: 1 1 220px;
  margin: 0;
}

.gst-study-card {
  margin-bottom: 1rem;
}

.gst-overview-lead {
  font-size: 0.92rem;
  line-height: 1.65;
  margin-top: 0;
  margin-bottom: 1.25rem;
}

.gst-acc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 0.85rem;
  background: var(--bg-card);
}

.gst-acc summary {
  cursor: pointer;
  padding: 0.75rem 0.95rem;
  font-weight: 600;
  color: var(--navy);
  list-style: none;
  line-height: 1.45;
}

.gst-acc summary::-webkit-details-marker {
  display: none;
}

.gst-acc-body {
  padding: 0.85rem 0.95rem 1rem;
  font-size: 0.9rem;
  line-height: 1.7;
  border-top: 1px solid var(--border);
  color: var(--text);
}

.gst-acc-body p {
  margin: 0 0 0.95rem;
}

.gst-acc-body p:last-child {
  margin-bottom: 0;
}

.gst-acc-body > ul:last-child,
.gst-acc-body > ol:last-child {
  margin-bottom: 0;
}

/* In-accordion topic labels (visual hierarchy without skipping heading levels) */
.gst-acc-subheading {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--navy);
  margin: 1.15rem 0 0.55rem;
  line-height: 1.35;
}

.gst-acc-body > .gst-acc-subheading:first-child {
  margin-top: 0;
}

.gst-acc-body ul,
.gst-acc-body ol {
  margin: 0.25rem 0 1rem;
  padding-left: 1.35rem;
}

.gst-acc-body li {
  margin-bottom: 0.55rem;
  padding-left: 0.15rem;
}

.gst-acc-body li:last-child {
  margin-bottom: 0;
}

.gst-acc-body ul.gst-tight li {
  margin-bottom: 0.35rem;
}

.gst-manual-frame {
  min-height: 50vh;
  margin-top: 0.75rem;
}

.gst-quiz-question {
  margin-bottom: 1.35rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.gst-quiz-question:last-of-type {
  border-bottom: none;
}

.gst-quiz-role {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.gst-quiz-qtext {
  font-weight: 600;
  margin-bottom: 0.5rem;
  line-height: 1.45;
}

.gst-quiz-options label {
  display: block;
  margin: 0.35rem 0;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  line-height: 1.4;
}

.gst-quiz-options label:hover {
  background: rgba(21, 101, 192, 0.06);
}

.gst-quiz-options input {
  margin-right: 0.5rem;
  vertical-align: middle;
}

.gst-result-pass {
  color: #166534;
}

.gst-result-fail {
  color: #b91c1c;
}

.department-guide-frame-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-card);
  min-height: 70vh;
}

.department-guide-iframe {
  display: block;
  width: 100%;
  height: min(78vh, 900px);
  min-height: 560px;
  border: none;
}

/* ── Cards ── */

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

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

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.card p {
  color: var(--text);
  line-height: 1.65;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.card-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

/* ── Announcements ── */

.announcement-card {
  border-left: 4px solid var(--border);
}

.announcement-card.priority-urgent {
  border-left-color: var(--danger);
  background: #fef5f5;
}

.announcement-card.priority-high {
  border-left-color: var(--warning);
  background: #fffbf0;
}

.announcement-card.priority-normal {
  border-left-color: var(--accent);
}

.announcement-card.priority-low {
  border-left-color: var(--text-light);
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--warning);
  letter-spacing: 0.05em;
}

.priority-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

.priority-badge.urgent { background: var(--danger); color: #fff; }
.priority-badge.high { background: var(--warning); color: #fff; }
.priority-badge.normal { background: var(--accent-light); color: var(--accent); }
.priority-badge.low { background: var(--bg); color: var(--text-muted); }

/* ── Schedule ── */

.schedule-day-group {
  margin-bottom: 1.5rem;
}

.schedule-day-header {
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  padding: 0.5rem 0;
  border-bottom: 2px solid var(--navy);
  margin-bottom: 0.75rem;
}

.schedule-event {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-light);
}

.schedule-event:last-child {
  border-bottom: none;
}

.event-time {
  min-width: 110px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
  padding-top: 0.1rem;
}

.event-details {
  flex: 1;
}

.event-details h4 {
  font-size: 0.95rem;
  margin-bottom: 0.15rem;
}

.event-details p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.event-category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  letter-spacing: 0.03em;
}

.cat-meeting { background: #e8f0fe; color: #2563eb; }
.cat-shift { background: #ecfdf5; color: #059669; }
.cat-training { background: #fef3c7; color: #d97706; }
.cat-event { background: #f3e8ff; color: #7c3aed; }
.cat-general { background: var(--bg); color: var(--text-muted); }

/* ── Training ── */

.training-card {
  cursor: pointer;
  transition: var(--transition);
}

.training-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.training-card.expanded {
  box-shadow: var(--shadow-lg);
}

.training-required {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--danger);
  color: #fff;
}

.training-category-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm);
  background: var(--accent-light);
  color: var(--accent);
}

.training-body {
  display: none;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  line-height: 1.75;
}

.training-body.visible {
  display: block;
  animation: fadeIn 0.2s ease;
}

.training-body h1, .training-body h2, .training-body h3 {
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  color: var(--navy);
}

.training-body h1 { font-size: 1.25rem; }
.training-body h2 { font-size: 1.1rem; }
.training-body h3 { font-size: 1rem; }

.training-body ul, .training-body ol {
  margin-left: 1.5rem;
  margin-bottom: 0.75rem;
}

.training-body li {
  margin-bottom: 0.25rem;
}

.training-body strong {
  color: var(--navy);
}

/* ── Dispatch ── */

.dispatch-card {
  border-left: 4px solid var(--border);
}

.dispatch-card.priority-emergency {
  border-left-color: var(--emergency);
  background: #fef5f5;
}

.dispatch-card.priority-high {
  border-left-color: var(--warning);
  background: #fffbf0;
}

.dispatch-card.priority-normal {
  border-left-color: var(--accent);
}

.dispatch-status {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
}

.status-open { background: var(--success); color: #fff; }
.status-acknowledged { background: var(--warning); color: #fff; }
.status-dispatched { background: #2563eb; color: #fff; }
.status-resolved { background: var(--text-light); color: #fff; }

/* ── Filters ── */

.schedule-filters, .dispatch-filters {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.35rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
}

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

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Forms ── */

.form-container {
  margin-bottom: 1.25rem;
}

.form-card {
  border: 2px solid var(--accent);
}

.form-group {
  margin-bottom: 0.85rem;
}

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

.checkbox-label {
  display: flex !important;
  align-items: center;
  gap: 0.4rem;
  padding-top: 1.5rem;
  cursor: pointer;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
  background: var(--bg-card);
  color: var(--text);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

.form-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.input-sm {
  padding: 0.3rem 0.5rem !important;
  font-size: 0.8rem !important;
  width: 140px !important;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.25rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  gap: 0.35rem;
}

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

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

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover {
  background: #27ae60;
  color: #fff;
}

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

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

.btn-danger {
  background: var(--danger);
  color: #fff;
}

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

.btn-sm {
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
}

.btn-full {
  width: 100%;
}

/* ── Modal ── */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Native [hidden] loses to .modal { display:flex } without this; Close then cannot hide the overlay. */
.modal[hidden] {
  display: none !important;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  z-index: 1;
}

.admin-training-modal .modal-content {
  max-width: min(880px, 94vw);
}

.reply-thread {
  margin-bottom: 1rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 0.5rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.reply-item {
  padding: 0.5rem;
  border-bottom: 1px solid var(--border-light);
}

.reply-item:last-child {
  border-bottom: none;
}

.reply-sender {
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--navy);
}

.reply-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-left: 0.5rem;
}

.reply-text {
  font-size: 0.9rem;
  margin-top: 0.2rem;
}

/* ── Table ── */

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

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

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

.data-table td {
  padding: 0.65rem 0.75rem;
  border-bottom: 1px solid var(--border-light);
  vertical-align: middle;
}

.data-table code {
  background: var(--bg);
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
}

.actions-cell {
  white-space: nowrap;
}

/* ── Alerts ── */

.alert {
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.alert-error {
  background: #fef5f5;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.alert-success {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* ── Utilities ── */

.hidden {
  display: none !important;
}

.loading-spinner {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.empty-state h3 {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

/* ── Footer ── */

.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--text-muted);
  font-size: 0.8rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .banner-wrap {
    max-height: 100px;
  }

  .banner-overlay h1 {
    font-size: 1rem;
  }

  .main-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-tabs {
    order: 2;
    justify-content: center;
  }

  .nav-user {
    order: 1;
    justify-content: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
  }

  .nav-tab {
    padding: 0.6rem 0.75rem;
    font-size: 0.8rem;
  }

  .tab-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

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

  .schedule-event {
    flex-direction: column;
    gap: 0.25rem;
  }

  .event-time {
    min-width: unset;
  }

  .admin-user-form .form-row {
    grid-template-columns: 1fr;
  }

  .data-table {
    font-size: 0.8rem;
  }

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

  .input-sm {
    width: 100% !important;
  }
}

/* ── 2026 Guest Services Schedule (read-only, shift scheduler style) ── */

.schedule-subnav {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
  padding: 0.25rem;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.schedule-subtab {
  padding: 0.55rem 1rem;
  border: none;
  background: transparent;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.schedule-subtab:hover {
  color: var(--navy);
  background: var(--accent-light);
}

.schedule-subtab.active {
  color: #fff;
  background: var(--navy);
  font-weight: 600;
}

.schedule-pane.tab-header-inner,
.tab-header-inner {
  margin-top: 0;
}

.schedule-pane-title {
  font-size: 1.05rem;
  color: var(--navy);
  margin: 0;
}

.shift-readonly-banner {
  font-size: 0.82rem;
  color: #1565c0;
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin-bottom: 0.85rem;
  line-height: 1.45;
}

.shift-readonly-banner code {
  font-size: 0.78rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.shift-day-stats {
  display: flex;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.5rem 0 0.75rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.shift-day-stats strong {
  color: var(--text);
}

.shift-schedule-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  margin: 0 0 0.65rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.shift-person-filter-label {
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}

.shift-person-filter-select {
  min-width: min(100%, 18rem);
  max-width: 100%;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-body, #fff);
  color: var(--text);
}

.shift-schedule-download-btn {
  margin-left: auto;
  flex-shrink: 0;
}

.shift-team-hours-panel {
  font-size: 0.82rem;
  line-height: 1.45;
}

.shift-team-hours-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
  max-width: 52rem;
}

.shift-team-hours-hint code {
  font-size: 0.72rem;
  background: rgba(26, 39, 68, 0.06);
  padding: 0.08rem 0.3rem;
  border-radius: 4px;
}

.shift-team-hours-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  box-shadow: var(--shadow);
  max-width: 100%;
}

.shift-team-hours-unavailable {
  margin: 0;
  font-size: 0.7rem;
  color: var(--text-muted);
}

.shift-team-hours-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.shift-team-hours-table th,
.shift-team-hours-table td {
  padding: 0.15rem 0.2rem;
  text-align: right;
  border-bottom: 1px solid var(--border);
}

.shift-team-hours-table th[scope='row'],
.shift-team-hours-table .shift-hours-col-name {
  text-align: left;
  font-weight: 600;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shift-team-hours-table thead th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.shift-team-hours-table tbody th {
  font-weight: 500;
}

.shift-hours-totals-row th,
.shift-hours-totals-row td {
  border-bottom: none;
  padding-top: 0.35rem;
  font-size: 0.73rem;
  color: var(--navy);
}

.shift-day-tabs {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0.25rem;
}

.shift-day-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.shift-day-tab:hover {
  color: var(--navy);
  background: rgba(26, 39, 68, 0.06);
}

.shift-day-tab.active {
  color: var(--navy);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.shift-schedule-content {
  min-height: 120px;
}

.shift-category-section {
  margin-bottom: 1.5rem;
}

.shift-category-header {
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-left: 4px solid var(--ss-cat-operations);
  background: var(--bg-card);
  border-radius: var(--radius);
  margin-bottom: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.shift-cat-badge {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 10px;
  color: #fff;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.shift-grid-ro {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 0.65rem;
}

.shift-card-ro {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.shift-card-ro-header {
  padding: 0.55rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

.shift-card-ro-title {
  font-weight: 600;
  font-size: 0.88rem;
  line-height: 1.35;
}

.shift-card-ro-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.shift-badge-am {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #e3f2fd;
  color: #1565c0;
  flex-shrink: 0;
}

.shift-badge-pm {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f3e5f5;
  color: #6a1b9a;
  flex-shrink: 0;
}

.shift-badge-na {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  background: #f0f0f0;
  color: #757575;
  flex-shrink: 0;
}

.shift-card-ro-body {
  padding: 0.55rem 0.75rem 0.65rem;
}

.shift-slot-ro {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
}

.shift-slot-ro:last-child {
  margin-bottom: 0;
}

.shift-slot-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e8eaf6;
  color: var(--navy);
  font-size: 0.68rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.shift-slot-name {
  flex: 1;
  padding: 0.35rem 0.5rem;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
}

/* ── Admin panel ── */
.admin-flash {
  margin-bottom: 1rem;
}

.admin-help {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: -0.25rem 0 0.75rem;
  line-height: 1.45;
}

.admin-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.65rem 1.25rem;
}

.admin-tab-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 500;
}

.admin-users-table .form-row {
  display: flex;
  flex-wrap: wrap;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.shift-admin-banner {
  background: #fff8e1;
  border-color: #ffe082;
  color: #5d4037;
}

.shift-admin-toolbar {
  margin-bottom: 0.75rem;
}

.shift-add-panel {
  margin-bottom: 1rem;
}

.shift-add-panel h3 {
  margin-top: 0;
  font-size: 1rem;
}

.form-hint {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: -0.25rem 0 0.5rem;
}

.shift-card-editable .shift-card-editable-fields {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  flex: 1;
  min-width: 0;
}

.shift-card-editable .shift-field-category {
  max-width: 220px;
}

.shift-card-editable .shift-field-title,
.shift-card-editable .shift-field-time {
  width: 100%;
  max-width: 100%;
}

.shift-card-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--border);
}

.shift-slot-editable .shift-slot-input {
  flex: 1;
  min-width: 0;
}
