:root {
  /* Brand Tokens - Lemon Tree Luxury Spa */
  --primary: #143823;
  --primary-light: #205c38;
  --primary-surface: #f2f7f3;
  --lemon: #facc15;
  --lemon-hover: #eab308;
  --lemon-bg: #fefce8;

  --surface-bg: #f8fafc;
  --surface-card: #ffffff;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --border-medium: #cbd5e1;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #94a3b8;

  /* Service Category Colors */
  --cat-body-bg: #ecfdf5;
  --cat-body-border: #10b981;
  --cat-body-text: #065f46;

  --cat-foot-bg: #fffbeb;
  --cat-foot-border: #f59e0b;
  --cat-foot-text: #92400e;

  --cat-facial-bg: #fff1f2;
  --cat-facial-border: #f43f5e;
  --cat-facial-text: #9f1239;

  --cat-lymph-bg: #f5f3ff;
  --cat-lymph-border: #8b5cf6;
  --cat-lymph-text: #5b21b6;

  --cat-combo-bg: #f0f9ff;
  --cat-combo-border: #0ea5e9;
  --cat-combo-text: #0369a1;

  /* Time Dimension Tokens */
  --time-col-width: 58px;
  --staff-col-width: 120px;
  --hour-height: 90px;
  --minute-height: 1.5px; /* 10 mins = 15px, 60 mins = 90px */

  /* Motion Curves (Impeccable spring) */
  --ease-spring: cubic-bezier(0.32, 0.72, 0, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 120ms;
  --dur-normal: 220ms;
  --dur-enter: 340ms;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 30px rgba(15,23,42,0.16);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--surface-bg);
  color: var(--text-primary);
  line-height: 1.45;
  overflow-x: hidden;
  user-select: none;
  -webkit-font-smoothing: antialiased;
}

/* ========================================================
   HEADER & TOP ACTIONS
   ======================================================== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background-color: var(--primary);
  color: #fff;
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.12);
}

.brand-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  font-size: 26px;
}

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

.brand-sub {
  font-size: 11px;
  color: #a7f3d0;
  font-weight: 500;
}

.btn-cta {
  background: var(--lemon);
  color: #1a3324;
  border: none;
  font-size: 14px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: transform var(--dur-fast) var(--ease-spring), box-shadow var(--dur-fast);
}

.btn-cta:active {
  transform: scale(0.94);
}

/* Sub-header toolbar */
.sub-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 8px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.today-tag {
  font-weight: 700;
  color: var(--primary);
}

.quick-toolbar {
  display: flex;
  gap: 6px;
}

.btn-tool {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--dur-fast);
}

.btn-tool:hover {
  background: #f1f5f9;
  border-color: var(--border-medium);
}

.btn-tool:active {
  transform: scale(0.95);
}

/* ========================================================
   DIGITAL ROSTER BOARD (數位水牌看板)
   ======================================================== */
.roster-board {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 12px 16px;
  box-shadow: var(--shadow-sm);
}

.roster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.roster-title {
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
}

.roster-hint {
  font-size: 11px;
  color: var(--text-tertiary);
}

/* Water-tile cards (水牌列) */
.roster-cards-scroller {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px 2px;
  scrollbar-width: thin;
}

.roster-cards-scroller::-webkit-scrollbar {
  height: 4px;
}
.roster-cards-scroller::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.roster-card {
  flex: 0 0 118px;
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur-normal) var(--ease-spring);
  animation: tileSlideIn var(--dur-enter) var(--ease-spring) forwards;
}

.roster-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.roster-card.is-head {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
  border-color: #f59e0b;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.2);
}

.card-rank-tag {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
}

.roster-card.is-head .card-rank-tag {
  color: #b45309;
}

.card-masseur-num {
  font-size: 19px;
  font-weight: 800;
  color: var(--primary);
  margin: 2px 0;
  letter-spacing: -0.5px;
}

.card-status-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 12px;
  display: inline-block;
  white-space: nowrap;
}

.card-status-pill.ready {
  background: #ecfdf5;
  color: #047857;
}

.card-status-pill.busy {
  background: #fffbeb;
  color: #b45309;
}

/* 1-touch Start Button directly on card */
.btn-card-start {
  width: 100%;
  margin-top: 6px;
  background: #10b981;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 0;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.btn-card-start:hover {
  background: #059669;
}

.btn-card-start:active {
  transform: scale(0.95);
}

/* Micro-actions on card */
.card-actions-row {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 6px;
  border-top: 1px solid var(--border-light);
  padding-top: 6px;
}

.btn-micro {
  background: #f8fafc;
  border: 1px solid var(--border);
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all var(--dur-fast);
}

.btn-micro:hover {
  background: #f1f5f9;
  border-color: var(--border-medium);
  color: var(--text-primary);
}

.btn-micro:active {
  transform: scale(0.9);
}

.btn-micro.crown:hover {
  background: #fef3c7;
  color: #b45309;
}

.btn-micro.danger:hover {
  background: #fee2e2;
  color: #b91c1c;
}

/* Not-arrived pool */
.unclocked-section {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

.unclocked-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-clock-in {
  background: #f8fafc;
  border: 1.5px dashed #94a3b8;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--dur-fast) var(--ease-spring);
}

.btn-clock-in:hover {
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
  transform: translateY(-1px);
}

.btn-clock-in:active {
  transform: scale(0.94);
}

.offduty-bar {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-tertiary);
}

.offduty-chip {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ========================================================
   FRESHA-STYLE VERTICAL TIMELINE GRID
   (垂直時間軸 11:00 ➔ 24:00 + 直向師傅欄位)
   ======================================================== */
.fresha-calendar-wrapper {
  position: relative;
  background: #ffffff;
  margin-top: 10px;
  box-shadow: var(--shadow-sm);
  border-top: 1px solid var(--border);
  overflow-x: auto;
  overflow-y: visible;
  scrollbar-width: thin;
}

.fresha-calendar-wrapper::-webkit-scrollbar {
  height: 6px;
}
.fresha-calendar-wrapper::-webkit-scrollbar-thumb {
  background: var(--border-medium);
  border-radius: 4px;
}

.calendar-inner {
  display: flex;
  position: relative;
  min-width: calc(var(--time-col-width) + 8 * var(--staff-col-width));
}

/* Time Ruler (Sticky Left) */
.calendar-time-ruler {
  position: sticky;
  left: 0;
  width: var(--time-col-width);
  z-index: 40;
  background: #ffffff;
  border-right: 1.5px solid var(--border);
  flex-shrink: 0;
}

.ruler-corner {
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-tertiary);
}

.ruler-slots-container {
  position: relative;
  height: calc(13 * var(--hour-height)); /* 11:00 to 24:00 = 13 hrs */
}

.ruler-hour-mark {
  position: absolute;
  left: 0;
  right: 0;
  height: var(--hour-height);
  border-top: 1px solid var(--border);
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

.ruler-hour-mark:first-child {
  border-top: none;
}

.ruler-half-line {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  border-top: 1px dashed var(--border-light);
}

/* Staff Columns */
.calendar-staff-columns {
  display: flex;
  flex: 1;
  position: relative;
}

.staff-column {
  width: var(--staff-col-width);
  min-width: var(--staff-col-width);
  border-right: 1px solid var(--border);
  position: relative;
  background: #ffffff;
}

.staff-column.not-arrived {
  background: repeating-linear-gradient(
    -45deg,
    #ffffff,
    #ffffff 10px,
    #f8fafc 10px,
    #f8fafc 20px
  );
}

.staff-column.off-duty {
  background: #f1f5f9;
  opacity: 0.5;
}

/* Sticky Column Header */
.staff-column-header {
  height: 52px;
  position: sticky;
  top: 0;
  z-index: 30;
  background: #ffffff;
  border-bottom: 2px solid var(--border);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.staff-column.is-head .staff-column-header {
  background: #fffbeb;
  border-bottom-color: #f59e0b;
}

.col-staff-num {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.col-staff-badges {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-top: 2px;
}

.tag-mini {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.tag-mini.rank { background: #e2e8f0; color: #475569; }
.tag-mini.head { background: #fef3c7; color: #b45309; }
.tag-mini.unclocked { background: #f1f5f9; color: #94a3b8; border: 1px dashed #cbd5e1; }
.tag-mini.off { background: #e2e8f0; color: #64748b; }

/* Column Slots Body */
.staff-column-body {
  position: relative;
  height: calc(13 * var(--hour-height));
  cursor: crosshair;
  background-image: repeating-linear-gradient(
    to bottom,
    transparent 0,
    transparent 44px,
    #f8fafc 44px,
    #f8fafc 45px
  );
}

/* 7號 21:30 禁區 */
.staff-limit-zone {
  position: absolute;
  left: 0;
  right: 0;
  background: repeating-linear-gradient(
    -45deg,
    #fee2e2,
    #fee2e2 6px,
    #fecaca 6px,
    #fecaca 12px
  );
  opacity: 0.8;
  z-index: 5;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: #991b1b;
}

/* Booking Blocks (Vertical Fresha-style Cards) */
.booking-block {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 11px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  z-index: 10;
  transition: all var(--dur-fast) var(--ease-spring);
  border-left-width: 4px;
  border-left-style: solid;
}

.booking-block:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
  z-index: 15;
}

.booking-block.cat-body {
  background: var(--cat-body-bg);
  border-color: var(--cat-body-border);
  color: var(--cat-body-text);
}

.booking-block.cat-foot {
  background: var(--cat-foot-bg);
  border-color: var(--cat-foot-border);
  color: var(--cat-foot-text);
}

.booking-block.cat-facial {
  background: var(--cat-facial-bg);
  border-color: var(--cat-facial-border);
  color: var(--cat-facial-text);
}

.booking-block.cat-lymph {
  background: var(--cat-lymph-bg);
  border-color: var(--cat-lymph-border);
  color: var(--cat-lymph-text);
}

.booking-block.cat-combo {
  background: var(--cat-combo-bg);
  border-color: var(--cat-combo-border);
  color: var(--cat-combo-text);
}

.booking-block.is-working {
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.4);
  animation: warmGlow 2.5s infinite ease-in-out;
}

.b-title {
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.2px;
}

.b-time {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.9;
  font-variant-numeric: tabular-nums;
  margin-top: 2px;
}

.b-status-tag {
  font-size: 9px;
  font-weight: 800;
  padding: 1px 4px;
  border-radius: 3px;
  margin-top: 3px;
  display: inline-block;
}

.b-status-tag.working {
  background: #f59e0b;
  color: #fff;
}

/* 10-min Buffer Strip directly under block */
.buffer-strip {
  position: absolute;
  left: 6px;
  right: 6px;
  background: repeating-linear-gradient(
    45deg,
    #e2e8f0,
    #e2e8f0 4px,
    #cbd5e1 4px,
    #cbd5e1 8px
  );
  border-radius: 0 0 6px 6px;
  opacity: 0.75;
  z-index: 4;
  pointer-events: none;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Current time horizontal indicator */
.current-time-bar {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background-color: #ef4444;
  z-index: 35;
  pointer-events: none;
}

.current-time-bar::before {
  content: '';
  position: absolute;
  left: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
}

/* ========================================================
   QUICK ORDER DRAWER & DUAL SUBMIT BUTTONS
   ======================================================== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-normal) var(--ease-out);
}

.drawer-overlay.active {
  opacity: 1;
  visibility: visible;
}

.bottom-drawer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 620px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 20px 20px 0 0;
  box-shadow: var(--shadow-lg);
  z-index: 101;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform var(--dur-enter) var(--ease-spring);
  will-change: transform;
}

.bottom-drawer.active {
  transform: translateY(0);
}

.drawer-drag-handle {
  width: 40px;
  height: 4px;
  background: #cbd5e1;
  border-radius: 2px;
  margin: 10px auto 4px auto;
}

.drawer-header {
  padding: 8px 18px 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.drawer-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--primary);
}

.drawer-close {
  background: #f1f5f9;
  border: none;
  font-size: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.drawer-body {
  padding: 14px 18px;
  overflow-y: auto;
  flex: 1;
}

.drawer-footer {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #fafafa;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

/* Service Grid (九宮格大按鈕) */
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.service-btn {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.service-btn:hover {
  background: #ffffff;
  border-color: var(--border-medium);
}

.service-btn:active {
  transform: scale(0.97);
}

.service-btn.active {
  background: #ecfdf5;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(20, 56, 35, 0.2);
}

.service-btn .s-name {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-primary);
}

.service-btn.active .s-name {
  color: var(--primary);
}

.service-btn .s-info {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Compact slots chips */
.compact-slots-row {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  margin-top: 6px;
  padding-bottom: 4px;
}

.slot-chip {
  flex: 0 0 auto;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: #3730a3;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.slot-chip.active {
  background: #4338ca;
  color: #ffffff;
  border-color: #3730a3;
}

/* Masseur Selector Grid */
.masseur-select-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.masseur-btn {
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 4px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: all var(--dur-fast);
}

.masseur-btn.active {
  background: #ecfdf5;
  border-color: var(--primary);
  color: var(--primary);
}

.masseur-btn.disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: #f1f5f9;
  border-style: dashed;
}

.masseur-btn:first-child {
  grid-column: span 3;
  padding: 10px;
}

.recommend-box {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.recommend-box.valid {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  color: #14532d;
}

.recommend-box.invalid {
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: #991b1b;
}

.rule-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  background: #dcfce7;
  color: #15803d;
  padding: 2px 8px;
  border-radius: 12px;
  width: fit-content;
}

/* DUAL SUBMIT BUTTONS (開工 vs 預約 涇渭分明) */
.btn-submit-start-now {
  width: 100%;
  background: #10b981;
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 800;
  padding: 13px;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--dur-fast) var(--ease-spring);
}

.btn-submit-start-now:hover {
  background: #059669;
}

.btn-submit-start-now:active {
  transform: scale(0.97);
}

.btn-submit-book-only {
  width: 100%;
  background: #f1f5f9;
  color: #334155;
  border: 1.5px solid var(--border-medium);
  font-size: 14px;
  font-weight: 700;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--dur-fast);
}

.btn-submit-book-only:hover {
  background: #e2e8f0;
}

.btn-submit-book-only:active {
  transform: scale(0.97);
}

.form-group {
  margin-bottom: 14px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 6px;
}

.input-text, .input-time {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
}

.input-text:focus, .input-time:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 56, 35, 0.15);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.price-summary-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fefce8;
  border: 1px solid #fef08a;
  padding: 12px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.price-val {
  font-size: 18px;
  font-weight: 800;
  color: #854d0e;
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 110;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-normal) var(--ease-out);
  padding: 16px;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-body {
  padding: 18px;
  max-height: 70vh;
  overflow-y: auto;
}

.detail-row {
  margin-bottom: 10px;
  font-size: 14px;
}

.detail-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 18px;
}

.btn {
  padding: 12px 16px;
  border-radius: 10px;
  border: none;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: #10b981; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }

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

@keyframes warmGlow {
  0%, 100% { box-shadow: 0 0 6px rgba(245, 158, 11, 0.3); }
  50% { box-shadow: 0 0 16px rgba(245, 158, 11, 0.7); }
}
