:root {
  --admin-bg: #090c14;
  --admin-card: #111726;
  --admin-border: #1e293b;
  --gold: #f59e0b;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --green: #10b981;
  --blue: #3b82f6;
  --red: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--admin-bg);
  color: var(--text-main);
  font-family: 'Montserrat', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
}

.gold { color: var(--gold); }

/* БЫСТРАЯ НАВИГАЦИЯ ПО РАЗДЕЛАМ CRM (ЮЗЕР-ФРЕНДЛИ) */
.crm-quick-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(17, 23, 38, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--admin-border);
  padding: 8px 16px;
  margin-bottom: 24px;
}

.crm-nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.crm-nav-inner::-webkit-scrollbar {
  display: none;
}

.crm-nav-item {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.crm-nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.crm-nav-item.active {
  color: var(--gold);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
}

.crm-section-anchor {
  scroll-margin-top: 70px;
}

@keyframes goldPulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.18); filter: drop-shadow(0 0 16px #f59e0b) drop-shadow(0 0 25px #10b981); color: #fff; }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 transparent); }
}

.kpi-glow-pulse {
  animation: goldPulse 0.9s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: inline-block;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  background: var(--admin-card);
  border-bottom: 1px solid var(--admin-border);
  flex-wrap: wrap;
  gap: 16px;
}

.admin-logo {
  font-size: 1.25rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-crm {
  background: rgba(245, 158, 11, 0.15);
  color: var(--gold);
  border: 1px solid var(--gold);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
}

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

.btn-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  border: 1px solid var(--admin-border);
  padding: 8px 14px;
  border-radius: 6px;
  transition: all 0.2s;
}

.btn-link:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.admin-container {
  max-width: 1320px;
  margin: 28px auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* СТАТИСТИКА */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-icon {
  font-size: 2.2rem;
  background: rgba(255, 255, 255, 0.04);
  padding: 12px;
  border-radius: 10px;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* СЕКЦИИ */
.section-card {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 28px;
  box-sizing: border-box;
}

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

.period-filter-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.period-filter-box label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.admin-select-sm {
  background: #090d16;
  border: 1px solid var(--gold);
  color: #fff;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
}

.section-desc {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 4px;
}

/* КНОПКИ ПЕРИОДОВ ГРАФИКА */
.period-button-group {
  display: inline-flex;
  background: #090d16;
  border: 1px solid var(--admin-border);
  border-radius: 8px;
  padding: 3px;
  gap: 4px;
}

.btn-period {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-period.active {
  background: var(--gold) !important;
  color: #000 !important;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.btn-period:hover:not(.active) {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.chart-summary-badge {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid #10b981;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* КОНТЕЙНЕР ГРАФИКА */
.chart-container {
  background: #090d16;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 30px 16px 36px 16px;
  position: relative;
  overflow-x: auto;
  margin-top: 14px;
  box-sizing: border-box;
}

.chart-grid-bg {
  position: absolute;
  top: 30px;
  left: 16px;
  right: 16px;
  bottom: 36px;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.grid-line {
  width: 100%;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}

.chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 12px;
  height: 220px;
  min-height: 220px;
  position: relative;
  z-index: 2;
  min-width: 100%;
  box-sizing: border-box;
}

.chart-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  min-width: 36px;
  max-width: 64px;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.bar-val {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 8px;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.bar-track {
  width: 100%;
  height: 100%;
  max-height: 160px;
  display: flex;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px 8px 3px 3px;
}

.bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #f59e0b 0%, rgba(245, 158, 11, 0.35) 100%);
  border-radius: 8px 8px 3px 3px;
  min-height: 4px;
  transition: height 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), background 0.2s ease;
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.15);
}

.chart-bar-item:hover .bar-fill {
  background: linear-gradient(180deg, #fde047 0%, #f59e0b 100%);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
}

.chart-bar-item:hover .bar-val {
  transform: scale(1.15);
  color: #fff;
}

.chart-bar-item.is-today .bar-fill {
  background: linear-gradient(180deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.35);
}

.chart-bar-item.is-today .bar-val {
  color: #34d399;
}

.bar-label {
  position: absolute;
  bottom: -28px;
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
  font-weight: 600;
}

.chart-bar-item.is-today .bar-label {
  color: #fff;
  font-weight: 700;
}

/* СТАТУСНЫЕ ВКЛАДКИ СО СЧЕТЧИКАМИ */
.status-tab-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.status-tab-btn {
  background: #0d121f;
  border: 1px solid var(--admin-border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.status-tab-btn.active, .status-tab-btn:hover {
  background: var(--admin-card);
  border-color: var(--gold);
  color: #fff;
}

.tab-badge {
  background: #1e293b;
  color: #fff;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
}

.badge-green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.badge-blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.badge-red { background: rgba(239, 68, 68, 0.2); color: #f87171; }

/* ФИЛЬТРЫ */
.filter-panel {
  background: #0d121f;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 14px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-group {
  flex: 1;
  min-width: 240px;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

.admin-input, .admin-select, .admin-textarea {
  background: #090d16;
  border: 1px solid var(--admin-border);
  color: #fff;
  padding: 9px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  outline: none;
  font-family: inherit;
  width: 100%;
}

.admin-input:focus, .admin-select:focus, .admin-textarea:focus {
  border-color: var(--gold);
}

.btn-chip {
  background: #1e293b;
  border: 1px solid var(--admin-border);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}

.btn-chip:hover {
  background: var(--gold);
  color: #000;
}

/* АДАПТИВНЫЙ ЖУРНАЛ ЗАПИСЕЙ (БЕЗ ГОРИЗОНТАЛЬНОГО СКРОЛЛА) */
.bookings-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-item-card {
  background: #0a0e17;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 16px 20px;
  display: grid;
  grid-template-columns: 130px 1.4fr 1.4fr 120px 110px 140px;
  align-items: center;
  gap: 14px;
  transition: all 0.2s;
}

.booking-item-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
  background: #0e1422;
}

.booking-time-col {
  display: flex;
  flex-direction: column;
}

.booking-time-badge {
  color: var(--gold);
  font-size: 1.05rem;
  font-weight: 800;
}

.booking-date-text {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.booking-client-name {
  font-weight: 700;
  color: #fff;
  font-size: 0.95rem;
}

.booking-client-phone {
  font-size: 0.85rem;
  color: #60a5fa;
  text-decoration: underline;
}

.booking-service-title {
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
}

.booking-master-pill {
  display: inline-block;
  background: #1e293b;
  color: var(--gold);
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  margin-top: 4px;
}

.booking-price-val {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
}

.booking-notes-val {
  font-size: 0.75rem;
  color: var(--text-muted);
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ТАБЛИЦА ФИНАНСОВ */
.table-responsive {
  overflow-x: auto;
  width: 100%;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.admin-table th {
  background: #0d121f;
  color: var(--text-muted);
  font-weight: 600;
  padding: 12px 14px;
  border-bottom: 1px solid var(--admin-border);
}

.admin-table td {
  padding: 13px 14px;
  border-bottom: 1px solid #1a2336;
  vertical-align: middle;
}

.admin-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* БЕЙДЖИ СТАТУСОВ */
.status-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
}

.status-confirmed {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid #10b981;
}

.status-completed {
  background: rgba(59, 130, 246, 0.15);
  color: #60a5fa;
  border: 1px solid #3b82f6;
}

.status-cancelled {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid #ef4444;
}

/* КНОПКИ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-gold { background: var(--gold); color: #000; }
.btn-gold:hover { opacity: 0.9; }

.btn-outline { background: transparent; border: 1px solid var(--admin-border); color: var(--text-main); }
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

.booking-actions-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}

.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  text-align: center;
  white-space: nowrap;
  box-sizing: border-box;
  transition: all 0.15s ease;
}

.btn-complete {
  background: rgba(16, 185, 129, 0.15);
  color: #34d399;
  border: 1px solid #10b981;
}

.btn-complete:hover {
  background: #10b981;
  color: #000;
}

.btn-cancel {
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid #ef4444;
}

.btn-cancel:hover {
  background: #ef4444;
  color: #fff;
}

.btn-delete {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #fca5a5;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.table-empty {
  text-align: center;
  padding: 36px;
  color: var(--text-muted);
}

.preview-mini {
  margin-top: 6px;
}
.preview-mini.hidden { display: none; }

/* УПРАВЛЕНИЕ МАСТЕРАМИ */
.masters-admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 14px;
}

.master-admin-card {
  background: #090e18;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 14px;
  transition: all 0.2s ease;
}

.master-admin-card:hover {
  border-color: rgba(245, 158, 11, 0.5);
  background: #0d1424;
}

.master-card-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.master-card-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.master-card-meta {
  flex: 1;
  min-width: 0;
}

.master-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
}

.master-card-role {
  font-size: 0.82rem;
  color: var(--gold);
  font-weight: 600;
  margin-bottom: 4px;
}

.master-card-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.badge-exp {
  background: #1e293b;
  color: #94a3b8;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
}

.badge-rating {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.master-card-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.spec-chip-sm {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #e2e8f0;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.72rem;
}

.master-card-cats {
  font-size: 0.76rem;
  color: #94a3b8;
  border-top: 1px dashed rgba(255, 255, 255, 0.08);
  padding-top: 8px;
}

.master-card-actions {
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--admin-border);
  padding-top: 10px;
}

.btn-edit {
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid var(--gold);
  color: #fbbf24;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  flex: 1;
  text-align: center;
}

.btn-edit:hover {
  background: var(--gold);
  color: #000;
}

/* БОЛЬШАЯ МОДАЛКА */
.modal-card-lg {
  max-width: 640px !important;
  max-height: 90vh;
  overflow-y: auto;
}

.quick-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.quick-tag {
  background: #1e293b;
  color: #cbd5e1;
  font-size: 0.74rem;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.quick-tag:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: rgba(245, 158, 11, 0.1);
}

.cat-checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #090e18;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--admin-border);
}

.cat-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  color: #e2e8f0;
  cursor: pointer;
}

/* РАСКРЫВАЮЩИЙСЯ СПИСОК (АККОРДЕОН) КАТЕГОРИЙ И УСЛУГ */
.services-accordion-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cat-accordion-card {
  background: #090e18;
  border: 1px solid var(--admin-border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.cat-accordion-card:hover {
  border-color: rgba(245, 158, 11, 0.4);
}

.cat-accordion-card.open {
  border-color: rgba(245, 158, 11, 0.6);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.cat-acc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: background 0.2s ease;
}

.cat-acc-header:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cat-acc-title-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cat-acc-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.cat-acc-name {
  font-size: 1.02rem;
  font-weight: 700;
  color: #fff;
}

.cat-acc-badge {
  background: #1e293b;
  color: var(--gold);
  border: 1px solid rgba(245, 158, 11, 0.25);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 12px;
}

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

.cat-acc-chevron {
  color: var(--gold);
  font-size: 0.85rem;
  transition: transform 0.25s ease;
  display: inline-block;
}

.cat-accordion-card.open .cat-acc-chevron {
  transform: rotate(180deg);
}

.cat-acc-body {
  display: none;
  padding: 16px;
  border-top: 1px solid var(--admin-border);
  background: #060911;
  animation: fadeInAccordion 0.25s ease forwards;
}

.cat-accordion-card.open .cat-acc-body {
  display: block;
}

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

.cat-empty-msg {
  text-align: center;
  padding: 20px;
  color: var(--text-muted);
  font-size: 0.88rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cat-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 12px;
}

.cat-service-item {
  background: var(--admin-card);
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
}

.cat-service-item:hover {
  border-color: rgba(245, 158, 11, 0.35);
  transform: translateY(-2px);
}

.cat-srv-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.cat-srv-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.cat-srv-thumb {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--gold);
}

.cat-srv-meta {
  min-width: 0;
}

.cat-srv-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cat-srv-desc {
  font-size: 0.76rem;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
}

.cat-srv-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

.cat-srv-price {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gold);
}

.cat-srv-duration {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.cat-srv-btns {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}

/* ИНТЕРАКТИВНОЕ КАДРИРОВАНИЕ ФОТО (ВЫБОР ОБЛАСТИ) */
.cropper-modal-card {
  max-width: 540px;
  width: 100%;
}

.cropper-header-box {
  margin-bottom: 14px;
}

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

.cropper-stage {
  position: relative;
  width: 100%;
  height: 340px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  cursor: grab;
  user-select: none;
  border: 1px solid var(--admin-border);
}

.cropper-stage:active {
  cursor: grabbing;
}

#cropper-canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.cropper-frame-overlay {
  position: absolute;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.65);
  pointer-events: none;
  border-radius: 8px;
  box-sizing: border-box;
  transition: width 0.15s ease, height 0.15s ease, left 0.15s ease, top 0.15s ease;
}

.cropper-grid-line {
  position: absolute;
  background: rgba(245, 158, 11, 0.25);
}

.h-line1 { top: 33.33%; left: 0; right: 0; height: 1px; }
.h-line2 { top: 66.66%; left: 0; right: 0; height: 1px; }
.v-line1 { left: 33.33%; top: 0; bottom: 0; width: 1px; }
.v-line2 { left: 66.66%; top: 0; bottom: 0; width: 1px; }

.cropper-controls-box {
  background: #090e18;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.cropper-control-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#cropper-zoom-slider {
  flex: 1;
  min-width: 120px;
  accent-color: var(--gold);
}

.ratio-switch-group {
  display: flex;
  gap: 6px;
  margin-left: auto;
}

.cropper-preview-section {
  background: #090e18;
  border: 1px solid var(--admin-border);
  border-radius: 10px;
  padding: 12px 14px;
}

.cropper-previews-flex {
  display: flex;
  align-items: center;
  gap: 20px;
}

.preview-card-wrap, .preview-avatar-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.preview-card-wrap span, .preview-avatar-wrap span {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.preview-mini-card {
  width: 70px;
  height: 90px;
  border-radius: 6px;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-mini-card canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-mini-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--gold);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.preview-mini-avatar canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.preview-mini-with-crop {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.avatar-thumb-box img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold);
}

/* МОДАЛКИ И ВСПЛЫВАЮЩИЕ ОКНА */
.modal { 
  position: fixed; 
  inset: 0; 
  z-index: 10000; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  padding: 16px; 
}
.modal.hidden { display: none; }
.modal-backdrop { 
  position: absolute; 
  inset: 0; 
  background: rgba(0,0,0,0.85); 
  backdrop-filter: blur(6px); 
}
.modal-card { 
  position: relative; 
  z-index: 2; 
  background: var(--admin-card); 
  border: 1px solid var(--gold); 
  border-radius: 16px; 
  padding: 28px; 
  max-width: 520px; 
  width: 100%; 
  box-sizing: border-box; 
  max-height: 90vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.modal-card h3 { 
  margin-bottom: 20px; 
  color: #fff; 
  padding-right: 36px; /* Чтобы длинный заголовок не наезжал на крестик */
}
.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #cbd5e1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}
.modal-close-btn:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
}

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.8rem; color: var(--text-muted); font-weight: 600; margin-bottom: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 22px; }

/* TOAST УВЕДОМЛЕНИЯ В CRM */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 400px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.toast-message {
  background: #0f172a;
  border: 1px solid var(--gold);
  color: #fff;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  gap: 10px;
  pointer-events: auto;
  animation: toastSlideIn 0.25s ease forwards;
  transition: all 0.3s ease;
}

.toast-message.toast-success { border-color: #10b981; color: #34d399; }
.toast-message.toast-error { border-color: #ef4444; color: #f87171; }

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateY(-15px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ ДЛЯ СМАРТФОНОВ (ПОЛНАЯ ОПТИМИЗАЦИЯ БЕЗ ГОРИЗОНТАЛЬНОГО СКРОЛЛА) */
@media (max-width: 768px) {
  .admin-container {
    padding: 0 12px;
    margin: 16px auto;
  }

  .card-header-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .card-header-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
  }

  .card-header-actions .btn {
    width: 100%;
  }

  .modal {
    padding: 10px;
  }

  .modal-card {
    padding: 22px 16px;
    border-radius: 14px;
  }

  .toast-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 18px;
  }

  .stat-card {
    padding: 12px 14px;
    gap: 10px;
    border-radius: 10px;
  }

  .stat-icon {
    font-size: 1.5rem;
    padding: 8px;
  }

  .stat-value {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 0.75rem;
  }

  .section-card {
    padding: 16px 14px;
    border-radius: 12px;
    margin-bottom: 18px;
  }

  .card-header-flex {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .period-filter-box {
    width: 100%;
    justify-content: space-between;
  }

  .admin-select-sm {
    flex: 1;
  }

  /* ТАБЛИЦА ФИНАНСОВ МАСТЕРОВ ПРЕВРАЩАЕТСЯ В НАГЛЯДНЫЕ КАРТОЧКИ */
  .table-responsive {
    overflow-x: visible !important;
  }

  .admin-table {
    display: block;
    width: 100%;
  }

  .admin-table thead {
    display: none !important;
  }

  .admin-table tbody {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .admin-table tr {
    display: flex;
    flex-direction: column;
    background: #090e18;
    border: 1px solid var(--admin-border);
    border-radius: 12px;
    padding: 14px 16px;
    gap: 8px;
    box-sizing: border-box;
  }

  .admin-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
    box-sizing: border-box;
  }

  .admin-table td:first-child {
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(245, 158, 11, 0.3);
  }

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

  .admin-table td::before {
    content: attr(data-label);
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .admin-table td:first-child::before {
    display: none;
  }

  /* КАРТОЧКИ ЖУРНАЛА ЗАПИСЕЙ */
  .status-tab-bar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 6px;
    flex-wrap: nowrap;
  }

  .status-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 0.78rem;
  }

  .booking-item-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    gap: 10px;
  }

  .booking-item-card > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }

  .booking-actions-wrap {
    flex-direction: row;
    gap: 8px;
    margin-top: 6px;
  }

  .filter-panel {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .chart-container {
    padding: 20px 10px 30px 10px;
  }

  .chart-bars-wrap {
    gap: 4px;
  }

  .chart-bar-item {
    min-width: 22px;
  }

  .bar-val {
    font-size: 0.68rem;
  }

  .bar-label {
    font-size: 0.65rem;
    bottom: -24px;
  }
}
