/* ===== Layout ===== */
.profile-page{
  max-width: 1100px;
  margin: 0 auto;
}

.profile-grid{
  display:grid;
  grid-template-columns: 420px 1fr;
  grid-template-areas:
    "team info"
    "password info"
    "settings .";
  gap:16px;
  align-items:start;
}

.card--team{ grid-area: team; }
.card--info{ grid-area: info; }
.card--password{ grid-area: password; }
/* Настройки — левой колонкой под «Паролем». Во всю ширину карточку не
   растягиваем: у .card в components.css общий потолок 440px, и одна широкая
   карточка среди узких читалась бы чужой на этой странице. */
.card--settings{ grid-area: settings; }

@media (max-width: 1024px){
  .profile-grid{
    grid-template-columns: 1fr;
    grid-template-areas:
      "info"
      "team"
      "password"
      "settings";
  }
}

/* ===== Cards ===== */
.card{
  position: relative;
  border-radius: 18px;
  padding: 16px;
  border: 1px solid var(--border, rgba(255,255,255,.10));
  background:
    radial-gradient(1200px 400px at 20% -10%, rgba(45,212,191,.08), transparent 55%),
    radial-gradient(900px 350px at 110% 20%, rgba(34,197,94,.06), transparent 55%),
    rgba(255,255,255,.03);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

.card-head{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom: 12px;
}

.card-title{
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .2px;
}

.card-sub{
  opacity: .7;
  font-size: 12px;
}

/* У “Инфо” сделаем ощущение “профильной карточки” */
.card--info::before{
  content:"";
  position:absolute;
  inset:0;
  border-radius: 18px;
  pointer-events:none;
  background:
    linear-gradient(180deg, rgba(255,255,255,.06), transparent 35%),
    linear-gradient(90deg, rgba(45,212,191,.10), transparent 45%, rgba(34,197,94,.08));
  opacity:.35;
  mask-image: radial-gradient(800px 280px at 20% 0%, #000 35%, transparent 70%);
}

/* ===== Form ===== */
.form{ display:flex; flex-direction:column; gap:12px; }
.field-label{ font-size:12px; opacity:.8; margin-bottom:6px; }

.row{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap: wrap;
}

.hint{ font-size:12px; opacity:.75; }
.hint.ok{ opacity:1; }
.hint.bad{ opacity:.9; }

/* ===== Inputs ===== */
.input, .select{
  width:100%;
  height:38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  color: inherit;
  padding: 0 12px;
  outline: none;
  transition: border-color .15s ease, background .15s ease;
}

.input:focus, .select:focus{
  border-color: rgba(45,212,191,.35);
  background: rgba(0,0,0,.22);
}

.prefix-input{
  display:flex;
  align-items:center;
  gap:8px;
}

.prefix{
  height:38px;
  min-width:38px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.18);
  opacity:.9;
}

.prefix-input .input{ flex:1; }

/* ===== Password input with eye (FIX) ===== */
.pass{
  position: relative;
}

.pass .input{
  padding-right: 44px; /* место под кнопку глаза */
}

/* ВАЖНО: глаз без своей рамки, чтобы не было “квадратика” */
.eye{
  position:absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  border-radius: 10px;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  opacity:.85;
}

.eye:hover{ opacity:1; background: rgba(255,255,255,.06); }
.eye:active{ transform: translateY(-50%) scale(.98); }

/* ===== Buttons ===== */
.btn{
  height:38px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.02);
  color: inherit;
  padding: 0 14px;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:hover{
  background: rgba(255,255,255,.04);
  border-color: rgba(255,255,255,.14);
}
.btn:active{ transform: translateY(1px); }

.btn.primary{
  background: rgba(45,212,191,.14);
  border-color: rgba(45,212,191,.30);
}
.btn.primary:hover{
  background: rgba(45,212,191,.18);
  border-color: rgba(45,212,191,.40);
}

.btn.danger{
  background: rgba(239, 68, 68, .10);
  border-color: rgba(239, 68, 68, .26);
}
.btn.danger:hover{
  background: rgba(239, 68, 68, .14);
  border-color: rgba(239, 68, 68, .34);
}

.tiny{
  margin-top: 2px;
  font-size:12px;
  opacity:.65;
  line-height: 1.35;
}

/* Disabled state */
.btn:disabled{
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
}

/* чуть приятнее статусы */
.hint.ok{ color: rgba(34,197,94,.95); }
.hint.bad{ color: rgba(239,68,68,.95); }

.input.is-readonly{
  opacity: .9;
  background: rgba(0,0,0,.14);
}

.select.is-readonly{
  opacity: .85;
}

.btn.secondary{
  background: rgba(255,255,255,.03);
}

/* ===== Настройка с тумблером ===== */
.setting{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
}

.setting__text{ min-width:0; }

.setting__name{
  font-size:13px;
  font-weight:600;
  margin-bottom:4px;
}

.setting__desc{
  font-size:12px;
  opacity:.7;
  line-height:1.45;
  max-width: 70ch;
}

/* Тумблер. Именно checkbox, а не select: глобальный улучшатель select'ов
   (js/ui/customSelect.js) растянул бы виджет на всю ширину карточки. */
.switch{
  position:relative;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  cursor:pointer;
  /* Тумблер прижат к верхней строке названия, а не к середине описания. */
  margin-top:2px;
}

.switch__input{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  margin:0;
  opacity:0;
  cursor:pointer;
}

.switch__track{
  position:relative;
  width:44px;
  height:26px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.22);
  transition: background .15s ease, border-color .15s ease;
}

.switch__thumb{
  position:absolute;
  top:50%;
  left:3px;
  width:18px;
  height:18px;
  border-radius:50%;
  background: rgba(255,255,255,.55);
  transform: translateY(-50%);
  transition: transform .15s ease, background .15s ease;
}

.switch__input:checked + .switch__track{
  background: rgba(45,212,191,.26);
  border-color: rgba(45,212,191,.45);
}

.switch__input:checked + .switch__track .switch__thumb{
  transform: translate(18px, -50%);
  background: rgba(45,212,191,.95);
}

.switch__input:focus-visible + .switch__track{
  outline: 2px solid rgba(45,212,191,.45);
  outline-offset: 2px;
}

.switch__input:disabled + .switch__track{ opacity:.5; }

[data-theme="light"] .switch__track{
  border-color: rgba(18,23,20,.14);
  background: rgba(18,23,20,.08);
}

[data-theme="light"] .switch__thumb{ background: rgba(18,23,20,.35); }

@media (prefers-reduced-motion: reduce){
  .switch__track, .switch__thumb{ transition: none; }
}

@media (max-width: 560px){
  .setting{ flex-direction:column; align-items:stretch; gap:10px; }
  .switch{ align-self:flex-start; }
}
