/* ==========================================================================
   RYAN PHYSICAL THERAPY APPOINTMENT SYSTEM - DESIGN SYSTEM & STYLES
   Tailored for Solo Studio & Lowest Cost Architecture
   ========================================================================== */

:root {
  /* Brand Palette - Medical Teal & Healing Mint */
  --primary: #0f766e;
  --primary-light: #14b8a6;
  --primary-dark: #115e59;
  --primary-subtle: #f0fdfa;
  --primary-border: #ccfbf1;
  
  /* LINE Brand Green */
  --line-green: #06c755;
  --line-green-dark: #05a847;
  --line-bg: #8c9ea7;
  --line-bubble-bg: #ffffff;
  --line-user-bubble: #64d173;

  /* Neutrals & Slate */
  --slate-900: #0f172a;
  --slate-800: #1e293b;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --slate-400: #94a3b8;
  --slate-300: #cbd5e1;
  --slate-200: #e2e8f0;
  --slate-100: #f1f5f9;
  --slate-50: #f8fafc;
  --white: #ffffff;

  /* Accents & Status */
  --emerald: #10b981;
  --emerald-bg: #ecfdf5;
  --amber: #f59e0b;
  --amber-bg: #fffbeb;
  --rose: #ef4444;
  --rose-bg: #fef2f2;
  --indigo: #6366f1;
  --indigo-bg: #eef2ff;

  /* UI Tokens */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.1), 0 4px 8px -2px rgba(15, 23, 42, 0.05);
  --shadow-xl: 0 20px 35px -5px rgba(15, 23, 42, 0.16), 0 8px 12px -3px rgba(15, 23, 42, 0.08);

  --font-sans: 'Plus Jakarta Sans', 'Noto Sans TC', system-ui, -apple-system, sans-serif;
  --transition-fast: 0.18s ease;
  --transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font-sans);
  background-color: #f1f5f9;
  color: var(--slate-800);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* ==========================================================================
   TOP CONTROL & NAVIGATION BAR
   ========================================================================== */

.top-nav {
  height: 68px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.8rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ffffff;
  border: 1.5px solid var(--slate-200);
  padding: 2px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.tab-mascot-icon {
  width: 18px;
  height: 24px;
  object-fit: contain;
  vertical-align: middle;
}

.mascot-avatar-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.mascot-avatar-circle.ryan {
  border-color: #7c3aed;
  background: #f5f3ff;
}
.mascot-avatar-circle.ally {
  border-color: #ea580c;
  background: #fff7ed;
}
.mascot-avatar-circle img {
  width: 75%;
  height: 85%;
  object-fit: contain;
}

.mascot-banner-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8fafc;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 14px;
}
.mascot-banner-badge.ryan {
  border-color: #ddd6fe;
  background: #faf5ff;
}
.mascot-banner-badge.ally {
  border-color: #fed7aa;
  background: #fff7ed;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}
  font-weight: 700;
  color: var(--slate-900);
  letter-spacing: -0.01em;
}

.brand-badge {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 1px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  width: fit-content;
  margin-top: 1px;
}

.mode-toggle-group {
  display: flex;
  background: var(--slate-100);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
  gap: 4px;
}

.mode-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 15px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--slate-600);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.mode-btn:hover {
  color: var(--slate-900);
}

.mode-btn.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.tech-guide-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 15px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  font-size: 0.84rem;
  font-weight: 700;
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.tech-guide-btn:hover {
  background: #dcfce7;
  transform: translateY(-1px);
}

/* ==========================================================================
   MAIN WRAPPER & VIEW MANAGEMENT
   ========================================================================== */

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.view-panel {
  display: none;
  flex: 1;
}

.view-panel.active {
  display: flex;
  animation: fadeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ==========================================================================
   VIEW 1: CLIENT / LINE SIMULATOR
   ========================================================================== */

.client-container {
  display: flex;
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 2rem;
  gap: 3rem;
  align-items: flex-start;
  justify-content: center;
}

.client-sidebar {
  flex: 1;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--line-green-dark);
  background: #e8f9ee;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  margin-bottom: 6px;
}

.sidebar-card h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.sidebar-card p {
  font-size: 0.9rem;
  color: var(--slate-600);
  margin-bottom: 12px;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill {
  font-size: 0.75rem;
  background: var(--slate-100);
  color: var(--slate-700);
  font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  border: 1px solid var(--slate-200);
}

.pill.green {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.pill.teal {
  background: #f0fdfa;
  color: #115e59;
  border-color: #99f6e4;
}

.pill.blue {
  background: #eff6ff;
  color: #1e40af;
  border-color: #bfdbfe;
}

/* Pain & Solution Card */
.pain-solution-card h4, .quick-actions-card h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 10px;
}

.scenario-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  margin-bottom: 8px;
  border: 1px solid var(--slate-200);
}

.scenario-item.highlight {
  background: #f0fdfa;
  border-color: #99f6e4;
}

.scen-icon {
  font-size: 1.1rem;
  line-height: 1.3;
}

.scen-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.scen-text strong {
  font-size: 0.84rem;
  color: var(--slate-900);
}

.scen-text span {
  font-size: 0.78rem;
  color: var(--slate-600);
  line-height: 1.4;
}

.quick-btns {
  display: flex;
  gap: 8px;
}

.action-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: var(--primary);
  color: var(--white);
  transition: var(--transition-fast);
}

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

.action-btn.outline {
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-300);
}

.action-btn.outline:hover {
  background: var(--slate-100);
  color: var(--slate-900);
}

/* ==========================================================================
   SMARTPHONE SIMULATOR FRAME
   ========================================================================== */

.phone-stage {
  flex-shrink: 0;
}

.smartphone-frame {
  width: 410px;
  height: 820px;
  background: #111;
  border-radius: 46px;
  padding: 12px;
  box-shadow: 
    0 25px 60px -15px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(255, 255, 255, 0.1) inset,
    0 0 0 3px #282828;
  position: relative;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 24px;
  background: #000;
  border-radius: var(--radius-full);
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.notch-speaker {
  width: 45px;
  height: 4px;
  background: #222;
  border-radius: var(--radius-full);
}

.notch-camera {
  width: 10px;
  height: 10px;
  background: #1a1a2e;
  border-radius: 50%;
  border: 1px solid #2a2a40;
}

.phone-screen {
  flex: 1;
  background: var(--line-bg);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

.mobile-statusbar {
  height: 38px;
  padding: 8px 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-size: 0.76rem;
  font-weight: 600;
  z-index: 20;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-battery {
  font-size: 0.72rem;
}

/* LINE Chat Header */
.line-header {
  height: 52px;
  background: rgba(43, 56, 66, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.line-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn {
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  transition: background 0.15s;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.line-avatar {
  position: relative;
  width: 34px;
  height: 34px;
}

.line-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.line-verified {
  position: absolute;
  bottom: -2px;
  right: -2px;
  background: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1px;
}

.line-title-box {
  display: flex;
  flex-direction: column;
}

.line-title {
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
}

.line-sub {
  font-size: 0.66rem;
  opacity: 0.85;
}

.line-header-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* LINE Chat Body */
.line-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background-color: #8c9ea7;
  background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 0);
  background-size: 16px 16px;
}

.line-chat-body::-webkit-scrollbar {
  width: 4px;
}
.line-chat-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

.chat-date-pill {
  align-self: center;
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 500;
  padding: 3px 12px;
  border-radius: var(--radius-full);
}

.chat-row {
  display: flex;
  gap: 8px;
  max-width: 86%;
}

.chat-row.bot {
  align-self: flex-start;
}

.chat-row.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.bubble-avatar img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.bubble-content {
  display: flex;
  align-items: flex-end;
  gap: 6px;
}

.chat-row.user .bubble-content {
  flex-direction: row-reverse;
}

.bubble-text {
  background: var(--white);
  color: var(--slate-900);
  padding: 10px 14px;
  border-radius: 16px;
  border-top-left-radius: 4px;
  font-size: 0.84rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  word-break: break-word;
}

.chat-row.user .bubble-text {
  background: var(--line-user-bubble);
  color: #064019;
  border-radius: 16px;
  border-top-right-radius: 4px;
  font-weight: 500;
}

.bubble-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 2px;
  flex-shrink: 0;
}

/* LINE Flex Message Card (Appointment Voucher) */
.flex-card-wrap {
  width: 100%;
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  margin-top: 6px;
}

.flex-card-hero {
  background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
  color: var(--white);
  padding: 16px 18px;
  position: relative;
}

.flex-hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 600;
}

.flex-hero-title {
  font-size: 1.15rem;
  font-weight: 800;
  margin-top: 6px;
}

.flex-hero-sub {
  font-size: 0.78rem;
  opacity: 0.9;
}

.flex-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flex-info-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.82rem;
  border-bottom: 1px dashed var(--slate-200);
  padding-bottom: 6px;
}

.flex-info-row:last-child {
  border-bottom: none;
}

.flex-info-row .lbl {
  color: var(--slate-500);
}

.flex-info-row .val {
  font-weight: 700;
  color: var(--slate-900);
  text-align: right;
}

.flex-info-row .val.highlight {
  color: var(--primary);
  font-size: 0.92rem;
}

.flex-card-actions {
  padding: 10px 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.flex-btn-action {
  width: 100%;
  padding: 9px;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  text-align: center;
  transition: var(--transition-fast);
}

.flex-btn-action.cal {
  background: var(--line-green);
  color: var(--white);
}

.flex-btn-action.cal:hover {
  background: var(--line-green-dark);
}

.flex-btn-action.subtle {
  background: var(--slate-100);
  color: var(--slate-700);
}

.flex-btn-action.subtle:hover {
  background: var(--slate-200);
}

/* Studio Optimized Rich Menu (1 Large Hero + 4 Mini) */
.line-rich-menu {
  background: var(--white);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.06);
  z-index: 15;
  transition: var(--transition-normal);
}

.rich-menu-bar {
  height: 24px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  font-size: 0.68rem;
  color: var(--slate-500);
  font-weight: 600;
  cursor: pointer;
  border-bottom: 1px solid var(--slate-200);
}

.rich-toggle-btn {
  font-size: 0.65rem;
  color: var(--slate-400);
}

.rich-menu-grid.studio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: 64px 56px 56px;
  gap: 1px;
  background: var(--slate-200);
}

.line-rich-menu.collapsed .rich-menu-grid {
  display: none;
}

.rich-btn {
  background: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 6px;
  text-align: center;
  transition: background 0.15s;
}

.rich-btn:active {
  background: #f1f5f9;
}

.rich-btn.main-span {
  grid-column: span 2;
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rich-btn.main-span .rich-icon {
  color: var(--white);
}

.rich-btn .rich-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 2px;
}

.rich-label {
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.rich-sublabel {
  font-size: 0.64rem;
  color: var(--slate-400);
}

.rich-btn.main-span .rich-sublabel {
  color: rgba(255, 255, 255, 0.85);
}

/* Chat Input Bar */
.line-input-bar {
  height: 48px;
  background: var(--white);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  padding: 0 8px;
  gap: 6px;
  z-index: 10;
}

.line-input-bar input {
  flex: 1;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  padding: 0 14px;
  font-size: 0.84rem;
  outline: none;
}

.line-input-bar input:focus {
  border-color: var(--line-green);
  background: var(--white);
}

.send-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: var(--line-green);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s;
}

/* ==========================================================================
   LIFF MODAL CONTAINER (Slide-up Web Experience)
   ========================================================================== */

.liff-modal-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--white);
  z-index: 40;
  display: flex;
  flex-direction: column;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.liff-modal-container.open {
  transform: translateY(0);
}

.liff-header {
  height: 46px;
  background: #f8fafc;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  flex-shrink: 0;
  margin-top: 38px;
}

.liff-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.liff-close-btn {
  padding: 4px;
  color: var(--slate-600);
}

.liff-url-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--slate-200);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  color: var(--slate-600);
  font-family: monospace;
}

.liff-single-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.liff-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
}

.liff-content::-webkit-scrollbar {
  width: 4px;
}
.liff-content::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 4px;
}

/* Booking Progress Bar */
.booking-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  padding: 0 10px;
}

.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.step-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--slate-200);
  color: var(--slate-500);
  font-size: 0.72rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.step-item span {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--slate-500);
}

.step-item.active .step-circle {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 0 0 3px var(--primary-border);
}

.step-item.active span {
  color: var(--primary);
  font-weight: 700;
}

.step-item.completed .step-circle {
  background: var(--emerald);
  color: var(--white);
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--slate-200);
  margin: -14px 8px 0;
  transition: var(--transition-fast);
}

.step-line.completed {
  background: var(--emerald);
}

/* Step Panels */
.booking-step-panel {
  display: none;
  flex-direction: column;
  flex: 1;
  animation: fadeIn 0.25s ease;
}

.booking-step-panel.active {
  display: flex;
}

.step-title-block {
  margin-bottom: 14px;
}

.step-title-block h2 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
}

.step-title-block p {
  font-size: 0.78rem;
  color: var(--slate-500);
  margin-top: 2px;
}

/* Service Cards */
.service-cards-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.service-card {
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  transition: var(--transition-fast);
  background: var(--white);
}

.service-card:hover {
  border-color: var(--primary-light);
}

.service-card.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.08);
}

.service-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.service-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--slate-600);
  background: var(--slate-100);
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.service-tag.hot {
  color: #c2410c;
  background: #ffedd5;
}

.service-time {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--slate-500);
}

.service-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.service-desc {
  font-size: 0.76rem;
  color: var(--slate-600);
  line-height: 1.4;
  margin-bottom: 8px;
}

.service-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.service-price {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.select-indicator {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--slate-300);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: var(--transition-fast);
}

.service-card.selected .select-indicator {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

/* Date Chips Track */
.date-scroll-container {
  overflow-x: auto;
  margin-bottom: 16px;
  padding-bottom: 4px;
}

.date-scroll-container::-webkit-scrollbar {
  height: 3px;
}

.date-chips-track {
  display: flex;
  gap: 8px;
}

.date-chip {
  flex-shrink: 0;
  width: 58px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  background: var(--white);
  transition: var(--transition-fast);
}

.date-chip .day-name {
  font-size: 0.68rem;
  color: var(--slate-500);
  font-weight: 500;
}

.date-chip .day-num {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--slate-900);
  margin: 2px 0;
}

.date-chip .status-text {
  font-size: 0.62rem;
  color: var(--emerald);
  font-weight: 600;
}

.date-chip:hover {
  border-color: var(--primary-light);
}

.date-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.date-chip.selected .day-name,
.date-chip.selected .day-num,
.date-chip.selected .status-text {
  color: var(--white);
}

/* Time Slots */
.time-slots-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.slot-group-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-700);
  margin-bottom: 6px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.time-slot-btn {
  padding: 9px 4px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--slate-800);
  text-align: center;
  transition: var(--transition-fast);
}

.time-slot-btn:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.time-slot-btn.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.25);
}

.time-slot-btn.disabled {
  background: var(--slate-100);
  border-color: var(--slate-200);
  color: var(--slate-400);
  cursor: not-allowed;
  font-size: 0.74rem;
}

/* Step 3: Symptoms & Profile */
.line-id-detected {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 9px 12px;
  margin-bottom: 14px;
}

.detected-avatar img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.detected-info {
  display: flex;
  flex-direction: column;
}

.detected-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: #14532d;
}

.liff-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.detected-sub {
  font-size: 0.68rem;
  color: #166534;
}

.form-group-block {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-800);
  margin-bottom: 5px;
}

.form-label .req {
  color: var(--rose);
  font-size: 0.72rem;
}

.pain-area-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pain-chip {
  padding: 5px 10px;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--slate-700);
  background: var(--slate-100);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-full);
  transition: var(--transition-fast);
}

.pain-chip:hover {
  background: var(--slate-200);
}

.pain-chip.selected {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.form-textarea, .form-input {
  width: 100%;
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-textarea:focus, .form-input:focus {
  border-color: var(--primary);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Order Summary Box */
.order-summary-box {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
}

.summary-line span {
  color: var(--slate-500);
}

.summary-line strong {
  color: var(--slate-800);
  text-align: right;
}

.summary-line strong.highlight {
  color: var(--primary);
}

.summary-line.total {
  border-top: 1px solid var(--slate-200);
  padding-top: 5px;
  margin-top: 2px;
}

.summary-line .price {
  font-size: 0.95rem;
  color: var(--primary-dark);
}

.booking-bottom-action {
  margin-top: auto;
  padding-top: 10px;
}

.booking-bottom-action.two-btns {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 10px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 11px 18px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 700;
  transition: var(--transition-fast);
}

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

.btn-primary.full-width {
  width: 100%;
}

.btn-outline {
  padding: 11px 14px;
  border: 1.5px solid var(--slate-300);
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-700);
  text-align: center;
  transition: var(--transition-fast);
}

.btn-outline:hover {
  background: var(--slate-100);
}

/* ==========================================================================
   VIEW 2: RYAN MOBILE ADMIN (手機版後台 - 看診空檔極速操作)
   ========================================================================== */

.mobile-admin-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.mobile-admin-hero {
  text-align: center;
  max-width: 680px;
}

.hero-tag-pill {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: var(--primary-subtle);
  border: 1px solid var(--primary-border);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 8px;
}

.mobile-admin-hero h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 6px;
}

.mobile-admin-hero p {
  font-size: 0.88rem;
  color: var(--slate-600);
  line-height: 1.5;
}

.mobile-admin-device-stage {
  display: flex;
  justify-content: center;
}

.admin-phone-frame {
  width: 390px;
  height: 740px;
  background: #18181b;
  border-radius: 42px;
  padding: 10px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
}

.admin-phone-screen {
  flex: 1;
  background: #f8fafc;
  border-radius: 32px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 16px 14px;
}

.admin-phone-screen::-webkit-scrollbar {
  width: 4px;
}
.admin-phone-screen::-webkit-scrollbar-thumb {
  background: var(--slate-300);
  border-radius: 4px;
}

.admin-m-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--slate-200);
  margin-bottom: 12px;
}

.m-brand {
  display: flex;
  flex-direction: column;
}

.m-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
}

.m-status-pill.live {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--emerald);
}

.m-today-date {
  font-size: 0.8rem;
  font-weight: 700;
  background: var(--slate-200);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--slate-700);
}

/* Quick Tools Card */
.m-quick-tools-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}

.tool-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

.m-tool-grid {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.m-action-tool {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--slate-100);
  color: var(--slate-800);
  transition: var(--transition-fast);
}

.m-action-tool:hover {
  background: var(--slate-200);
}

.m-action-tool.primary {
  background: linear-gradient(135deg, var(--primary) 0%, #0d9488 100%);
  color: var(--white);
  box-shadow: 0 2px 6px rgba(15, 118, 110, 0.2);
}

.m-action-tool.primary:hover {
  background: var(--primary-dark);
}

.m-schedule-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}

.m-schedule-header h3 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--slate-900);
}

.m-schedule-header .m-sub {
  font-size: 0.68rem;
  color: var(--slate-500);
}

.m-schedule-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-booking-card {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: var(--transition-fast);
}

.m-booking-card:hover {
  border-color: var(--primary);
}

.m-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.m-card-time {
  font-size: 1rem;
  font-weight: 800;
  color: var(--primary-dark);
}

.m-card-status {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-full);
}

.m-card-status.confirmed { background: #dcfce7; color: #15803d; }
.m-card-status.ongoing { background: #e0e7ff; color: #4338ca; }
.m-card-status.completed { background: var(--slate-100); color: var(--slate-600); }

.m-card-client {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.m-client-name {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--slate-900);
}

.m-client-tag {
  font-size: 0.68rem;
  color: var(--slate-500);
}

.m-service-title {
  font-size: 0.78rem;
  color: var(--slate-700);
}

.m-symptom-quote {
  font-size: 0.72rem;
  color: var(--slate-600);
  background: var(--slate-50);
  padding: 5px 8px;
  border-radius: 4px;
  border-left: 2px solid var(--primary);
}

.m-card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 4px;
}

.m-btn-mini {
  padding: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 6px;
  text-align: center;
  background: var(--slate-100);
  color: var(--slate-700);
}

.m-btn-mini:hover {
  background: var(--slate-200);
}

.m-btn-mini.call {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* ==========================================================================
   VIEW 3: THERAPIST DESKTOP ADMIN DASHBOARD
   ========================================================================== */

.admin-container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-top-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.stat-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-wrap.teal {
  background: var(--primary-subtle);
  color: var(--primary);
}

.stat-icon-wrap.emerald {
  background: #ecfdf5;
  color: var(--emerald);
}

.stat-icon-wrap.indigo {
  background: #eef2ff;
  color: var(--indigo);
}

.stat-icon-wrap.amber {
  background: #fffbeb;
  color: var(--amber);
}

.stat-meta {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--slate-500);
  font-weight: 600;
}

.stat-number-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 2px;
}

.stat-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--slate-900);
}

.stat-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

.stat-badge.green {
  background: #dcfce7;
  color: #15803d;
}

.stat-badge.indigo {
  background: #ede9fe;
  color: #6d28d9;
}

.stat-badge.amber {
  background: #fef3c7;
  color: #b45309;
}

.admin-grid-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 1.5rem;
}

.admin-main-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}

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

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header-left h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--slate-900);
}

.date-filter-tag {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-subtle);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.header-actions {
  display: flex;
  gap: 8px;
}

.admin-btn-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-md);
  color: var(--slate-700);
  background: var(--white);
  transition: var(--transition-fast);
}

.admin-btn-action:hover {
  background: var(--slate-100);
}

.admin-btn-action.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: var(--white);
}

.admin-btn-action.primary:hover {
  background: var(--primary-dark);
}

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

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.85rem;
}

.admin-table th {
  background: var(--slate-50);
  color: var(--slate-600);
  font-weight: 700;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  font-size: 0.76rem;
}

.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--slate-100);
  color: var(--slate-800);
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: #f8fafc;
}

.table-time {
  font-weight: 800;
  color: var(--primary-dark);
  white-space: nowrap;
}

.patient-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.patient-mini-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--slate-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-700);
}

.status-chip {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.status-chip.confirmed {
  background: #dcfce7;
  color: #15803d;
}

.status-chip.ongoing {
  background: #e0e7ff;
  color: #4338ca;
}

.status-chip.completed {
  background: var(--slate-100);
  color: var(--slate-600);
}

.admin-actions-cell {
  display: flex;
  gap: 6px;
}

.btn-icon-subtle {
  padding: 5px;
  border-radius: 6px;
  color: var(--slate-500);
  transition: background 0.15s;
}

.btn-icon-subtle:hover {
  background: var(--slate-200);
  color: var(--slate-900);
}

/* Side Stack */
.admin-side-stack {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.admin-side-card {
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-lg);
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.side-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 1rem;
}

.side-card-title h4 {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--slate-900);
}

.line-status-beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line-green);
  position: relative;
}

.line-status-beacon.active::after {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  border-radius: 50%;
  border: 2px solid var(--line-green);
  animation: pulse 1.8s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}

.api-status-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.api-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}

.api-info {
  display: flex;
  flex-direction: column;
}

.api-name {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--slate-800);
}

.api-state.live {
  font-size: 0.7rem;
  color: var(--emerald);
  font-weight: 600;
}

.api-detail {
  font-size: 0.7rem;
  color: var(--slate-500);
}

.line-action-box {
  margin-top: 10px;
}

.btn-line-sync {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: var(--line-green);
  color: var(--white);
  padding: 9px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 700;
  transition: var(--transition-fast);
}

.btn-line-sync:hover {
  background: var(--line-green-dark);
}

.quick-patient-view {
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px;
}

.patient-highlight-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.pat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
}

.pat-meta {
  display: flex;
  flex-direction: column;
}

.pat-meta strong {
  font-size: 0.88rem;
  color: var(--slate-900);
}

.pat-meta span {
  font-size: 0.72rem;
  color: var(--slate-500);
}

.pat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}

.symptom-tag {
  font-size: 0.7rem;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: var(--slate-200);
  color: var(--slate-700);
  font-weight: 600;
}

.symptom-tag.pain {
  background: #fee2e2;
  color: #b91c1c;
}

.pat-note-quote {
  font-size: 0.78rem;
  color: var(--slate-600);
  font-style: italic;
  line-height: 1.4;
  background: var(--white);
  border-left: 3px solid var(--primary);
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}

.quick-memo-input {
  width: 100%;
  font-size: 0.78rem;
  padding: 7px 10px;
  border: 1px solid var(--slate-300);
  border-radius: var(--radius-sm);
  outline: none;
}

.quick-memo-input:focus {
  border-color: var(--primary);
}

/* ==========================================================================
   MODAL COMPONENT (Architecture & Cost Table)
   ========================================================================== */

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-backdrop.open {
  display: flex;
}

.modal-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  max-width: 860px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.modal-header {
  padding: 1.4rem 1.8rem;
  border-bottom: 1px solid var(--slate-200);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.modal-title-group .modal-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-subtle);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  margin-bottom: 6px;
}

.modal-title-group h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--slate-900);
}

.modal-close-btn {
  color: var(--slate-400);
  padding: 6px;
  border-radius: 50%;
  transition: background 0.15s;
}

.modal-close-btn:hover {
  background: var(--slate-100);
  color: var(--slate-800);
}

.modal-body {
  padding: 1.5rem 1.8rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.solution-highlight-box {
  background: #f0fdf4;
  border-left: 4px solid #16a34a;
  padding: 12px 16px;
  border-radius: 4px;
}

.solution-highlight-box h3 {
  font-size: 0.95rem;
  color: #14532d;
  font-weight: 800;
  margin-bottom: 6px;
}

.solution-highlight-box p {
  font-size: 0.85rem;
  color: #166534;
  line-height: 1.6;
}

.cost-table-wrap h4 {
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 8px;
}

.cost-breakdown-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.cost-breakdown-table th, .cost-breakdown-table td {
  padding: 10px 12px;
  border: 1px solid var(--slate-200);
  text-align: left;
}

.cost-breakdown-table th {
  background: var(--slate-100);
  font-weight: 700;
  color: var(--slate-700);
}

.text-green { color: #16a34a; }

.modal-conclusion-box {
  background: var(--slate-50);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.2rem;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.modal-conclusion-box h4 {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 4px;
}

.modal-conclusion-box p {
  font-size: 0.85rem;
  color: var(--slate-700);
  line-height: 1.5;
}

.modal-footer {
  padding: 1.2rem 1.8rem;
  border-top: 1px solid var(--slate-200);
  display: flex;
  justify-content: flex-end;
  background: var(--slate-50);
}

/* Toast Container */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
}

.toast {
  background: var(--slate-900);
  color: var(--white);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.success {
  background: #064e3b;
  border: 1px solid #059669;
}

@keyframes slideInRight {
  from { transform: translateX(50px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 1024px) {
  .client-container {
    flex-direction: column;
    align-items: center;
    padding: 1rem;
  }

  .client-sidebar {
    max-width: 100%;
    width: 100%;
  }

  .admin-top-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .admin-grid-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .top-nav {
    padding: 0 1rem;
    height: auto;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 12px;
  }

  .brand-name {
    display: none;
  }

  .smartphone-frame, .admin-phone-frame {
    width: 100%;
    max-width: 380px;
    height: 760px;
    border-radius: 36px;
    padding: 8px;
  }

  .admin-top-stats {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   RYAN X ALLY DUAL BRAND & ADVANCED APPOINTMENT STYLES
   ========================================================================== */

/* Brand & Color Tokens for Ally */
:root {
  --ally-coral: #e11d48;
  --ally-rose: #f43f5e;
  --ally-light: #fff1f2;
  --ally-border: #fecdd3;
  --ally-gradient: linear-gradient(135deg, #f43f5e 0%, #fb7185 100%);
  --ig-gradient: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Rich Menu 2-Tab Switcher */
.rich-menu-tabs {
  display: flex;
  background: #1e293b;
  border-bottom: 2px solid #334155;
  padding: 0 4px;
}

.rich-tab-btn {
  flex: 1;
  padding: 10px 6px;
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  transition: all 0.2s ease;
}

.rich-tab-btn:hover {
  color: #ffffff;
}

.rich-tab-btn.active.ryan {
  color: #c4b5fd;
}
.rich-tab-btn.active.ryan::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: #8b5cf6;
  border-radius: 3px 3px 0 0;
}

.rich-tab-btn.active.ally {
  color: #fdba74;
}
.rich-tab-btn.active.ally::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 10%;
  width: 80%;
  height: 3px;
  background: #f97316;
  border-radius: 3px 3px 0 0;
}

.rich-grid-ryan, .rich-grid-ally {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: #334155;
}

.rich-grid-ryan.hidden, .rich-grid-ally.hidden {
  display: none !important;
}

/* Instagram Direct Buttons */
.rich-btn.ig-btn {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  position: relative;
  overflow: hidden;
}
.rich-btn.ig-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--ig-gradient);
}
.rich-btn.ig-btn .rich-icon svg {
  color: #f43f5e;
}

.ig-floating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--ig-gradient);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 3px 8px rgba(225, 29, 72, 0.25);
  transition: transform 0.2s ease;
  cursor: pointer;
}
.ig-floating-pill:hover {
  transform: translateY(-1px);
}

/* Plan C: Slot Picking & Backup Slots */
.slot-strategy-tip {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.78rem;
  color: #166534;
  line-height: 1.4;
}
.slot-strategy-tip svg {
  flex-shrink: 0;
  margin-top: 1px;
  color: #15803d;
}

.session-count-picker {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.count-chip {
  flex: 1;
  padding: 8px 12px;
  border: 1.5px solid var(--slate-200);
  background: var(--white);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s;
}
.count-chip.selected {
  border-color: var(--primary);
  background: var(--primary-subtle);
  color: var(--primary-dark);
}

.backup-slots-panel {
  background: var(--slate-50);
  border: 1px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin-top: 12px;
}
.backup-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.backup-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--slate-700);
  display: flex;
  align-items: center;
  gap: 6px;
}
.backup-badge-limit {
  font-size: 0.72rem;
  color: var(--slate-500);
}
.backup-chips-box {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.backup-chip-btn {
  padding: 5px 10px;
  border: 1px solid var(--slate-300);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate-600);
  cursor: pointer;
  transition: all 0.18s;
}
.backup-chip-btn:hover {
  border-color: var(--primary-light);
}
.backup-chip-btn.selected {
  background: #0f766e;
  border-color: #0f766e;
  color: #fff;
}

/* Time slot button indicators for Primary vs Backup */
.time-slot-btn.is-primary {
  border-color: #059669 !important;
  background: #ecfdf5 !important;
  color: #065f46 !important;
  font-weight: 700;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}
.time-slot-btn.is-backup {
  border-color: #f59e0b !important;
  background: #fffbeb !important;
  color: #92400e !important;
  font-weight: 700;
}

/* Ally Group Class Modal & Cards */
.ally-class-card {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.ally-class-card:hover {
  border-color: var(--ally-border);
  box-shadow: var(--shadow-md);
}
.ally-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.ally-class-name {
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--slate-900);
  margin-bottom: 2px;
}
.ally-class-meta {
  font-size: 0.78rem;
  color: var(--slate-500);
}
.ally-coach-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: #fff1f2;
  color: #e11d48;
  border: 1px solid #fecdd3;
  padding: 3px 8px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ally-class-desc {
  font-size: 0.78rem;
  color: var(--slate-600);
  line-height: 1.4;
  margin: 6px 0 10px;
}

/* Capacity Progress Bar with Milestones */
.capacity-progress-wrap {
  background: var(--slate-100);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 10px;
}
.capacity-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.capacity-badge.gathering {
  color: #d97706;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 999px;
}
.capacity-badge.confirmed {
  color: #059669;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 999px;
}
.capacity-badge.full {
  color: #dc2626;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 999px;
}

.capacity-progress-bar-bg {
  height: 8px;
  background: #e2e8f0;
  border-radius: 999px;
  position: relative;
  overflow: visible;
}
.capacity-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #f59e0b 0%, #10b981 100%);
  transition: width 0.4s ease;
}
.capacity-progress-fill.full {
  background: #ef4444;
}
.capacity-min-marker {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: #0f172a;
  border-radius: 1px;
}
.capacity-min-label {
  position: absolute;
  top: -16px;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.ally-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
}
.ally-pricing {
  display: flex;
  flex-direction: column;
}
.ally-price-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #e11d48;
}
.ally-pass-info {
  font-size: 0.72rem;
  color: var(--slate-500);
}
.btn-ally-enroll {
  background: var(--ally-rose);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.btn-ally-enroll:hover {
  background: #e11d48;
  transform: translateY(-1px);
}
.btn-ally-enroll.disabled {
  background: #cbd5e1;
  cursor: not-allowed;
  transform: none;
}

/* Dual Patient Records (Legal Defense vs Ryan Private) */
.dual-record-box {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--slate-200);
  background: var(--white);
  margin-bottom: 14px;
}
.dual-record-header {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  font-weight: 700;
}
.dual-record-header.student {
  background: #f8fafc;
  border-bottom: 1px solid var(--slate-200);
  color: var(--slate-700);
}
.dual-record-header.ryan-private {
  background: #f0fdf4;
  border-bottom: 1px solid #bbf7d0;
  color: #166534;
}
.legal-pill {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #475569;
  font-weight: 600;
}
.private-lock-pill {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.dual-record-body {
  padding: 12px 14px;
  font-size: 0.8rem;
  color: var(--slate-700);
  line-height: 1.5;
}

/* Payment Quick Cashier */
.cashier-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cashier-item {
  background: var(--white);
  border: 1.5px solid var(--slate-200);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.18s;
}
.cashier-item.paid {
  border-color: #86efac;
  background: #f0fdf4;
}
.cashier-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cashier-client-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cashier-name {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--slate-900);
}
.cashier-type-badge {
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 4px;
  background: #e0f2fe;
  color: #0369a1;
  font-weight: 600;
}
.cashier-info-line {
  font-size: 0.78rem;
  color: var(--slate-600);
}
.cashier-proof-quote {
  font-size: 0.75rem;
  background: #f8fafc;
  padding: 4px 8px;
  border-radius: 4px;
  border-left: 3px solid #3b82f6;
  color: #334155;
  margin-top: 4px;
  font-family: monospace;
}
.cashier-action-btn {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 5px rgba(16, 185, 129, 0.25);
}
.cashier-action-btn:hover {
  background: #059669;
}
.cashier-action-btn.is-paid {
  background: #e2e8f0;
  color: #64748b;
  box-shadow: none;
  cursor: default;
}

/* Mobile Admin Sub Tabs */
.mobile-admin-tabs {
  display: flex;
  background: #0f172a;
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  gap: 4px;
}
.m-tab-btn {
  flex: 1;
  padding: 8px 2px;
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: #94a3b8;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  white-space: nowrap;
  transition: all 0.2s;
}
.m-tab-btn.active {
  background: #334155;
  color: #ffffff;
}
.m-badge-count {
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  padding: 1px 5px;
  border-radius: 999px;
  font-weight: 800;
}

/* Audit Card for Plan C */
.audit-card {
  background: var(--white);
  border: 1.5px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-sm);
}
.audit-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.audit-client-name {
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--slate-900);
}
.audit-status-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #c2410c;
  background: #ffedd5;
  padding: 2px 8px;
  border-radius: 999px;
}
.audit-slots-list {
  background: #fff7ed;
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  margin-bottom: 10px;
  font-size: 0.78rem;
  line-height: 1.5;
}
.audit-slot-line.primary {
  font-weight: 700;
  color: #9a3412;
}
.audit-slot-line.backup {
  color: #b45309;
}
.audit-action-row {
  display: flex;
  gap: 6px;
}
.btn-audit-ok {
  flex: 1.2;
  background: #10b981;
  color: #fff;
  border: none;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.75rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-audit-backup {
  flex: 1;
  background: #f59e0b;
  color: #fff;
  border: none;
  padding: 7px 6px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.73rem;
  cursor: pointer;
}
.btn-audit-decline {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #cbd5e1;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.73rem;
  cursor: pointer;
}

/* Cross-Day Multi-Backup Pool (Up to 6 slots across different days) */
.cross-day-backup-wrap {
  background: #f8fafc;
  border: 1.5px dashed var(--slate-300);
  border-radius: var(--radius-md);
  padding: 12px;
  margin-top: 14px;
}
.cross-backup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cross-backup-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
}
.cross-backup-pool {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  align-items: center;
}
.backup-empty-hint {
  font-size: 0.75rem;
  color: var(--slate-400);
  font-style: italic;
}
.backup-tag-chip {
  background: #f0fdf4;
  border: 1px solid #86efac;
  color: #166534;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  animation: fadeIn 0.2s ease;
}
.backup-tag-chip .chip-del-btn {
  background: rgba(22, 101, 52, 0.15);
  color: #166534;
  border: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s;
}
.backup-tag-chip .chip-del-btn:hover {
  background: #ef4444;
  color: #fff;
}

/* Backup Picker Dropdown for Ryan Admin */
.audit-backup-dropdown-panel {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
  border-radius: var(--radius-sm);
  padding: 10px;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  animation: fadeIn 0.2s ease;
}
.audit-backup-dropdown-panel.hidden {
  display: none !important;
}
.audit-dropdown-header {
  font-size: 0.75rem;
  font-weight: 800;
  color: #92400e;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.audit-backup-options-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.audit-backup-option-btn {
  background: var(--white);
  border: 1px solid #f59e0b;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #78350f;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.18s;
}
.audit-backup-option-btn:hover {
  background: #fef3c7;
  border-color: #d97706;
}
.audit-backup-option-btn .btn-lock-sub {
  background: #f59e0b;
  color: #fff;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 800;
}

/* Independent Finance Split Tabs & Cards */
.cashier-subtabs {
  display: flex;
  background: #e2e8f0;
  padding: 3px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  gap: 4px;
}
.cashier-subtab-btn {
  flex: 1;
  padding: 7px 4px;
  background: transparent;
  border: none;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--slate-600);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.18s;
}
.cashier-subtab-btn.active.ryan {
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 2px 4px rgba(124, 58, 237, 0.25);
}
.cashier-subtab-btn.active.ally {
  background: #ea580c;
  color: #fff;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.25);
}

.bank-info-card {
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 12px;
  border: 1.5px solid;
}
.bank-info-card.ryan {
  border-color: #ddd6fe;
  background: #faf5ff;
}
.bank-info-card.ally {
  border-color: #fed7aa;
  background: #fff7ed;
}
.bank-badge-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 0.85rem;
  font-weight: 800;
}
.bank-badge-title.ryan { color: #6d28d9; }
.bank-badge-title.ally { color: #c2410c; }

/* Slot cell with inline "+備選" button (cross-day pool) */
.slot-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.slot-cell .time-slot-btn {
  width: 100%;
}
.slot-backup-add-btn {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  border-radius: var(--radius-sm);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 2px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.slot-backup-add-btn:hover {
  border-color: #f59e0b;
  color: #b45309;
  background: #fffbeb;
}
.slot-backup-add-btn.active {
  border-style: solid;
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

/* Desktop split cashier group headers */
.cashier-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  margin: 12px 0 6px;
}
.cashier-group-header:first-child { margin-top: 0; }
.cashier-group-header.ryan { background: #faf5ff; color: #6d28d9; border: 1px solid #ddd6fe; }
.cashier-group-header.ally { background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa; }
.cashier-group-meta { font-size: 0.68rem; font-weight: 700; opacity: 0.85; }

/* Day-before reminder panel */
.reminder-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.reminder-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-left: 4px solid var(--slate-300);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
  margin-bottom: 8px;
}
.reminder-item.ryan { border-left-color: #7c3aed; }
.reminder-item.ally { border-left-color: #ea580c; }
.reminder-item.sent { opacity: 0.6; }
.reminder-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.reminder-name {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--slate-800);
}
.reminder-meta {
  font-size: 0.72rem;
  color: var(--slate-500);
}
.reminder-status {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 999px;
}
.reminder-status.pending { background: #fef3c7; color: #92400e; }
.reminder-status.sent { background: #dcfce7; color: #166534; }
.reminder-send-btn {
  border: none;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: #0f766e;
  white-space: nowrap;
}
.reminder-send-btn:disabled {
  background: var(--slate-300);
  cursor: default;
}
.reminder-bulk-btn {
  border: none;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 0.78rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, #0f766e, #0d9488);
  width: 100%;
  margin-bottom: 10px;
}
.reminder-empty {
  font-size: 0.78rem;
  color: var(--slate-400);
  font-style: italic;
  padding: 6px 0;
}

/* Generic hidden utility (fixes mobile admin panel switching) */
.hidden {
  display: none !important;
}

/* Closed-day hint in the slot picker */
.slot-closed-hint {
  grid-column: 1 / -1;
  padding: 14px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #92400e;
  background: #fffbeb;
  border: 1px dashed #fcd34d;
  border-radius: var(--radius-sm);
}

/* Environment / preview mode banner */
.env-banner {
  position: sticky;
  top: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-bottom: 1px solid transparent;
}
.env-banner-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35);
}
.env-banner.mode-mock { background: #fff7ed; color: #9a3412; border-bottom-color: #fed7aa; }
.env-banner.mode-mock .env-banner-dot { background: #f97316; }
.env-banner.mode-browser { background: #eff6ff; color: #1d4ed8; border-bottom-color: #bfdbfe; }
.env-banner.mode-browser .env-banner-dot { background: #3b82f6; }
.env-banner.mode-liff { background: #ecfdf5; color: #047857; border-bottom-color: #a7f3d0; }
.env-banner.mode-liff .env-banner-dot { background: #10b981; }


