/* ===== ТЕМЫ (через CSS-переменные) ===== */
:root{
  --bg:#ffffff;
  --card:#ffffff;
  --card2:#f8fafc;
  --stroke:#e7edf3;

  --text:#0f172a;
  --muted:#64748b;

  --primary:#14b8a6;
  --primary2:#06b6d4;
  --primaryText:#ffffff;

  --shadow: 0 18px 50px rgba(2, 6, 23, .14);
  --radius: 16px;
}

:root[data-theme="dark"]{
  /* тёмно-серая тема */
  --bg:#0f0f10;
  --card:#17181b;
  --card2:#131417;
  --stroke:#2a2c31;

  --text:#f2f4f8;
  --muted:#a6adbb;

  --shadow: 0 22px 60px rgba(0,0,0,.65);
}

/* плавная смена темы */
*{
  box-sizing:border-box;
  transition:
    background-color .25s ease,
    color .25s ease,
    border-color .25s ease,
    box-shadow .25s ease;
}
html,body{ height:100%; }

body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--text);
  background: var(--bg);
}

.auth{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}

.auth__card{
  width:min(460px, 100%);
  display:flex;
  flex-direction:column;
  background: var(--card);
  border:1px solid var(--stroke);
  border-radius:var(--radius);
  box-shadow: var(--shadow);
  overflow:hidden;

  /* подсветка панели, чтобы было видно на белом и на тёмном */
  outline: 1px solid rgba(20,184,166,.20);
}

.auth__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
  border-bottom:1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(20,184,166,.10), transparent);
}

.brand{
  font-weight:950;
  letter-spacing:.12em;
  font-size:14px;
}

.themebtn{
  display:flex;
  gap:10px;
  align-items:center;
  border:1px solid var(--stroke);
  background: transparent;
  color: var(--text);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
}
.themebtn__dot{
  width:10px;
  height:10px;
  border-radius:999px;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
}
.themebtn__text{
  font-weight:800;
  font-size:12px;
  color: var(--muted);
}

.auth__left,
.auth__right{
  width:100%;
  text-align:center;
}

.auth__left{
  padding:16px 18px 14px;
}

.auth__right{
  padding:14px 18px 18px;
  background: var(--card2);
  border-top:1px solid var(--stroke);
}

/* ===== Панели + анимация ===== */
.panel{
  display:none;
  opacity:0;
  transform: translateY(6px);
}

.panel--active{
  display:block;
  animation: panelIn .22s ease both;
}

@keyframes panelIn{
  from { opacity:0; transform: translateY(6px); }
  to   { opacity:1; transform: translateY(0); }
}

.panel__title{
  margin:0 0 14px;
  font-weight:900;
  font-size:20px;
  letter-spacing:.06em;
}

.field{
  display:block;
  margin:0 0 12px;
  text-align:left;
}

.field__label{
  display:block;
  font-size:12px;
  color:var(--muted);
  margin:0 0 6px;
}

.field__input{
  width:100%;
  padding:11px 12px;
  border-radius:12px;
  border:1px solid var(--stroke);
  background: transparent;
  color:var(--text);
  outline:none;
  transition: box-shadow .15s ease, border-color .15s ease;
}
.field__input:focus{
  border-color: rgba(20,184,166,.80);
  box-shadow: 0 0 0 4px rgba(20,184,166,.18);
}

.btn{
  width:100%;
  border:0;
  cursor:pointer;
  border-radius:12px;
  padding:11px 14px;
  font-weight:900;
  letter-spacing:.03em;
}
.btn--primary{
  margin-top:8px;
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  color:var(--primaryText);
}
.btn--primary:active{ transform: translateY(1px); }

.panel__switch{
  margin:12px 0 0;
  font-size:13px;
  color:var(--muted);
  text-align:center;
}

.link{
  border:0;
  background:transparent;
  color: var(--primary);
  cursor:pointer;
  padding:0;
  font-weight:800;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== Кастомная галочка (по центру) ===== */
.check{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin:10px 0 0;
  user-select:none;
  text-align:left;
}

.check__input{
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
  overflow:hidden;
  pointer-events:none;
}

.check__box{
  width:18px;
  height:18px;
  border-radius:6px;
  border:1px solid var(--stroke);
  background: transparent;
  flex: 0 0 18px;
  margin-top:2px;

  display:flex;
  align-items:center;
  justify-content:center;
}

.check__tick{
  width:8px;
  height:12px;
  border:2px solid transparent;
  border-top:0;
  border-left:0;
  transform: rotate(45deg);
}

.check__input:focus + .check__box{
  box-shadow: 0 0 0 4px rgba(20,184,166,.16);
  border-color: rgba(20,184,166,.80);
}

.check__input:checked + .check__box{
  background: linear-gradient(90deg, var(--primary), var(--primary2));
  border-color: transparent;
}

.check__input:checked + .check__box .check__tick{
  border-color: #ffffff;
}

.check__text{
  font-size:12.2px;
  color:var(--muted);
  line-height:1.35;
}

/* ===== Соцсети ===== */
.social__subtitle{
  margin:0 0 10px;
  color:var(--muted);
  font-size:13px;
}

.social__icons{
  display:flex;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
}

.iconbtn{
  width:44px;
  height:44px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;

  border:1px solid var(--stroke);
  background: var(--card);
  text-decoration:none;

  box-shadow: 0 10px 24px rgba(2, 6, 23, .06);
}
:root[data-theme="dark"] .iconbtn{
  box-shadow:none;
}

.iconbtn:hover{
  transform: translateY(-1px);
  border-color: rgba(20,184,166,.55);
}

.icon{
  width:22px;
  height:22px;
  display:block;
}

/* отдельный размер для цветного Google */
.icon--google{
  width:24px;
  height:24px;
}

.iconbtn--vk{ color:#4a76a8; }
.iconbtn--tg{ color:#229ED9; }
/* google цветной — там цвета внутри SVG, поэтому color не нужен */