@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Warm Light Editorial Barbershop Palette */
  --bg-page: #F7F6F2;
  --bg-surface: #FFFFFF;
  --bg-surface-subtle: #FAFAF7;
  --bg-active-nav: #EBF3EE;

  --text-primary: #20231F;
  --text-secondary: #777A73;
  --text-dim: #9C9E97;

  /* Brand Accent: Deep Forest Green */
  --brand: #176B4D;
  --brand-hover: #10543B;
  --brand-light: #EBF3EE;
  --brand-glow: rgba(23, 107, 77, 0.15);

  /* Subtle Warm Grey Borders */
  --border: #E7E5DE;
  --border-subtle: #EFECE6;
  --border-focus: #176B4D;

  /* Restrained Functional Status Badges */
  --badge-confirmed-bg: #EBF5F0;
  --badge-confirmed-text: #166534;
  --badge-confirmed-border: #BBF7D0;

  --badge-completed-bg: #EFF6FF;
  --badge-completed-text: #1D4ED8;
  --badge-completed-border: #BFDBFE;

  --badge-pending-bg: #FEF3C7;
  --badge-pending-text: #92400E;
  --badge-pending-border: #FDE68A;

  --badge-cancelled-bg: #FEE2E2;
  --badge-cancelled-text: #991B1B;
  --badge-cancelled-border: #FECACA;

  /* Shadows & Layout Metrics */
  --sidebar-width: 256px;
  --header-height: 64px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-full: 9999px;
  --shadow-card: 0 1px 3px rgba(32, 35, 31, 0.04), 0 1px 2px rgba(32, 35, 31, 0.02);
  --shadow-dropdown: 0 10px 25px -5px rgba(32, 35, 31, 0.08), 0 8px 10px -6px rgba(32, 35, 31, 0.04);
  --transition: all 0.18s ease-in-out;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* =====================================================================
   SIDEBAR LAYOUT ARCHITECTURE
   ===================================================================== */

/* Mobile Topbar (Visible only on < 992px) */
.mobile-topbar {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  justify-content: space-between;
  z-index: 100;
}

.mobile-toggle-btn, .mobile-action-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mobile-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 17px;
  color: var(--text-primary);
}

/* Sidebar Container */
.app-sidebar {
  width: var(--sidebar-width);
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 110;
  overflow-y: auto;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(32, 35, 31, 0.4);
  backdrop-filter: blur(2px);
  z-index: 105;
}

/* Sidebar Header */
.sidebar-header {
  padding: 22px 20px 18px;
  border-bottom: 1px solid var(--border-subtle);
}

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

.brand-monogram {
  width: 36px;
  height: 36px;
  background: var(--brand);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
}

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

.brand-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

.brand-edition {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
}

.salon-badge {
  margin-top: 14px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.salon-badge svg {
  color: var(--brand);
  flex-shrink: 0;
}

.salon-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

/* Sidebar Nav */
.sidebar-nav {
  padding: 16px 14px;
  flex: 1;
}

.nav-group {
  margin-bottom: 20px;
}

.nav-group:last-child {
  margin-bottom: 8px;
}

.nav-group-title {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  color: var(--text-secondary);
  padding: 4px 10px 8px;
}

.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  color: #383C35;
  transition: var(--transition);
}

.nav-link svg {
  color: var(--text-secondary);
  transition: var(--transition);
  flex-shrink: 0;
}

.nav-link:hover {
  background: var(--bg-surface-subtle);
  color: var(--text-primary);
}

.nav-link:hover svg {
  color: var(--brand);
}

.nav-link.active {
  background: var(--bg-active-nav);
  color: var(--brand);
  font-weight: 700;
}

.nav-link.active svg {
  color: var(--brand);
}

/* Sidebar Footer User Card */
.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
}

.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--bg-page);
  border: 1px solid var(--border);
  color: var(--brand);
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.user-meta-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-meta-role {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
}

.logout-icon-btn {
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.logout-icon-btn:hover {
  background: #FEE2E2;
  color: #B91C1C;
}

/* =====================================================================
   MAIN VIEWPORT & PAGE CONTENT
   ===================================================================== */

.container {
  margin-left: var(--sidebar-width);
  padding: 36px 40px 80px;
  min-height: 100vh;
  max-width: 1380px;
}

.container.narrow {
  max-width: 900px;
}

/* Page Heading Section */
.page-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.breadcrumb-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.breadcrumb-nav span {
  color: var(--text-dim);
}

.page-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 0 0 4px;
}

.page-subtext {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0;
}

.heading-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =====================================================================
   KPI SUMMARY CARDS
   ===================================================================== */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.kpi-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.kpi-value {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.8px;
  color: var(--text-primary);
  margin: 6px 0 2px;
  line-height: 1.15;
}

.kpi-subtext {
  font-size: 12px;
  color: var(--text-dim);
}

.kpi-subtext a {
  color: var(--brand);
  font-weight: 600;
}

/* Secondary Summaries (Visually quieter) */
.secondary-summary-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.secondary-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.secondary-card-label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}

.secondary-card-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

/* =====================================================================
   MAIN TWO-COLUMN WORKSPACE
   ===================================================================== */

.workspace-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

.panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  margin-bottom: 22px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.panel-heading h2 {
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin: 0;
}

.panel-subtext {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 2px 0 0;
}

/* =====================================================================
   TABLES
   ===================================================================== */

.table-wrap,
.table-container {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  white-space: nowrap;
  background: var(--bg-surface);
}

th {
  background: var(--bg-surface-subtle);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: #FCFBF9;
}

/* =====================================================================
   BUTTONS & ACTIONS
   ===================================================================== */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  white-space: nowrap;
}

.button.primary {
  background: var(--brand);
  color: #FFFFFF;
}

.button.primary:hover {
  background: var(--brand-hover);
}

.button.secondary {
  background: #FFFFFF;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.button.secondary:hover {
  background: var(--bg-surface-subtle);
  border-color: #D2D0C7;
}

.button.small-button {
  padding: 5px 10px;
  font-size: 12px;
}

.button.block {
  width: 100%;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  color: var(--brand);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.link-button:hover {
  text-decoration: underline;
}

.danger-text {
  color: #B91C1C !important;
}

.inline-form {
  display: inline-flex;
  gap: 6px;
}

/* =====================================================================
   STATUS BADGES
   ===================================================================== */

.status, .pill, .status-badge, .badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.2px;
  border: 1px solid transparent;
  white-space: nowrap;
}

.status.confirmed, .status-badge.confirmed, .badge.badge-confirmed, .badge-confirmed {
  background: var(--badge-confirmed-bg);
  color: var(--badge-confirmed-text);
  border-color: var(--badge-confirmed-border);
}

.status.completed, .status-badge.completed, .badge.badge-completed, .badge-completed {
  background: var(--badge-completed-bg);
  color: var(--badge-completed-text);
  border-color: var(--badge-completed-border);
}

.status.cancel_requested, .status-badge.cancel_requested, .badge.badge-pending, .badge-pending {
  background: var(--badge-pending-bg);
  color: var(--badge-pending-text);
  border-color: var(--badge-pending-border);
}

.status.cancelled, .status.no_show, .status-badge.cancelled, .status-badge.no_show, .badge.badge-cancelled, .badge-cancelled {
  background: var(--badge-cancelled-bg);
  color: var(--badge-cancelled-text);
  border-color: var(--badge-cancelled-border);
}

.pill-credit { background: #EBF5F0; color: #166534; }
.pill-reserve { background: #FEF3C7; color: #92400E; }
.pill-release { background: #F3E8FF; color: #6B21A8; }
.pill-debit { background: #EFF6FF; color: #1D4ED8; }
.pill-adjustment { background: #FCE7F3; color: #9D174D; }

.walkin-pill {
  background: #F2EFE9;
  color: #615E55;
  border: 1px solid var(--border);
  font-size: 9.5px;
  margin-left: 6px;
}

/* =====================================================================
   FORMS & INPUTS
   ===================================================================== */

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  display: block;
}

input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13.5px;
  transition: var(--transition);
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--brand-glow);
}

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

.form-section {
  padding: 14px 0;
  border-bottom: 1px solid var(--border-subtle);
}

.form-section:last-child {
  border-bottom: none;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  border: 1px solid transparent;
}

.alert.success {
  background: var(--badge-confirmed-bg);
  color: var(--badge-confirmed-text);
  border-color: var(--badge-confirmed-border);
}

.alert.error {
  background: var(--badge-cancelled-bg);
  color: var(--badge-cancelled-text);
  border-color: var(--badge-cancelled-border);
}

.alert.warning {
  background: var(--badge-pending-bg);
  color: var(--badge-pending-text);
  border-color: var(--badge-pending-border);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 36px 16px;
  color: var(--text-secondary);
  font-size: 13px;
}

/* =====================================================================
   BOOKING CREATION 4-STEP WIZARD
   ===================================================================== */

.booking-wizard {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.wizard-step {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.step-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
}

.step-desc {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: auto;
}

/* Step 2 Service Cards */
.services-category-block {
  margin-bottom: 18px;
}

.services-category-title {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border-subtle);
}

.service-selectable-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: #FFFFFF;
  cursor: pointer;
  transition: var(--transition);
}

.service-selectable-row:hover {
  background: var(--bg-surface-subtle);
  border-color: #D2D0C7;
}

.service-selectable-row.is-selected {
  background: var(--bg-active-nav);
  border-color: var(--brand);
}

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

.service-row-left input[type="checkbox"] {
  width: 17px;
  height: 17px;
  accent-color: var(--brand);
}

.service-row-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.service-row-duration {
  font-size: 12px;
  color: var(--text-secondary);
  margin-left: 8px;
}

.service-row-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
}

/* Slots Grid */
.slots-grid-wrap {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.slot-btn {
  padding: 9px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: var(--transition);
}

.slot-btn:hover {
  background: var(--bg-active-nav);
  border-color: var(--brand);
}

.slot-btn.selected {
  background: var(--brand);
  color: #FFFFFF;
  border-color: var(--brand);
}

.slot-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: var(--bg-page);
}

/* Booking Summary Card */
.summary-box {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin-bottom: 16px;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
}

.summary-line.total {
  font-size: 15px;
  font-weight: 800;
  color: var(--brand);
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}

/* =====================================================================
   AUTH PAGE (LOGIN)
   ===================================================================== */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg-page);
}

.auth-card {
  width: min(100%, 430px);
  padding: 36px 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-dropdown);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: var(--bg-page);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin: 18px 0;
  border: 1px solid var(--border);
}

.tab-btn {
  background: none;
  border: none;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.tab-btn.active {
  background: var(--bg-surface);
  color: var(--text-primary);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

/* Modals */
.modal-dialog {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  color: var(--text-primary);
  padding: 0;
  max-width: 480px;
  width: 90vw;
  box-shadow: var(--shadow-dropdown);
}

.modal-dialog::backdrop {
  background: rgba(32, 35, 31, 0.4);
  backdrop-filter: blur(2px);
}

.modal-content {
  padding: 24px;
}

/* Staff Overview List in Secondary Column */
.staff-duty-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.staff-duty-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
}

/* Secondary Column Widgets & Feed */
.alert-kpi {
  border-color: #FECACA !important;
  background: #FFFDFD !important;
}

.strong-cell {
  font-weight: 700;
  color: var(--text-primary);
}

.cell-subtext {
  font-size: 11.5px;
  color: var(--text-secondary);
}

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

.staff-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
}

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

.staff-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.cancel-requests-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cancel-item {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
}

.cancel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.cancel-details {
  margin: 4px 0 10px;
}

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

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.activity-action {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

/* Stats Grid & Stat Card (matching KPI system) */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stats-grid.stats-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}

.stat-card span {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-card strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: var(--text-primary);
  margin: 6px 0 2px;
  line-height: 1.15;
}

.stat-card small {
  font-size: 12px;
  color: var(--text-dim);
}

.stat-card.featured {
  border-left: 3px solid var(--brand);
}

.stat-card.alert-card {
  border-color: #FECACA;
  background: #FFFDFD;
}

.stat-card.success-card {
  border-color: #BBF7D0;
  background: #F8FDF9;
}

/* Two-column layout helper alias */
.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 1.1fr);
  gap: 24px;
  align-items: start;
}

/* Services Catalogue Items */
.services-list-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.service-item-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.service-item-row:hover {
  background: var(--bg-surface-subtle);
  border-color: #D2D0C7;
}

.service-item-row.inactive-item {
  opacity: 0.65;
  background: var(--bg-page);
}

.service-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.service-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  margin: 0;
}

.service-duration {
  font-size: 12px;
  color: var(--text-dim);
}

.service-actions-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.service-price-tag {
  font-size: 16px;
  font-weight: 800;
  color: var(--brand);
}

.mini-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.category-header {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-secondary);
  margin: 20px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.category-header:first-child {
  margin-top: 0;
}

/* Checkbox Pill Selection (Settings Weekly Off) */
.checkbox-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.checkbox-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  background: #FFFFFF;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  user-select: none;
  transition: var(--transition);
}

.checkbox-pill:hover {
  background: var(--bg-surface-subtle);
  border-color: #D2D0C7;
}

.checkbox-pill input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--brand);
}

/* Info Table (Settings) */
.info-table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin-top: 12px;
}

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

.info-table td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 13px;
}

.info-table tr:last-child td {
  border-bottom: none;
}

/* Utilities */
.disabled-input {
  background: var(--bg-surface-subtle) !important;
  color: var(--text-secondary) !important;
  cursor: not-allowed;
}

.json-code {
  font-size: 11px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  padding: 3px 6px;
  border-radius: 4px;
  display: inline-block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.highlight-price {
  color: var(--brand) !important;
  font-weight: 800 !important;
}

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}

.panel-divider {
  border: 0;
  border-top: 1px solid var(--border-subtle);
  margin: 20px 0;
}

/* =====================================================================
   RESPONSIVE MEDIA QUERIES
   ===================================================================== */

@media (max-width: 1200px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .secondary-summary-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .mobile-topbar {
    display: flex;
  }
  .app-sidebar {
    transform: translateX(-100%);
  }
  .app-sidebar.is-open {
    transform: translateX(0);
  }
  .sidebar-backdrop.is-visible {
    display: block;
  }
  .container {
    margin-left: 0;
    padding: 24px 20px 60px;
    padding-top: calc(var(--header-height) + 24px);
  }
  .workspace-columns {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .kpi-grid {
    grid-template-columns: 1fr;
  }
  .secondary-summary-row {
    grid-template-columns: 1fr;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .page-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .heading-actions {
    width: 100%;
  }
  .heading-actions .button {
    flex: 1;
  }
}

/* =====================================================================
   GROWTH, LOYALTY, VOUCHERS & GAMIFICATION STYLES
   ===================================================================== */
.loyalty-progress-card {
  background: linear-gradient(135deg, #176B4D 0%, #0D4531 100%);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(23, 107, 77, 0.2);
}
.loyalty-progress-card::after {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  pointer-events: none;
}
.loyalty-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.loyalty-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}
.loyalty-badge {
  background: rgba(255, 255, 255, 0.18);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.progress-bar-bg {
  background: rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-full);
  height: 12px;
  overflow: hidden;
  margin-bottom: 10px;
}
.progress-bar-fill {
  background: linear-gradient(90deg, #FDE68A 0%, #F59E0B 100%);
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.4s ease;
}
.loyalty-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  opacity: 0.9;
}

/* Voucher Ticket Cards */
.voucher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.voucher-card {
  background: var(--bg-surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.voucher-card:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}
.voucher-code-tag {
  font-family: monospace;
  font-weight: 700;
  letter-spacing: 0.05em;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  color: var(--brand);
  display: inline-block;
}
.voucher-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-primary);
  margin: 8px 0 4px;
}
.voucher-desc {
  font-size: 12px;
  color: var(--text-secondary);
}

/* Gamification Spin Wheel & Scratch Card */
.game-card-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
}
.wheel-outer {
  position: relative;
  width: 280px;
  height: 280px;
  margin: 0 auto 20px;
}
.wheel-canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform 4s cubic-bezier(0.17, 0.67, 0.12, 0.99);
}
.wheel-pointer {
  position: absolute;
  top: -12px;
  left: calc(50% - 14px);
  width: 28px;
  height: 28px;
  z-index: 10;
}
.wheel-pointer svg {
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Scratch Card */
.scratch-box {
  position: relative;
  width: 280px;
  height: 180px;
  margin: 0 auto 16px;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border: 2px dashed var(--border);
}
.scratch-prize-underneath {
  position: absolute;
  inset: 0;
  background: #FFFBEB;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px;
  text-align: center;
}
.scratch-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Referral Sharing Box */
.referral-share-card {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  margin-top: 16px;
}
.referral-copy-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.referral-code-input {
  flex: 1;
  font-family: monospace;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.05em;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--brand);
}
