/* ==========================================================================
   Nail Atelier — Telegram Mini App Design System
   Aesthetic: Warm luxury beauty minimalism, modern typography & micro-interactions
   ========================================================================== */

:root {
  /* Default Light Palette */
  --bg-primary: #fcfbf9;
  --bg-surface: #ffffff;
  --card-bg: #ffffff;
  --bg-subtle: #f5f2ed;
  --bg-input: #ffffff;
  --border-color: #eae5dc;
  --border-focus: #c89b6d;

  --text-main: #1c1917;
  --text-muted: #78716c;
  --text-faint: #a8a29e;

  /* Accent: Warm Champagne Gold & Terracotta */
  --accent-gold: #c89b6d;
  --accent-gold-hover: #b88657;
  --accent-gold-light: rgba(200, 155, 109, 0.12);
  --accent-success: #15803d;
  --accent-success-bg: #f0fdf4;
  --accent-danger: #dc2626;
  --accent-danger-bg: #fef2f2;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 12px rgba(28, 25, 23, 0.05);

  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  --font-stack: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Telegram Native Theme Sync & Dark Theme */
[data-theme="dark"],
body.dark-mode {
  --bg-primary: #121212;
  --bg-surface: #1e1e1e;
  --card-bg: #1e1e1e;
  --bg-subtle: #282828;
  --bg-input: #242424;
  --border-color: #383838;
  --border-focus: #e0b484;

  --text-main: #f5f5f4;
  --text-muted: #a8a29e;
  --text-faint: #78716c;

  --accent-gold: #e0b484;
  --accent-gold-hover: #e8c49e;
  --accent-gold-light: rgba(224, 180, 132, 0.16);
  --accent-success: #22c55e;
  --accent-success-bg: rgba(34, 197, 94, 0.12);
  --accent-danger: #ef4444;
  --accent-danger-bg: rgba(239, 68, 68, 0.12);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-stack);
  background-color: var(--bg-primary);
  color: var(--text-main);
  line-height: 1.5;
  font-size: 15px;
  overflow-x: hidden;
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px)); /* Space for bottom navigation */
}

/* Dev Banner */
.dev-banner {
  background: #1e1b4b;
  color: #e0e7ff;
  padding: 8px 14px;
  font-size: 12px;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid #312e81;
}

.dev-banner-content {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 540px;
  margin: 0 auto;
}

.dev-badge {
  background: #4f46e5;
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.5px;
}

.dev-select {
  background: #312e81;
  color: #ffffff;
  border: 1px solid #4338ca;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  outline: none;
}

.dev-theme-btn {
  margin-left: auto;
  background: transparent;
  color: #c7d2fe;
  border: 1px solid #4338ca;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
}

/* App Container */
.demo-notice {
  padding: 9px 18px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 12px;
  text-align: center;
}

.app-container {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
}

/* Studio Header */
.studio-header {
  padding: 16px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--accent-gold);
}

.brand-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
}

.avatar-letter {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-gold);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-letter img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.role-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-gold);
  color: #1c1917;
  margin-left: 2px;
}

.user-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

/* Main Content Views */
.main-content {
  padding: 18px 16px;
}

.view-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 12px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Step Progress Indicator */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
}

.step-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-color);
  transition: all 0.25s ease;
}

.step-dot.active {
  background: var(--accent-gold);
  width: 22px;
  border-radius: 4px;
}

.step-line {
  flex: 0 0 12px;
  height: 2px;
  background: var(--border-color);
}

/* Step Header */
.step-header {
  margin-bottom: 18px;
}

.step-number {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-gold);
}

.step-title {
  font-size: 20px;
  font-weight: 700;
  margin-top: 2px;
  letter-spacing: -0.4px;
}

.step-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.back-link {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 8px;
  display: inline-block;
}

/* Cards & Containers */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

/* Category Filters */
.category-filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  margin-bottom: 14px;
  scrollbar-width: none;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-pill {
  padding: 7px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.category-pill.active {
  background: var(--accent-gold);
  color: #ffffff;
  border-color: var(--accent-gold);
  box-shadow: 0 2px 6px rgba(200, 155, 109, 0.35);
}

/* Service Card */
.service-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.service-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.service-card:hover,
.service-card:active {
  border-color: var(--accent-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.service-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
}

.service-price {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-gold);
  white-space: nowrap;
}

.service-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.4;
}

.service-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.badge-duration {
  font-size: 12px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

/* Master Cards */
.master-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.master-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.master-card:hover,
.master-card:active {
  border-color: var(--accent-gold);
  background: var(--bg-surface);
  box-shadow: var(--shadow-md);
}

.master-card.any-master {
  border-style: dashed;
  border-color: var(--accent-gold);
}

.master-card.any-master:hover,
.master-card.any-master:active {
  border-style: solid;
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
}

.master-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent-gold-light);
  color: var(--accent-gold);
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-gold);
  flex-shrink: 0;
}

.master-info {
  flex-grow: 1;
}

.master-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.master-spec {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.master-exp {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-gold);
  margin-top: 3px;
}

/* Selected Summary Chip */
.selected-summary-chip {
  background: var(--accent-gold-light);
  border: 1px solid var(--accent-gold);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Date Strip */
.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.dates-strip {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 10px;
  scrollbar-width: none;
}

.dates-strip::-webkit-scrollbar {
  display: none;
}

.date-item {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
}

.date-item.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(200, 155, 109, 0.4);
}

.date-weekday {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.date-day {
  font-size: 18px;
  font-weight: 800;
  margin: 2px 0;
}

.date-month {
  font-size: 11px;
  color: inherit;
  opacity: 0.85;
}

/* Slots Grid */
.slots-container {
  min-height: 120px;
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

@media (max-width: 360px) {
  .slots-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.slot-btn {
  padding: 10px 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.slot-btn:hover:not(:disabled),
.slot-btn:active:not(:disabled) {
  border-color: var(--accent-gold);
  background: var(--accent-gold-light);
  color: var(--accent-gold);
}

.slot-btn.unavailable {
  background: var(--bg-subtle);
  border-color: var(--border-color);
  color: var(--text-muted);
  opacity: 0.48;
  cursor: not-allowed;
}

.slot-sub {
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: var(--text-muted);
}

.slots-empty {
  text-align: center;
  padding: 30px 16px;
  color: var(--text-muted);
  font-size: 14px;
  background: var(--bg-surface);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-md);
}

/* Receipt Card */
.booking-receipt {
  margin-bottom: 20px;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  margin-bottom: 8px;
}

.receipt-label {
  color: var(--text-muted);
}

.receipt-value {
  font-weight: 600;
  color: var(--text-main);
  text-align: right;
}

.receipt-value.highlight {
  color: var(--accent-gold);
  font-weight: 700;
}

.receipt-divider {
  height: 1px;
  background: var(--border-color);
  margin: 12px 0;
}

.receipt-row.total {
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 0;
}

.receipt-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--accent-gold);
}

/* Forms */
.booking-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
}

/* Buttons */
.btn-primary {
  background: var(--accent-gold);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(200, 155, 109, 0.35);
}

.btn-primary:hover,
.btn-primary:active {
  background: var(--accent-gold-hover);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-danger {
  background: var(--accent-danger-bg);
  color: var(--accent-danger);
  border: 1px solid var(--accent-danger);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-block {
  width: 100%;
}

/* Success Card */
.success-card {
  text-align: center;
  padding: 32px 20px;
}

.success-icon {
  width: 56px;
  height: 56px;
  background: var(--accent-success-bg);
  color: var(--accent-success);
  border-radius: 50%;
  font-size: 28px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.success-title {
  font-size: 22px;
  font-weight: 800;
  margin-bottom: 6px;
}

.success-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.success-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* My Bookings List */
.my-bookings-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.booking-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.booking-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.booking-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  letter-spacing: 0.5px;
}

.booking-badge.pending {
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
}

.booking-badge.confirmed {
  background: var(--accent-success-bg);
  color: var(--accent-success);
}

.booking-badge.cancelled_by_client,
.booking-badge.cancelled_by_admin {
  background: var(--accent-danger-bg);
  color: var(--accent-danger);
}

.booking-card-service {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.booking-card-details {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 12px;
}

.booking-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
}

.booking-card-price {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-gold);
}

/* Info Cards (About View) */
.info-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent-gold);
  letter-spacing: 0.5px;
}

.info-text {
  font-size: 14px;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
}

.standards-list {
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 calc(8px + env(safe-area-inset-bottom, 0px)) 0;
  max-width: 520px;
  margin: 0 auto;
  z-index: 200;
}

.nav-item {
  flex: 1;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-item.active {
  color: var(--accent-gold);
}

.nav-icon {
  font-size: 18px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 25, 23, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  z-index: 5000;
  max-width: min(90vw, 420px);
  width: max-content;
  text-align: center;
  line-height: 1.35;
  animation: toastIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, -10px) scale(0.96); }
  to { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* Admin Panel Styles */
.admin-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-refresh {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.btn-refresh:active {
  transform: rotate(180deg);
}

.admin-date-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.admin-date-btn {
  padding: 6px 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
}

.admin-date-btn.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  color: #1c1917;
}

.admin-date-input {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-family: inherit;
  outline: none;
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.admin-kpi-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.kpi-label {
  font-size: 11px;
  color: var(--text-muted);
}

.kpi-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.kpi-value.highlight {
  color: var(--accent-gold);
}

.kpi-value.pending-alert {
  color: #f59e0b;
}

.admin-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-sm-text {
  background: none;
  border: none;
  color: var(--accent-gold);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 2px 6px;
}

.admin-booking-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-booking-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-booking-service {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.admin-booking-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.admin-booking-actions {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.btn-action {
  flex: 1;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  text-align: center;
  transition: opacity 0.15s;
}

.btn-action:active {
  opacity: 0.8;
}

.btn-action.success {
  background: #10b981;
  color: #ffffff;
}

.btn-action.danger {
  background: #ef4444;
  color: #ffffff;
}

.btn-action.complete {
  background: var(--accent-gold);
  color: #1c1917;
}

.admin-block-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.btn-danger-sm {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.modal-content {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  max-width: 420px;
  width: 100%;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
}

/* ==========================================================================
   Admin CRM & Management Styles
   ========================================================================== */

.admin-segment-nav {
  display: flex;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
  border: 1px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.admin-segment-nav::-webkit-scrollbar {
  display: none;
}

.admin-segment-btn {
  flex-shrink: 0;
  border: none;
  background: transparent;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  text-align: center;
}

.admin-segment-btn.active {
  background: var(--bg-surface);
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  font-weight: 700;
}

.admin-quick-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.btn-primary-sm {
  background: var(--accent-gold);
  color: #ffffff;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-primary-sm:active {
  background: var(--accent-gold-hover);
}

.btn-secondary-sm {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-filter-strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 12px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.admin-filter-strip::-webkit-scrollbar {
  display: none;
}

.admin-filter-pill {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.15s ease;
}

.admin-filter-pill.active {
  background: var(--text-main);
  color: var(--bg-primary);
  border-color: var(--text-main);
  font-weight: 600;
}

.admin-controls-row {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  align-items: center;
}

.admin-search-box {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 10px;
}

.admin-search-box input {
  border: none;
  background: transparent;
  padding: 8px 6px;
  font-size: 13px;
  color: var(--text-main);
  width: 100%;
  outline: none;
}

.admin-select-sm {
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  color: var(--text-main);
  padding: 8px 10px;
  border-radius: var(--radius-md);
  font-size: 12px;
  outline: none;
  max-width: 140px;
}

.btn-action.contact {
  background: var(--bg-subtle);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-services-catalog {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-service-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-service-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.admin-service-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.admin-service-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.admin-service-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-service-toggle {
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s ease;
}

.btn-service-toggle.active {
  background: var(--accent-success-bg);
  color: var(--accent-success);
  border: 1px solid rgba(21, 128, 61, 0.25);
}

.btn-service-toggle.inactive {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border-color);
}

.btn-edit-price {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.admin-analytics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 20px;
}

.analytics-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.analytics-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.analytics-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.analytics-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.admin-master-stats-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.master-stat-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 10px 14px;
}

.admin-masters-catalog {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-master-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.admin-master-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
}

.admin-master-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.admin-master-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.btn-action-edit {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--accent-gold);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.btn-action-delete {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn-action-delete:active {
  background: rgba(239, 68, 68, 0.25);
}

.modal-error-banner {
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #f87171;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: 12px;
}

.service-category-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-subtle);
  color: var(--text-muted);
  width: fit-content;
}

.admin-service-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
  font-style: italic;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hidden {
  display: none !important;
}
