/* Login and Register styles */
:root {
  --bgA: #FAFAFF;
  --bgB: #FDFCF8;
  --card: #ffffff;
  --text: #1e2633;
  --muted: #64748b;
  --accentA: #60a5fa;
  --accentB: #f59e0b;
  --shadow: 0 16px 40px rgba(31,41,55,.10);
  --radius: 24px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Nunito', system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 15% 10%, var(--bgA), transparent 70%),
    radial-gradient(1000px 520px at 85% 20%, var(--bgB), transparent 60%),
    var(--bgB);
  min-height: 100vh;
}

.page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 48px 40px;
  max-width: 480px;
  width: 100%;
  text-align: center;
}

.title {
  margin: 0 0 16px 0;
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  background: linear-gradient(135deg, var(--accentA), var(--accentB));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  margin: 0 0 32px 0;
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
}

.field {
  margin-bottom: 24px;
  text-align: left;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: var(--text);
  font-size: 14px;
}

.field input {
  width: 100%;
  padding: 16px 20px;
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  font-size: 16px;
  font-family: inherit;
  transition: all 0.3s ease;
  background: #fff;
}

.field input:focus {
  outline: none;
  border-color: var(--accentA);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.1);
}

.field input::placeholder {
  color: #94a3b8;
}

.submit {
  width: 100%;
  padding: 16px 24px;
  border: none;
  border-radius: 20px;
  background: linear-gradient(135deg, var(--accentA), var(--accentB));
  color: white;
  font-size: 16px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 24px;
}

.submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(96, 165, 250, 0.3);
}

.helper {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

.helper a {
  color: var(--accentA);
  text-decoration: none;
  font-weight: 700;
  transition: color 0.3s ease;
}

.helper a:hover {
  color: var(--accentB);
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Error messages */
.field [role="alert"] {
  color: #ef4444;
  font-size: 14px;
  margin-top: 8px;
  font-weight: 600;
}

.error-message {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 24px;
  font-size: 14px;
  font-weight: 600;
}

/* Quick login panel */
.ql-panel {
  margin-top: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
}

.ql-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 18px;
  background: #f8fafc;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
  transition: background 0.15s;
}

.ql-toggle:hover { background: #f1f5f9; }

.ql-toggle-arrow {
  font-size: 10px;
  transition: transform 0.2s;
}

.ql-body {
  padding: 14px 16px 16px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.ql-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ql-kg-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #94a3b8;
  margin: 0 0 8px 2px;
}

.ql-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 8px 10px;
  margin-bottom: 6px;
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s, background 0.12s;
}

.ql-btn:last-child { margin-bottom: 0; }

.ql-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.ql-role {
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  padding: 2px 7px;
}

.ql-email {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}

/* Role colours */
.ql-owner { border-color: #c4b5fd; }
.ql-owner:hover { background: #faf5ff; border-color: #a78bfa; }
.ql-owner .ql-role { background: #ede9fe; color: #7c3aed; }

.ql-admin { border-color: #bfdbfe; }
.ql-admin:hover { background: #eff6ff; border-color: #93c5fd; }
.ql-admin .ql-role { background: #dbeafe; color: #1d4ed8; }

.ql-parent { border-color: #bbf7d0; }
.ql-parent:hover { background: #f0fdf4; border-color: #86efac; }
.ql-parent .ql-role { background: #dcfce7; color: #15803d; }

/* Responsive */
@media (max-width: 520px) {
  .page {
    padding: 16px;
  }
  
  .card {
    padding: 32px 24px;
  }
  
  .title {
    font-size: 28px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .quick-login-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .quick-login-btn {
    width: 100%;
    max-width: 200px;
  }
}
.lang-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

/* Флаги языков */
.custom-select img {
    width: 18px;
    height: 12px;
    object-fit: contain;
    vertical-align: middle;
}