/* ==================================================================
 *  HamkorAI — uslublar (assets/style.css)
 *  index.php dan ajratildi. Dizayn: antiqa oltin/marjon.
 * ================================================================== */

/* ==================================================================
   DIZAYN TOKENLARI
   ================================================================== */
:root{
  --bg:         #0A0E17;
  --panel:      #111827;
  --panel-2:    #161F33;
  --border:     #232D45;
  --text:       #E9EAEE;
  --muted:      #8791A8;
  --gold:       #C9A15A;
  --gold-soft:  rgba(201,161,90,.14);
  --teal:       #3FBFAE;
  --teal-soft:  rgba(63,191,174,.14);
  --red:        #E0645A;
  --red-soft:   rgba(224,100,90,.13);
  --yellow:     #D9A441;
  --yellow-soft:rgba(217,164,65,.13);
  --green:      #4FBF7A;
  --green-soft: rgba(79,191,122,.13);
  --font-head:  'Space Grotesk', system-ui, sans-serif;
  --font-body:  'Inter', system-ui, sans-serif;
  --font-mono:  'JetBrains Mono', ui-monospace, monospace;
  --radius:     14px;
  --radius-sm:  9px;
  --sidebar-w:  232px;
  --sidebar-w-m:68px;
  --shadow-lg:  0 24px 60px rgba(0,0,0,.45);
  --shadow-md:  0 12px 32px rgba(0,0,0,.30);
  --ease:       cubic-bezier(.22,.61,.36,1);
}
*{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; }
body{
  font-family:var(--font-body);
  font-size:15px;
  line-height:1.6;
  color:var(--text);
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(63,191,174,.06), transparent 60%),
    radial-gradient(800px 500px at -10% 110%, rgba(201,161,90,.05), transparent 60%),
    var(--bg);
  min-height:100vh;
  min-width:360px;
  overflow-x:hidden;
}
::selection{ background:rgba(201,161,90,.35); }
img{ max-width:100%; }
button{ font-family:inherit; }
input,textarea{ font-family:inherit; }

/* Dekorativ harakatlanuvchi fon */
.bg-decor{
  position:fixed;
  inset:0;
  z-index:0;
  pointer-events:none;
  overflow:hidden;
}
.bg-blob{
  position:absolute;
  border-radius:50%;
  filter:blur(90px);
  opacity:.5;
}
.bg-blob-1{
  width:560px; height:560px;
  top:-180px; right:-120px;
  background:radial-gradient(circle, rgba(63,191,174,.16), transparent 65%);
  animation:float-a 26s ease-in-out infinite;
}
.bg-blob-2{
  width:520px; height:520px;
  bottom:-200px; left:-140px;
  background:radial-gradient(circle, rgba(201,161,90,.14), transparent 65%);
  animation:float-b 30s ease-in-out infinite;
}
.bg-blob-3{
  width:420px; height:420px;
  top:38%; left:58%;
  background:radial-gradient(circle, rgba(96,116,255,.10), transparent 65%);
  animation:float-c 34s ease-in-out infinite;
}
.bg-glow{
  position:absolute;
  inset:0;
  background:radial-gradient(1200px 700px at 50% -20%, rgba(63,191,174,.04), transparent 60%);
}
@keyframes float-a{
  0%,100%{ transform:translate(0,0) scale(1); }
  50%{ transform:translate(-60px,50px) scale(1.12); }
}
@keyframes float-b{
  0%,100%{ transform:translate(0,0) scale(1); }
  50%{ transform:translate(70px,-40px) scale(1.08); }
}
@keyframes float-c{
  0%,100%{ transform:translate(0,0) scale(1); }
  50%{ transform:translate(-50px,-50px) scale(1.15); }
}

/* Asosiy oqim fon qatlami ustida */
.sidebar, .main, .app-footer, .modal-overlay, .toast-region{ position:relative; z-index:1; }

:focus{ outline:none; }
:focus-visible{
  outline:2px solid var(--gold);
  outline-offset:3px;
  border-radius:6px;
}

/* Scrollbar */
::-webkit-scrollbar{ width:10px; height:10px; }
::-webkit-scrollbar-track{ background:transparent; }
::-webkit-scrollbar-thumb{ background:var(--border); border-radius:8px; border:2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover{ background:#33405f; }

/* ==================================================================
   ORB — imzo elementi (aylanuvchi, nafas oluvchi gradient sharcha)
   ================================================================== */
.orb{
  --size:64px;
  position:relative;
  width:var(--size);
  height:var(--size);
  border-radius:50%;
  background:conic-gradient(from 0deg, var(--gold), var(--teal), var(--gold));
  animation:orb-spin 9s linear infinite;
  box-shadow:
    0 0 24px rgba(63,191,174,.35),
    0 0 48px rgba(201,161,90,.25),
    inset 0 0 18px rgba(255,255,255,.12);
  flex:none;
}
.orb::before{
  content:'';
  position:absolute;
  inset:6px;
  border-radius:50%;
  background:radial-gradient(circle at 32% 28%, #ffffff, rgba(255,255,255,.25) 18%, rgba(10,14,23,.96) 62%);
  animation:orb-breathe 4.2s ease-in-out infinite;
}
.orb::after{
  content:'';
  position:absolute;
  inset:0;
  border-radius:50%;
  background:repeating-conic-gradient(rgba(255,255,255,.10) 0deg 6deg, transparent 6deg 14deg);
  opacity:.35;
}
@keyframes orb-spin{ to{ transform:rotate(360deg); } }
@keyframes orb-breathe{
  0%,100%{ transform:scale(1); }
  50%{ transform:scale(.82); }
}
.orb.is-pulsing{ animation-duration:2.4s; }

/* ==================================================================
   SALOMLASHUV EKRANI
   ================================================================== */
.welcome{
  position:fixed;
  inset:0;
  z-index:100;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:26px;
  padding:24px;
  text-align:center;
  background:
    radial-gradient(900px 600px at 50% -10%, rgba(63,191,174,.10), transparent 60%),
    radial-gradient(700px 500px at 50% 115%, rgba(201,161,90,.09), transparent 60%),
    var(--bg);
  transition:opacity .7s var(--ease), visibility .7s;
}
.welcome.is-hidden{ opacity:0; visibility:hidden; pointer-events:none; }
.welcome .welcome-orb{ --size:92px; margin-bottom:6px; position:relative; }
.welcome .welcome-orb::before{
  content:'';
  position:absolute;
  inset:-26px;
  border-radius:50%;
  border:1px solid rgba(201,161,90,.35);
  animation:ring-pulse 3s ease-in-out infinite;
}
.welcome .welcome-orb::after{
  content:'';
  position:absolute;
  inset:-52px;
  border-radius:50%;
  border:1px dashed rgba(63,191,174,.25);
  animation:orb-spin 22s linear infinite;
}
@keyframes ring-pulse{
  0%,100%{ transform:scale(.92); opacity:.55; }
  50%{ transform:scale(1.06); opacity:1; }
}
.welcome .orb{ --size:92px; margin-bottom:6px; }
.welcome h1{
  font-family:var(--font-head);
  font-weight:600;
  font-size:clamp(26px, 5.5vw, 46px);
  letter-spacing:-.5px;
  min-height:1.3em;
}
.welcome h1 .cursor{
  display:inline-block;
  width:3px;
  height:.9em;
  background:var(--gold);
  margin-left:4px;
  vertical-align:-2px;
  animation:blink 1s steps(1) infinite;
}
@keyframes blink{ 50%{ opacity:0; } }
.welcome .welcome-sub{
  color:var(--muted);
  max-width:520px;
  font-size:15px;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .8s var(--ease), transform .8s var(--ease);
}
.welcome .welcome-sub.is-visible{ opacity:1; transform:translateY(0); }
.welcome .welcome-sub b{ color:var(--text); font-weight:500; }
.btn-skip{
  margin-top:10px;
  opacity:0;
  transform:translateY(8px);
  transition:opacity .6s var(--ease), transform .6s var(--ease), background .2s, color .2s;
}
.welcome .btn-skip.is-visible{ opacity:1; transform:translateY(0); }
.welcome-timer{
  margin-top:14px;
  font-size:12.5px;
  color:var(--muted);
  opacity:0;
  transition:opacity .8s var(--ease);
  letter-spacing:.3px;
}
.welcome-timer.is-visible{ opacity:1; }

/* ==================================================================
   UMUMIY APP TARTIB
   ================================================================== */
.app{
  display:flex;
  min-height:100vh;
  opacity:0;
  transition:opacity .8s var(--ease);
}
.app.is-ready{ opacity:1; }

/* ----- Sidebar ----- */
.sidebar{
  width:var(--sidebar-w);
  flex:none;
  position:sticky;
  top:0;
  height:100vh;
  display:flex;
  flex-direction:column;
  padding:20px 14px;
  background:linear-gradient(180deg, rgba(17,24,39,.96), rgba(13,18,30,.96));
  border-right:1px solid var(--border);
  gap:6px;
  z-index:20;
}
.sidebar-brand{
  display:flex;
  align-items:center;
  gap:12px;
  padding:4px 8px 18px;
}
.sidebar-brand .orb{ --size:40px; }
.brand-name{
  font-family:var(--font-head);
  font-weight:700;
  font-size:18px;
  letter-spacing:.3px;
  white-space:nowrap;
}
.brand-name span{ color:var(--gold); }
.brand-tag{
  font-size:11px;
  color:var(--muted);
  letter-spacing:.5px;
  white-space:nowrap;
}
.sidebar-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex:1;
}
.nav-item{
  display:flex;
  align-items:center;
  gap:12px;
  width:100%;
  padding:11px 12px;
  border:none;
  border-radius:var(--radius-sm);
  background:transparent;
  color:var(--muted);
  cursor:pointer;
  font-size:14.5px;
  font-weight:500;
  text-align:left;
  transition:background .2s, color .2s, transform .15s;
}
.nav-item svg{ flex:none; }
.nav-item:hover{ background:rgba(255,255,255,.04); color:var(--text); }
.nav-item:active{ transform:scale(.98); }
.nav-item.active{
  background:linear-gradient(90deg, var(--gold-soft), rgba(63,191,174,.08));
  color:var(--gold);
}
.nav-item.active::before{
  content:'';
  position:absolute;
  left:-14px;
  width:3px;
  height:22px;
  border-radius:3px;
  background:var(--gold);
}
.nav-item{ position:relative; }
.sidebar-foot{
  margin-top:auto;
  padding:14px 10px 4px;
  border-top:1px solid var(--border);
}
.sidebar-foot-note{
  font-size:11.5px;
  line-height:1.5;
  color:var(--muted);
}

/* ----- Main ----- */
.main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}
.topbar{
  position:sticky;
  top:0;
  z-index:15;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 26px;
  background:rgba(10,14,23,.82);
  backdrop-filter:blur(12px);
  -webkit-backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
}
.topbar h2{
  font-family:var(--font-head);
  font-size:19px;
  font-weight:600;
  letter-spacing:-.2px;
}
.topbar-right{ display:flex; align-items:center; gap:10px; }
.session-pill{
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--panel);
  color:var(--muted);
  font-size:12.5px;
  font-weight:500;
}
.session-pill .dot-live{
  width:8px; height:8px; border-radius:50%;
  background:var(--green);
  box-shadow:0 0 10px rgba(79,191,122,.8);
}
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:38px; height:38px;
  border:1px solid var(--border);
  border-radius:50%;
  background:var(--panel);
  color:var(--muted);
  cursor:pointer;
  transition:color .2s, border-color .2s, transform .15s;
}
.icon-btn:hover{ color:var(--gold); border-color:var(--gold); }
.icon-btn:active{ transform:scale(.95); }

.content{
  flex:1;
  width:100%;
  max-width:1200px;
  margin:0 auto;
  padding:28px 26px 40px;
}

/* ----- Ekranlar (alohida sahifalar) ----- */
.screen{ display:none; }
.screen.active{ display:block; animation:screen-in .38s var(--ease); }
@keyframes screen-in{
  from{ opacity:0; transform:translateY(10px); }
  to{ opacity:1; transform:translateY(0); }
}

/* ----- Umumiy komponentlar ----- */
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  font-weight:600;
  letter-spacing:1.6px;
  text-transform:uppercase;
  color:var(--gold);
  margin-bottom:10px;
}
.eyebrow::before{
  content:'';
  width:22px; height:1px;
  background:var(--gold);
  opacity:.7;
}
.page-title{
  font-family:var(--font-head);
  font-size:clamp(24px, 4vw, 34px);
  font-weight:600;
  letter-spacing:-.5px;
  margin-bottom:8px;
  background:linear-gradient(100deg, #fff 25%, #c9d6e8 55%, var(--gold) 100%);
  -webkit-background-clip:text;
  background-clip:text;
  -webkit-text-fill-color:transparent;
  color:transparent;
}
.page-sub{ color:var(--muted); max-width:620px; margin-bottom:26px; }

.card{
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:20px;
}
.card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.card-title{
  font-family:var(--font-head);
  font-size:15.5px;
  font-weight:600;
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:9px;
  padding:11px 22px;
  border:none;
  border-radius:var(--radius-sm);
  font-size:14.5px;
  font-weight:600;
  cursor:pointer;
  transition:transform .15s, filter .2s, box-shadow .2s, background .2s;
  white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{
  background:linear-gradient(135deg, var(--gold), #b98f4b);
  color:#0A0E17;
  box-shadow:0 8px 24px rgba(201,161,90,.25);
}
.btn-primary:hover{ filter:brightness(1.07); box-shadow:0 10px 28px rgba(201,161,90,.35); }
.btn-teal{
  background:linear-gradient(135deg, var(--teal), #2f9d8f);
  color:#0A0E17;
  box-shadow:0 8px 24px rgba(63,191,174,.25);
}
.btn-teal:hover{ filter:brightness(1.07); }
.btn-ghost{
  background:transparent;
  border:1px solid var(--border);
  color:var(--muted);
}
.btn-ghost:hover{ border-color:var(--gold); color:var(--gold); }
.btn:disabled{ opacity:.55; cursor:not-allowed; transform:none; }

.field-label{
  display:block;
  font-size:13px;
  font-weight:500;
  color:var(--muted);
  margin-bottom:8px;
}
.input,
.textarea{
  width:100%;
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  color:var(--text);
  padding:12px 14px;
  font-size:14.5px;
  transition:border-color .2s, box-shadow .2s;
}
.input::placeholder,
.textarea::placeholder{ color:#5b647c; }
.input:focus,
.textarea:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(201,161,90,.15);
}
.textarea{ resize:vertical; min-height:140px; line-height:1.6; }

.form-row{
  display:flex;
  gap:12px;
  align-items:stretch;
}
.form-row .input{ flex:1; min-width:0; }
.pill-group{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:16px;
}
.pill{
  padding:9px 18px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--panel);
  color:var(--muted);
  font-size:13.5px;
  font-weight:500;
  cursor:pointer;
  transition:all .2s;
}
.pill:hover{ color:var(--text); border-color:#33405f; }
.pill.active{
  background:var(--teal-soft);
  border-color:var(--teal);
  color:var(--teal);
}

/* ----- Stat kartalari ----- */
.stats-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(150px, 1fr));
  gap:12px;
  margin-bottom:26px;
}
.stat-card{
  position:relative;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  padding:16px;
  overflow:hidden;
  transition:transform .2s, border-color .2s;
}
.stat-card:hover{ transform:translateY(-2px); border-color:#33405f; }
.stat-card .stat-label{
  font-size:11.5px;
  font-weight:500;
  letter-spacing:.4px;
  text-transform:uppercase;
  color:var(--muted);
  margin-bottom:8px;
  display:flex;
  align-items:center;
  gap:7px;
}
.stat-card .stat-value{
  font-family:var(--font-head);
  font-size:26px;
  font-weight:700;
  letter-spacing:-.5px;
}
.stat-card .stat-extra{ font-size:12px; color:var(--muted); margin-top:4px; }
.stat-card .stat-bar{
  position:absolute;
  left:0; right:0; bottom:0;
  height:3px;
  background:var(--teal);
  opacity:.7;
}
.stat-card.is-ok .stat-bar{ background:var(--green); }
.stat-card.is-warn .stat-bar{ background:var(--yellow); }
.stat-card.is-bad .stat-bar{ background:var(--red); }

/* ----- Muammo kartalari ----- */
.issues-list{ display:flex; flex-direction:column; gap:12px; }
.issue-card{
  background:var(--panel-2);
  border:1px solid var(--border);
  border-left:4px solid var(--muted);
  border-radius:var(--radius-sm);
  padding:16px 18px;
  animation:card-in .4s var(--ease) both;
}
.issue-card.severity-yuqori{ border-left-color:var(--red); }
.issue-card.severity-orta{ border-left-color:var(--yellow); }
.issue-card.severity-past{ border-left-color:var(--green); }
@keyframes card-in{
  from{ opacity:0; transform:translateY(8px); }
  to{ opacity:1; transform:translateY(0); }
}
.issue-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.issue-title{ font-weight:600; font-size:15px; }
.badge{
  flex:none;
  font-size:11px;
  font-weight:600;
  letter-spacing:.4px;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  white-space:nowrap;
}
.badge.yuqori{ background:var(--red-soft); color:var(--red); }
.badge.orta{ background:var(--yellow-soft); color:var(--yellow); }
.badge.past{ background:var(--green-soft); color:var(--green); }
.issue-desc{ color:var(--muted); font-size:14px; margin-bottom:8px; white-space:pre-wrap; }
.issue-title{ flex:1; min-width:0; }
.badge.line{ background:var(--teal-soft); color:var(--teal); }
.code-snippet{
  background:#0C1220;
  border:1px solid var(--border);
  border-left:3px solid var(--yellow);
  border-radius:var(--radius-sm);
  padding:10px 12px;
  font-family:var(--font-mono);
  font-size:12.5px;
  line-height:1.6;
  color:#d6dae4;
  white-space:pre-wrap;
  word-break:break-all;
  overflow-x:auto;
  margin-bottom:10px;
}
.errors-toggle{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
  padding:13px 14px;
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  color:var(--text);
  font-size:14.5px;
  font-weight:600;
  cursor:pointer;
  margin-bottom:12px;
  transition:border-color .2s, background .2s;
}
.errors-toggle:hover{ border-color:rgba(201,161,90,.5); background:rgba(201,161,90,.06); }
.errors-toggle .et-count{
  background:var(--red-soft);
  color:var(--red);
  padding:2px 10px;
  border-radius:999px;
  font-size:12px;
  font-weight:600;
}
.errors-toggle .et-chev{
  margin-left:auto;
  display:flex;
  color:var(--muted);
  transition:transform .25s var(--ease);
}
.errors-toggle.is-open .et-chev{ transform:rotate(180deg); color:var(--gold); }

/* ----- Jonli ko'rinish (preview) ----- */
#code-preview-box .preview-note{
  padding:14px 16px;
  background:var(--yellow-soft);
  border:1px solid rgba(217,164,65,.3);
  border-radius:var(--radius-sm);
  color:#e8d9b4;
  font-size:13.5px;
  line-height:1.6;
  margin-bottom:12px;
}
#code-preview-box .preview-note b{ color:var(--yellow); }
#code-preview-box .preview-sql{
  background:#0C1220;
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  padding:12px 14px;
  font-family:var(--font-mono);
  font-size:12.5px;
  line-height:1.7;
  color:#a9e0d8;
  white-space:pre-wrap;
  word-break:break-all;
  max-height:260px;
  overflow:auto;
}
#code-preview-box .preview-frame{
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  overflow:hidden;
  background:#fff;
}
#code-preview-box iframe{
  width:100%;
  height:460px;
  border:none;
  display:block;
  background:#fff;
}
.preview-legend{
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:10px;
  font-size:12.5px;
  color:var(--muted);
}
.preview-legend .pl-dot{ width:8px; height:8px; border-radius:50%; background:var(--green); box-shadow:0 0 8px rgba(79,191,122,.7); }
.issue-rec{
  font-size:13.5px;
  padding:10px 12px;
  background:rgba(63,191,174,.06);
  border:1px solid rgba(63,191,174,.18);
  border-radius:var(--radius-sm);
  color:#c7e7e1;
}
.issue-rec b{ color:var(--teal); font-weight:600; }
.issue-copy{
  background:transparent;
  border:1px solid var(--border);
  color:var(--muted);
  font-size:12.5px;
  padding:6px 12px;
  border-radius:8px;
  cursor:pointer;
  transition:all .2s;
}
.issue-copy:hover{ color:var(--text); border-color:#33405f; background:rgba(255,255,255,.03); }

/* ----- Aqlli takliflar bloki ----- */
.suggestions-block{
  margin-top:22px;
  background:linear-gradient(135deg, rgba(63,191,174,.07), rgba(201,161,90,.05));
  border:1px solid rgba(63,191,174,.18);
  border-radius:var(--radius);
  padding:18px 20px;
}
.suggestions-head{
  display:flex;
  align-items:center;
  gap:9px;
  color:var(--teal);
  margin-bottom:14px;
}
.suggestions-head h3{
  font-family:var(--font-head);
  font-size:15.5px;
  font-weight:600;
  color:var(--text);
  flex:1;
}
.suggestions-head .hint-chip{ color:var(--muted); }
.suggestions-list{ list-style:none; display:flex; flex-direction:column; gap:10px; }
.suggestion-item{
  display:flex;
  gap:12px;
  align-items:flex-start;
  font-size:14px;
  line-height:1.55;
  color:#c9d3e5;
}
.suggestion-item .sg-num{
  flex:none;
  width:22px; height:22px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background:var(--teal-soft);
  color:var(--teal);
  font-size:12px;
  font-weight:700;
  margin-top:2px;
}
.summary-block{
  background:linear-gradient(135deg, rgba(201,161,90,.08), rgba(63,191,174,.06));
  border:1px solid rgba(201,161,90,.22);
  border-radius:var(--radius);
  padding:16px 18px;
  margin-bottom:16px;
  color:#e6e9f0;
  font-size:14.5px;
}
.summary-block b{ color:var(--gold); }

/* ----- Bo'sh holat ----- */
.empty-state{
  text-align:center;
  padding:44px 20px;
  color:var(--muted);
}
.empty-state svg{ margin-bottom:14px; opacity:.5; }
.empty-state h3{
  font-family:var(--font-head);
  color:var(--text);
  font-size:17px;
  margin-bottom:6px;
}
.empty-state p{ font-size:14px; max-width:440px; margin:0 auto; }

/* ----- Skeleton ----- */
.skeleton{
  position:relative;
  overflow:hidden;
  background:var(--panel-2);
  border-radius:var(--radius);
}
.skeleton::after{
  content:'';
  position:absolute;
  inset:0;
  transform:translateX(-100%);
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.05), transparent);
  animation:shimmer 1.5s infinite;
}
@keyframes shimmer{ to{ transform:translateX(100%); } }
.skeleton-line{
  height:14px;
  border-radius:6px;
  background:var(--panel-2);
  margin-bottom:10px;
}
.skeleton.issue{ height:120px; }
.skeleton.stat{ height:96px; }
.skeleton.hint{ height:70px; margin-bottom:12px; }

/* ----- Tarix (sessiya) ----- */
.history-list{ display:flex; flex-direction:column; gap:8px; }
.history-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:12px 14px;
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  font-size:13.5px;
}
.history-item .h-icon{
  flex:none;
  width:34px; height:34px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--teal-soft);
  color:var(--teal);
}
.history-item .h-main{ flex:1; min-width:0; }
.history-item .h-title{
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.history-item .h-meta{ font-size:12px; color:var(--muted); }
.history-item .h-badges{ display:flex; gap:6px; flex:none; }

/* ----- Tarixlar (kengaytirilgan) ----- */
.history-entry{
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
  overflow:hidden;
  animation:card-in .4s var(--ease) both;
}
.history-entry summary{
  display:flex;
  align-items:center;
  gap:12px;
  padding:13px 14px;
  cursor:pointer;
  list-style:none;
  user-select:none;
}
.history-entry summary::-webkit-details-marker{ display:none; }
.history-entry summary:hover{ background:rgba(255,255,255,.02); }
.history-entry summary:focus-visible{ outline-offset:-2px; }
.history-entry .h-icon{
  flex:none;
  width:36px; height:36px;
  border-radius:9px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--teal-soft);
  color:var(--teal);
}
.history-entry.type-site .h-icon{ background:var(--teal-soft); color:var(--teal); }
.history-entry.type-code .h-icon{ background:var(--gold-soft); color:var(--gold); }
.history-entry .h-main{ flex:1; min-width:0; }
.history-entry .h-title{
  font-weight:600;
  font-size:14.5px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.history-entry .h-meta{ font-size:12px; color:var(--muted); }
.history-entry .h-chev{
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  width:24px; height:24px;
  border-radius:6px;
  color:var(--muted);
  transition:transform .25s var(--ease);
}
.history-entry[open] .h-chev{ transform:rotate(90deg); color:var(--gold); }
.history-body{ padding:0 14px 14px; border-top:1px solid var(--border); }
.history-body .h-statline{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  padding:12px 0;
  font-size:12.5px;
  color:var(--muted);
}
.history-body .h-statline .h-chip{
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:4px 10px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:999px;
  font-weight:500;
}
.history-body .h-chips{ color:var(--teal); }
.history-body .h-chips.warn{ color:var(--yellow); }
.history-body .h-chips.bad{ color:var(--red); }
.history-body .h-ok-note{
  padding:12px 14px;
  margin-top:2px;
  background:var(--green-soft);
  border:1px solid rgba(79,191,122,.25);
  border-radius:var(--radius-sm);
  color:var(--green);
  font-size:13.5px;
}
.history-body .issues-list{ gap:10px; }

/* ----- Chat (ChatGPT uslubida, lekin antiqa oltin tusda) ----- */
.chat-wrap{
  display:flex;
  flex-direction:row;
  height:calc(100vh - 120px);
  height:calc(100dvh - 120px);
  min-height:480px;
  padding:0;
  overflow:hidden;
  background:rgba(10,14,23,.35);
}
.chat-main{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
}

/* ----- Suhbatlar ro'yxati (chatlar bo'limi) ----- */
.chat-sidebar{
  flex:none;
  width:260px;
  display:flex;
  flex-direction:column;
  border-right:1px solid var(--border);
  background:rgba(8,12,20,.5);
}
.chat-side-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:14px 14px 12px;
  border-bottom:1px solid var(--border);
}
.chat-side-title{
  font-family:var(--font-head);
  font-size:14px;
  font-weight:600;
  color:var(--text);
  letter-spacing:.3px;
}
.chat-side-new{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:linear-gradient(135deg, var(--gold), #a8813c);
  border:none;
  color:#0A0E17;
  font-size:12px;
  font-weight:600;
  padding:6px 10px;
  border-radius:8px;
  cursor:pointer;
  transition:filter .2s, transform .2s;
}
.chat-side-new:hover{ filter:brightness(1.1); transform:translateY(-1px); }
.chat-side-list{
  flex:1;
  overflow-y:auto;
  padding:10px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.chat-side-empty{
  margin:auto;
  text-align:center;
  color:var(--muted);
  font-size:13px;
  padding:20px 12px;
  line-height:1.6;
}
.chat-item{
  display:flex;
  align-items:center;
  gap:9px;
  width:100%;
  text-align:left;
  background:transparent;
  border:1px solid transparent;
  border-radius:10px;
  padding:9px 10px;
  cursor:pointer;
  color:var(--text);
  transition:background .2s, border-color .2s;
}
.chat-item:hover{ background:rgba(201,161,90,.06); }
.chat-item.active{
  background:rgba(201,161,90,.10);
  border-color:rgba(201,161,90,.35);
}
.chat-item-icon{
  flex:none;
  display:flex;
  align-items:center;
  justify-content:center;
  width:32px; height:32px;
  border-radius:9px;
  background:rgba(63,191,174,.12);
  color:var(--teal);
}
.chat-item.active .chat-item-icon{ background:rgba(201,161,90,.18); color:var(--gold); }
.chat-item-body{ min-width:0; flex:1; }
.chat-item-title{
  font-size:13px;
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.35;
}
.chat-item-time{
  font-size:10.5px;
  color:var(--muted);
  margin-top:2px;
}
.chat-item-del{
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:26px; height:26px;
  border:none;
  background:transparent;
  color:var(--muted);
  border-radius:7px;
  cursor:pointer;
  opacity:0;
  transition:opacity .2s, color .2s, background .2s;
}
.chat-item:hover .chat-item-del{ opacity:1; }
.chat-item-del:hover{ color:#ff7b6b; background:rgba(255,123,107,.12); }

/* --- Mobil chizma (drawer) --- */
.chat-list-btn{
  display:none;
}
.chat-drawer-mask{
  display:none;
}
.chat-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:12px 18px;
  border-bottom:1px solid var(--border);
  background:rgba(10,14,23,.5);
}
.chat-head-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.chat-status{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:13.5px;
  color:var(--muted);
  font-weight:500;
}
.chat-status .dot-live{
  width:9px; height:9px; border-radius:50%;
  background:var(--green);
  box-shadow:0 0 10px rgba(79,191,122,.8);
  animation:blink 2.2s ease-in-out infinite;
}
.chat-scroll{
  flex:1;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:26px;
  padding:26px 22px 10px;
}
.chat-msg{
  display:flex;
  gap:14px;
  max-width:88%;
  animation:chat-in .35s var(--ease) both;
}
@keyframes chat-in{
  from{ opacity:0; transform:translateY(8px); }
  to{ opacity:1; transform:translateY(0); }
}
.chat-msg.user{ align-self:flex-end; flex-direction:row-reverse; }
.chat-msg .chat-avatar{
  flex:none;
  width:42px; height:42px;
  border-radius:14px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  font-weight:700;
  box-shadow:var(--shadow-md);
}
.chat-msg.assistant .chat-avatar{
  background:conic-gradient(from 180deg, var(--gold), var(--teal), var(--gold));
  color:#0A0E17;
  border-radius:50%;
}
.chat-msg.user .chat-avatar{
  background:linear-gradient(135deg, #232d45, #161f33);
  border:1px solid var(--border);
  color:var(--gold);
  border-radius:50%;
}
.chat-msg .chat-col{ min-width:0; flex:1; }
.chat-bubble{
  padding:15px 18px;
  border-radius:16px;
  font-size:16px;
  line-height:1.7;
  white-space:pre-wrap;
  word-break:break-word;
  overflow-wrap:anywhere;
}
.chat-msg.assistant .chat-bubble{
  background:linear-gradient(160deg, rgba(201,161,90,.08), rgba(63,191,174,.04));
  border:1px solid rgba(201,161,90,.22);
  border-top-left-radius:4px;
  position:relative;
}
.chat-msg.assistant .chat-bubble::before{
  content:'';
  position:absolute;
  top:-1px; left:16px;
  width:44px; height:2px;
  background:linear-gradient(90deg, var(--gold), transparent);
  border-radius:2px;
}
.chat-msg.user .chat-bubble{
  background:linear-gradient(135deg, rgba(63,191,174,.22), rgba(63,191,174,.10));
  border:1px solid rgba(63,191,174,.32);
  border-top-right-radius:4px;
}
.chat-msg .chat-time{
  font-size:11.5px;
  color:var(--muted);
  margin-top:7px;
  opacity:.8;
}
.chat-msg.assistant .chat-actions{
  display:flex;
  gap:8px;
  margin-top:8px;
  opacity:0;
  transform:translateY(-3px);
  transition:opacity .2s, transform .2s;
}
.chat-msg.assistant:hover .chat-actions{ opacity:1; transform:translateY(0); }
.chat-action{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:transparent;
  border:none;
  color:var(--muted);
  font-size:13px;
  padding:5px 10px;
  border-radius:8px;
  cursor:pointer;
  transition:color .2s, background .2s;
}
.chat-action:hover{ color:var(--gold); background:rgba(201,161,90,.1); }

/* Kod bloklari — chat ichida */
.chat-bubble .cb-code{
  display:block;
  background:#0c1220;
  border:1px solid var(--border);
  border-left:3px solid var(--gold);
  border-radius:8px;
  padding:10px 12px;
  margin:8px 0;
  font-family:var(--font-mono);
  font-size:12.5px;
  color:#c9d6e8;
  white-space:pre;
  overflow-x:auto;
  line-height:1.5;
}
.chat-bubble code{
  font-family:var(--font-mono);
  font-size:12.5px;
  background:rgba(63,191,174,.12);
  color:var(--teal);
  padding:1px 6px;
  border-radius:5px;
}
.chat-bubble strong{ color:var(--gold); }

/* Tezkor savollar — chips */
.chat-chips{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
  padding:12px 18px;
  border-top:1px solid var(--border);
}
.chat-chips .chip-label{
  font-size:11.5px;
  letter-spacing:.3px;
  text-transform:uppercase;
  color:var(--muted);
  margin-right:4px;
}
.chat-chips .chip{
  padding:7px 14px;
  border:1px solid var(--border);
  border-radius:999px;
  background:var(--panel);
  color:var(--muted);
  font-size:12.5px;
  cursor:pointer;
  transition:all .2s;
}
.chat-chips .chip:hover{ border-color:var(--teal); color:var(--teal); background:var(--teal-soft); }

/* Kirish satri — suzuvchi, ChatGPT uslubida */
.chat-input-bar{
  display:flex;
  align-items:flex-end;
  gap:10px;
  padding:14px 18px;
  border-top:1px solid var(--border);
  background:rgba(10,14,23,.55);
}
.chat-input-bar textarea{
  flex:1;
  min-height:0;
  max-height:140px;
  resize:none;
  border-radius:22px;
  padding:15px 20px;
  font-size:16px;
  background:var(--panel-2);
  transition:border-color .2s, box-shadow .2s;
}
.chat-input-bar textarea:focus{
  border-color:var(--gold);
  box-shadow:0 0 0 3px rgba(201,161,90,.15), 0 6px 24px rgba(0,0,0,.25);
}
.chat-send{
  flex:none;
  width:46px; height:46px;
  border:none;
  border-radius:50%;
  background:linear-gradient(135deg, var(--gold), #b98f4b);
  color:#0A0E17;
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  box-shadow:0 8px 22px rgba(201,161,90,.3);
  transition:transform .15s, filter .2s, box-shadow .2s;
}
.chat-send:hover{ filter:brightness(1.08); transform:translateY(-1px); }
.chat-send:active{ transform:scale(.94); }
.chat-send.is-stop{
  background:linear-gradient(135deg, var(--red), #c04f46);
  color:#fff;
  box-shadow:0 8px 22px rgba(224,100,90,.3);
}

.typing-dots{
  display:inline-flex;
  gap:4px;
  align-items:center;
}
.typing-dots span{
  width:7px; height:7px;
  border-radius:50%;
  background:var(--gold);
  animation:typing 1.2s infinite;
}
.typing-dots span:nth-child(2){ animation-delay:.15s; }
.typing-dots span:nth-child(3){ animation-delay:.3s; }
@keyframes typing{
  0%,60%,100%{ transform:translateY(0); opacity:.5; }
  30%{ transform:translateY(-5px); opacity:1; }
}
.chat-msg.is-typing .chat-bubble{ background:var(--panel-2); border-color:var(--border); }

/* ----- Quick cards (home) ----- */
.quick-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(240px, 1fr));
  gap:14px;
  margin-bottom:26px;
}
.quick-card{
  text-align:left;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:20px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  color:var(--text);
  cursor:pointer;
  transition:transform .2s var(--ease), border-color .2s, box-shadow .2s;
  position:relative;
  overflow:hidden;
}
.quick-card:hover{
  transform:translateY(-3px);
  border-color:rgba(201,161,90,.55);
  box-shadow:0 16px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(201,161,90,.18);
}
.quick-card::after{
  content:'';
  position:absolute;
  top:0; left:0; right:0;
  height:2px;
  background:linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity:0;
  transition:opacity .25s;
}
.quick-card:hover::after{ opacity:1; }
.quick-card .qc-icon{
  width:44px; height:44px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--teal-soft);
  color:var(--teal);
}
.quick-card:nth-child(2) .qc-icon{ background:var(--gold-soft); color:var(--gold); }
.quick-card:nth-child(3) .qc-icon{ background:rgba(63,191,174,.16); color:var(--teal); }
.quick-card h3{ font-family:var(--font-head); font-size:17px; font-weight:600; }
.quick-card p{ color:var(--muted); font-size:13.5px; flex:1; }
.quick-card .qc-go{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-size:13px;
  font-weight:600;
  color:var(--gold);
}

/* ----- Session panel ----- */
.session-stats{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:12px;
  margin-top:14px;
}
.session-stat{
  text-align:center;
  padding:14px 8px;
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:var(--radius-sm);
}
.session-stat .ss-num{
  font-family:var(--font-head);
  font-size:24px;
  font-weight:700;
  color:var(--gold);
}
.session-stat .ss-label{ font-size:12px; color:var(--muted); margin-top:2px; }

/* ----- Toast (xotirjam xabarlar) ----- */
.toast-region{
  position:fixed;
  right:20px;
  bottom:20px;
  z-index:90;
  display:flex;
  flex-direction:column;
  gap:10px;
  max-width:min(380px, calc(100vw - 40px));
}
.toast{
  display:flex;
  gap:12px;
  align-items:flex-start;
  padding:14px 16px;
  background:var(--panel-2);
  border:1px solid var(--border);
  border-left:4px solid var(--teal);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow-lg);
  opacity:0;
  transform:translateX(30px);
  transition:opacity .35s var(--ease), transform .35s var(--ease);
  font-size:14px;
  line-height:1.5;
}
.toast.show{ opacity:1; transform:translateX(0); }
.toast.is-error{ border-left-color:var(--red); }
.toast.is-warn{ border-left-color:var(--yellow); }
.toast.is-success{ border-left-color:var(--green); }
.toast .t-dot{
  flex:none;
  width:9px; height:9px;
  border-radius:50%;
  margin-top:6px;
  background:var(--teal);
}
.toast.is-error .t-dot{ background:var(--red); }
.toast.is-warn .t-dot{ background:var(--yellow); }
.toast.is-success .t-dot{ background:var(--green); }

/* ----- Modal (sozlamalar) ----- */
.modal-overlay{
  position:fixed;
  inset:0;
  z-index:80;
  background:rgba(5,8,14,.72);
  backdrop-filter:blur(6px);
  -webkit-backdrop-filter:blur(6px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  opacity:0;
  visibility:hidden;
  transition:opacity .3s, visibility .3s;
}
.modal-overlay.is-open{ opacity:1; visibility:visible; }
.modal{
  width:100%;
  max-width:460px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:18px;
  padding:24px;
  box-shadow:var(--shadow-lg);
  transform:translateY(12px) scale(.98);
  transition:transform .3s var(--ease);
}
.modal-overlay.is-open .modal{ transform:translateY(0) scale(1); }
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:16px;
}
.modal-head h3{ font-family:var(--font-head); font-size:18px; font-weight:600; }
.modal p{ color:var(--muted); font-size:13.5px; margin-bottom:14px; }
.modal .btn{ width:100%; }
.modal-status{
  display:none;
  margin-top:12px;
  padding:11px 13px;
  border-radius:var(--radius-sm);
  font-size:13px;
}
.modal-status.is-visible{ display:block; }
.modal-status.ok{ background:var(--green-soft); color:var(--green); border:1px solid rgba(79,191,122,.3); }
.modal-status.err{ background:var(--red-soft); color:var(--red); border:1px solid rgba(224,100,90,.3); }

/* ----- Footer ----- */
.app-footer{
  text-align:center;
  padding:18px 26px 30px;
  border-top:1px solid var(--border);
  color:var(--muted);
  font-size:12.5px;
  letter-spacing:.2px;
}
.heart{ color:var(--gold); }

/* ----- Vaqti-vaqti: yuklanayotgan hint ----- */
.hint-chip{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-top:12px;
  padding:8px 14px;
  background:var(--panel-2);
  border:1px solid var(--border);
  border-radius:999px;
  font-size:12.5px;
  color:var(--muted);
}
.hint-chip .spin{
  width:13px; height:13px;
  border:2px solid var(--border);
  border-top-color:var(--gold);
  border-radius:50%;
  animation:spin .8s linear infinite;
}
@keyframes spin{ to{ transform:rotate(360deg); } }

/* ==================================================================
   RESPONSIVE
   ================================================================== */
@media (max-width:880px){
  .sidebar{
    width:var(--sidebar-w-m);
    padding:16px 10px;
  }
  .sidebar-brand{ flex-direction:column; gap:6px; padding-bottom:14px; }
  .brand-name, .brand-tag, .nav-label, .sidebar-foot-note{ display:none; }
  .nav-item{ justify-content:center; padding:12px; }
  .nav-item.active::before{ left:auto; right:-10px; }
  .topbar{ padding:14px 18px; }
  .content{ padding:22px 18px 34px; }
  .chat-wrap{ height:calc(100vh - 150px); height:calc(100dvh - 150px); }
  .chat-scroll{ -webkit-overflow-scrolling:touch; }
  .chat-list-btn{ display:inline-flex; }
  .chat-sidebar{ display:none; }
  .chat-drawer-mask{
    position:fixed;
    inset:0;
    z-index:80;
    background:rgba(5,8,14,.6);
    backdrop-filter:blur(3px);
    display:block;
    opacity:0;
    visibility:hidden;
    transition:opacity .25s var(--ease), visibility .25s;
  }
  .chat-drawer-mask.open{ opacity:1; visibility:visible; }
  .chat-drawer{
    position:absolute;
    left:10px; top:10px; bottom:10px;
    width:min(280px, calc(100vw - 80px));
    background:var(--panel);
    border:1px solid var(--border);
    border-radius:var(--radius);
    box-shadow:var(--shadow-lg);
    display:flex;
    flex-direction:column;
    overflow:hidden;
    transform:translateX(-110%);
    transition:transform .3s var(--ease);
  }
  .chat-drawer.open{ transform:translateX(0); }
  .chat-drawer .chat-side-list{ padding-bottom:16px; }
}
@media (max-width:560px){
  .form-row{ flex-direction:column; }
  .stats-grid{ grid-template-columns:repeat(2, 1fr); }
  .chat-msg{ max-width:92%; }
  .session-pill .sp-text{ display:none; }
  .topbar h2{ font-size:17px; }
  #chat-new-btn span{ display:none; }

  /* iPhone zoom bo'lmasligi uchun input yirik shrift */
  .input, .textarea{ font-size:16px; }

  /* Sidebar pastdagi navigatsiya paneliga aylanadi */
  .sidebar{
    position:fixed;
    bottom:0; top:auto; left:0; right:0;
    width:100%; height:auto;
    flex-direction:row;
    align-items:center;
    gap:0;
    padding:6px calc(6px + env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) calc(6px + env(safe-area-inset-left));
    border-top:1px solid var(--border);
    border-right:none;
    background:rgba(10,14,23,.94);
    backdrop-filter:blur(12px);
    -webkit-backdrop-filter:blur(12px);
    z-index:45;
  }
  .sidebar-brand, .sidebar-foot{ display:none; }
  .sidebar-nav{
    flex-direction:row;
    width:100%;
    justify-content:space-around;
    gap:2px;
    flex:none;
  }
  .nav-item{
    flex:1;
    flex-direction:column;
    gap:3px;
    padding:5px 2px;
    min-height:52px;
    justify-content:center;
    text-align:center;
    font-size:9.5px;
    border-radius:10px;
  }
  .nav-item svg{ width:20px; height:20px; }
  .nav-label{ display:block; }
  .nav-item.active::before{
    left:50%; top:-6px; bottom:auto; right:auto;
    transform:translateX(-50%);
    width:28px; height:3px;
  }

  .content{
    padding:18px 14px calc(86px + env(safe-area-inset-bottom));
  }
  .chat-wrap{
    height:calc(100vh - 190px);
    height:calc(100dvh - 190px);
    min-height:380px;
  }
  .chat-input-bar{
    padding-bottom:max(12px, env(safe-area-inset-bottom));
  }
  .chat-head{ padding:10px 12px; }
  .chat-scroll{ padding:18px 12px 6px; }
  .toast-region{
    right:12px;
    bottom:calc(72px + env(safe-area-inset-bottom));
    left:12px;
    max-width:none;
  }
  .page-sub{ margin-bottom:20px; }
}

/* ==================================================================
   QULAYLIK: kamaytirilgan animatsiya
   ================================================================== */
@media (prefers-reduced-motion: reduce){
  *, *::before, *::after{
    animation-duration:.001s !important;
    animation-iteration-count:1 !important;
    transition-duration:.001s !important;
    scroll-behavior:auto !important;
  }
  html{ scroll-behavior:auto; }
}
