/* Личный кабинет AutoTrader */
.at-app { --c-bg: #141518; --c-card: #1d1e22; --c-card2: #24252a; --c-fg: #f4f5f7; --c-muted: #9a9ca3; --c-line: rgba(255,255,255,.08);
  color: var(--c-fg); font-family: Montserrat, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; margin: 30px 0 80px; }
html[data-at-theme="light"] .at-app { --c-bg: #f3f4f6; --c-card: #ffffff; --c-card2: #f6f7f9; --c-fg: #16181d; --c-muted: #6b7280; --c-line: rgba(16,24,40,.09); }
.at-app *, .at-app *::before, .at-app *::after { box-sizing: border-box; }
.at-app h1, .at-app h2, .at-app h3 { color: var(--c-fg); margin: 0; letter-spacing: -.01em; }
.at-app a { color: inherit; }
.at-app .muted { color: var(--c-muted); }
.at-card { background: var(--c-card); border: 1px solid var(--c-line); border-radius: 24px; }
.at-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; padding: 0 24px; border-radius: 16px; border: 0; cursor: pointer;
  font: 700 14px/1 inherit; font-family: inherit; text-decoration: none !important; transition: transform .15s, filter .2s, background .2s; white-space: nowrap; }
.at-btn:active { transform: scale(.98); }
.at-btn-primary { background: var(--at-accent, #f57800); color: #fff !important; }
.at-btn-primary:hover { filter: brightness(1.06); }
.at-btn-primary[disabled] { opacity: .55; cursor: default; box-shadow: none; }
.at-btn-ghost { background: var(--c-card2); color: var(--c-fg) !important; border: 1px solid var(--c-line); }
.at-btn-danger { background: rgba(239,68,68,.12); color: #ef4444 !important; border: 1px solid rgba(239,68,68,.3); }
.at-btn svg { width: 18px; height: 18px; }
.at-input { width: 100%; height: 54px; border-radius: 16px; border: 1px solid var(--c-line); background: var(--c-card2); color: var(--c-fg); padding: 0 18px;
  font: 600 16px/1 inherit; font-family: inherit; outline: none; transition: border-color .2s, box-shadow .2s; }
.at-input:focus { border-color: var(--at-accent); box-shadow: 0 0 0 4px rgba(var(--at-accent-rgb), .15); }
.at-label { display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin: 0 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.at-err { color: #ef4444; font-size: 13px; font-weight: 600; min-height: 18px; margin-top: 8px; }

/* ---------- вход ---------- */
.at-auth { display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 24px; align-items: stretch; }
.at-auth-form { padding: 40px; }
.at-auth-form h1 { font-size: 30px; line-height: 1.15; margin-bottom: 10px; text-transform: none; }
.at-auth-form .sub { color: var(--c-muted); font-size: 15px; line-height: 1.5; margin-bottom: 28px; }
.at-check { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.5; color: var(--c-muted); margin: 16px 0 22px; cursor: pointer; }
.at-check input { width: 18px; height: 18px; margin-top: 1px; accent-color: var(--at-accent); flex: 0 0 18px; }
.at-check a { color: var(--c-fg); }
.at-code { display: flex; gap: 12px; margin: 6px 0 4px; }
.at-code input { width: 64px; height: 72px; text-align: center; font-size: 30px; font-weight: 800; border-radius: 18px; padding: 0; }
.at-linkbtn { background: none; border: 0; color: var(--at-accent); font: 600 14px inherit; font-family: inherit; cursor: pointer; padding: 0; }
.at-linkbtn[disabled] { color: var(--c-muted); cursor: default; }
.at-debug { margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: rgba(var(--at-accent-rgb), .12); color: var(--at-accent); font-size: 13px; font-weight: 600; }
.at-auth-side { position: relative; overflow: hidden; padding: 40px; color: #fff; border: 0;
  background: #16181d; }
.at-auth-side h2 { color: #fff; font-size: 26px; line-height: 1.2; margin-bottom: 26px; max-width: 420px; }
.at-benefit { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 20px; max-width: 460px; }
.at-benefit i { width: 46px; height: 46px; border-radius: 14px; background: rgba(255,255,255,.18); display: grid; place-items: center; flex: 0 0 46px; font-style: normal; }
.at-benefit i svg { width: 22px; height: 22px; }
.at-benefit b { display: block; font-size: 15px; margin-bottom: 3px; }
.at-benefit span { font-size: 13px; opacity: .85; line-height: 1.45; }
.at-auth-side .at-car { position: absolute; right: -40px; bottom: -20px; width: 60%; opacity: .25; pointer-events: none; }

/* ---------- кабинет ---------- */
.at-hero { display: flex; align-items: center; gap: 20px; padding: 26px 28px; margin-bottom: 18px; flex-wrap: wrap; }
.at-ava { width: 68px; height: 68px; border-radius: 22px; background: var(--at-accent, #f57800); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 800; flex: 0 0 68px; }
.at-hero h1 { font-size: 24px; text-transform: none; }
.at-hero .phone { color: var(--c-muted); font-size: 14px; margin-top: 4px; }
.at-hero .grow { flex: 1; min-width: 180px; }
.at-stats { display: flex; gap: 10px; flex-wrap: wrap; }
.at-stat { padding: 10px 16px; border-radius: 14px; background: var(--c-card2); border: 1px solid var(--c-line); min-width: 110px; }
.at-stat b { display: block; font-size: 20px; }
.at-stat span { font-size: 12px; color: var(--c-muted); }
.at-tabs { display: flex; gap: 8px; margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.at-tabs::-webkit-scrollbar { display: none; }
.at-tab { height: 44px; padding: 0 18px; border-radius: 22px; border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-fg); cursor: pointer;
  font: 600 14px inherit; font-family: inherit; white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.at-tab.on { background: var(--c-fg); color: var(--c-bg); border-color: transparent; }
.at-tab .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--at-accent); color: #fff; font-size: 12px; display: inline-grid; place-items: center; }
.at-panel { padding: 26px; }
.at-panel h2 { font-size: 20px; margin-bottom: 18px; text-transform: none; }
.at-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.at-carcard { position: relative; border-radius: 20px; overflow: hidden; background: var(--c-card2); border: 1px solid var(--c-line); text-decoration: none !important; color: var(--c-fg) !important; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.at-carcard:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(0,0,0,.25); }
.at-carcard .img { aspect-ratio: 4 / 3; background: #0003 center / cover no-repeat; }
.at-carcard .body { padding: 14px 16px 16px; }
.at-carcard .t { font-weight: 700; font-size: 15px; line-height: 1.3; margin-bottom: 6px; }
.at-carcard .p { font-weight: 800; font-size: 18px; color: var(--at-accent); }
.at-carcard .x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; color: #e0301e; display: grid; place-items: center; cursor: pointer; }
.at-carcard .x svg { width: 18px; height: 18px; }
.at-empty { text-align: center; padding: 50px 20px; }
.at-empty .ic { width: 72px; height: 72px; border-radius: 24px; margin: 0 auto 16px; display: grid; place-items: center; background: var(--c-card2); color: var(--at-accent); }
.at-empty .ic svg { width: 32px; height: 32px; }
.at-empty h3 { font-size: 18px; margin-bottom: 8px; text-transform: none; }
.at-empty p { color: var(--c-muted); margin: 0 auto 20px; max-width: 380px; font-size: 14px; line-height: 1.5; }
.at-list { display: flex; flex-direction: column; gap: 10px; }
.at-row { display: flex; gap: 14px; align-items: center; padding: 16px 18px; border-radius: 18px; background: var(--c-card2); border: 1px solid var(--c-line); flex-wrap: wrap; }
.at-row .main { flex: 1; min-width: 200px; }
.at-row .t { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.at-row .s { font-size: 13px; color: var(--c-muted); line-height: 1.45; }
.at-badge2 { padding: 6px 12px; border-radius: 12px; font-size: 12px; font-weight: 700; }
.at-badge2.new { background: rgba(var(--at-accent-rgb), .15); color: var(--at-accent); }
.at-badge2.work { background: rgba(59,130,246,.15); color: #3b82f6; }
.at-badge2.done { background: rgba(34,197,94,.15); color: #22c55e; }
.at-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; max-width: 760px; }
.at-form .full { grid-column: 1 / -1; }
.at-seg { display: inline-flex; padding: 4px; border-radius: 16px; background: var(--c-card2); border: 1px solid var(--c-line); gap: 4px; }
.at-seg button { height: 42px; padding: 0 16px; border-radius: 12px; border: 0; background: transparent; color: var(--c-muted); font: 600 14px inherit; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; }
.at-seg button.on { background: var(--c-card); color: var(--c-fg); box-shadow: 0 2px 8px rgba(0,0,0,.15); }
.at-seg svg { width: 18px; height: 18px; }
.at-danger { margin-top: 30px; padding: 22px; border-radius: 20px; border: 1px solid rgba(239,68,68,.35); background: rgba(239,68,68,.06); }
.at-danger h3 { font-size: 16px; color: #ef4444; margin-bottom: 6px; text-transform: none; }
.at-danger p { font-size: 13.5px; color: var(--c-muted); margin: 0 0 16px; line-height: 1.5; }
.at-modal { position: fixed; inset: 0; z-index: 2100; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(6px); }
.at-modal .box { width: 100%; max-width: 460px; padding: 28px; border-radius: 24px; background: var(--c-card); color: var(--c-fg); border: 1px solid var(--c-line); }
.at-modal h3 { font-size: 20px; margin-bottom: 10px; text-transform: none; }
.at-modal p { color: var(--c-muted); font-size: 14px; line-height: 1.55; }
.at-modal .btns { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; }
.at-spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: atSpin .8s linear infinite; }
@keyframes atSpin { to { transform: rotate(360deg); } }
.at-skel { height: 120px; border-radius: 20px; background: linear-gradient(90deg, var(--c-card2), var(--c-card), var(--c-card2)); background-size: 200% 100%; animation: atSk 1.2s infinite; }
@keyframes atSk { to { background-position: -200% 0; } }
@media (max-width: 991.98px) {
  .at-auth { grid-template-columns: 1fr; }
  .at-auth-side { order: 2; padding: 28px; }
  .at-auth-form { padding: 28px 22px; }
  .at-auth-form h1 { font-size: 26px; }
  .at-form { grid-template-columns: 1fr; }
  .at-panel { padding: 18px; }
  .at-hero { padding: 20px; }
  .at-code input { width: 58px; height: 66px; }
}

/* вход по звонку: подсказка «код — последние 4 цифры номера» */
.at-callhint { display: inline-flex; align-items: center; gap: 2px; margin: 2px 0 14px; padding: 10px 16px; border-radius: 14px;
  background: var(--at-c-soft, rgba(127, 127, 127, .12)); font: 600 17px/1 var(--at-ui-font); letter-spacing: .04em; color: var(--at-c-muted, #8a8f98); }
.at-callhint b { color: var(--at-accent); font-weight: 800; letter-spacing: .18em; }
