/* ==== ПАНЕЛЬ НАСТРОЕК (автозакрытие) ==== */
.admin-settings-bar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}

.admin-setting {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-dim);
  flex-wrap: wrap;
}

.admin-setting input {
  background: var(--bg);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 8px 12px;
  border-radius: var(--radius);
  outline: none;
  width: 100px;
  text-align: center;
}
.admin-setting input:focus {
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-setting-note {
  font-size: 12px;
  color: #8fd98f;
  margin-left: 8px;
}

/* ==== БЫСТРЫЕ ДЕЙСТВИЯ (Статистика / Экспорт) ==== */
.admin-quick-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ==== ПАНЕЛЬ УПРАВЛЕНИЯ ==== */
.admin-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.admin-month-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-month-label {
  font-family: var(--font-head);
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #e8e8e8;
  min-width: 200px;
  text-align: center;
}

/* ==== СЕТКА РАСПИСАНИЯ ==== */
.schedule {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.schedule-day {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
}

.schedule-day-head {
  font-family: var(--font-head);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #e8e8e8;
  padding-bottom: 12px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.schedule-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
}

.schedule-slot {
  padding: 10px 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  border: 1px solid var(--border-hi);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

/* ==== СВОБОДНЫЙ СЛОТ (серый) ==== */
.schedule-slot.slot-free {
  background: var(--bg);
  color: var(--text-dim);
}
.schedule-slot.slot-free:hover {
  border-color: var(--accent-hi);
  color: var(--text);
}

/* ==== ЗАНЯТЫЙ СЛОТ (зелёный) ==== */
.schedule-slot.slot-busy {
  background: rgba(100, 200, 100, 0.15);
  border-color: rgba(100, 200, 100, 0.6);
  color: #8fd98f;
}
.schedule-slot.slot-busy:hover {
  background: rgba(100, 200, 100, 0.25);
}

/* ==== АВТОЗАКРЫТЫЙ СЛОТ (жёлтый) ==== */
.schedule-slot.slot-auto-closed {
  background: rgba(220, 180, 60, 0.15);
  border-color: rgba(220, 180, 60, 0.6);
  color: #d9b84a;
  cursor: not-allowed;
  opacity: 0.75;
}
.schedule-slot.slot-auto-closed:hover {
  background: rgba(220, 180, 60, 0.15);
  border-color: rgba(220, 180, 60, 0.6);
}

/* ==== ЗАБЛОКИРОВАННЫЙ СЛОТ (чёрный) ==== */
.schedule-slot.slot-blocked {
  background: rgba(20, 20, 20, 0.9);
  border-color: #2a2a2a;
  color: #4a4a4a;
  cursor: pointer;
}
.schedule-slot.slot-blocked:hover {
  border-color: #555;
  color: #666;
}

/* ==== МОДАЛЬНОЕ ОКНО ==== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.2s;
}
.modal-overlay.visible {
  display: block;
  opacity: 1;
}

.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 90vw;
  background: var(--surface);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  padding: 32px 28px;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
}
.modal-overlay.visible .modal {
  transform: translateX(0);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 14px;
  transition: all 0.15s;
}
.modal-close:hover {
  border-color: var(--accent-hi);
  color: var(--accent-hi);
}

.modal-title {
  font-size: 22px;
  margin-bottom: 6px;
}

.modal-sub {
  color: var(--text-mute);
  font-size: 13px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.modal-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.modal-row span {
  color: var(--text-mute);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.06em;
}
.modal-row strong {
  color: #e8e8e8;
  font-family: var(--font-mono);
  font-weight: 500;
}
.modal-row strong.accent {
  color: var(--accent-hi);
  font-size: 15px;
}

.modal-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-mute);
}
.modal-label input,
.modal-label select,
.modal-label textarea {
  background: var(--bg);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 12px;
  border-radius: var(--radius);
  outline: none;
  width: 100%;
  appearance: none;
  resize: vertical;
}
.modal-label input:focus,
.modal-label select:focus,
.modal-label textarea:focus {
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

@media (max-width: 600px) {
  .schedule-slots { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
  .modal { width: 100%; max-width: 100%; }
  .admin-setting { font-size: 12px; }
  .admin-setting input { width: 80px; }
}
/* ==== ВКЛАДКИ АДМИНКИ ==== */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.admin-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-mute);
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 22px;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

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

.admin-tab.active {
  color: var(--accent-hi);
  border-bottom-color: var(--accent-hi);
}

.admin-tab-panel {
  display: none;
}

.admin-tab-panel.active {
  display: block;
}

/* ==== БАЗА КЛИЕНТОВ ==== */
.client-search {
  background: var(--bg);
  border: 1px solid var(--border-hi);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 8px 14px;
  border-radius: var(--radius);
  outline: none;
  width: 300px;
  max-width: 100%;
}
.client-search:focus {
  border-color: var(--accent-hi);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.clients-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.clients-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.clients-table th {
  background: var(--bg-alt);
  color: var(--text-mute);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  font-weight: 600;
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.clients-table td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-mono);
}

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

.clients-table tr:hover {
  background: var(--bg-alt);
}

.clients-table .cell-name {
  font-family: var(--font-head);
  letter-spacing: 0.02em;
  color: #e8e8e8;
}

.clients-table .cell-spent {
  color: var(--accent-hi);
  font-weight: 600;
  font-family: var(--font-head);
  font-size: 14px;
}

.clients-table .client-status {
  display: inline-block;
  font-size: 11px;
  padding: 4px 10px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.client-status.status-new {
  background: rgba(180, 180, 180, 0.15);
  color: #b4b4b4;
  border: 1px solid rgba(180, 180, 180, 0.4);
}
.client-status.status-regular {
  background: rgba(180, 130, 60, 0.15);
  color: #d9b84a;
  border: 1px solid rgba(180, 130, 60, 0.4);
}
.client-status.status-vip {
  background: rgba(200, 100, 60, 0.15);
  color: #e08a5a;
  border: 1px solid rgba(200, 100, 60, 0.4);
}

.clients-table .btn-view {
  background: none;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  font-family: var(--font-head);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.15s;
}
.clients-table .btn-view:hover {
  border-color: var(--accent-hi);
  color: var(--accent-hi);
}

@media (max-width: 700px) {
  .admin-tab { padding: 12px 14px; font-size: 12px; }
  .client-search { width: 100%; }
}