/* asosiy.css — Asosiy o'zgaruvchilar, umumiy elementlar, oq chaqnashga qarshi qoidalar. */
:root {
  --bg: #f5f4f1; --surface: #fff; --surface-2: #ece9e3; --border: #ddd8cf;
  --text: #241f19; --text-muted: #79726557; --accent: #b8863a; --accent-contrast: #fff;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'IBM Plex Sans', system-ui, sans-serif; overflow-x: hidden; }
/* Oq chaqnashga qarshi (Kamron 2026-09-29): skript rejimni (auth-mode / app-mode)
   qo'ygunicha asosiy — och rangli — dizayn bir lahza ko'rinib qolardi. Rejim qo'yilguncha
   sahifa qorong'i va bo'sh turadi. */
html { background: #07060a; }
body:not(.auth-mode):not(.app-mode) { background: #07060a; }
body:not(.auth-mode):not(.app-mode) .shell { visibility: hidden; }
a { color: var(--accent); }
.shell { margin: 0; padding: 0 0 64px; }
header.top { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 22px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; position: sticky; top: 0; background: var(--bg); z-index: 10; }
.brand { display: flex; flex-direction: column; gap: 4px; }
.brand .name { font-family: 'Instrument Serif', serif; font-size: 28px; font-style: italic; }
.top-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.lang-switch { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 8px; }
.lang-pill { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; padding: 7px 11px; border-radius: 5px; cursor: pointer; color: var(--text-muted); border: none; background: none; }
.lang-pill.active { background: var(--accent); color: var(--accent-contrast); }
.logout-link { font-family: 'IBM Plex Mono', monospace; font-size: 11.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; padding: 8px 4px; }
.logout-link:hover { color: var(--text); }
main { display: flex; flex-direction: column; gap: 0; margin-top: 20px; }
.canvas { overflow-x: auto; padding: 0 16px; }
.frame-wrap { width: 100%; }

.xz-vtabs { display: flex; gap: 6px; background: var(--surface-2); padding: 5px; border-radius: 10px; margin: 0 16px 14px; }
.xz-vtab { flex: 1; text-align: center; padding: 10px 6px; border-radius: 7px; cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-muted); font-family: 'IBM Plex Sans', sans-serif; }
.xz-vtab.active { background: var(--accent); color: var(--accent-contrast); }

.xz-root { box-sizing: border-box; width: 100%; padding: 36px 40px 48px; }
.xz-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.xz-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.xz-chartrow { display: flex; gap: 24px; align-items: center; }

@media (max-width: 680px) {
  .xz-root { padding: 20px 16px 32px; }
  .xz-grid3, .xz-grid2 { grid-template-columns: 1fr; }
  .xz-chartrow { flex-direction: column; align-items: stretch; }
  .canvas { padding: 0; }
  .xz-vtabs { margin: 0 0 14px; }
  header.top { padding: 16px 16px; }
  .brand .name { font-size: 22px; }
}
.auth-wrap { max-width: 380px; margin: 60px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.auth-wrap h2 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 26px; margin: 0 0 20px; }
.auth-wrap input { width: 100%; box-sizing: border-box; padding: 11px 13px; border-radius: 10px; border: 1px solid var(--border); background: var(--bg); color: var(--text); font-size: 14px; margin-bottom: 10px; font-family: inherit; }
.auth-wrap button { width: 100%; padding: 12px; border-radius: 10px; border: none; background: var(--accent); color: var(--accent-contrast); font-weight: 700; font-size: 14px; cursor: pointer; margin-top: 6px; }
.auth-wrap .switch { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 14px; cursor: pointer; }
.auth-wrap .err { color: #b3352c; font-size: 13px; margin-bottom: 10px; min-height: 1em; }
.loading-note { text-align: center; color: var(--text-muted); font-size: 13px; padding: 60px 0; }
