/* ==============================================================================
   KOFI rewards - Design System (Gugenka Café Boutique & Paytin Fintech Theme)
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Paytin Theme Colors */
  --bg-app: #F5F7F2;
  --bg-surface: #FFFFFF;
  --bg-subtle: #EAF0E4;
  --bg-hover: #E3EBDC;
  
  --border-color: #DEE6D5;
  --border-focus: #111827;
  --border-subtle: #E8EFE0;

  --text-main: #111827;
  --text-muted: #556575;
  --text-light: #8E9BAE;

  /* Electric Lime & Obsidian */
  --lime-primary: #B8F256;
  --lime-hover: #A3E635;
  --lime-dark: #84CC16;
  --lime-light: #EDFBD8;
  --lime-border: #C8F67C;
  --lime-glow: rgba(184, 242, 86, 0.45);

  --obsidian-dark: #111827;
  --obsidian-hover: #000000;
  --obsidian-card: #18181B;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-sm: 0 2px 5px 0 rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 14px -2px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 14px 24px -4px rgba(0, 0, 0, 0.09);
  --shadow-popup: 0 25px 35px -5px rgba(0, 0, 0, 0.14);

  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;
}

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

body {
  background-color: var(--bg-app);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==============================================================================
   Top Navigation Bar, Hamburger Button & Interactive Logo
   ============================================================================== */
.top-navbar {
  background-color: var(--bg-surface);
  border-bottom: 1px solid var(--border-color);
  padding: 0 20px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

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

.btn-hamburger {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-app);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--obsidian-dark);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-hamburger:hover {
  background: var(--obsidian-dark);
  color: var(--lime-primary);
  border-color: var(--obsidian-dark);
}

.brand-section {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  user-select: none;
}

.brand-section:hover {
  background-color: var(--bg-subtle);
}

.brand-logo-img {
  width: 36px;
  height: 36px;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain;
  display: block;
}

.brand-section:hover .brand-logo-img {
  transform: none;
}

.brand-badge {
  width: 36px;
  height: 36px;
  background: transparent;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-badge img {
  width: 100%;
  height: 100%;
  border-radius: 0 !important;
  box-shadow: none !important;
  object-fit: contain;
}

.brand-title {
  font-size: 20px;
  font-weight: 900;
  letter-spacing: -0.04em;
  color: var(--text-main);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-sub {
  font-size: 10px;
  background-color: var(--lime-primary);
  color: var(--obsidian-dark);
  font-weight: 900;
  padding: 3px 7px;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.brand-menu-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 3px;
  margin-top: 2px;
}

.brand-store-name {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.onboard-profile-card {
  transition: all 0.2s ease;
}

.onboard-profile-card:hover {
  border-color: var(--obsidian-dark) !important;
  background-color: var(--lime-light) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* ==============================================================================
   Drawer / Menú Lateral Deslizable (Sidebar Drawer)
   ============================================================================== */
.drawer-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

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

.sidebar-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  height: 100vh;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  box-shadow: 10px 0 30px rgba(0, 0, 0, 0.12);
  z-index: 101;
  transform: translateX(-100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}

.sidebar-drawer.active {
  transform: translateX(0);
}

.drawer-header {
  padding: 20px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-app);
}

.drawer-tenant-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-close-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  font-size: 18px;
  font-weight: 500;
  transition: var(--transition-fast);
}

.drawer-close-btn:hover {
  background: var(--obsidian-dark);
  color: #FFFFFF;
}

.drawer-body {
  padding: 20px 14px;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.drawer-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 12px 10px 6px 10px;
}

.drawer-nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-decoration: none;
  font-size: 14px;
  font-weight: 450;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.drawer-nav-item:hover {
  background: var(--bg-subtle);
  color: var(--obsidian-dark);
}

.drawer-nav-item.active {
  background: var(--obsidian-dark);
  color: var(--lime-primary);
  font-weight: 500;
}

.drawer-nav-item.active svg {
  stroke: var(--lime-primary);
}

.drawer-badge {
  margin-left: auto;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--lime-primary);
  color: var(--obsidian-dark);
}

.drawer-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border-color);
  background: var(--bg-app);
}

/* Selector dinámico de Cafeterías en Header */
.store-selector-dropdown {
  position: relative;
  display: inline-block;
}

.store-select-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
}

.store-select-btn:hover {
  background: var(--bg-hover);
  border-color: var(--obsidian-dark);
}

.store-dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
  display: none;
}

.store-dropdown-menu.active {
  display: block;
}

.store-option-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition-fast);
}

.store-option-item:hover {
  background: var(--bg-subtle);
}

.store-option-item.active {
  background: var(--obsidian-dark);
  color: var(--lime-primary);
}

.nav-tabs {
  display: flex;
  gap: 6px;
  background-color: var(--bg-subtle);
  padding: 5px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
}

.tab-button {
  background: transparent;
  border: none;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: var(--radius-full);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.tab-button:hover {
  color: var(--text-main);
}

.tab-button.active {
  background-color: var(--obsidian-dark);
  color: #B8F5CE; /* Menta claro */
  box-shadow: var(--shadow-sm);
}

.tab-button.active svg {
  stroke: #B8F5CE;
}

.tab-badge {
  background-color: #B8F5CE;
  color: var(--obsidian-dark);
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-full);
  font-weight: 600;
}

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

.store-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-main);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: var(--lime-primary);
  display: inline-block;
  box-shadow: 0 0 0 3px rgba(184, 242, 86, 0.4);
}

/* ==============================================================================
   Main Container
   ============================================================================== */
.main-content {
  flex: 1;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
  padding: 28px;
}

.view-section {
  display: none;
}

.view-section.active {
  display: block;
  animation: fadeIn 0.2s ease-out;
}

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

/* ==============================================================================
   POS Cashier View
   ============================================================================== */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
}

@media (max-width: 960px) {
  .pos-layout {
    grid-template-columns: 1fr;
  }
}

.pos-main-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.search-box-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
}

.search-label {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-input-wrapper {
  display: flex;
  gap: 10px;
}

.phone-search-input {
  flex: 1;
  height: 54px;
  padding: 0 20px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-main);
  background-color: var(--bg-surface);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.phone-search-input:focus {
  border-color: var(--obsidian-dark);
  box-shadow: 0 0 0 4px var(--lime-glow);
}

.btn-search {
  height: 54px;
  padding: 0 24px;
  background-color: var(--obsidian-dark);
  color: var(--lime-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all var(--transition-fast);
}

.btn-search:hover {
  background-color: #000000;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.customer-card-pos {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

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

.customer-meta h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.customer-subinfo {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.city-tag {
  background-color: var(--obsidian-dark);
  color: #FFFFFF;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 12px;
}

.ig-tag {
  background-color: var(--lime-primary);
  color: var(--obsidian-dark);
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 12px;
}

.customer-total-badge {
  text-align: right;
  background-color: var(--bg-subtle);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.customer-total-badge .badge-num {
  font-size: 20px;
  font-weight: 900;
  color: var(--obsidian-dark);
}

.customer-total-badge .badge-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 700;
}

/* ==============================================================================
   Stamps Tracker with Checks
   ============================================================================== */
.stamps-tracker-section {
  background-color: #F8FAF6;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 22px;
}

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

.stamps-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--obsidian-dark);
  letter-spacing: -0.02em;
}

.stamps-count-pill {
  background-color: var(--lime-primary);
  color: var(--obsidian-dark);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 2px 6px var(--lime-glow);
}

.stamps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
}

.stamp-slot {
  aspect-ratio: 1;
  background-color: var(--bg-surface);
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all var(--transition-normal);
  position: relative;
}

/* Checked Slot */
.stamp-slot.active {
  background-color: var(--lime-primary) !important;
  border: 2px solid var(--lime-dark) !important;
  box-shadow: 0 6px 14px var(--lime-glow);
  transform: translateY(-2px);
}

.stamp-slot.reward-slot {
  border: 2px dashed #94A3B8;
  background-color: #FFFFFF;
}

.stamp-slot.reward-slot.active {
  background: var(--obsidian-dark) !important;
  border: 2px solid var(--obsidian-dark) !important;
  color: var(--lime-primary) !important;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.stamp-slot .stamp-number {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-light);
}

.stamp-slot.active .stamp-number {
  color: var(--obsidian-dark);
}

.stamp-slot.reward-slot.active .stamp-number {
  color: var(--lime-primary);
}

.stamp-slot-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  line-height: 1.15;
}

.stamp-slot-date {
  font-size: 10px;
  font-weight: 700;
  color: #1E293B;
  margin-top: 2px;
  letter-spacing: -0.01em;
}

.stamp-slot-amount {
  font-size: 11px;
  font-weight: 900;
  color: #0F172A;
  margin-top: 1px;
}

.stamp-slot.reward-slot.active .stamp-slot-date {
  color: #94A3B8;
}

.stamp-slot.reward-slot.active .stamp-slot-amount {
  color: #B8F5CE;
}

/* ==============================================================================
   Sale Form
   ============================================================================== */
.sale-register-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.sale-inputs-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: flex-end;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.input-money-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.currency-symbol {
  position: absolute;
  left: 16px;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-muted);
}

.input-money {
  width: 100%;
  height: 52px;
  padding-left: 36px;
  padding-right: 16px;
  font-size: 19px;
  font-weight: 800;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  outline: none;
  background-color: var(--bg-surface);
  transition: all var(--transition-fast);
}

.input-money::placeholder {
  color: #CBD5E1;
  font-weight: 500;
}

.input-money:focus {
  border-color: var(--obsidian-dark);
  box-shadow: 0 0 0 4px var(--lime-glow);
}

.btn-add-stamp {
  height: 52px;
  padding: 0 26px;
  background-color: var(--obsidian-dark);
  color: var(--lime-primary);
  border: none;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  transition: all var(--transition-fast);
}

.btn-add-stamp:hover {
  background-color: #000000;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.rule-hint-pill {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}

.rule-highlight {
  font-weight: 800;
  color: var(--obsidian-dark);
  background-color: var(--lime-primary);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* ==============================================================================
   Sidebar Feed
   ============================================================================== */
.pos-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.recent-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.recent-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-md);
  font-size: 12px;
  transition: background-color var(--transition-fast);
}

.recent-item:hover {
  background-color: #E2EADF;
}

.recent-info strong {
  display: block;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 700;
}

.recent-info span {
  color: var(--text-muted);
  font-size: 11px;
}

.recent-stamp-badge {
  background-color: var(--lime-primary);
  color: var(--obsidian-dark);
  font-weight: 800;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
}

/* ==============================================================================
   Admin Table
   ============================================================================== */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .kpi-row {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform var(--transition-fast);
}

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

.kpi-card.alert-highlight {
  border-color: var(--lime-primary);
  background: linear-gradient(180deg, var(--lime-light) 0%, #FFFFFF 100%);
}

.kpi-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.kpi-value {
  font-size: 30px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.03em;
}

.kpi-trend {
  font-size: 12px;
  color: var(--obsidian-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ==============================================================================
   Admin View & Upcoming Birthdays Sidebar
   ============================================================================== */
.admin-grid-layout {
  display: grid;
  grid-template-columns: 1fr 330px;
  gap: 20px;
  align-items: start;
}

@media (max-width: 1100px) {
  .admin-grid-layout {
    grid-template-columns: 1fr;
  }
}

.birthday-sidebar-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.birthday-sidebar-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
}

.birthday-sidebar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.birthday-sidebar-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 4px 0 0 0;
  line-height: 1.3;
}

.birthday-badge-count {
  background-color: #B8F5CE;
  color: var(--obsidian-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.birthday-items-list {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 540px;
  overflow-y: auto;
}

.birthday-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.birthday-user-item:hover {
  background-color: #F8FAFC;
  border-color: #CBD5E1;
  transform: translateY(-1px);
  box-shadow: var(--shadow-xs);
}

.bday-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bday-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--obsidian-dark);
  color: #B8F5CE;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.bday-user-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.2;
}

.bday-user-phone {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.bday-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.bday-tag {
  font-size: 11px;
  font-weight: 500;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background-color: #F1F5F9;
  color: var(--text-main);
}

.bday-tag.today {
  background-color: #DCFCE7;
  color: #166534;
  font-weight: 600;
}

.bday-days-left {
  font-size: 10px;
  color: var(--text-muted);
}

.table-container-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  padding: 18px 22px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  gap: 12px;
}

.table-title-group h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.table-title-group p {
  font-size: 12px;
  color: var(--text-muted);
}

.table-actions {
  display: flex;
  gap: 10px;
}

.table-search-input {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 13px;
  outline: none;
  background-color: var(--bg-subtle);
  width: 260px;
}

.table-search-input:focus {
  background-color: var(--bg-surface);
  border-color: var(--obsidian-dark);
}

.data-table-wrapper {
  overflow-x: auto;
  min-height: 280px;
  padding-bottom: 80px;
}

.monday-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.monday-table th {
  background-color: #F8FAF6;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.monday-table td {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.monday-table tr:hover td {
  background-color: var(--bg-hover);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 700;
}

.status-pill.pendiente {
  background-color: var(--lime-primary);
  color: var(--obsidian-dark);
  box-shadow: 0 2px 6px var(--lime-glow);
}

.status-pill.notificado {
  background-color: #E0F2FE;
  color: #0369A1;
}

.status-pill.canjeado {
  background-color: #DCFCE7;
  color: #15803D;
}

.mini-progress-bar {
  width: 100px;
  height: 8px;
  background-color: var(--bg-subtle);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: inline-block;
  margin-right: 8px;
}

.mini-progress-fill {
  height: 100%;
  background-color: var(--lime-primary);
  border-radius: var(--radius-full);
}

/* Business Checkbox Selection Modal */
.biz-checkbox-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-surface);
  cursor: pointer;
  transition: var(--transition-fast);
  user-select: none;
}

.biz-checkbox-card:hover {
  background: var(--bg-subtle);
  border-color: var(--obsidian-dark);
}

.biz-checkbox-card.selected {
  background: var(--lime-light);
  border-color: var(--obsidian-dark);
}

.biz-checkbox-card input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--obsidian-dark);
}

/* Action Dropdown Menu for Clientes Table */
.action-dropdown {
  position: relative;
  display: inline-block;
}

.btn-action-dropdown {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  background: var(--bg-surface);
  font-size: 12px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  transition: var(--transition-fast);
  white-space: nowrap;
}

.btn-action-dropdown:hover {
  background: var(--bg-subtle);
  border-color: var(--obsidian-dark);
}

.action-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  z-index: 50;
  display: none;
  flex-direction: column;
  gap: 2px;
}

.action-dropdown-menu.active {
  display: flex;
}

.action-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: var(--transition-fast);
  text-decoration: none;
}

.action-menu-item:hover {
  background: var(--bg-subtle);
  color: var(--obsidian-dark);
}

.action-menu-item.action-whatsapp {
  color: #15803D;
  font-weight: 700;
}

.action-menu-item.action-whatsapp:hover {
  background: #DCFCE7;
}

.action-menu-item.action-notify {
  color: #0369A1;
  font-weight: 700;
}

.action-menu-item.action-notify:hover {
  background: #E0F2FE;
}

.action-menu-item.action-redeem {
  color: #15803D;
  font-weight: 800;
}

.action-menu-item.action-redeem:hover {
  background: #DCFCE7;
}

.action-menu-divider {
  height: 1px;
  background: var(--border-color);
  margin: 4px 0;
}

.btn-table-action {
  height: 32px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-surface);
  color: var(--text-main);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition-fast);
}

.btn-table-action:hover {
  background-color: var(--lime-primary);
  border-color: var(--lime-primary);
  color: var(--obsidian-dark);
}

/* ==============================================================================
   Modals & Controls
   ==============================================================================/* WhatsApp Quick Button */
.btn-whatsapp {
  background-color: #25D366 !important;
  color: #FFFFFF !important;
  border: 1px solid #1EBE5D !important;
  font-weight: 700 !important;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: 11px;
  transition: var(--transition-fast);
}

.btn-whatsapp:hover {
  background-color: #1EBE5D !important;
  transform: scale(1.03);
}

/* Client Profile & Edit 2-Column Grid */
.client-edit-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 20px;
}

.client-edit-main {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.client-edit-sidebar {
  background: var(--bg-app);
  border-left: 1px solid var(--border-color);
  padding-left: 18px;
  display: flex;
  flex-direction: column;
}

.audit-history-list {
  max-height: 380px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
  padding-right: 4px;
}

.audit-history-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 12px;
}

.audit-history-author {
  font-weight: 800;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.audit-history-time {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 500;
}

.audit-history-details {
  color: var(--text-muted);
  line-height: 1.4;
  font-size: 11px;
}

.audit-history-details code {
  background: var(--bg-subtle);
  padding: 1px 4px;
  border-radius: 3px;
  color: var(--text-main);
  font-weight: 600;
}

.danger-zone-box {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-md);
  background: #FEF2F2;
  border: 1px solid #FECACA;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-danger-delete {
  background: #DC2626;
  color: #FFFFFF;
  border: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-danger-delete:hover {
  background: #B91C1C;
}

/* Base Modal Dialogs */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(17, 24, 39, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  padding: 20px;
}

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

#modal-select-business {
  z-index: 200;
}

.modal-dialog {
  background-color: var(--bg-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-popup);
  width: 100%;
  max-width: 520px;
  overflow: hidden;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

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

.modal-header h3 {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 22px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-body {
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-footer {
  padding: 18px 26px;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.celebration-box {
  text-align: center;
  padding: 36px 26px;
}

.celebration-icon {
  font-size: 54px;
  margin-bottom: 12px;
  animation: bounce 0.8s infinite alternate ease-in-out;
}

@keyframes bounce {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}

.celebration-title {
  font-size: 26px;
  font-weight: 900;
  color: var(--obsidian-dark);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.celebration-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.form-input {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 14px;
  outline: none;
  transition: all var(--transition-fast);
  background-color: var(--bg-surface);
}

.form-input:focus {
  border-color: var(--obsidian-dark);
  box-shadow: 0 0 0 3px var(--lime-glow);
}

.btn-primary {
  height: 46px;
  padding: 0 24px;
  background-color: var(--obsidian-dark);
  color: var(--lime-primary);
  border: none;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background-color: #000000;
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  height: 46px;
  padding: 0 20px;
  background-color: var(--bg-surface);
  color: var(--text-main);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.btn-secondary:hover {
  background-color: var(--bg-subtle);
}

/* ============================================================================
   PANTALLA DEDICADA DE LOGIN (PORTAL INDEPENDIENTE)
   ============================================================================ */
.login-page-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-body);
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.login-brand-badge {
  width: 56px;
  height: 56px;
  background: var(--obsidian-dark);
  color: var(--lime-primary);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
  box-shadow: 0 4px 12px rgba(184, 242, 86, 0.25);
}

.login-title {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-main);
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.4;
}

.btn-google-login-page {
  width: 100%;
  height: 52px;
  background: #FFFFFF;
  color: var(--obsidian-dark);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.btn-google-login-page:hover {
  border-color: var(--obsidian-dark);
  background: #F9FAFB;
  transform: translateY(-1px);
}

.login-divider {
  display: flex;
  align-items: center;
  margin: 24px 0;
  color: var(--text-light);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.login-divider span {
  padding: 0 12px;
}

.login-footer-link {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-footer-link a {
  color: var(--obsidian-dark);
  font-weight: 800;
  text-decoration: none;
}

.login-footer-link a:hover {
  text-decoration: underline;
}

.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 1000;
}

.toast {
  background-color: var(--obsidian-dark);
  color: #FFFFFF;
  padding: 14px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease-out;
}

.toast.success {
  background-color: var(--obsidian-dark);
  border-left: 5px solid var(--lime-primary);
}

.toast.amber {
  background-color: #78350F;
  border-left: 5px solid #F59E0B;
}

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

/* ==============================================================================
   Settings View Specific
   ============================================================================== */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 960px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

.settings-card {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.settings-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.settings-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.reward-mode-toggle {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.mode-option-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--bg-surface);
}

.mode-option-card:hover {
  background-color: var(--bg-subtle);
}

.mode-option-card.active {
  border-color: var(--obsidian-dark);
  background-color: var(--lime-light);
}

.mode-radio-circle {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.mode-option-card.active .mode-radio-circle {
  border-color: var(--obsidian-dark);
  background-color: var(--obsidian-dark);
}

.mode-option-card.active .mode-radio-circle::after {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--lime-primary);
}
