/* ======================================================================
   LEGACY CSS — не редактировать, только читать
   Содержит старые правила на фиксированных цветах/inline-логике.
   После полной миграции клиентского UI — удалить.
   ====================================================================== */

/* ===== Base / Reset light ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  color: #222;
}

/* ===== Layout ===== */
.container {
  background: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.1);
}

/* ===== Typography ===== */
h1, h2, h3 { margin: 0 0 15px; line-height: 1.2; }

/* ===== Buttons ===== */
.btn {
  background: #3498db;
  color: #fff;
  padding: 12px 20px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-weight: bold;
}
.btn:hover { background: #2980b9; }
.logout-btn { background: #e74c3c; color: #fff; padding: 8px 15px; border: none; border-radius: 3px; text-decoration: none; display: inline-block; }

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 5px; font-weight: bold; }
input, select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 13px; line-height: 1.4; }
input.invalid { border-color: #d9534f; }
.error { color: #d9534f; background: #ffeaea; padding: 15px; border-radius: 5px; margin-bottom: 20px; }

/* ===== Header (register) ===== */
.admin-header { background: #2c3e50; color: #fff; padding: 15px; border-radius: 5px; margin-bottom: 20px; }
.admin-header a { color: #fff; text-decoration: none; } /* вместо инлайна */

/* ===== Register-specific toggles ===== */
.company-field, .custom-term-field { display: none; }
.login-prompt { text-align: center; padding: 40px; }
.login-btn { background: #4CAF50; color: #fff; padding: 15px 30px; border-radius: 5px; display: inline-block; text-decoration: none; }

/* Register.php — подсказки под телефоном */
.phone-error { color: #d9534f; font-size: 0.9em; margin-top: 6px; display: none; }
.duplicate-hint { color: #c27d00; font-size: 0.9em; margin-top: 6px; display: none; }

/* ===== 3rd-party tweaks (intl-tel-input) ===== */
.iti { width: 100%; font-size: 13px; line-height: 1.4; }
.iti--separate-dial-code .iti__selected-dial-code { font-weight: normal; display: inline-block; }

/* ===== Dashboard helpers (сохранены на будущее, не мешают register) ===== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; margin-bottom: 30px; }
.stat-card { background: #fff; padding: 20px; border-radius: 5px; box-shadow: 0 2px 5px rgba(0,0,0,.1); }
.stat-number { font-size: 2em; font-weight: bold; color: #2c3e50; }
.actions { background: #fff; padding: 20px; border-radius: 5px; margin-bottom: 20px; }

/* ===== Login page ===== */
body.login-page { background: #ffffff; }       /* фон вокруг формы */
.login-form { background: #f5f5f5; padding: 20px; border-radius: 5px; max-width: 400px; margin: 50px auto; }
.remember-group { display: flex; align-items: center; gap: 8px; margin-bottom: 15px; }
.remember-group input { width: auto; }
.info-icon { display: inline-block; width: 16px; height: 16px; background: #3498db; color: #fff; border-radius: 50%; text-align: center; line-height: 16px; font-size: 12px; cursor: help; margin-left: 8px; position: relative; }
.tooltip { display: none; position: absolute; background: #333; color: #fff; padding: 10px; border-radius: 4px; font-size: 12px; width: 200px; z-index: 1000; }
.info-icon:hover + .tooltip { display: block; }

/* Сохранение внешнего вида кнопки логина как было в инлайне */
.login-submit { background: #4CAF50; color: #fff; padding: 10px; border: none; width: 100%; cursor: pointer; }

/* ===== Dashboard page refinements ===== */
.header-left h1 { margin: 0; padding: 0; }

.user-box { display: flex; align-items: center; }
.user-text { text-align: right; margin-right: 15px; }

.session-info { font-size: 0.9em; color: #bdc3c7; margin-top: 5px; }
.session-time { font-size: 0.8em; color: #95a5a6; margin-top: 2px; }

.logout-btn:hover { background: #c0392b; }

/* Ряд кнопок быстрого выбора */
.quick-row { display: flex; flex-wrap: wrap; gap: 10px; }

/* Цвета кнопок по типам карт */
.btn-young { background: #3498db; color: #fff; }
.btn-lite { background: #27ae60; color: #fff; }
.btn-bronze { background: #cd7f32; color: #fff; }
.btn-silver { background: #95a5a6; color: #fff; }
.btn-gold { background: #f1c40f; color: #2c3e50; }
.btn-business { background: #000; color: #fff; }

/* Вспомогательный отступ */
.mt-20 { margin-top: 20px; }

/* ===== Admin Dashboard header fix ===== */
.header {
  background: #2c3e50;
  color: #fff;
  padding: 20px;
  border-radius: 5px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Левая часть (заголовок) */
.header-left h1 {
  margin: 0;
  padding: 0;
}

/* Правая часть (инфо о пользователе + кнопка выхода) */
.user-box {
  display: flex;
  align-items: center;
}

.user-text {
  text-align: right;
  margin-right: 15px;
}

.logout-btn {
  background: #e74c3c;
  color: #fff;
  padding: 8px 15px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-left: 20px;
}
.logout-btn:hover {
  background: #c0392b;
}

/* Сессия — серый текст под ником */
.session-info {
  font-size: 0.9em;
  color: #bdc3c7;
  margin-top: 5px;
}
.session-time {
  font-size: 0.8em;
  color: #95a5a6;
  margin-top: 2px;
}

/* Только для админ-дашборда: во всю ширину экрана */
body.dashboard-page {
  max-width: none;
  margin: 0;
  padding: 20px; /* как в оригинале */
}

/* Additions for DentalCard UI */
.dc-toast {
  position: fixed;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  bottom: 20px;
  background: #2c3e50;
  color: #fff;
  padding: 10px 16px;
  border-radius: 6px;
  opacity: 0;
  transition: opacity .3s ease, transform .3s ease;
  z-index: 9999;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  font-size: 14px;
}
.dc-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.dc-toast-success { background: #27ae60; }
.dc-toast-error { background: #e74c3c; }

/* ...конец действующих (legacy) правил */

/* ===== конец LEGACY CSS — ниже идут подключения темы ===== */