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

:root {
  --bg-primary: #0b0f19;
  --bg-secondary: #111827;
  --bg-card: rgba(17, 24, 39, 0.85);
  --border-color: rgba(255, 255, 255, 0.05);
  
  --accent-primary: #0ea5e9; /* Sky Blue */
  --accent-secondary: #06b6d4;
  --accent-gradient: linear-gradient(135deg, #38bdf8 0%, #0ea5e9 100%);
  --accent-glow: rgba(14, 165, 233, 0.15);

  --status-paid: #38bdf8;
  --status-paid-bg: rgba(14, 165, 233, 0.08);
  --status-due: #f59e0b;
  --status-due-bg: rgba(245, 158, 11, 0.1);
  --status-overdue: #f43f5e;
  --status-overdue-bg: rgba(244, 63, 94, 0.1);

  --text-primary: #f8fafc;
  --text-secondary: #a3b2c7; /* bumped from #94a3b8 for legibility on dark */
  --text-muted: #6b7990;     /* bumped from #475569 — slate-600 failed contrast */

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Barlow Condensed', 'Outfit', sans-serif;
  --mono: ui-monospace, monospace;

  /* Motion — strong custom curves (Emil Kowalski) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --press: scale(0.97);
}

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

button, input, select, textarea {
  font-family: var(--font-sans);
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  height: 100vh;
  display: flex;
  justify-content: center;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.app-wrapper {
  width: 100%;
  max-width: 480px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-primary);
  position: relative;
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.85);
}

/* Header */
.app-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: rgba(10, 11, 13, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  z-index: 10;
}

.logo {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.35rem;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.logo span {
  color: var(--accent-primary);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  color: #0a0b0d;
  border: 1px solid rgba(255,255,255,0.25);
}

/* Browser Test Simulator Selector */
.test-selector {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,0.01);
  padding: 8px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.test-selector select {
  background: #131418;
  color: white;
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 6px;
  outline: none;
  font-size: 0.75rem;
}

/* Main Content Area */
.app-main {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 80px;
  display: flex;
  flex-direction: column;
}

.app-main::-webkit-scrollbar {
  width: 4px;
}
.app-main::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
}

.welcome-box {
  margin-bottom: 22px;
}

.welcome-box h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
}

.welcome-box p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* Loader */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 60vh;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(255, 255, 255, 0.03);
  border-top-color: var(--accent-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Tab Switching transition */
.tab-content {
  display: none;
  animation: fadeIn 240ms var(--ease-out);
}

.tab-content.active {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tab-content.active:not(#tab-chat) {
  min-height: unset !important;
  height: auto !important;
}

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

/* Payment Method Badges */
.payment-method-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.05);
}
.payment-method-badge.method-cash {
  background: rgba(34, 197, 94, 0.1);
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.2);
}
.payment-method-badge.method-nocash {
  background: rgba(14, 165, 233, 0.1);
  color: #38bdf8;
  border-color: rgba(14, 165, 233, 0.2);
}
.payment-method-badge.method-online {
  background: rgba(139, 92, 246, 0.1);
  color: #a78bfa;
  border-color: rgba(139, 92, 246, 0.2);
}
.payment-method-badge.method-other {
  background: rgba(107, 114, 128, 0.1);
  color: #9ca3af;
  border-color: rgba(107, 114, 128, 0.2);
}

/* Staggered entrance for list rows (decorative, never blocks input) */
.classes-container > *,
.history-list > *,
#client-cabinet-leaderboard > *,
.inbox-messages > * {
  animation: rowIn 260ms var(--ease-out) backwards;
}
.classes-container > *:nth-child(1), .history-list > *:nth-child(1), #client-cabinet-leaderboard > *:nth-child(1), .inbox-messages > *:nth-child(1) { animation-delay: 20ms; }
.classes-container > *:nth-child(2), .history-list > *:nth-child(2), #client-cabinet-leaderboard > *:nth-child(2), .inbox-messages > *:nth-child(2) { animation-delay: 60ms; }
.classes-container > *:nth-child(3), .history-list > *:nth-child(3), #client-cabinet-leaderboard > *:nth-child(3), .inbox-messages > *:nth-child(3) { animation-delay: 100ms; }
.classes-container > *:nth-child(4), .history-list > *:nth-child(4), #client-cabinet-leaderboard > *:nth-child(4), .inbox-messages > *:nth-child(4) { animation-delay: 140ms; }
.classes-container > *:nth-child(5), .history-list > *:nth-child(5), #client-cabinet-leaderboard > *:nth-child(5), .inbox-messages > *:nth-child(5) { animation-delay: 180ms; }
.classes-container > *:nth-child(n+6), .history-list > *:nth-child(n+6), #client-cabinet-leaderboard > *:nth-child(n+6), .inbox-messages > *:nth-child(n+6) { animation-delay: 210ms; }

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

.membership-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--rounded-lg);
  padding: 24px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

.membership-card::before {
  display: none;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

.plan-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.paid { background: var(--status-paid-bg); color: var(--status-paid); border: 1px solid rgba(14, 165, 233, 0.2); }
.status-badge.due { background: var(--status-due-bg); color: var(--status-due); border: 1px solid rgba(245, 158, 11, 0.2); }
.status-badge.overdue { background: var(--status-overdue-bg); color: var(--status-overdue); border: 1px solid rgba(244, 63, 94, 0.2); }

/* Progress bar style */
.progress-box {
  margin-bottom: 20px;
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 6px;
}

.progress-label {
  color: var(--text-secondary);
}

.progress-val {
  font-weight: 600;
}

.progress-bar-container {
  height: 6px;
  background: rgba(255,255,255,0.04);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent-gradient);
  border-radius: 3px;
  width: 0;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.4);
}

.card-details {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding-top: 20px;
  position: relative;
  z-index: 1;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.detail-row .label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.detail-row .value {
  font-size: 0.9rem;
  font-weight: 500;
}

/* Auto renew toggle row */
.autorenew-toggle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  position: relative;
  z-index: 1;
}

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

.autorenew-text .title {
  font-size: 0.85rem;
  font-weight: 600;
}

.autorenew-text .sub {
  font-size: 0.7rem;
  color: var(--text-secondary);
  opacity: 0.7;
}

/* Switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 22px;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255,255,255,0.04);
  transition: .3s;
  border-radius: 22px;
  border: 1px solid var(--border-color);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: var(--accent-primary);
  border-color: transparent;
}

input:checked + .slider:before {
  transform: translateX(20px);
}

input:checked + .slider:before {
  background-color: #0a0b0d;
}

/* Button */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.88rem;
  border: none;
  cursor: pointer;
  transition: transform 160ms cubic-bezier(0.23, 1, 0.32, 1), filter 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

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

.btn-primary {
  background: var(--accent-gradient);
  color: #0a0b0d;
  box-shadow: 0 4px 15px rgba(14, 165, 233, 0.25);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
  }
}

.btn-primary:disabled {
  background: rgba(255,255,255,0.03);
  color: var(--text-muted);
  box-shadow: none;
  cursor: not-allowed;
  transform: none !important;
}

.btn-secondary {
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
    background: rgba(255,255,255,0.06);
  }
}

/* Schedule Filters */
.schedule-filters-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 18px;
}

.days-filter-row, .categories-filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.days-filter-row::-webkit-scrollbar {
  height: 4px;
}
.days-filter-row::-webkit-scrollbar-thumb {
  background: rgba(14, 165, 233, 0.25);
  border-radius: 2px;
}
.categories-filter-row::-webkit-scrollbar {
  display: none;
}

.day-pill, .cat-pill {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.01);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.day-pill.active, .cat-pill.active {
  background: var(--accent-gradient);
  color: #0a0b0d;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

/* Classes Schedule Container */
.classes-container {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.class-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.2s, border-color 0.2s;
}

.class-item:hover {
  border-color: rgba(255,255,255,0.1);
}

.class-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.class-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
}

.day-badge {
  background: rgba(14, 165, 233, 0.1);
  color: var(--accent-primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
}

.class-details {
  display: flex;
  gap: 16px;
  font-size: 0.75rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(255,255,255,0.03);
  padding-bottom: 12px;
}

.class-details div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.class-capacity {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.btn-small {
  padding: 6px 14px;
  font-size: 0.75rem;
  border-radius: 8px;
}

/* History List */
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-item {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

.history-item span.time {
  color: var(--text-secondary);
}

.history-item span.status {
  font-weight: 600;
  color: var(--status-paid);
}

/* Notifications Box */
.inbox-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
}

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

.inbox-header h3 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
}

.inbox-header .badge {
  background: var(--status-overdue);
  color: white;
  padding: 2px 6px;
  border-radius: 10px;
  font-size: 0.65rem;
  font-weight: 700;
}

.inbox-messages {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 180px;
  overflow-y: auto;
}

.notif-item {
  background: rgba(255, 255, 255, 0.01);
  border-left: 2px solid var(--accent-primary);
  border-radius: 6px;
  padding: 10px 12px;
}

.notif-time {
  font-size: 0.6rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.notif-msg {
  font-size: 0.725rem;
  color: var(--text-secondary);
  line-height: 1.4;
}

/* Support Card */
.gym-info-card {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 20px;
}

.gym-info-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.gym-info-card p {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-bottom: 14px;
}

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

.contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: white;
  border: 1px solid var(--border-color);
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.contact-btn.tg {
  background: rgba(14, 165, 233, 0.05);
  border-color: rgba(14, 165, 233, 0.15);
  color: var(--accent-primary);
}

.contact-btn.phone {
  background: rgba(255,255,255,0.02);
}

.contact-btn:hover {
  filter: brightness(1.15);
}

/* Modal overlays */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 10, 13, 0.93);
  display: flex;
  justify-content: center;
  align-items: flex-end;
  z-index: 1000;
  opacity: 1;
  animation: modalFadeIn 250ms cubic-bezier(0.23, 1, 0.32, 1);
  overflow-x: hidden;
}

/* Sub-modals z-index stack to prevent overlapping blockage */
#admin-plan-modal,
#admin-trainer-modal,
#admin-add-payment-modal,
#admin-copy-day-modal,
#admin-copy-week-modal,
#voin-confirm-modal {
  z-index: 1100 !important;
}

/* Full-screen settings modal override */
#admin-settings-modal .modal-card {
  height: 100vh !important;
  max-height: 100vh !important;
  border-radius: 0 !important;
  border: none !important;
  padding: 16px 16px 24px 16px !important;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-top-left-radius: var(--rounded-lg);
  border-top-right-radius: var(--rounded-lg);
  width: 100%;
  padding: 24px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(0);
  animation: modalSlideUp 350ms cubic-bezier(0.32, 0.72, 0, 1);
  height: 80vh;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.modal-body {
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.modal-body::-webkit-scrollbar {
  width: 4px;
}
.modal-body::-webkit-scrollbar-track {
  background: transparent;
}
.modal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}
.modal-body::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

@keyframes modalSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

/* Plan select option */
.plans-select-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plan-option {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.plan-option:hover {
  background: rgba(255,255,255,0.03);
}

.plan-option.selected {
  border-color: var(--accent-primary);
  background: rgba(14, 165, 233, 0.05);
}

.plan-option .name {
  font-size: 0.85rem;
  font-weight: 600;
}

.plan-option .price {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent-primary);
}

/* Bottom Tab Bar Navigation */
.app-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  background: #0a0b0d;
  border-top: 1px solid var(--border-color);
  padding: 8px 0;
  z-index: 10;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.675rem;
  cursor: pointer;
  width: 68px;
  transition: color 0.2s;
}

.nav-item:hover, .nav-item.active {
  color: var(--accent-primary);
}

.nav-item.active svg {
  transform: translateY(-1px);
}

.btn-block {
  width: 100%;
}

/* ========================================================== */
/* VOIN CRM SCREENSHOT SPECIFIC ALIGNMENTS */
/* ========================================================== */

/* 4 Metrics Grid Layout */
.stats-grid-voin {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}

.stat-box-voin {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-box-voin .stat-icon-label {
  font-size: 0.725rem;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-box-voin .stat-value {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: white;
}

.stat-box-voin .stat-value-sm {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
}

.stat-box-voin .stat-sub {
  font-size: 0.65rem;
  color: var(--text-muted);
}

.stat-box-voin .stat-sub.positive {
  color: var(--accent-primary);
  font-weight: 600;
}

/* Overlapping Avatars for New Signups */
.voin-requests-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.voin-requests-box h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
}

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

.avatar-overlap-group {
  display: flex;
  position: relative;
  align-items: center;
}

.avatar-sm {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid #131418;
  background-size: cover;
  background-position: center;
  margin-right: -10px;
}

.avatar-count-badge {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #1c1d24;
  border: 2px solid #131418;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.requests-text {
  font-size: 0.775rem;
  color: var(--text-secondary);
}

/* Horizontal Calendar Date Picker row */
.day-pill-voin {
  padding: 8px 12px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  min-width: 66px;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.day-pill-voin.active {
  background: var(--accent-primary);
  border-color: transparent;
  color: #0a0b0d;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.day-pill-voin .date {
  font-size: 0.775rem;
  font-weight: 700;
}

.day-pill-voin .weekday {
  font-size: 0.55rem;
  font-weight: 600;
  opacity: 0.75;
}

/* Client Detail Parameter Cards */
.client-params-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.param-card {
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 8px 4px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.param-card .val {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  color: white;
}

.param-card .lbl {
  font-size: 0.525rem;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.goal-tag {
  font-size: 0.725rem;
  color: var(--text-secondary);
  background: rgba(255,255,255,0.01);
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.goal-tag span {
  color: white;
  font-weight: 600;
}

/* Sparklines charts */
.sparkline-container svg {
  filter: drop-shadow(0 2px 4px rgba(14, 165, 233, 0.15));
}

.donut-chart {
  transform: rotate(-90deg);
}

.admin-search-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
  color: white;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}

.admin-search-input:focus {
  border-color: var(--accent-primary);
}

.admin-client-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.admin-client-card:hover {
  background: rgba(255,255,255,0.01);
}

.admin-client-card .info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-client-card .name {
  font-size: 0.9rem;
  font-weight: 600;
  color: white;
}

.admin-client-card .phone {
  font-size: 0.725rem;
  color: var(--text-secondary);
}

.admin-client-card .sub-badge {
  font-size: 0.65rem;
  color: var(--text-muted);
}

/* Distribution Indicator */
.distribution-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 16px 20px;
}

.distribution-card h3 {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.dist-bar {
  height: 8px;
  background: rgba(255,255,255,0.04);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
}

.dist-segment {
  height: 100%;
  transition: width 0.5s ease-in-out;
}

.dist-segment.paid { background-color: var(--status-paid); }
.dist-segment.due { background-color: var(--status-due); }
.dist-segment.overdue { background-color: var(--status-overdue); }

.dist-legend {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 0.65rem;
  color: var(--text-secondary);
}

.dist-legend div {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
}

.dot.paid { background-color: var(--status-paid); }
.dot.due { background-color: var(--status-due); }
.dot.overdue { background-color: var(--status-overdue); }

.roster-client-item {
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.roster-client-item:hover {
  background: rgba(255,255,255,0.02);
}

.roster-client-item.attended {
  border-color: rgba(14, 165, 233, 0.3);
  background: rgba(14, 165, 233, 0.02);
}

.roster-client-item .client-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.roster-client-item .client-name {
  font-size: 0.85rem;
  font-weight: 500;
}

.roster-client-item .sub-details {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.roster-check-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: transparent;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.attended .roster-check-btn {
  background-color: var(--status-paid);
  border-color: var(--status-paid);
  color: #0a0b0d;
}

/* Layout and Spacing Utility Classes to remove inline styles */
.hidden { display: none !important; }
.init-hidden { display: none; }
.flex-col { display: flex; flex-direction: column; }
.flex-row { display: flex; flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.flex-col-center { display: flex; flex-direction: column; justify-content: center; align-items: center; }
.flex-row-center { display: flex; flex-direction: row; justify-content: center; align-items: center; }
.flex-between-center { display: flex; justify-content: space-between; align-items: center; }
.flex-around-center { display: flex; justify-content: space-around; align-items: center; }
.flex-end { justify-content: flex-end; }
.items-center { align-items: center; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.m-auto-0 { margin: auto 0; }
.border-top-line { border-top: 1px solid var(--border-color); }
.border-bottom-line { border-bottom: 1px solid var(--border-color); }

/* Spacing Scales (gap) */
.gap-2 { gap: 4px; }
.gap-4 { gap: 8px; }
.gap-6 { gap: 12px; }
.gap-8 { gap: 16px; }
.gap-10 { gap: 20px; }
.gap-12 { gap: 24px; }

/* Spacing Scales (padding) */
.p-8 { padding: 8px; }
.p-10 { padding: 10px; }
.p-12 { padding: 12px; }
.p-14 { padding: 14px; }
.p-16 { padding: 16px; }
.p-18 { padding: 18px; }
.p-20 { padding: 20px; }
.p-24 { padding: 24px; }

/* Spacing Scales (margin) */
.m-0 { margin: 0; }
.mt-2 { margin-top: 4px; }
.mt-4 { margin-top: 8px; }
.mt-6 { margin-top: 12px; }
.mt-8 { margin-top: 16px; }
.mt-10 { margin-top: 20px; }
.mb-2 { margin-bottom: 4px; }
.mb-4 { margin-bottom: 8px; }
.mb-6 { margin-bottom: 12px; }
.mb-8 { margin-bottom: 16px; }
.mb-10 { margin-bottom: 20px; }

/* Custom elements & typography */
.text-4xl { font-size: 2.5rem; font-weight: 800; color: white; letter-spacing: -0.5px; line-height: 1.1; }
.text-3xl { font-size: 1.85rem; font-weight: 800; color: white; letter-spacing: -0.3px; line-height: 1.2; }
.text-lg { font-size: 1.4rem; font-weight: 800; color: white; }
.text-md { font-size: 1.05rem; font-weight: 700; color: white; }
.text-sm { font-size: 0.8rem; color: var(--text-secondary); }
.text-xs { font-size: 0.725rem; color: var(--text-secondary); }
.text-xxs { font-size: 0.6rem; color: var(--text-secondary); }
.bold-text { font-weight: 700; }
.accent-value { font-size: 1.1rem; font-weight: 800; color: var(--accent-primary); }
.label-block { font-size: 0.75rem; color: var(--text-secondary); display: block; }
.bg-primary-input { background: var(--bg-primary) !important; }
.cursor-pointer { cursor: pointer; }

/* Touch Target Minimum Height & Width */
.switch {
  width: 50px;
  height: 28px;
}
.slider:before {
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
}
input:checked + .slider:before {
  transform: translateX(22px);
}
.day-pill, .cat-pill, .day-pill-voin, .contact-btn, .btn-small, .btn, .nav-item {
  min-height: 44px;
}
/* Adjust layout spacing for touch targets */
.day-pill, .cat-pill {
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.day-pill-voin {
  min-width: 70px;
  justify-content: center;
  padding: 6px 12px;
}
.btn-small {
  padding: 10px 18px;
}

/* Scoped Hover Improvements — Prevent Sticky States on Mobile Devices */
@media (hover: hover) and (pointer: fine) {
  .day-pill:hover, .cat-pill:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
  }
  .class-item:hover, .admin-client-card:hover, .roster-client-item:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.01);
  }
  .plan-option:hover {
    background: rgba(255, 255, 255, 0.03);
  }
  .contact-btn:hover {
    filter: brightness(1.15);
  }
}

.overflow-hidden { overflow: hidden; }
.max-w-400 { max-width: 400px; }
.max-w-380 { max-width: 380px; }
.border-none { border: none !important; }
.bg-transparent { background: transparent !important; }
.display-block { display: block !important; }

.client-leaderboard-section { border-top: 1px solid var(--border-color); padding-top: 8px; margin-top: 8px; }
.client-leaderboard-title { font-size: 0.725rem; font-weight: 700; color: white; margin-bottom: 8px; }
.pt-4 { padding-top: 8px; }
.pb-4 { padding-bottom: 8px; }

.profile-avatar-preview { width: 58px; height: 58px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-primary); }
.profile-avatar-fallback { width: 58px; height: 58px; border-radius: 50%; background: var(--accent-primary); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 1.1rem; color: white; }
.btn-avatar-trigger { margin: 0; padding: 10px 14px; font-size: 0.725rem; border-radius: var(--rounded-sm); cursor: pointer; border: none; background: rgba(255,255,255,0.03); color: var(--text-primary); }
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; }
.h-full { height: 100%; }
.box-border { box-sizing: border-box; }
.min-h-280 { min-height: 280px; }
.justify-between { justify-content: space-between; }
.chat-messages-box { display: flex; flex-direction: column; gap: 10px; max-height: none; min-height: 150px; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 10px; background: rgba(0,0,0,0.25); border-radius: var(--rounded-md); flex: 1; border: 1px solid var(--border-color); }
.m-auto-t { margin-top: auto; }

.max-h-150 { max-height: 150px; }
.btn-import-trigger { font-size: 0.7rem; padding: 6px 12px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.08); color: var(--text-primary); }
.collapsible-import-box { display: none; margin-bottom: 16px; padding: 12px; background: rgba(255,255,255,0.02); border-radius: var(--rounded-md); border: 1px solid var(--border-color); }
.text-white { color: white !important; }
.lh-135 { line-height: 1.35; }
.sort-select { width: auto; max-width: 140px; padding: 10px 12px; background: var(--bg-secondary); font-size: 0.75rem; border: 1px solid var(--border-color); border-radius: var(--rounded-md); cursor: pointer; color: white; }
.btn-action-copy { flex: 1; padding: 8px; font-size: 0.725rem; border-radius: var(--rounded-sm); font-weight: 600; background: rgba(255,255,255,0.03); border: 1px solid var(--border-color); cursor: pointer; color: var(--text-primary); }

.p-0 { padding: 0 !important; }
.resize-none { resize: none !important; }
.h-70 { height: 70px !important; }
.text-paid { color: var(--status-paid) !important; }

.avatar-md { width: 46px; height: 46px; font-size: 1.1rem; }
.btn-badge-action { padding: 6px 12px; font-size: 0.65rem; min-height: 32px; border-radius: var(--rounded-sm); display: inline-flex; align-items: center; justify-content: center; }
.modal-timeline-box { display: flex; flex-direction: column; gap: 6px; max-height: 150px; overflow-y: auto; font-size: 0.65rem; color: var(--text-secondary); }
.modal-chat-box { display: flex; flex-direction: column; gap: 8px; max-height: 150px; min-height: 100px; overflow-y: auto; padding: 4px 0; margin-bottom: 8px; border-bottom: 1px solid var(--border-color); }
.booking-container { margin-bottom: 6px; border: 1px solid var(--border-color); background: rgba(255,255,255,0.01); border-radius: var(--rounded-md); padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.text-decoration-none { text-decoration: none !important; }
.flex-2 { flex: 2; }

.pt-6 { padding-top: 16px !important; }
.resize-vertical { resize: vertical !important; }
.h-60 { height: 60px !important; }
.h-80pct { height: 80% !important; }
.min-h-120 { min-height: 120px !important; }
.max-h-300 { max-height: 300px !important; }
.max-h-120 { max-height: 120px !important; }
.overflow-y-auto { overflow-y: auto !important; }
.trainer-photo-preview { width: 54px; height: 54px; border-radius: 50%; object-fit: cover; border: 1px solid var(--border-color); }
.preview-panel { background: rgba(0,0,0,0.2); border-radius: var(--rounded-md); padding: 10px; font-size: 0.7rem; border: 1px solid var(--border-color); }

/* ===== Press feedback — every pressable element responds to touch (Kowalski) ===== */
.nav-item { transition: color 200ms ease, transform 160ms var(--ease-out); }
.nav-item:active,
.day-pill-voin:active,
.plan-option:active,
.contact-btn:active,
.class-item:active,
.admin-client-card:active,
.roster-client-item:active,
.roster-check-btn:active,
.btn-close:active {
  transform: var(--press);
}
.nav-item.active svg { transition: transform 200ms var(--ease-out); }

/* Respect reduced-motion: keep opacity/color cues, drop movement */
@media (prefers-reduced-motion: reduce) {
  .tab-content,
  .classes-container > *,
  .history-list > *,
  #client-cabinet-leaderboard > *,
  .inbox-messages > *,
  .modal-card,
  .modal-overlay {
    animation: none !important;
  }
  * { transition-duration: 120ms !important; }
  .nav-item:active, .day-pill:active, .cat-pill:active, .day-pill-voin:active,
  .plan-option:active, .contact-btn:active, .class-item:active,
  .admin-client-card:active, .roster-client-item:active, .btn:active {
    transform: none;
  }
}

/* VOIN Icon Utilities */
.voin-icon {
  width: 1.15em;
  height: 1.15em;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
  margin-top: -3px;
  margin-right: 4px;
}
.voin-icon-lg {
  width: 1.35em;
  height: 1.35em;
}
.voin-icon-sm {
  width: 0.95em;
  height: 0.95em;
}
.voin-icon-inline {
  margin-right: 0px;
}


/* ===== Gamification & design pass (streaks, amber accent) ===== */
:root {
  --accent-warm: #f59e0b;        /* energetic amber — achievements/streaks */
  --accent-warm-soft: rgba(245, 158, 11, 0.12);
}

/* Streak strip — the athletic, warm counterpoint to the cool blue UI */
.streak-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(245,158,11,0.14) 0%, rgba(245,158,11,0.03) 60%),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(245, 158, 11, 0.22);
}
.streak-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.streak-flame {
  font-size: 1.7rem; line-height: 1;
  filter: drop-shadow(0 0 10px rgba(245,158,11,0.5));
  animation: flameFlicker 2.2s ease-in-out infinite;
}
@keyframes flameFlicker {
  0%, 100% { transform: scale(1) rotate(-2deg); opacity: 1; }
  50% { transform: scale(1.08) rotate(2deg); opacity: 0.92; }
}
.streak-copy { min-width: 0; }
.streak-value {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 1rem; color: var(--text-primary);
  letter-spacing: -0.2px;
}
.streak-sub { font-size: 0.68rem; color: var(--text-secondary); margin-top: 1px; }
.streak-metrics { display: flex; gap: 14px; flex-shrink: 0; }
.streak-metric { display: flex; flex-direction: column; align-items: center; }
.streak-metric b {
  font-family: var(--font-heading); font-weight: 800;
  font-size: 1.15rem; color: var(--accent-warm);
}
.streak-metric span { font-size: 0.58rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.4px; }

@media (prefers-reduced-motion: reduce) {
  .streak-flame { animation: none; }
}

/* Unlimited plan: infinite shimmer instead of a misleading full bar */
.progress-bar-fill--unlimited {
  background: linear-gradient(90deg,
    rgba(56,189,248,0.35) 0%, var(--accent-primary) 50%, rgba(56,189,248,0.35) 100%);
  background-size: 200% 100%;
  animation: unlimitedShimmer 2.4s linear infinite;
}
@keyframes unlimitedShimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .progress-bar-fill--unlimited { animation: none; }
}

/* Points value adopts the warm accent so achievements read as "reward", not "info" */
#client-points-value { color: var(--accent-warm) !important; }

/* ===== Personal Records card ===== */
.pr-card {
  margin-top: 18px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
}
.pr-head {
  font-family: var(--font-heading);
  font-weight: 700; font-size: 1.05rem;
  margin-bottom: 14px; color: var(--text-primary);
}
.pr-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.pr-form-row { display: grid; grid-template-columns: 1fr 70px 44px; gap: 8px; }
.pr-add-btn { padding: 0; height: 100%; font-size: 1.3rem; line-height: 1; }
.pr-list { display: flex; flex-direction: column; gap: 8px; }
.pr-empty { font-size: 0.8rem; color: var(--text-muted); text-align: center; padding: 10px 0; }
.pr-item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(245,158,11,0.06) 0%, rgba(255,255,255,0.02) 60%);
  border: 1px solid rgba(245,158,11,0.14);
}
.pr-ex { font-weight: 600; font-size: 0.88rem; color: var(--text-primary); }
.pr-best {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem;
  color: var(--accent-warm); white-space: nowrap;
}
.pr-meta { font-size: 0.62rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

/* ===== Referral card ===== */
.referral-card {
  margin-top: 4px; margin-bottom: 8px;
  padding: 16px 18px;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(245,158,11,0.12) 0%, rgba(14,165,233,0.06) 100%),
    rgba(255,255,255,0.02);
  border: 1px solid rgba(245,158,11,0.20);
}
.ref-title {
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem;
  color: var(--text-primary); letter-spacing: -0.2px;
}
.ref-sub { font-size: 0.72rem; color: var(--text-secondary); margin: 4px 0 12px; }
.ref-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ref-btn { padding: 9px 12px; font-size: 0.8rem; }

/* ===== Challenge of the month ===== */
.challenge-card {
  margin-top: 8px; margin-bottom: 8px;
  padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border-color);
}
.challenge-head {
  font-family: var(--font-heading); font-weight: 700; font-size: 1rem;
  color: var(--text-primary);
}
.challenge-month { color: var(--accent-warm); text-transform: capitalize; }
.challenge-subhead { font-size: 0.7rem; color: var(--text-secondary); margin: 3px 0 12px; }
.challenge-list { display: flex; flex-direction: column; gap: 6px; }
.challenge-row {
  display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.015);
}
.challenge-row.challenge-me {
  background: linear-gradient(135deg, rgba(245,158,11,0.14) 0%, rgba(255,255,255,0.02) 70%);
  border: 1px solid rgba(245,158,11,0.25);
}
.challenge-rank { font-size: 0.9rem; text-align: center; }
.challenge-name { font-size: 0.85rem; font-weight: 600; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.challenge-count { font-family: var(--font-heading); font-weight: 800; font-size: 1rem; color: var(--accent-warm); }

/* ===== Design polish pass (hero elevation, hierarchy) ===== */
/* The subscription card is the #1 thing a member checks — give it real weight
   and depth so it dominates the flat surfaces around it. */
.membership-card {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(56,189,248,0.10) 0%, transparent 45%),
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, transparent 30%),
    var(--bg-secondary);
  border: 1px solid rgba(56, 189, 248, 0.16);
  box-shadow:
    0 20px 44px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.02),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* A soft accent glow anchored to the "paid" badge corner */
.membership-card::before {
  content: '';
  display: block;
  position: absolute;
  top: -60px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(14,165,233,0.16) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* Greeting: make the athlete's name pop with the brand accent */
.welcome-box h2 { letter-spacing: -0.5px; }

/* Streak strip now stands alone after the hero — tighten its rhythm */
#streak-strip { margin-top: -4px; }

/* ===== Class cards polish (capacity bar + category accent) ===== */
.class-item {
  position: relative;
  border-radius: 14px;
  transition: transform 160ms var(--ease-out), border-color 200ms ease, background-color 200ms ease;
}
.class-item:active { transform: var(--press); }

/* Category color accent as a left rail */
.class-item::before {
  content: '';
  position: absolute;
  left: 0; top: 14px; bottom: 14px;
  width: 3px; border-radius: 3px;
  background: var(--cat-color, var(--accent-primary));
}
.class-item--cat-crossfit { --cat-color: #0ea5e9; }
.class-item--cat-yoga     { --cat-color: #10b981; }
.class-item--cat-box      { --cat-color: #f43f5e; }
.class-item--cat-spin     { --cat-color: #a855f7; }
.class-item--cat-pilates  { --cat-color: #f59e0b; }
.class-item--cat-default  { --cat-color: var(--accent-primary); }

.class-capacity-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}
.class-capacity-info { flex: 1; min-width: 0; }
.class-waitlist { color: var(--accent-warm); font-weight: 600; font-size: 0.7rem; }
.capacity-track {
  height: 5px; margin-top: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px; overflow: hidden;
}
.capacity-fill {
  height: 100%; border-radius: 3px;
  transition: width 500ms var(--ease-out);
}

/* ===== Brand character — athletic wordmark ===== */
.logo {
  font-style: italic;             /* forward lean = motion/sport */
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.5px;
}
.logo span {
  display: inline-block;
  font-size: 0.62em;
  font-weight: 700;
  letter-spacing: 1.5px;
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--status-paid-bg);
  color: var(--accent-primary);
  -webkit-text-fill-color: currentColor;
  border: 1px solid rgba(14, 165, 233, 0.22);
  vertical-align: 0.2em;
  font-style: normal;
}

/* ===== History rows polish ===== */
.history-item {
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.history-item:active { transform: var(--press); }
.history-left { display: flex; align-items: center; gap: 12px; }
.history-check {
  width: 26px; height: 26px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  font-size: 0.8rem; font-weight: 800;
}
.history-item .history-title { color: var(--text-primary); font-weight: 600; font-size: 0.85rem; }
.history-item .history-date { color: var(--text-secondary); font-size: 0.72rem; }
.history-info-col { display: flex; flex-direction: column; gap: 2px; }
.history-item .status {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 4px 10px; border-radius: 8px;
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px;
}

/* ===== Fullscreen Chat Custom Polish (Emil Kowalski style) ===== */
#admin-client-detail-modal.fullscreen-chat-active .modal-card {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  border: none;
  padding: 16px 16px 8px 16px;
  display: flex;
  flex-direction: column;
}

#admin-client-detail-modal.fullscreen-chat-active .modal-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow: hidden;
  padding: 0;
}

#admin-client-detail-modal.fullscreen-chat-active #detail-subtab-chat {
  display: flex !important;
  flex-direction: column;
  flex: 1;
  height: 100%;
  overflow: hidden;
  gap: 8px;
}

#admin-client-detail-modal.fullscreen-chat-active #admin-modal-client-chat-box {
  flex: 1;
  height: auto !important;
  max-height: none !important;
  overflow-y: auto;
  padding-right: 4px;
}

.admin-search-input::placeholder {
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Specific button overrides for high contrast and readability */
.btn-primary, button.btn-primary {
  background: var(--accent-gradient) !important;
  color: #0b0f19 !important; /* Force deep dark color for maximum contrast on bright background! */
  font-weight: 700 !important;
}
.btn-primary:active {
  filter: brightness(0.9) !important;
}
.btn-secondary, button.btn-secondary, a.btn-secondary {
  background: rgba(255, 255, 255, 0.06) !important;
  color: #ffffff !important; /* Force clean white text on dark buttons */
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  font-weight: 600 !important;
}
.btn-secondary:active {
  background: rgba(255, 255, 255, 0.12) !important;
}

/* Active tags / pills */
.day-pill.active, .cat-pill.active, button.cat-pill.active {
  background: var(--accent-gradient) !important;
  color: #0b0f19 !important; /* Force deep dark color for active tab button */
  font-weight: 700 !important;
  border-color: transparent !important;
}

/* Non-active tags / pills */
.day-pill, .cat-pill, button.cat-pill {
  background: rgba(255, 255, 255, 0.04) !important;
  color: #e2e8f0 !important; /* Lighter white/grey for non-active pills for readability */
  border: 1px solid rgba(255, 255, 255, 0.06) !important;
  font-weight: 500 !important;
}

/* Settings modal tab styles */
.settings-tab-btn.active {
  background: var(--accent-gradient) !important;
  color: #0b0f19 !important;
  box-shadow: 0 4px 12px rgba(0, 180, 255, 0.2) !important;
  font-weight: 700 !important;
}

/* ===== FIX: tab-content is flex-column; stop cards from being squished =====
   Direct children of scrollable tabs must keep their natural height (the
   .app-main wrapper handles scrolling). Without this, flex-shrink collapsed
   the membership hero to ~50px. Chat tab keeps flex behaviour for its input. */
.tab-content.active:not(#tab-chat) > * {
  flex-shrink: 0;
}

/* ===== FIX: inactive tabs must stay hidden =====
   #tab-chat carries a .flex-col utility (display:flex) that, being later in the
   cascade at equal specificity, beat `.tab-content { display:none }` — so the
   chat tab bled onto every other tab. Higher-specificity guard wins cleanly. */
.tab-content:not(.active) {
  display: none;
}

/* ===== Day calendar pills (weekday + date) ===== */
.days-filter-row { align-items: stretch; }
.day-pill--cal {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1px; min-width: 48px; padding: 7px 10px; line-height: 1.05;
  border-radius: 16px;
}
.day-pill--cal .dp-wd {
  font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; font-weight: 600;
}
.day-pill--cal .dp-num {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.1rem; line-height: 1;
}

/* ===== Rounded corners everywhere (softer, consistent) ===== */
.admin-search-input,
input[type="text"], input[type="number"], input[type="tel"], input[type="date"],
select, textarea {
  border-radius: 14px;
}
.test-selector select { border-radius: 10px; }
.status-badge, .day-badge, .sub-badge { border-radius: 10px; }
.btn, .btn-primary, .btn-secondary { border-radius: 14px; }
.btn-small { border-radius: 12px; }
.membership-card, .distribution-card, .inbox-card, .gym-info-card,
.referral-card, .challenge-card, .pr-card, .stat-box-voin, .admin-client-card {
  border-radius: 20px;
}
.class-item, .history-item, .roster-client-item, .plan-option, .notif-item {
  border-radius: 16px;
}
img.profile-avatar-preview, .avatar, .avatar-sm { border-radius: 50%; }

/* ===== FIX: "Мои тренировки" count badge (was a 7px square sliver) ===== */
#client-my-bookings-count {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 22px; height: 22px; padding: 0 7px;
  border-radius: 11px; line-height: 1;
  font-family: var(--font-heading); font-weight: 800; font-size: 0.72rem;
}

/* ===== Payment modal: plan options with selection + meta ===== */
.plan-option {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-radius: 16px;
  border: 1px solid var(--border-color);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  transition: transform 160ms var(--ease-out), border-color 200ms ease, background-color 200ms ease;
}
.plan-option:active { transform: var(--press); }
.plan-option .po-check {
  width: 20px; height: 20px; flex-shrink: 0; border-radius: 50%;
  border: 2px solid var(--border-color); position: relative;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.plan-option.selected {
  border-color: var(--accent-primary);
  background: rgba(14,165,233,0.08);
}
.plan-option.selected .po-check {
  border-color: var(--accent-primary); background: var(--accent-primary);
}
.plan-option.selected .po-check::after {
  content: ''; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px; border: solid #0b0f19; border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.plan-option .po-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.plan-option .name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
.plan-option .po-meta { font-size: 0.68rem; color: var(--text-muted); }
.plan-option .price {
  font-family: var(--font-heading); font-weight: 800; font-size: 1.05rem;
  color: var(--accent-primary); white-space: nowrap;
}

/* ===== Status badge: green "ОК" (traffic-light: green ok / amber due / red overdue) ===== */
.status-badge.ok {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.28);
}

/* Full viewport height layout for client chat screen */
.tab-content#tab-chat.active {
  display: flex !important;
  flex-direction: column !important;
  flex: 1 !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}
.tab-content#tab-chat.active .welcome-box {
  display: none !important;
}
.tab-content#tab-chat.active .gym-info-card {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 12px !important;
  gap: 12px !important;
  box-sizing: border-box !important;
  justify-content: space-between !important;
}
.tab-content#tab-chat.active .chat-messages-box {
  padding: 8px !important;
  gap: 8px !important;
}
