/* === Avtarium Theme — Navy + Mint (#00d1b2) ============================== */
/* Шрифт Inter уже подключается в base.html через <link>, поэтому @import не нужен. */

/* Палитра и размеры по умолчанию (тихая типографика) */
:root{
  --bg-1:#071a2b; --bg-2:#0b2237; --card:#0e1627; --line:#1c2942;
  --text:#e8f1ff; --muted:#9fb2c8;
  --mint:#00d1b2; --mint-700:#00b39a;
  --danger:#ef4444;

  --r-lg:18px; --r-md:14px;
  --shadow:0 20px 60px rgba(0,0,0,.45),0 2px 10px rgba(0,0,0,.25);

  --fs-base:14px;   /* было 16 → 14 */
  --fs-metric:22px; /* было 28 → 22 */
  --fs-small:11px;  /* было 12 → 11 */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font:var(--fs-base)/1.55 "Inter",system-ui,-apple-system,"Segoe UI",Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(1200px 800px at 20% 10%,rgba(0,209,178,.10),transparent 60%),
    linear-gradient(140deg,var(--bg-1),var(--bg-2));
  background-attachment:fixed;
}

/* Контейнеры и утилиты отступов */
.container{max-width:1200px;margin:0 auto;padding:0 18px}
.center{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:24px}
.p-22{padding:22px}
.mb-8{margin-bottom:8px}.mb-12{margin-bottom:12px}.mb-16{margin-bottom:16px}

/* Карточки */
.card{
  background:rgba(14,22,39,.82);
  border:1px solid var(--line);
  border-radius:var(--r-lg);
  box-shadow:var(--shadow);
  backdrop-filter: blur(6px);
  width:100%;
}

/* Бренд/логотип как текст */
.wordmark{font-weight:800;letter-spacing:.15px;color:var(--mint)}
.brand-name{
  font-weight:800; letter-spacing:.15px; color:var(--mint);
  font-size:24px; margin-bottom:2px;
}
.brand-sub{ color:var(--muted); font-size:13px; opacity:.95; }

/* Заголовки, метрики, мелкий текст */
.card-title{
  color:var(--muted); font-weight:700; margin-bottom:6px;
  font-size:13.5px; letter-spacing:.15px;
}
.metric{ font-size:var(--fs-metric); font-weight:700; font-variant-numeric: tabular-nums; }
.small{ color:var(--muted); font-size:var(--fs-small) }

/* Сетки */
.grid{display:grid; gap:14px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-2{grid-template-columns:repeat(2,1fr)}
@media(max-width:1100px){.grid-3,.grid-2{grid-template-columns:1fr}}

/* Таблицы/строки */
.table{border:1px solid var(--line); border-radius:var(--r-md); overflow:hidden}
.thead,.row{display:grid; gap:10px; padding:10px 12px; align-items:center}
.thead{background:#0c1426; color:#cbd5e1; font-weight:700; font-size:12.5px}
.num{text-align:right}

/* Прогресс-бар */
.progress{height:7px;background:#111827;border-radius:8px;overflow:hidden}
.progress>div{height:7px;background:var(--mint)}

/* Кнопки */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:8px 12px;
  border-radius:12px;
  border:0; cursor:pointer;
  font-weight:700; line-height:1.1;
  transition:transform .12s ease, filter .12s ease, background .12s ease, border-color .12s ease;
  background:var(--mint); color:#06221c;   /* мятная по умолчанию */
}
.btn:hover{background:var(--mint-700); transform:translateY(-1px)}
.btn-ghost{
  background:#0c1426; color:var(--text); border:1px solid var(--line);
}
.btn-ghost:hover{border-color:#2a3e60; transform:translateY(-1px)}
.btn.is-muted{opacity:.65;cursor:default}
.btn-block{width:100%}

/* Верхняя панель (если используется) */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 16px; border-bottom:1px solid var(--line);
  background:linear-gradient(180deg,rgba(255,255,255,.02),rgba(255,255,255,0));
}

/* Баннеры/уведомления */
.notice{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:10px 12px; border:1px solid var(--line); border-radius:14px; background:#0c1426
}
.notice .small{color:var(--muted)}
.notice.ok{border-color:rgba(0,209,178,.35)}
.notice.warn{border-color:#b45309;background:#1f2937}
.notice.err{border-color:#ef4444;background:#2a1214}

/* 12-column utilities */
.grid-12{display:grid;gap:12px;grid-template-columns:repeat(12,minmax(0,1fr))}
.col-12{grid-column:span 12}
.col-9{grid-column:span 9}.col-8{grid-column:span 8}.col-6{grid-column:span 6}
.col-4{grid-column:span 4}.col-3{grid-column:span 3}
@media (max-width:1200px){
  .grid-12{grid-template-columns:repeat(8,minmax(0,1fr))}
  .col-9{grid-column:span 8}
}
@media (max-width:860px){
  .grid-12{grid-template-columns:repeat(4,minmax(0,1fr))}
  .col-6{grid-column:span 4}.col-4{grid-column:span 4}.col-3{grid-column:span 4}
}
@media (max-width:560px){
  .grid-12{grid-template-columns:repeat(2,minmax(0,1fr))}
  .col-9,.col-8,.col-6,.col-4,.col-3{grid-column:span 2}
}

/* Компактный режим */
body.compact{
  --fs-base:13.5px;
  --fs-metric:20px;
  --fs-small:10.5px;
}

/* Пустые состояния / тултипы */
.empty-state{display:inline-flex; align-items:center; gap:8px; padding:8px 10px; color:var(--muted); font-size:var(--fs-small)}
.empty-emoji{opacity:.75}
.q{
  width:18px;height:18px;border-radius:50%;
  background:rgba(255,255,255,.06); border:1px solid rgba(255,255,255,.12);
  color:var(--text); font-size:12px; font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;
  cursor:help; position:relative;
}
.q:hover::after{
  content:attr(data-tip);
  position:absolute; left:50%; top:120%; transform:translateX(-50%);
  max-width:360px; background:#0d172b; color:var(--text);
  border:1px solid #20314f; border-radius:10px;
  padding:10px 12px; font-size:12px; line-height:1.45;
  box-shadow:0 8px 24px rgba(0,0,0,.45); z-index:40; white-space:normal;
}

/* === Формы (логин/профиль) — поля и метки === */
.f{display:grid; gap:8px}
.f-label{font-weight:600; color:var(--muted); font-size:13px}
.f-input,
input[type="text"], input[type="password"], input[type="email"], input:not([type]){
  width:100%; display:block;
  padding:14px 16px;
  border-radius:12px;
  border:1px solid var(--line);
  background:#0b1322;             /* единый цвет поля */
  color:var(--text);
  outline:0;
  transition:border-color .15s ease, box-shadow .15s ease, background .15s ease;
  appearance:none; -webkit-appearance:none;
}
.f-input::placeholder{color:#7e8bb6}
.f-input:focus,
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus, input:not([type]):focus{
  border-color:rgba(0,209,178,.5);
  box-shadow:0 0 0 3px rgba(0,209,178,.12);
}

/* Флеш-сообщения */
.flash{margin:12px 0}
.flash-item{padding:10px 12px; border-radius:10px; border:1px solid var(--line); background:#0c1426}
.flash-item.error{border-color:#ef4444;background:#2a1214;color:#ffd9de}
.flash-item.ok{border-color:#22c55e;background:#112818;color:#c8f7d2}

/* ===== Login page ===== */
.login-card{
  max-width:560px; padding:28px 28px 22px; margin:0 auto; text-align:center;
}
.login-brand{
  font-weight:800; letter-spacing:.15px; color:var(--mint);
  font-size:28px; margin-bottom:6px;
}
.login-title{
  margin:0 0 16px; font-size:22px; font-weight:700; color:var(--text);
}
.login-form{display:grid; gap:16px; text-align:left; margin-top:6px}
.login-subtext{margin-top:16px; color:var(--muted); font-size:13px}

/* ===== Premium Dashboard polish ===== */

.container { max-width: 1280px; }

/* крупные отступы между секциями */
.dash section { padding: 8px 0 22px; }

/* hero */
.dash-hero { padding-top: 18px; padding-bottom: 10px; }
.brand-badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  background: rgba(0,209,178,.10);
  color: var(--mint); font-weight:700; font-size:12.5px;
  border: 1px solid rgba(0,209,178,.25);
}
.dash-title{ margin:10px 0 4px; font-size:28px; font-weight:800; letter-spacing:.2px; }
.dash-sub{ margin:0; color:var(--muted); }

/* сетка с более крупным шагом */
.grid-lg { gap: 22px; }

/* стекло-карточки */
.card-glass{
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
  border-radius: var(--r-lg);
}

/* KPI */
.kpi-card{
  padding: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,.00));
  border: 1px solid rgba(0,209,178,.20);
  border-radius: var(--r-lg);
  box-shadow: 0 18px 60px rgba(0,0,0,.35);
  backdrop-filter: blur(8px);
}
.kpi-head{ color:#cfe8ff; font-weight:700; font-size:12.5px; letter-spacing:.2px; }
.kpi-value{ font-size:28px; font-weight:800; margin:10px 0 4px; }
.kpi-foot{ margin-top:6px; }

/* капсулы-инфо */
.stat-pill{
  padding:14px; border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(12,20,38,.6);
}
.stat-value{ font-size:22px; font-weight:800; }

/* мелкие правки */
.p-24{ padding:24px; }
.muted{ color:var(--muted); }

/* ===== Top Navigation (glass) ===== */
.topnav{
  position: sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg,rgba(7,16,33,.65),rgba(7,16,33,.25));
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav-row{
  height: 58px; display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center; gap: 18px;
}
.nav-brand{
  display:flex; align-items:center; gap:10px;
  color: var(--text); font-weight:800; letter-spacing:.2px; text-decoration:none;
}
.nav-logo-dot{
  width:10px;height:10px;border-radius:50%;
  background: var(--mint); box-shadow:0 0 0 4px rgba(0,209,178,.18);
}
.nav-links{ display:flex; gap:18px; }
.nav-link{
  color: var(--muted); text-decoration:none; font-weight:600;
  padding:8px 10px; border-radius:10px; transition: color .15s, background .15s;
}
.nav-link:hover{ color: var(--text); background: rgba(255,255,255,.04); }
.nav-aux{ display:flex; align-items:center; gap:12px; }

/* компактная кнопка */
.btn-sm{ padding:8px 12px; border-radius:10px; font-weight:700; }

/* Burger for mobile */
.nav-burger{ display:none; background:none; border:0; padding:6px 4px; }
.nav-burger span{
  display:block; width:22px; height:2px; background:#c9d9ee; margin:4px 0; border-radius:2px;
}

@media (max-width: 920px){
  .nav-links{
    position:absolute; left:0; right:0; top:58px;
    display:none; flex-direction:column; gap:0;
    background:rgba(7,16,33,.95); border-bottom:1px solid rgba(255,255,255,.06);
  }
  .nav-links.show{ display:flex; }
  .nav-link{ padding:12px 18px; border-radius:0; }
  .nav-burger{ display:block; }
}
.nav-link.active{ color: var(--text); background: rgba(0,209,178,.12); }

.page{ padding-top:24px; padding-bottom:56px; }
.page-header{ margin-bottom:18px; }
.page-title{ font-size:28px; font-weight:800; letter-spacing:.2px; }
.page-sub{ color:var(--muted); margin-top:6px; }

.auth-page {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 0 4rem;
}

.auth-card {
  background: rgba(5, 10, 14, 0.65);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(0, 150, 136, 0.25);
  border-radius: 1.4rem;
  padding: 2.4rem 2.6rem 2rem;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 18px 40px rgba(0,0,0,0.18);
}

.auth-card h1 {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  color: #fff;
  text-align: center;
}

.auth-form .form-label {
  display: block;
  margin-bottom: 1rem;
  color: rgba(255,255,255,0.72);
  font-weight: 500;
}

.auth-form .form-input {
  width: 100%;
  background: rgba(0,0,0,0.12);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: .6rem;
  padding: .55rem .7rem;
  color: #fff;
}

.auth-form .form-input:focus {
  outline: none;
  border-color: rgba(0, 150, 136, 0.85);
  box-shadow: 0 0 0 2px rgba(0,150,136,0.25);
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-right: 1.3rem;
  margin-bottom: .8rem;
  color: rgba(255,255,255,0.7);
  font-size: .9rem;
}

.btn.w-full { width: 100%; }

.muted {
  text-align: center;
  margin-top: 1rem;
  color: rgba(255,255,255,0.35);
}
.muted a { color: #fff; }
