/* ==========================================================================
   Unity Global — admin.css
   Bosh sahifaning rang va shrift tizimidan foydalanadi, dashboard uslubida.
   ========================================================================== */

:root {
  --ink:        #12151c;
  --ink-2:      #1b202b;
  --ink-3:      #262c3a;
  --lime:       #8cc63f;
  --lime-600:   #74ac2c;
  --lime-700:   #5f8f24;
  --lime-100:   #eef7e0;
  --lime-50:    #f6fbee;
  --canvas:     #ffffff;
  --mist:       #f5f7f2;
  --mist-2:     #eef1ea;
  --line:       #e5e9df;
  --line-2:     #d9ded0;
  --muted:      #6e7683;
  --muted-dark: #9aa3b0;

  /* status ranglari */
  --st-new:      #f59e0b;
  --st-new-bg:   #fff7e6;
  --st-prog:     #3b82f6;
  --st-pot:      #16a34a;
  --st-notpot:   #e05252;

  --font-display: "Manrope", "Golos Text", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Golos Text", "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;

  --shadow-sm: 0 1px 2px rgba(18, 21, 28, .06);
  --shadow-md: 0 12px 32px -14px rgba(18, 21, 28, .22);
  --shadow-lg: 0 30px 60px -24px rgba(18, 21, 28, .38);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --sidebar-w: clamp(240px, 17vw, 320px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--mist);
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -.02em; }

:focus-visible { outline: 3px solid var(--lime); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--lime); color: var(--ink); }

.hidden { display: none !important; }

/* ============================ LOGIN =============================== */
.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(130% 80% at 100% 0%, rgba(140, 198, 63, .16), transparent 55%),
    radial-gradient(120% 90% at 0% 100%, rgba(140, 198, 63, .1), transparent 50%),
    var(--ink);
}

/* orqa fonda sekin aylanuvchi belgi */
.login-screen::before {
  content: "";
  position: absolute;
  width: 640px; height: 640px;
  right: -140px; top: -160px;
  background: url("../assets/img/mark.png") center/contain no-repeat;
  opacity: .05;
  animation: spin 70s linear infinite;
  pointer-events: none;
}
.login-screen::after {
  content: "";
  position: absolute;
  width: 380px; height: 380px;
  left: -120px; bottom: -120px;
  background: url("../assets/img/mark.png") center/contain no-repeat;
  opacity: .04;
  animation: spin 90s linear infinite reverse;
  pointer-events: none;
}

.login-back {
  position: absolute;
  top: 22px;
  left: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: #dfe5ee;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .85rem;
  backdrop-filter: blur(6px);
  transition: background-color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.login-back:hover { background: rgba(140, 198, 63, .18); border-color: rgba(140, 198, 63, .5); transform: translateX(-2px); }
.login-back svg { width: 16px; height: 16px; }

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  background: rgba(255, 255, 255, .98);
  border: 1px solid rgba(255, 255, 255, .5);
  border-radius: var(--r-xl);
  padding: 40px 36px 34px;
  box-shadow: var(--shadow-lg);
  animation: cardIn .55s var(--ease) both;
}
.login-card__logo { height: 34px; width: auto; margin-bottom: 26px; }
.login-card__eyebrow {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--lime-600);
  margin-bottom: 8px;
}
.login-card__title { font-size: 1.6rem; font-weight: 800; }
.login-card__sub { color: var(--muted); font-size: .92rem; margin: 8px 0 26px; }

.field { margin-bottom: 16px; }
.field__label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--muted);
  margin-bottom: 7px;
}
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg {
  position: absolute;
  left: 14px;
  width: 18px; height: 18px;
  color: var(--muted-dark);
  pointer-events: none;
}
.input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--mist);
  font-size: .95rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease), box-shadow .2s var(--ease);
}
.input-wrap .input { padding-left: 42px; }
.input::placeholder { color: var(--muted-dark); }
.input:focus {
  outline: none;
  border-color: var(--lime);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(140, 198, 63, .16);
}
.input-toggle {
  position: absolute;
  right: 10px;
  width: 32px; height: 32px;
  display: grid; place-items: center;
  color: var(--muted-dark);
  border-radius: 8px;
  transition: color .2s var(--ease), background-color .2s var(--ease);
}
.input-toggle:hover { color: var(--ink); background: var(--mist-2); }
.input-toggle svg { width: 18px; height: 18px; }

.btn {
  --bg: var(--lime);
  --fg: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 20px;
  border-radius: var(--r-sm);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .92rem;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background-color .2s var(--ease), opacity .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 10px 22px -12px rgba(140, 198, 63, .85); }
.btn:active { transform: none; }
.btn:disabled { opacity: .6; pointer-events: none; }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--block { width: 100%; }
.btn--lg { padding: 14px 22px; font-size: 1rem; }
.btn--primary::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -60%;
  width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .55), transparent);
  transform: skewX(-18deg);
  transition: left .55s var(--ease);
}
.btn--primary:hover::after { left: 120%; }
.btn--ghost { --bg: transparent; --fg: var(--ink); border: 1px solid var(--line-2); }
.btn--ghost:hover { background: var(--mist); box-shadow: none; }
.btn--dark { --bg: var(--ink); --fg: #fff; }
.btn--danger { --bg: #fdecec; --fg: #d64545; }
.btn--danger:hover { --bg: #f9dcdc; box-shadow: none; }
.btn--sm { padding: 8px 14px; font-size: .82rem; }
.btn--xs { padding: 6px 11px; font-size: .78rem; border-radius: var(--r-xs); }
.btn--icon { padding: 9px; }
.btn--icon svg { width: 16px; height: 16px; }

.login-error {
  display: none;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  background: #fdecec;
  border: 1px solid #f6cccc;
  color: #c53030;
  font-size: .86rem;
  font-weight: 500;
}
.login-error.is-visible { display: flex; }
.login-error svg { width: 18px; height: 18px; flex: none; }

.login-card__foot {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: .8rem;
  color: var(--muted-dark);
}

/* ============================ APP SHELL ========================== */
.app { display: none; min-height: 100vh; }
.app.is-active {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  width: 100%;
}

/* Backdrop har doim oqimdan tashqarida turadi (grid katakchasini egallamasligi uchun) */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  background: rgba(10, 12, 17, .5);
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s, visibility .3s;
  pointer-events: none;
}
.sidebar-backdrop.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #fff;
  padding: 22px 16px;
}
.sidebar__brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 22px; }
.sidebar__brand img { height: 28px; width: auto; }
.sidebar__nav { display: grid; gap: 4px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  color: #b9c0cb;
  font-weight: 600;
  font-size: .92rem;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active { background: var(--lime); color: var(--ink); }
.nav-item svg { width: 19px; height: 19px; flex: none; }
.nav-item__badge {
  margin-left: auto;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: var(--st-new);
  color: #fff;
  font-size: .72rem;
  font-weight: 800;
}
.nav-item.is-active .nav-item__badge { background: var(--ink); color: #fff; }

.sidebar__foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar__user { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; }
.avatar {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .95rem;
  flex: none;
}
.sidebar__user-name { font-weight: 700; font-size: .9rem; }
.sidebar__user-role { font-size: .74rem; color: var(--muted-dark); text-transform: capitalize; }

/* ============================ MAIN ============================== */
.main { min-width: 0; width: 100%; display: flex; flex-direction: column; }
.main > .view { flex: 1 1 auto; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px clamp(18px, 2vw, 40px);
  background: rgba(245, 247, 242, .85);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar__burger { display: none; width: 40px; height: 40px; border: 1px solid var(--line); border-radius: var(--r-xs); align-items: center; justify-content: center; }
.topbar__burger svg { width: 20px; height: 20px; }
.topbar__title { font-size: 1.25rem; font-weight: 800; }
.topbar__sub { font-size: .82rem; color: var(--muted); }
.topbar__spacer { margin-left: auto; }

.view {
  padding: clamp(18px, 2vw, 40px);
  max-width: 2400px;
  margin: 0 auto;
  width: 100%;
}
.view.hidden { display: none; }

/* stat kartalar */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 26px;
}
.stat {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  overflow: hidden;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat__accent { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: 4px; }
.stat__label { font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); text-transform: uppercase; }
.stat__value { font-family: var(--font-display); font-weight: 800; font-size: 2.1rem; margin-top: 8px; letter-spacing: -.03em; }
.stat__icon { position: absolute; right: 18px; top: 18px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; background: var(--mist); color: var(--muted); }
.stat__icon svg { width: 18px; height: 18px; }

/* filtr paneli */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.search {
  position: relative;
  flex: 1;
  min-width: 220px;
  max-width: 340px;
}
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--muted-dark); pointer-events: none; }
.search .input { padding-left: 40px; background: #fff; }
.chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.chip-filter {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  color: var(--muted);
  transition: all .18s var(--ease);
}
.chip-filter:hover { border-color: var(--line-2); color: var(--ink); }
.chip-filter.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip-filter .n { opacity: .6; margin-left: 4px; }

/* jadval / kartalar */
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
thead th {
  text-align: left;
  padding: 14px 18px;
  font-family: var(--font-display);
  font-size: .74rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--mist);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background-color .15s var(--ease); }
tbody tr:hover { background: var(--lime-50); }
tbody tr:last-child td { border-bottom: 0; }

.cell-name { font-weight: 700; }
.cell-sub { font-size: .8rem; color: var(--muted); }
.cell-flag { width: 26px; height: 19px; border-radius: 4px; box-shadow: 0 0 0 1px rgba(18,21,28,.1); display: inline-block; vertical-align: middle; margin-right: 8px; object-fit: cover; }
.cell-phone a { font-weight: 600; }
.cell-phone a:hover { color: var(--lime-600); }
.row-actions { display: flex; gap: 6px; justify-content: flex-end; }

/* status belgi */
.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; }
.status--new      { background: #fff4e0; color: #b26a00; }
.status--new .dot { background: var(--st-new); }
.status--in_progress      { background: #e7f0ff; color: #2563eb; }
.status--in_progress .dot { background: var(--st-prog); }
.status--potential      { background: #e5f6ea; color: #158040; }
.status--potential .dot { background: var(--st-pot); }
.status--not_potential      { background: #fdecec; color: #c0392b; }
.status--not_potential .dot { background: #e05252; }

.assignee { display: inline-flex; align-items: center; gap: 8px; }
.assignee .avatar { width: 26px; height: 26px; font-size: .72rem; }
.assignee--empty { color: var(--muted-dark); font-style: italic; }
.assignee--me .avatar { box-shadow: 0 0 0 2px var(--lime-100); }

/* bo'sh holat */
.empty {
  padding: 60px 24px;
  text-align: center;
  color: var(--muted);
}
.empty svg { width: 46px; height: 46px; margin: 0 auto 14px; color: var(--line-2); }
.empty h3 { font-size: 1.1rem; margin-bottom: 6px; color: var(--ink); }

/* ============================ MODAL ============================== */
.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(10, 12, 17, .55);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s var(--ease), visibility .25s;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__box {
  width: min(100%, 560px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(14px) scale(.98);
  transition: transform .3s var(--ease);
}
.modal.is-open .modal__box { transform: none; }

/* Modal ichida forma bo'lsa ham skroll ishlashi uchun flex zanjiri uzilmasin */
.modal__box > form {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1 1 auto;
  overflow: hidden;
}
.modal__box--wide { width: min(100%, 640px); }
.modal__head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}
.modal__title { font-size: 1.2rem; font-weight: 800; }
.modal__close {
  margin-left: auto;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--muted);
  transition: background-color .2s, color .2s, transform .2s;
}
.modal__close:hover { background: var(--mist); color: var(--ink); transform: rotate(90deg); }
.modal__close svg { width: 16px; height: 16px; }
.modal__body {
  padding: 22px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
  flex: 1 1 auto;
}
.modal__foot {
  flex: none;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--mist);
}

.form-row { display: grid; gap: 14px; }
.form-row--2 { grid-template-columns: 1fr 1fr; }
label.field__label .req { color: #d64545; }

.select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  background: var(--mist);
  font-size: .95rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa3b0' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
.select:focus { outline: none; border-color: var(--lime); background-color: #fff; }
textarea.input { resize: vertical; min-height: 84px; font-family: var(--font-body); }

.seg { display: inline-flex; padding: 4px; gap: 4px; background: var(--mist); border: 1px solid var(--line); border-radius: var(--r-sm); }
.seg button { padding: 7px 13px; border-radius: 9px; font-family: var(--font-display); font-weight: 700; font-size: .82rem; color: var(--muted); }
.seg button.is-active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

/* lead detail */
.detail-grid { display: grid; gap: 14px; margin-bottom: 20px; }
.detail-item { display: flex; gap: 12px; align-items: flex-start; }
.detail-item__icon { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 10px; background: var(--lime-100); color: var(--lime-600); }
.detail-item__icon svg { width: 17px; height: 17px; }
.detail-item__label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.detail-item__value { font-weight: 600; }

.timeline { border-top: 1px solid var(--line); padding-top: 18px; }
.timeline__title { font-family: var(--font-display); font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 14px; }
.event { display: flex; gap: 12px; padding-bottom: 14px; }
.event__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--lime); margin-top: 5px; flex: none; position: relative; }
.event:not(:last-child) .event__dot::after { content: ""; position: absolute; left: 50%; top: 14px; width: 2px; height: calc(100% + 4px); background: var(--line); transform: translateX(-50%); }
.event__text { font-size: .88rem; }
.event__meta { font-size: .76rem; color: var(--muted); margin-top: 1px; }

/* content editor */
.content-group { margin-bottom: 26px; }
.content-group__title { font-family: var(--font-display); font-weight: 800; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 12px; }
.content-field { background: #fff; border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; margin-bottom: 12px; }
.content-field__head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.content-field__key { font-family: var(--font-display); font-weight: 700; font-size: .9rem; }
.content-field__hint { font-size: .78rem; color: var(--muted); }
.lang-tabs { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; }
.lang-tab { padding: 5px 11px; border-radius: 999px; background: var(--mist); font-size: .78rem; font-weight: 700; color: var(--muted); }
.lang-tab.is-active { background: var(--lime); color: var(--ink); }
.lang-panel { display: none; }
.lang-panel.is-active { display: block; }

/* toast */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: grid; gap: 10px; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: var(--r-sm);
  background: var(--ink);
  color: #fff;
  font-size: .88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: toastIn .3s var(--ease) both;
}
.toast--ok { background: #14532d; }
.toast--err { background: #7f1d1d; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.is-out { animation: toastOut .3s var(--ease) both; }

/* ============================ ANIM ============================== */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
@keyframes rowIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
tbody tr { animation: rowIn .3s var(--ease) both; }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(18,21,28,.2); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
.btn .spinner { border-color: rgba(18,21,28,.3); border-top-color: var(--ink); }

/* ============================ RESPONSIVE ======================== */
@media (max-width: 900px) {
  .app.is-active { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--sidebar-w);
    z-index: 50;
    transform: translateX(-100%);
    transition: transform .3s var(--ease);
  }
  .sidebar.is-open { transform: none; box-shadow: var(--shadow-lg); }
  .topbar__burger { display: inline-flex; }
}

@media (max-width: 640px) {
  .view { padding: 18px; }
  .form-row--2 { grid-template-columns: 1fr; }
  .col-hide-sm { display: none; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ============================ v3 QO'SHIMCHALAR ==================== */

/* Yo'riqnoma bloki — har bo'limda nima qilinishini tushuntiradi */
.hint {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px 16px;
  margin-bottom: 20px;
  border-radius: var(--r-md);
  background: var(--lime-50);
  border: 1px solid var(--lime-100);
  color: #4a5a33;
  font-size: .88rem;
  line-height: 1.5;
}
.hint svg { width: 18px; height: 18px; flex: none; margin-top: 1px; color: var(--lime-600); }
.hint b { color: var(--ink); }

/* Sidebar: saytga havola */
.sidebar__site {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  margin-bottom: 10px;
  border-radius: var(--r-sm);
  color: #b9c0cb;
  font-size: .86rem;
  font-weight: 600;
  transition: background-color .18s var(--ease), color .18s var(--ease);
}
.sidebar__site:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar__site svg { width: 17px; height: 17px; }

/* Filtr paneli (davlat / IELTS) */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
}
.filter-bar__group { display: grid; gap: 5px; min-width: 170px; }
.filter-bar__label {
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted);
}
.filter-bar__count { margin-left: auto; font-size: .84rem; color: var(--muted); font-weight: 600; }
.select--sm { padding: 9px 12px; font-size: .88rem; background-color: #fff; }

.ielts-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--lime-100);
  color: var(--lime-700);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .78rem;
}

.cell-flag--lg { width: 34px; height: 24px; border-radius: 5px; }

.tag-tg {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  border-radius: 999px; background: #e7f0ff; color: #2563eb;
  font-size: .68rem; font-weight: 800; vertical-align: middle;
}

/* Forma bo'lim sarlavhasi */
.form-section {
  margin: 22px 0 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: .82rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--ink);
}
.form-section:first-child { margin-top: 0; }
.form-section span { font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--muted-dark); }
.field__hint { margin-top: 6px; font-size: .78rem; color: var(--muted); line-height: 1.45; }
.form-row--3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg--wrap { flex-wrap: wrap; }

/* ---------------------------- PAKETLAR ---------------------------- */
.pkg-group { margin-bottom: 42px; }

.pkg-group__head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding-bottom: 18px;
  margin-bottom: 24px;
  position: relative;
  text-align: center;
}
.pkg-group__head::after {
  content: "";
  position: absolute;
  left: 50%; bottom: 0;
  width: 72px; height: 3px;
  transform: translateX(-50%);
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, var(--lime), transparent);
}
.pkg-group__flag { display: grid; place-items: center; }
.pkg-group__head h3 { font-size: 1.25rem; font-weight: 800; letter-spacing: -.025em; }
.pkg-group__add { position: absolute; right: 0; top: 0; }

/* Kartalar markazda, teng balandlikda */
.pkg-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: stretch;
  gap: 22px;
}
.pkg-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 1 330px;
  max-width: 360px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 30px 26px 24px;
  overflow: hidden;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}

/* Yuqoridagi nozik yorug'lik chizig'i */
.pkg-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: var(--line-2);
}
.pkg-card--start::before    { background: linear-gradient(90deg, #cfe6a8, #a8d46a); }
.pkg-card--standard::before { background: linear-gradient(90deg, var(--lime), var(--lime-700)); }
.pkg-card--premium::before  { background: linear-gradient(90deg, #f5cf6b, #d9941f); }

/* Fon yorug'ligi */
.pkg-card::after {
  content: "";
  position: absolute;
  top: -80px; right: -80px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(140,198,63,.12), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.pkg-card:hover::after { opacity: 1; }
.pkg-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 60px -30px rgba(18, 21, 28, .35);
  border-color: var(--line-2);
}

.pkg-card.is-featured {
  border-color: var(--lime);
  box-shadow: 0 22px 52px -28px rgba(140, 198, 63, .85);
  transform: translateY(-4px);
}
.pkg-card.is-featured:hover { transform: translateY(-10px); }
.pkg-card.is-off { opacity: .55; background: var(--mist); }

.pkg-card__ribbon {
  position: absolute;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  padding: 5px 16px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--lime);
  font-family: var(--font-display);
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  white-space: nowrap;
  z-index: 1;
}
.pkg-card.is-featured { padding-top: 46px; }

.pkg-card__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  text-align: center;
}
.pkg-card__name {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.025em;
}
.pkg-card__tag {
  display: inline-block;
  padding: 4px 13px;
  border-radius: 999px;
  background: var(--mist);
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.pkg-card--premium .pkg-card__tag { background: #fdf3dd; color: #a5701a; }
.pkg-card--standard .pkg-card__tag { background: var(--lime-100); color: var(--lime-700); }

.pkg-card__price {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 0 16px;
  margin-bottom: 4px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.pkg-card__num {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.05rem;
  letter-spacing: -.04em;
  color: var(--ink);
  line-height: 1.05;
}
.pkg-card--standard .pkg-card__num { color: var(--lime-700); }
.pkg-card--premium  .pkg-card__num { color: #b8761a; }
.pkg-card__cur {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--muted);
}
.pkg-card__note {
  font-size: .86rem;
  color: var(--muted);
  margin: 14px 0 18px;
  line-height: 1.5;
  text-align: center;
}

.pkg-card__divider {
  display: flex; align-items: center; gap: 10px;
  margin: 0 0 15px;
  font-family: var(--font-display);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted-dark);
}
.pkg-card__divider::before,
.pkg-card__divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.pkg-card__list { display: grid; gap: 11px; margin: 0 0 20px; flex: 1; }
.pkg-card__list li {
  display: flex; gap: 11px; align-items: flex-start;
  font-size: .875rem; line-height: 1.5;
}
.pkg-card__list .tick {
  flex: none;
  width: 20px; height: 20px;
  margin-top: 1px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--lime-100);
  color: var(--lime-700);
}
.pkg-card--premium .tick { background: #fdf0d5; color: #b8761a; }
.pkg-card--start .tick { background: var(--mist-2); color: var(--lime-600); }

.pkg-card__foot {
  display: flex; align-items: center; gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pkg-card__count { font-size: .8rem; color: var(--muted); font-weight: 600; }
.pkg-card__foot .btn { margin-left: auto; }

.service-list { display: grid; gap: 8px; }
.service-row { display: flex; gap: 8px; align-items: center; }
.service-row .input { flex: 1; }

@media (max-width: 700px) {
  .pkg-row { gap: 18px; }
  .pkg-card { flex: 1 1 100%; max-width: 100%; padding: 26px 22px 20px; }
  .pkg-card.is-featured { padding-top: 42px; }
  .pkg-card__num { font-size: 1.75rem; }
  .pkg-group__head { flex-wrap: wrap; padding-bottom: 46px; }
  .pkg-group__add { right: 50%; top: auto; bottom: 4px; transform: translateX(50%); }
}

/* ---------------------------- DAVLATLAR --------------------------- */
.country-grid { display: grid; gap: 12px; }
.country-item {
  display: flex; align-items: center; gap: 14px;
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 15px 18px;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.country-item:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.country-item.is-off { opacity: .62; background: var(--mist); }
.country-item__main { flex: 1; min-width: 0; }
.country-item__main h4 { font-size: 1rem; font-weight: 700; }

/* ---------------------------- TELEGRAM ---------------------------- */
.tg-status {
  display: flex; align-items: center; gap: 13px;
  padding: 16px 20px; margin-bottom: 18px;
  border-radius: var(--r-md); border: 1px solid var(--line); background: #fff;
}
.tg-status__dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tg-status.is-on  .tg-status__dot { background: var(--st-pot); box-shadow: 0 0 0 4px rgba(22,163,74,.15); }
.tg-status.is-off .tg-status__dot { background: var(--st-notpot); box-shadow: 0 0 0 4px rgba(148,163,184,.15); }
.tg-status__title { font-family: var(--font-display); font-weight: 800; font-size: .98rem; }

/* ---------------------------- RESPONSIVE -------------------------- */
@media (max-width: 1100px) {
  .col-hide-md { display: none; }
}
@media (max-width: 640px) {
  .form-row--3 { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar__group { min-width: 0; }
  .filter-bar__count { margin-left: 0; }
  .pkg-row { grid-template-columns: 1fr; }
  .country-item { flex-wrap: wrap; }
  .country-item__main { flex-basis: 100%; order: -1; }
  .hint { font-size: .84rem; }
}

/* ============================ v4 QO'SHIMCHALAR ==================== */

/* Jamoa rasmini tanlash */
.photo-picker { display: flex; gap: 16px; align-items: flex-start; }
.photo-preview {
  width: 84px; height: 84px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  overflow: hidden;
  background: var(--mist);
  border: 1px solid var(--line);
  color: var(--lime-600);
}
.photo-preview svg { width: 40px; height: 40px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-picker__actions { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; flex: 1; min-width: 0; }
.photo-picker__actions .field__hint { margin-top: 2px; }

/* Telegram token holati */
.tg-token-ok, .tg-token-warn {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px 16px; border-radius: var(--r-md);
  font-size: .88rem; line-height: 1.55;
}
.tg-token-ok { background: var(--lime-50); border: 1px solid var(--lime-100); color: #3f5127; }
.tg-token-ok svg { flex: none; color: var(--lime-600); }
.tg-token-warn { background: #fff8e8; border: 1px solid #f5e2b8; color: #7a5a12; }
.tg-token-warn svg { flex: none; color: var(--st-new); }
.tg-token-warn pre {
  margin: 8px 0 0;
  padding: 9px 12px;
  background: var(--ink);
  color: #d9f0b0;
  border-radius: var(--r-xs);
  font-size: .82rem;
  overflow-x: auto;
}
.tg-token-warn code, .tg-token-ok code {
  background: rgba(18,21,28,.07); padding: 1px 6px; border-radius: 5px; font-size: .85em;
}

@media (max-width: 640px) {
  .photo-picker { flex-direction: column; align-items: center; text-align: center; }
  .photo-picker__actions { align-items: center; }
}

.src-dot {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #e7f0ff;
  color: #2563eb;
  font-family: var(--font-display);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .04em;
  vertical-align: middle;
}

/* ============================ v6: statistika, eslatma, zaxira ========= */

/* Manba belgilari (Telegram / qo'lda) */
.src-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px; height: 20px;
  margin-left: 6px;
  border-radius: 6px;
  vertical-align: middle;
}
.src-badge--tg { background: #e7f0ff; color: #229ED9; }
.src-badge--manual { background: var(--lime-100); color: var(--lime-700); }
.src-ico { width: 13px; height: 13px; }
.src-ico--hand { width: 12px; height: 12px; }
.remind-dot { margin-left: 5px; font-size: .82rem; }

/* Eslatma bloki */
.remind-box {
  margin-top: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--mist);
}
.remind-box.is-set { background: #fff8e8; border-color: #f5e2b8; }
.remind-box__head { display: flex; gap: 11px; align-items: flex-start; margin-bottom: 12px; }
.remind-box__icon { font-size: 1.1rem; line-height: 1.2; }
.remind-box__title { font-family: var(--font-display); font-weight: 800; font-size: .92rem; }
.remind-opts { display: flex; flex-wrap: wrap; gap: 7px; }
.remind-opts .chip-filter { background: #fff; }
.chip-filter--danger { color: #c0392b; border-color: #f6cccc; }
.chip-filter--danger:hover { background: #fdecec; }

/* Grafiklar */
.chart-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px 22px;
  margin-bottom: 18px;
}
.chart-card__head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 16px;
}
.chart-card__head h3 { font-size: 1rem; font-weight: 800; }
.chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 18px;
}
.chart-grid .chart-card { margin-bottom: 0; }

.bar-row {
  display: grid;
  grid-template-columns: 130px 1fr 62px;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}
.bar-row__label {
  font-size: .86rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.bar-row__track { height: 10px; border-radius: 999px; background: var(--mist-2); overflow: hidden; }
.bar-row__fill { height: 100%; border-radius: 999px; transition: width .6s var(--ease); }
.bar-row__val { font-family: var(--font-display); font-weight: 800; font-size: .9rem; text-align: right; }

/* Kunlik ustunlar */
.day-chart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 150px; padding: 4px 0;
}
.day-chart__col { flex: 1; display: flex; align-items: flex-end; height: 100%; min-width: 3px; }
.day-chart__bar {
  width: 100%;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--lime), var(--lime-600));
  transition: opacity .2s;
}
.day-chart__col:hover .day-chart__bar { opacity: .7; }
.day-chart__axis {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: .76rem; color: var(--muted);
}

/* Donut */
.donut-wrap { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.donut {
  position: relative;
  width: 128px; height: 128px;
  border-radius: 50%;
  flex: none;
  display: grid; place-items: center;
}
.donut::after {
  content: "";
  position: absolute;
  inset: 22px;
  background: #fff;
  border-radius: 50%;
}
.donut span {
  position: relative; z-index: 1;
  font-family: var(--font-display);
  font-weight: 800; font-size: 1.5rem;
}
.donut-legend { display: grid; gap: 9px; flex: 1; min-width: 150px; }
.donut-legend__row { display: flex; align-items: center; gap: 9px; font-size: .86rem; }
.donut-legend__row .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.donut-legend__row b { margin-left: auto; font-family: var(--font-display); }

.mini-bar {
  display: inline-block;
  width: 70px; height: 7px;
  border-radius: 999px;
  background: var(--mist-2);
  overflow: hidden;
  vertical-align: middle;
  margin-right: 7px;
}
.mini-bar__fill { height: 100%; background: var(--st-pot); border-radius: 999px; }

.spark { width: 100%; height: 34px; }

@media (max-width: 640px) {
  .bar-row { grid-template-columns: 96px 1fr 48px; gap: 8px; }
  .day-chart { height: 110px; }
  .donut-wrap { justify-content: center; }
}

/* Zaxira: qisqa ko'rsatkichlar */
.bk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.bk-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 15px 18px;
}
.bk-card__label {
  font-size: .72rem; font-weight: 700; letter-spacing: .05em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 6px;
}
.bk-card__value { font-family: var(--font-display); font-weight: 700; font-size: .95rem; }

/* ============================ v10: eslatma ikonkasi, botlar ========== */

/* Premium animatsiyali soat ikonkasi */
.remind-icon {
  width: 22px; height: 22px;
  color: var(--st-new);
  display: block;
}
.remind-icon--sm { width: 15px; height: 15px; display: inline-block; vertical-align: -2px; }
.remind-icon__ring {
  opacity: .9;
  transform-origin: 50% 50%;
  animation: remindPulse 2.6s var(--ease) infinite;
}
.remind-icon__hand-m {
  transform-origin: 50% 50%;
  animation: remindSpin 4s linear infinite;
}
.remind-icon__hand-h {
  transform-origin: 50% 50%;
  animation: remindSpin 24s linear infinite;
}
.remind-dot .remind-icon { color: var(--st-new); }
.remind-box.is-set .remind-icon { color: #b8761a; }

@keyframes remindSpin { to { transform: rotate(360deg); } }
@keyframes remindPulse {
  0%, 100% { opacity: .9; stroke-width: 1.8; }
  50%      { opacity: .55; stroke-width: 2.2; }
}
.remind-box__icon { display: grid; place-items: center; width: 26px; height: 26px; }

/* Botlar ro'yxati */
.bot-list { display: grid; gap: 12px; }
.bot-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.bot-card:hover { border-color: var(--line-2); box-shadow: var(--shadow-sm); }
.bot-card__dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.bot-card.is-on  .bot-card__dot { background: var(--st-pot); box-shadow: 0 0 0 4px rgba(22,163,74,.14); }
.bot-card.is-off .bot-card__dot { background: #cbd5e1; box-shadow: 0 0 0 4px rgba(148,163,184,.14); }
.bot-card__main { flex: 1; min-width: 0; }
.bot-card__title { font-family: var(--font-display); font-weight: 800; font-size: .98rem; }
.bot-card__sub { font-size: .84rem; color: var(--muted); margin-top: 2px; }
.bot-card__err { font-size: .8rem; color: #c0392b; margin-top: 4px; }
.bot-card__state {
  font-family: var(--font-display); font-weight: 700; font-size: .78rem;
  padding: 5px 12px; border-radius: 999px; white-space: nowrap;
  background: var(--mist); color: var(--muted);
}
.bot-card.is-on .bot-card__state { background: #e5f6ea; color: #158040; }
.bot-hint {
  margin: -4px 0 4px;
  padding: 10px 16px;
  border-radius: var(--r-sm);
  background: #fff8e8;
  border: 1px solid #f5e2b8;
  color: #7a5a12;
  font-size: .83rem;
}
.bot-hint code { background: rgba(18,21,28,.07); padding: 1px 6px; border-radius: 5px; }

@media (max-width: 640px) {
  .bot-card { flex-wrap: wrap; }
  .bot-card__main { flex-basis: calc(100% - 30px); }
  .bot-card__state { margin-left: 25px; }
}

/* ============ v11: barcha ekranlarga moslashuv ============ */

/* Juda katta monitorlar — matn va bo'shliqlar biroz kattalashadi */
@media (min-width: 1800px) {
  .stat__value { font-size: 2.35rem; }
  .stats { gap: 20px; }
  .chart-grid { gap: 22px; }
}

/* Katta monitor: statistika kartalari 4 tadan bir qatorda */
@media (min-width: 1180px) {
  .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1500px) {
  .pkg-row { gap: 26px; }
}

/* O'rta ekran / kichik noutbuk */
@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-grid { grid-template-columns: 1fr; }
}

/* Planshet (albom va portret) */
@media (max-width: 900px) {
  .topbar { padding: 14px 18px; }
  .topbar__title { font-size: 1.12rem; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .stat { padding: 16px 18px; }
  .stat__value { font-size: 1.8rem; }
  .toolbar { gap: 8px; }
  .search { max-width: none; flex: 1 1 100%; }
  .filter-bar { gap: 10px; }
  .filter-bar__group { flex: 1 1 180px; }
}

/* Telefon */
@media (max-width: 640px) {
  .topbar { padding: 12px 16px; gap: 10px; }
  .topbar__title { font-size: 1.05rem; }
  .topbar__sub { font-size: .76rem; }
  .topbar .btn span { display: none; }
  .topbar .btn { padding: 9px; }

  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px 15px; border-radius: var(--r-md); }
  .stat__value { font-size: 1.55rem; }
  .stat__label { font-size: .68rem; }
  .stat__icon { width: 28px; height: 28px; right: 12px; top: 12px; }

  .chip-row { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .chip-row::-webkit-scrollbar { height: 4px; }
  .chip-filter { white-space: nowrap; }

  .toolbar .btn { flex: 1 1 auto; justify-content: center; }
  .panel { border-radius: var(--r-md); }
  table { font-size: .85rem; }
  thead th, tbody td { padding: 11px 12px; }

  .modal { padding: 0; align-items: flex-end; }
  .modal__box {
    width: 100%;
    max-height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }
  .modal__head { padding: 16px 18px; }
  .modal__body { padding: 18px; }
  .modal__foot { padding: 14px 18px; }
  .modal__title { font-size: 1.05rem; }

  .hint { padding: 12px 14px; }
  .bk-grid { grid-template-columns: 1fr; }
  .day-chart { height: 120px; }
  .donut { width: 108px; height: 108px; }
}

/* Juda kichik telefonlar */
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr; }
  .view { padding: 14px; }
  .pkg-card__num { font-size: 1.5rem; }
}

/* Landshaft rejimidagi past ekranlar */
@media (max-height: 520px) and (orientation: landscape) {
  .modal__box { max-height: 96vh; }
  .sidebar { padding: 14px 12px; }
  .sidebar__brand { padding-bottom: 14px; }
  .nav-item { padding: 9px 12px; }
}

/* ============ v12: login/parol ustuni va profil ============ */

/* Xodimlar jadvalidagi login + parol */
.cred { display: grid; gap: 4px; }
.cred__user {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink);
}
.cred__pass {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px 2px 9px;
  border-radius: 999px;
  background: var(--mist);
  border: 1px solid var(--line);
  width: fit-content;
}
.cred__mask {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: .8rem;
  color: var(--muted);
  letter-spacing: .04em;
  user-select: all;
}
.cred__pass.is-shown { background: var(--lime-50); border-color: var(--lime-100); }
.cred__pass.is-shown .cred__mask { color: var(--ink); font-weight: 600; }
.cred__eye {
  display: grid; place-items: center;
  width: 24px; height: 24px;
  border-radius: 50%;
  color: var(--muted-dark);
  transition: color .18s var(--ease), background-color .18s var(--ease);
}
.cred__eye:hover { color: var(--ink); background: rgba(18, 21, 28, .06); }
.cred__none { font-size: .76rem; color: var(--muted-dark); font-style: italic; }

/* Sidebar profil tugmasi */
.sidebar__user {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 8px;
  margin-bottom: 8px;
  border-radius: var(--r-sm);
  text-align: left;
  transition: background-color .18s var(--ease);
}
.sidebar__user:hover { background: rgba(255, 255, 255, .07); }
.sidebar__user-info { flex: 1; min-width: 0; }
.sidebar__user-name,
.sidebar__user-role { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar__user-edit {
  width: 15px; height: 15px;
  flex: none;
  color: var(--muted-dark);
  opacity: 0;
  transition: opacity .18s var(--ease);
}
.sidebar__user:hover .sidebar__user-edit { opacity: 1; }

.photo-preview.is-empty { background: var(--mist); }

/* Faqat o'qish uchun maydon (masalan xodim uchun lavozim) */
.readonly-box {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--r-sm);
  background: var(--mist);
  font-size: .93rem;
  color: var(--ink);
}
.readonly-box__note {
  margin-left: auto;
  font-size: .76rem;
  color: var(--muted);
  font-style: italic;
}
