/* ==========================================================================
   HPI Gala 2026 — Admin Dashboard Stylesheet
   Aesthetic: Same luxury ivory/olive/gold palette as registration,
   adapted for a data-dense admin interface.
   ========================================================================== */

/* --------------------------------------------------------------------------
   0. FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Playfair+Display:wght@700&display=swap');

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS
   All spacing on 8px baseline grid. No magic numbers.
   -------------------------------------------------------------------------- */
:root {
  /* --- Color Palette --- */
  --color-ivory:        #FAF6F0;
  --color-white:        #FFFFFF;
  --color-olive:        #5C6B4F;
  --color-olive-dark:   #3D4A34;
  --color-gold:         #C9A96E;
  --color-gold-dark:    #B89B5E;
  --color-text:         #2C2C2C;
  --color-text-light:   #6B6B6B;
  --color-error:        #C04040;
  --color-success:      #4A7C59;
  --color-border:       rgba(0, 0, 0, 0.10);
  --color-border-hover: rgba(0, 0, 0, 0.20);
  --color-focus-glow:   rgba(201, 169, 110, 0.30);
  --color-overlay:      rgba(44, 44, 44, 0.55);
  --color-hover-row:    rgba(255, 255, 255, 0.7);

  /* --- Typography --- */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --text-xs:   clamp(0.6875rem, 0.65rem + 0.2vw, 0.75rem);     /* 11–12px */
  --text-sm:   clamp(0.75rem, 0.7rem + 0.25vw, 0.8125rem);      /* 12–13px */
  --text-base: clamp(0.8125rem, 0.78rem + 0.2vw, 0.875rem);     /* 13–14px */
  --text-lg:   clamp(0.875rem, 0.82rem + 0.3vw, 1rem);          /* 14–16px */
  --text-xl:   clamp(1.125rem, 1rem + 0.5vw, 1.25rem);          /* 18–20px */
  --text-2xl:  clamp(1.5rem, 1.2rem + 1.2vw, 2rem);             /* 24–32px */

  /* --- Spacing (8px baseline) --- */
  --space-0:  0.25rem;   /* 4px  — half-grid for tight spots */
  --space-1:  0.5rem;    /* 8px  */
  --space-2:  1rem;      /* 16px */
  --space-3:  1.5rem;    /* 24px */
  --space-4:  2rem;      /* 32px */
  --space-5:  2.5rem;    /* 40px */
  --space-6:  3rem;      /* 48px */
  --space-8:  4rem;      /* 64px */

  /* --- Surfaces --- */
  --radius-sm:   0.375rem;  /* 6px  */
  --radius-md:   0.75rem;   /* 12px */
  --radius-full: 50%;

  --shadow-card:    0 0.0625rem 0.1875rem rgba(0, 0, 0, 0.05);
  --shadow-card-hover: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
  --shadow-lifted:  0 0.5rem 2rem rgba(0, 0, 0, 0.12);
  --shadow-toast:   0 0.5rem 1.5rem rgba(0, 0, 0, 0.18);

  /* --- Layout --- */
  --container-max: 72rem;  /* 1152px */

  /* --- Motion --- */
  --ease-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --duration:  0.2s;
  --duration-slow: 0.3s;
}


/* --------------------------------------------------------------------------
   2. RESET
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.5;
  color: var(--color-text);
  background-color: var(--color-ivory);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

img, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

table {
  border-collapse: collapse;
  width: 100%;
}


/* --------------------------------------------------------------------------
   3. DASHBOARD HEADER
   Sticky olive bar. Flex layout: brand left, actions right.
   -------------------------------------------------------------------------- */
.dash-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-olive);
  color: var(--color-white);
}

.dash-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: var(--space-1) var(--space-3);
  gap: var(--space-2);
}

.dash-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  text-decoration: none;
  color: inherit;
}

.dash-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-full);
  background-color: var(--color-white);
  color: var(--color-olive);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.dash-header__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  line-height: 1.2;
  color: var(--color-white);
}

.dash-header__sub {
  font-size: var(--text-xs);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.3;
}

.dash-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}


/* --------------------------------------------------------------------------
   4. BUTTONS
   Base + variants. All use Inter 500. No full-width destructive buttons.
   -------------------------------------------------------------------------- */
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-0);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  line-height: 1;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  border: 0.0625rem solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out),
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out),
    transform var(--duration) var(--ease-out);
}

.dash-btn:active {
  transform: scale(0.98);
}

.dash-btn:focus-visible {
  outline: 0.125rem solid var(--color-gold);
  outline-offset: 0.125rem;
}

.dash-btn--primary {
  background-color: var(--color-olive);
  color: var(--color-white);
  border-color: var(--color-olive);
}

.dash-btn--primary:hover {
  background-color: var(--color-olive-dark);
  border-color: var(--color-olive-dark);
}

.dash-btn--ghost {
  background-color: transparent;
  color: var(--color-white);
  border-color: rgba(255, 255, 255, 0.4);
}

.dash-btn--ghost:hover {
  background-color: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.7);
}

.dash-btn--danger {
  background-color: transparent;
  color: var(--color-error);
  border-color: var(--color-error);
  padding: var(--space-0) var(--space-1);
  font-size: var(--text-xs);
}

.dash-btn--danger:hover {
  background-color: var(--color-error);
  color: var(--color-white);
}

.dash-btn--sm {
  padding: var(--space-0) var(--space-1);
  font-size: var(--text-xs);
}


/* --------------------------------------------------------------------------
   5. STAT CARDS
   Horizontal flex, subtle background lift (not bordered boxes).
   Clickable with hover shadow increase. Gold left border when active.
   -------------------------------------------------------------------------- */
.stat-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  padding: var(--space-2) var(--space-3);
  max-width: var(--container-max);
  margin-inline: auto;
  border-bottom: 0.0625rem solid var(--color-border);
}

.stat-card {
  flex: 0 1 auto;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.375rem;
  min-width: 7rem;
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  border-right: 0.0625rem solid var(--color-border);
  transition: background-color var(--duration) var(--ease-out);
}

.stat-card:last-child {
  border-right: none;
}

.stat-card:hover {
  background-color: rgba(92, 107, 79, 0.04);
}

.stat-card.active {
  background-color: rgba(201, 169, 110, 0.08);
}

.stat-card__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-2xl);
  color: var(--color-olive);
  line-height: 1.2;
}

.stat-card__label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}


/* --------------------------------------------------------------------------
   6. TAB BAR
   Horizontal scrollable tab row. Active tab fills olive.
   -------------------------------------------------------------------------- */
.tab-bar {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x mandatory;
  gap: 0.125rem;
  padding: 0.25rem;
  background-color: rgba(92, 107, 79, 0.06);
  border-radius: 100vw;
  margin-top: var(--space-4);
  margin-bottom: var(--space-2);
  width: max-content;
  max-width: 100%;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab {
  scroll-snap-align: start;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-olive);
  padding: var(--space-1) var(--space-2);
  border: none;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 100vw;
  transition:
    background-color var(--duration) var(--ease-out),
    color var(--duration) var(--ease-out);
}

.tab:hover {
  background-color: rgba(92, 107, 79, 0.08);
}

.tab:focus-visible {
  outline: 0.125rem solid var(--color-gold);
  outline-offset: -0.125rem;
}

.tab.active {
  background-color: var(--color-olive);
  color: var(--color-white);
  box-shadow: var(--shadow-card);
}


/* --------------------------------------------------------------------------
   7. CONTROLS: SEARCH + FILTER ROW
   -------------------------------------------------------------------------- */
.dash-controls {
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 var(--space-3);
}

.dash-search {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  padding: var(--space-2) 0;
}

.dash-search__field {
  flex: 1;
  position: relative;
}

.search-icon {
  position: absolute;
  left: var(--space-1);
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-light);
  pointer-events: none;
  width: 1rem;
  height: 1rem;
}

.search-input {
  width: 100%;
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-4);
  font-size: var(--text-base);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.search-input::placeholder {
  color: var(--color-text-light);
}

.search-input:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

.filter-select {
  padding: var(--space-1) var(--space-2) var(--space-1) var(--space-1);
  font-size: var(--text-base);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-1) center;
  cursor: pointer;
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.filter-select:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}


/* --------------------------------------------------------------------------
   8. TABLE WRAP — Horizontal scroll container with fade edge
   -------------------------------------------------------------------------- */
.table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: var(--container-max);
  margin-inline: auto;
  padding: 0 var(--space-3);
}

.table-wrap::after {
  content: '';
  position: sticky;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--space-4);
  background: linear-gradient(to left, var(--color-ivory), transparent);
  pointer-events: none;
  flex-shrink: 0;
}


/* --------------------------------------------------------------------------
   9. DATA TABLE
   Clean, minimal. No zebra striping. Subtle hover highlight.
   -------------------------------------------------------------------------- */
.dash-table {
  width: 100%;
  font-size: var(--text-sm);
}

.dash-table thead th {
  position: sticky;
  top: 0;
  background-color: var(--color-ivory);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  color: var(--color-olive);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: left;
  padding: var(--space-1) var(--space-2);
  border-bottom: 0.0625rem solid var(--color-border);
  white-space: nowrap;
}

.dash-table th[data-sort] {
  cursor: pointer;
  user-select: none;
}

.dash-table th[data-sort]:hover {
  color: var(--color-olive-dark);
}

.sort-arrow {
  display: inline-block;
  margin-left: var(--space-0);
  font-size: var(--text-xs);
  opacity: 0.4;
  transition: opacity var(--duration) var(--ease-out);
}

.dash-table th[data-sort]:hover .sort-arrow {
  opacity: 1;
}

.dash-table tbody tr {
  border-bottom: 0.0625rem solid var(--color-border);
  transition: background-color var(--duration) var(--ease-out);
}

.dash-table tbody tr:hover {
  background-color: var(--color-hover-row);
}

.dash-table td {
  padding: 0.75rem var(--space-2);
  vertical-align: middle;
}

.dash-table .col-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

/* Compact variant — tighter row padding for dense views */
.dash-table--compact td {
  padding: var(--space-0) var(--space-1);
}

.dash-table--compact thead th {
  padding: var(--space-0) var(--space-1);
}


/* --------------------------------------------------------------------------
   10. TAB PANELS
   -------------------------------------------------------------------------- */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
  animation: fadeIn var(--duration-slow) var(--ease-out);
}


/* --------------------------------------------------------------------------
   11. EMPTY STATE
   -------------------------------------------------------------------------- */
.empty-state {
  text-align: center;
  padding: var(--space-6) var(--space-3);
  color: var(--color-text-light);
  font-style: italic;
  font-size: var(--text-base);
}


/* --------------------------------------------------------------------------
   12. GROUPED CONTENT (Flights, Mahjong, etc.)
   -------------------------------------------------------------------------- */
.group {
  padding: var(--space-2) 0 var(--space-1);
}

.group + .group {
  border-top: 0.0625rem solid var(--color-border);
}

.group__heading {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-olive);
  margin-bottom: var(--space-1);
}

.group__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-xs);
  background-color: var(--color-olive);
  color: var(--color-white);
  border-radius: 100vw;
  padding: 0.0625rem 0.5rem;
  min-width: 1.25rem;
  line-height: 1.4;
}

.group__items {
  list-style: none;
}

/* Group tables inherit tight spacing */
.group .dash-table {
  margin-bottom: 0;
}

/* Subheader row inside a single table — replaces separate tables per group */
.group-subheader td {
  padding-top: var(--space-3) !important;
  padding-bottom: var(--space-1) !important;
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  color: var(--color-olive);
  border-bottom: 0.125rem solid var(--color-olive);
  background: transparent;
}

.group-subheader:first-child td {
  padding-top: var(--space-1) !important;
}

.group-subheader .group__count {
  vertical-align: middle;
}


/* --------------------------------------------------------------------------
   13. SUMMARY CARDS (Hotel, Dietary, Mahjong aggregates)
   -------------------------------------------------------------------------- */
.summary-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin: 0 auto var(--space-3);
  border-bottom: 0.0625rem solid var(--color-border);
  padding: 0 var(--space-3) var(--space-2);
  max-width: var(--container-max);
}

.summary-stat {
  flex: 0 0 auto;
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
  padding: var(--space-1) 0;
}

.summary-stat__value {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--color-olive);
  line-height: 1.2;
}

.summary-stat__label {
  font-size: var(--text-xs);
  color: var(--color-text-light);
}


/* --------------------------------------------------------------------------
   14. DETAIL MODAL — Native <dialog>
   -------------------------------------------------------------------------- */
dialog.detail-modal {
  border: none;
  border-radius: var(--radius-md);
  background-color: var(--color-white);
  max-width: 37.5rem;  /* 600px */
  width: calc(100% - var(--space-4));
  max-height: calc(100vh - var(--space-8));
  padding: 0;
  box-shadow: var(--shadow-lifted);
  overflow: hidden;
}

dialog.detail-modal::backdrop {
  background-color: var(--color-overlay);
}

dialog.detail-modal[open] {
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) var(--space-3);
  border-bottom: 0.0625rem solid var(--color-border);
}

.modal-header h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
  color: var(--color-text);
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-sm);
  font-size: var(--text-lg);
  color: var(--color-text-light);
  transition: background-color var(--duration) var(--ease-out);
}

.modal-close:hover {
  background-color: rgba(0, 0, 0, 0.06);
}

.modal-body {
  padding: var(--space-3);
  overflow-y: auto;
  max-height: calc(100vh - 14rem);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-1);
  padding: var(--space-2) var(--space-3);
  border-top: 0.0625rem solid var(--color-border);
}

/* Modal form fields — matches registration form styling */
.modal-field {
  margin-bottom: var(--space-2);
}

.modal-label {
  display: block;
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text);
  margin-bottom: var(--space-0);
}

.modal-input,
.modal-select,
.modal-textarea {
  width: 100%;
  padding: var(--space-1);
  font-size: var(--text-base);
  border: 0.0625rem solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  transition:
    border-color var(--duration) var(--ease-out),
    box-shadow var(--duration) var(--ease-out);
}

.modal-input:focus,
.modal-select:focus,
.modal-textarea:focus {
  outline: none;
  border-color: var(--color-gold);
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}

.modal-textarea {
  min-height: 5rem;
  resize: vertical;
}

.modal-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B6B6B' d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-1) center;
  padding-right: var(--space-4);
  cursor: pointer;
}


/* --------------------------------------------------------------------------
   15. INLINE EDITABLE FIELDS
   -------------------------------------------------------------------------- */
.editable {
  cursor: pointer;
  border-bottom: 0.0625rem dashed transparent;
  transition: border-color var(--duration) var(--ease-out);
}

.editable:hover {
  border-bottom-color: var(--color-gold);
}

.editable::after {
  content: ' ✎';
  font-size: var(--text-xs);
  color: var(--color-text-light);
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.editable:hover::after {
  opacity: 0.6;
}

.editable.editing {
  border-bottom-color: transparent;
}

.editable.editing::after {
  display: none;
}

.editable.editing .editable__text {
  display: none;
}

.editable.editing .editable__input {
  display: inline-block;
}

.editable__input {
  display: none;
  padding: var(--space-0);
  font-size: inherit;
  border: 0.0625rem solid var(--color-gold);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  box-shadow: 0 0 0 0.1875rem var(--color-focus-glow);
}


/* --------------------------------------------------------------------------
   16. TOAST NOTIFICATIONS
   -------------------------------------------------------------------------- */
.toast {
  position: fixed;
  bottom: var(--space-3);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  padding: var(--space-1) var(--space-3);
  border-radius: 100vw;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-white);
  background-color: var(--color-text);
  box-shadow: var(--shadow-toast);
  animation: slideUp var(--duration-slow) var(--ease-out);
  pointer-events: auto;
}

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

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


/* --------------------------------------------------------------------------
   17. STATUS BADGES — Small inline pills
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.0625rem 0.375rem;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.4;
  border-radius: 100vw;
  white-space: nowrap;
  vertical-align: middle;
}

.badge--olive {
  background-color: rgba(92, 107, 79, 0.12);
  color: var(--color-olive-dark);
}

.badge--gold {
  background-color: rgba(201, 169, 110, 0.15);
  color: var(--color-gold-dark);
}

.badge--muted {
  background-color: rgba(0, 0, 0, 0.06);
  color: var(--color-text-light);
}

.badge--danger {
  background-color: rgba(192, 64, 64, 0.1);
  color: var(--color-error);
}


/* --------------------------------------------------------------------------
   18. RESPONSIVE BREAKPOINTS
   Mobile-first: base → 48rem → 64rem
   -------------------------------------------------------------------------- */

/* Base (< 48rem): stat cards wrap naturally as flex */

@media (max-width: 47.999rem) {
  .stat-card {
    min-width: calc(33.33% - 1px);
    border-bottom: 0.0625rem solid var(--color-border);
    padding: var(--space-1) var(--space-2);
  }
}

@media (min-width: 64rem) {
  .stat-cards {
    flex-wrap: nowrap;
  }

  .stat-card {
    flex: 1;
  }
}

/* Small screen: header stacks */
@media (max-width: 47.999rem) {
  .dash-header__inner {
    flex-wrap: wrap;
  }

  .dash-header__actions {
    width: 100%;
    justify-content: flex-end;
  }

  .dash-search {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select {
    width: 100%;
  }
}


/* --------------------------------------------------------------------------
   19. PRINT STYLES
   -------------------------------------------------------------------------- */
@media print {
  body {
    background-color: var(--color-white);
    color: #000;
    font-size: 10pt;
  }

  .dash-header__actions,
  .dash-controls,
  .tab-bar,
  .toast,
  .modal-actions,
  .dash-btn--danger {
    display: none !important;
  }

  .dash-header {
    position: static;
    background-color: var(--color-white);
    color: #000;
    border-bottom: 0.0625rem solid #000;
  }

  .dash-header__title {
    color: #000;
  }

  .stat-card {
    box-shadow: none;
    border: 0.0625rem solid #ccc;
    break-inside: avoid;
  }

  .dash-table thead th {
    background-color: var(--color-white);
    color: #000;
    border-bottom: 0.125rem solid #000;
  }

  .dash-table tbody tr {
    border-bottom: 0.0625rem solid #ccc;
  }

  .dash-table tbody tr:hover {
    background-color: transparent;
  }

  .tab-panel {
    display: block !important;
    break-inside: avoid;
  }

  dialog.detail-modal {
    position: static;
    box-shadow: none;
    border: 0.0625rem solid #ccc;
    max-width: 100%;
    width: 100%;
  }
}


/* --------------------------------------------------------------------------
   20. UTILITIES
   -------------------------------------------------------------------------- */
.text-muted {
  color: var(--color-text-light);
}

.hidden {
  display: none !important;
}

/* Modal checkbox grid for dietary editing */
.modal-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-1);
}

.modal-checkbox {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-sm);
  cursor: pointer;
  padding: 0.25rem 0;
}

.modal-checkbox input[type="checkbox"] {
  accent-color: var(--color-olive);
  width: 1rem;
  height: 1rem;
}


/* --------------------------------------------------------------------------
   21. ANIMATIONS
   -------------------------------------------------------------------------- */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(1rem);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
