:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --text-main: #1f2937;
  --text-secondary: #6b7280;
  --border: #e5e7eb;
  /* Добавим чуть более тёмный оттенок для тени */
  --input-shadow-inset: rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #dbeafe 0%, #f3f4f6 100%);
  padding: 20px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

.auth-header {
  padding: 32px;
  text-align: center;
}

.auth-header h2 {
  color: var(--text-main);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 12px 0;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--text-secondary);
  font-weight: 500;
  transition: color 0.2s, background 0.2s;
}

.tab-btn.active {
  color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.auth-forms {
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-main);
  font-size: 14px;
  font-weight: 500;
}

/* Стили полей ввода с глубиной */
.form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(235, 235, 251, 0.8);
  color: var(--text-main);
  font-size: 15px;
  
  /* Внутренняя тень для эффекта глубины */
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.04);
  
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  /* При фокусе делаем тень чуть заметнее и добавляем внешнее свечение */
  box-shadow: 
    inset 0 2px 8px rgba(0, 0, 0, 0.06),
    0 0 0 3px rgba(79, 70, 229, 0.15);
}

.form-input:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.submit-btn {
  width: 100%;
  padding: 14px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
}

.submit-btn:hover {
  background: var(--primary-hover);
}

.submit-btn:active {
  transform: scale(0.98);
  transform-origin: center;
}

/* Стили для чекбокса */
.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
}

.custom-checkbox {
  position: relative;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.custom-checkbox input {
  opacity: 0;
  position: absolute;
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.checkmark {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.checkmark::after {
  content: '';
  display: none;
  width: 10px;
  height: 7px;
  border: 2px solid #fff;
  border-top: none;
  border-right: none;
  transform: rotate(-45deg);
}

.custom-checkbox input:checked + .checkmark {
  border-color: var(--primary);
  background-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
  display: block;
}

.form-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.form-footer a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.form-section {
  display: none;
}

.form-section.active {
  display: block;
}
.auth-errors {
  padding: 12px 32px 0;
}

.auth-errors .error-text {
  color: #dc2626;
  font-size: 14px;
  margin-bottom: 4px;
}
.role-banner {
  padding: 12px;
  border-radius: 8px;
  font-size: 14px;
  color: var(--text-main);
  margin-bottom: 16px;
}

.role-banner--admin { background: rgba(79, 70, 229, 0.08); }
.role-banner--mod   { background: rgba(34, 197, 94, 0.08); }
.role-banner--user  { background: rgba(107, 114, 128, 0.08); }


@media (max-width: 480px) {
  .auth-container {
    border-radius: 12px;
  }
  .auth-header h2 {
    font-size: 22px;
  }
}
