/* ============================================================
   BirOvoz — fuqaro SPA uslublari (mobil-birinchi)
   ============================================================ */

:root {
  --green: #1A7F4E;
  --green-dark: #0F5C37;
  --green-bg: #E8F5EE;
  --green-light: #A7F3C9;
  --amber: #F59E0B;
  --red: #DC2626;
  --purple: #8B5CF6;
  --orange: #F97316;
  --blue: #2563EB;
  --indigo: #4F46E5;
  --teal: #0D9488;
  --ink: #12241A;
  --muted: #5B6E63;
  --card: #ffffff;
  --line: #DCEAE1;
  --bg: #F4FAF6;
  --radius: 16px;
  --radius-sm: 14px;
  --shadow: 0 4px 20px rgba(15, 92, 55, 0.08);
  --shadow-lift: 0 14px 30px rgba(15, 92, 55, 0.16);
  --header-h: 60px;
  --tabbar-h: 62px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}

img { max-width: 100%; }

a { color: var(--green-dark); }

:focus-visible { outline: 3px solid rgba(26, 127, 78, 0.4); outline-offset: 2px; border-radius: 6px; }

.container { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.container.narrow { max-width: 640px; }

.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }

/* ============ Tugmalar ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit; font-weight: 700;
  border-radius: 12px; padding: 11px 18px; font-size: 15px; line-height: 1.2;
  text-decoration: none; white-space: nowrap;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 4px 14px rgba(26, 127, 78, 0.35); }
.btn-primary:hover { background: var(--green-dark); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(15, 92, 55, 0.35); }
.btn-light { background: #fff; color: var(--green-dark); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.btn-light:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22); }
.btn-outline-light { background: rgba(255, 255, 255, 0.08); border: 1.5px solid rgba(255, 255, 255, 0.65); color: #fff; }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.18); transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--green-dark); }
.btn-ghost:hover { background: var(--green-bg); }
.btn-danger-ghost { background: transparent; color: var(--red); border: 1.5px solid #FECACA; }
.btn-danger-ghost:hover { background: #FEF2F2; }
.btn-block { width: 100%; }
.btn-lg { padding: 14px 26px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 14px; font-size: 13.5px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none !important; box-shadow: none; }

/* ============ Kartalar ============ */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px;
}
.lift { transition: transform 0.22s ease, box-shadow 0.22s ease; }
.lift:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }

/* ============ Sarlavha (header) ============ */
.site-header {
  position: sticky; top: 0; z-index: 900;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner { height: var(--header-h); display: flex; align-items: center; gap: 16px; }
.brand {
  display: flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 20px; font-weight: 800; color: var(--green-dark); letter-spacing: -0.3px;
}
.brand em { font-style: normal; color: var(--green); }
.main-nav { display: none; gap: 4px; margin-left: 8px; }
.main-nav a {
  text-decoration: none; color: var(--muted); font-weight: 600; font-size: 14.5px;
  padding: 7px 13px; border-radius: 999px; transition: color 0.18s, background 0.18s;
}
.main-nav a:hover { color: var(--green-dark); background: var(--green-bg); }
.main-nav a.active { color: var(--green-dark); background: var(--green-bg); }
.header-user { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-name { font-weight: 700; font-size: 14px; color: var(--green-dark); max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bildirishnoma qo'ng'iroqchasi */
.bell-wrap { position: relative; }
.bell-btn {
  position: relative; width: 40px; height: 40px; border-radius: 50%;
  border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 18px;
  transition: background 0.18s, transform 0.18s;
}
.bell-btn:hover { background: var(--green-bg); transform: translateY(-1px); }
.bell-badge {
  position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
  padding: 0 4px; border: 2px solid #fff;
  animation: badgePop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }
.notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 10px); width: min(360px, 92vw);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lift); overflow: hidden; z-index: 950;
  animation: dropIn 0.22s ease both;
}
@keyframes dropIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.notif-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14px; }
.notif-list { max-height: 380px; overflow-y: auto; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--green-bg); }
.notif-dot { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 7px; border-radius: 50%; background: var(--green); }
.notif-item.read .notif-dot { background: var(--line); }
.notif-title { font-weight: 700; font-size: 13.5px; }
.notif-body { font-size: 13px; color: var(--muted); margin-top: 2px; }
.notif-time { font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.notif-empty { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 14px; }
.notif-foot { padding: 10px; border-top: 1px solid var(--line); }

/* ============ Mobil pastki tab-bar ============ */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 900;
  display: flex; background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
.tabbar a {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; text-decoration: none; color: var(--muted); font-size: 11px; font-weight: 700;
  transition: color 0.18s;
}
.tabbar a .tab-icon { font-size: 21px; line-height: 1; transition: transform 0.2s ease; }
.tabbar a.active { color: var(--green-dark); }
.tabbar a.active .tab-icon { transform: translateY(-2px) scale(1.12); }
.tabbar a[data-nav="new"] .tab-icon {
  width: 40px; height: 40px; margin-top: -16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--green), var(--green-dark)); border-radius: 50%;
  box-shadow: 0 6px 14px rgba(26, 127, 78, 0.45); font-size: 18px;
}

/* ============ Sahifa almashinuvi ============ */
.page { display: none; }
.page.active { display: block; animation: pageIn 0.38s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.page-title { font-size: 24px; font-weight: 800; margin: 22px 0 16px; letter-spacing: -0.4px; }

/* Scroll-reveal */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.65s ease var(--d, 0ms), transform 0.65s ease var(--d, 0ms); }
.reveal.revealed { opacity: 1; transform: none; }

/* ============ Bosh sahifa: hero ============ */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: linear-gradient(135deg, #0F5C37 0%, #1A7F4E 55%, #2FA46B 100%);
  padding: 56px 0 64px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 70%);
}
.hero::before { width: 420px; height: 420px; top: -160px; right: -120px; }
.hero::after { width: 340px; height: 340px; bottom: -160px; left: -100px; }
.hero-inner { position: relative; z-index: 1; }
.hero-eyebrow {
  display: inline-block; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 5px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; margin-bottom: 18px;
}
.hero h1 { font-size: clamp(30px, 6vw, 48px); font-weight: 900; line-height: 1.14; letter-spacing: -1px; }
.hero h1 span { color: var(--green-light); }
.hero-sub { margin-top: 14px; font-size: clamp(15px, 2.4vw, 17.5px); max-width: 560px; color: rgba(255, 255, 255, 0.88); }
.hero-cta { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ Statistika ============ */
.stats-section { margin-top: -34px; position: relative; z-index: 2; }
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.stat-card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); padding: 16px 14px; text-align: center;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.stat-icon { font-size: 22px; }
.stat-value { font-size: 26px; font-weight: 900; color: var(--green-dark); letter-spacing: -0.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }

/* Umumiy holat (diagramma) */
.overview { margin-top: 26px; }
.overview-card { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.overview-chart { position: relative; width: 180px; height: 180px; flex: 0 0 auto; }
.overview-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; pointer-events: none;
}
.overview-center strong { font-size: 30px; font-weight: 900; color: var(--green-dark); }
.overview-center span { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.overview-text { font-size: 15px; }
.overview-text h2 { font-size: 19px; margin-bottom: 8px; letter-spacing: -0.3px; }
.overview-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--muted); }
.overview-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }

/* ============ Qanday ishlaydi ============ */
.how { margin: 44px 0 8px; }
.section-title { font-size: clamp(22px, 4vw, 28px); font-weight: 900; letter-spacing: -0.5px; text-align: center; margin-bottom: 8px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 24px; }
.how-grid { display: grid; gap: 14px; }
.how-card { position: relative; padding: 24px 20px 22px; }
.how-num {
  position: absolute; top: 16px; right: 18px; font-size: 42px; font-weight: 900;
  color: var(--green-bg); line-height: 1; user-select: none;
}
.how-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; font-size: 26px; border-radius: 16px;
  background: var(--green-bg); margin-bottom: 12px;
}
.how-card h3 { font-size: 17px; margin-bottom: 6px; }
.how-card p { font-size: 14px; color: var(--muted); }

/* CTA band */
.cta-band {
  margin: 40px 0 30px; text-align: center; color: #fff;
  background: linear-gradient(135deg, var(--green-dark), var(--green));
  border-radius: 20px; padding: 40px 22px;
  box-shadow: 0 14px 34px rgba(15, 92, 55, 0.3);
}
.cta-band h2 { font-size: clamp(20px, 4vw, 26px); font-weight: 900; letter-spacing: -0.4px; }
.cta-band p { margin: 10px auto 22px; max-width: 480px; color: rgba(255, 255, 255, 0.85); font-size: 15px; }

.site-footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 8px 0 28px; }

/* ============ Auth ============ */
.auth-card { max-width: 440px; margin: 34px auto; padding: 28px 22px; }
.auth-card h1 { font-size: 22px; letter-spacing: -0.4px; margin-bottom: 6px; }
.auth-card > .auth-step > p { margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label, .form-card label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 7px; }
input[type="tel"], input[type="text"], textarea {
  width: 100%; font-family: inherit; font-size: 16px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fff; transition: border-color 0.18s, box-shadow 0.18s;
}
input:focus, textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(26, 127, 78, 0.12); }
textarea { resize: vertical; min-height: 120px; }
.char-hint { text-align: right; font-size: 12px; color: var(--muted); margin-top: 4px; }

.divider { display: flex; align-items: center; gap: 12px; margin: 18px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.tooltip-wrap { position: relative; }
.btn-oneid { background: #F1F5F3; color: var(--muted); border: 1.5px dashed var(--line); width: 100%; }
/* Ilova yuklab olish bo'limi */
.app-download { text-align: center; padding: 34px 0 8px; }
.app-buttons { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }
.app-btn {
  display: flex; align-items: center; gap: 12px; text-align: left; text-decoration: none;
  padding: 12px 22px; border-radius: 16px; line-height: 1.25;
}
.app-btn small { opacity: 0.8; font-weight: 600; font-size: 12px; }
.app-btn strong { font-size: 15.5px; }
.app-btn-icon { font-size: 26px; }
.app-btn-android { background: #0F5C37; color: #fff; }
.app-btn-android:hover { background: #1A7F4E; transform: translateY(-2px); }
.app-btn-ios { background: #111; color: #fff; border: none; cursor: pointer; font-family: inherit; }
.app-btn-ios:hover { background: #2a2a2a; transform: translateY(-2px); }
.ios-steps {
  max-width: 460px; margin: 18px auto 0; text-align: left; background: #fff;
  border: 1.5px solid var(--line, #E2E8E5); border-radius: 14px; padding: 16px 20px;
  animation: pageIn 0.35s ease both;
}
.ios-steps ol { margin: 8px 0 0 18px; display: grid; gap: 6px; }
.ios-share-icon {
  display: inline-block; border: 1.5px solid #888; border-radius: 5px;
  padding: 0 5px; font-size: 13px; line-height: 1.4;
}

.btn-admin {
  background: #0F5C37; color: #fff; text-decoration: none; white-space: nowrap;
}
.btn-admin:hover { background: #1A7F4E; transform: translateY(-1px); }
@media (max-width: 560px) {
  .btn-admin { font-size: 0; padding: 8px 10px; }
  .btn-admin::after { content: '⚙️'; font-size: 15px; }
}
.btn-telegram {
  background: #229ED9; color: #fff; text-align: center; text-decoration: none;
  font-weight: 700; margin-bottom: 8px;
}
.btn-telegram:hover { background: #1d8dc2; transform: translateY(-1px); }
.tg-hint { margin: 0 0 14px; line-height: 1.5; }
.tg-sent {
  display: block; margin-bottom: 16px; background: #EBF8FF; border: 1.5px solid #90CDF4;
  color: #2C5282; border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 600;
  animation: pageIn 0.4s ease both;
}
.tooltip {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%) translateY(4px);
  background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600;
  padding: 7px 12px; border-radius: 8px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease;
}
.tooltip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--ink);
}
.tooltip-wrap:hover .tooltip, .tooltip-wrap:focus-within .tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }

.dev-code {
  display: block; width: 100%; margin-bottom: 16px; cursor: pointer;
  background: #FFFBEB; border: 1.5px dashed #FCD34D; color: #92400E;
  border-radius: 12px; padding: 10px 14px; font-family: inherit; font-size: 14px; font-weight: 700;
  transition: transform 0.18s ease, background 0.18s;
  animation: pageIn 0.4s ease both;
}
.dev-code:hover { background: #FEF3C7; transform: translateY(-2px); }

.otp-cells { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.otp-cells input {
  width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 800;
  padding: 0; border-radius: 12px; caret-color: var(--green);
}
.otp-cells input:focus { transform: scale(1.05); }

.auth-step .btn + .btn { margin-top: 10px; }

/* ============ Yangi murojaat ============ */
.form-card { margin-bottom: 30px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.chip {
  border: 1.5px solid var(--line); background: #fff; color: var(--ink);
  font-family: inherit; font-size: 13px; font-weight: 700; cursor: pointer;
  padding: 7px 12px; border-radius: 999px;
  transition: background 0.18s, border-color 0.18s, transform 0.18s;
}
.chip:hover { background: var(--green-bg); border-color: var(--green); transform: translateY(-2px); }
.chip:active { transform: scale(0.95); }

.mini-map {
  height: 240px; border-radius: var(--radius-sm); border: 1.5px solid var(--line);
  overflow: hidden; z-index: 0; background: var(--green-bg);
}
.map-fallback { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); font-size: 14px; padding: 16px; text-align: center; }
.loc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; flex-wrap: wrap; }

.upload-drop {
  width: 100%; border: 1.5px dashed var(--line); background: #FAFDFB; color: var(--muted);
  font-family: inherit; font-size: 14px; font-weight: 700; cursor: pointer;
  border-radius: 12px; padding: 18px 14px; transition: border-color 0.18s, background 0.18s;
}
.upload-drop:hover { border-color: var(--green); background: var(--green-bg); color: var(--green-dark); }
.photo-preview { position: relative; margin-top: 10px; display: inline-block; }
[hidden] { display: none !important; }
.photo-preview img { max-height: 160px; border-radius: 12px; border: 1px solid var(--line); display: block; }
.photo-remove {
  position: absolute; top: -8px; right: -8px; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: var(--red); color: #fff; font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

/* ============ AI tahlil ekrani ============ */
.ai-card { text-align: center; padding: 30px 22px; margin: 26px 0; }
.ai-orb {
  width: 72px; height: 72px; margin: 0 auto 14px; font-size: 34px;
  display: flex; align-items: center; justify-content: center; border-radius: 50%;
  background: linear-gradient(135deg, var(--green-bg), #fff);
  border: 2px solid var(--green); animation: orbPulse 2s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 127, 78, 0.35); }
  50% { box-shadow: 0 0 0 16px rgba(26, 127, 78, 0); }
}
.ai-title { font-size: 20px; font-weight: 900; letter-spacing: -0.3px; }
.ai-number { margin-top: 4px; font-weight: 700; }
.ai-steps { list-style: none; margin: 22px 0 0; text-align: left; display: flex; flex-direction: column; gap: 10px; }
.ai-step {
  display: flex; gap: 12px; align-items: flex-start;
  background: #FAFDFB; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 13px 14px; font-size: 14.5px;
  animation: stepIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}
@keyframes stepIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
.ai-step-icon { font-size: 19px; line-height: 1.3; }
.ai-step-body { flex: 1; }
.ai-step--loading { border-color: var(--green); }
.ai-step--loading .ai-step-icon { animation: spinPulse 1.1s ease-in-out infinite; display: inline-block; }
@keyframes spinPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25) rotate(12deg); } }
.dots::after { content: ""; animation: dots 1.4s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.ai-step--pulse {
  background: var(--green-bg); border-color: var(--green);
  animation: stepIn 0.5s cubic-bezier(0.2, 0.7, 0.3, 1) both, clusterPulse 1.6s ease-in-out 0.5s 3;
}
@keyframes clusterPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 127, 78, 0.35); }
  50% { box-shadow: 0 0 0 10px rgba(26, 127, 78, 0); }
}
.ai-step--error { background: #FEF2F2; border-color: #FECACA; }
.ai-actions { margin-top: 22px; display: flex; flex-direction: column; gap: 10px; animation: stepIn 0.5s ease both; }

/* ============ Murojaatlarim ============ */
.appeal-card { margin-bottom: 12px; cursor: pointer; animation: stepIn 0.45s ease both; }
.appeal-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.appeal-no { font-weight: 900; color: var(--green-dark); font-size: 14.5px; letter-spacing: 0.2px; }
.appeal-text { font-size: 14.5px; color: var(--ink); }
.appeal-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; align-items: center; }

.status-chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px;
  border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff;
  background: var(--chip, var(--green));
}
.prio-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800;
  border: 1.5px solid var(--pc, var(--muted)); color: var(--pc, var(--muted)); background: #fff;
}
.cluster-mini { color: var(--green-dark); font-weight: 800; }

.sla-ok { color: var(--green-dark); font-weight: 800; }
.sla-warn { color: var(--amber); font-weight: 800; }
.sla-over { color: var(--red); font-weight: 800; }

.empty-state { text-align: center; padding: 46px 18px; }
.empty-state .empty-icon { font-size: 46px; }
.empty-state h3 { margin: 10px 0 6px; }
.empty-state p { color: var(--muted); margin-bottom: 18px; }

/* Batafsil ko'rinish */
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 14px 0; }
.detail-head h1 { font-size: 22px; letter-spacing: -0.4px; }
.detail-chiprow { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-card { margin-bottom: 14px; }
.detail-text { font-size: 15px; }
.detail-photo { margin-top: 12px; border-radius: 12px; border: 1px solid var(--line); max-height: 260px; object-fit: cover; }
.detail-addr { margin-top: 10px; font-size: 13.5px; color: var(--muted); font-weight: 600; }

.cluster-banner {
  display: flex; gap: 12px; align-items: center;
  background: var(--green-bg); border: 1.5px solid var(--green);
  border-radius: var(--radius-sm); padding: 14px; margin-bottom: 14px;
  animation: clusterPulse 1.8s ease-in-out 0.4s 2;
}
.cluster-banner .cb-icon { font-size: 26px; }
.cluster-banner strong { color: var(--green-dark); }
.cluster-banner p { font-size: 13px; color: var(--muted); margin-top: 2px; }

.sla-panel { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); background: #fff; margin-bottom: 14px; }
.sla-panel.overdue { border-color: #FECACA; background: #FEF2F2; }
.sla-panel .sla-icon { font-size: 24px; }
.sla-panel small { display: block; color: var(--muted); font-weight: 600; }

/* Tasdiqlash paneli */
.confirm-panel { border: 1.5px solid var(--purple); background: #F7F4FF; border-radius: var(--radius); padding: 18px; margin-bottom: 14px; text-align: center; }
.confirm-panel h3 { font-size: 17px; margin-bottom: 4px; }
.confirm-panel p { font-size: 13.5px; color: var(--muted); margin-bottom: 14px; }
.confirm-btns { display: flex; gap: 10px; }
.confirm-btns .btn { flex: 1; }
.progress { height: 8px; border-radius: 999px; background: #E9E4F8; overflow: hidden; margin-top: 14px; }
.progress > div { height: 100%; border-radius: 999px; background: var(--purple); transition: width 0.6s ease; }
.progress-label { font-size: 12px; color: var(--muted); font-weight: 700; margin-top: 6px; }

/* Pochta-kuzatuv timeline */
.timeline-card { margin-bottom: 30px; }
.timeline-card h2 { font-size: 17px; margin-bottom: 16px; }
.timeline { position: relative; margin-left: 8px; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(to bottom, var(--green), var(--line));
  border-radius: 2px;
}
.tl-item { position: relative; padding-bottom: 20px; animation: stepIn 0.45s ease both; animation-delay: var(--d, 0ms); }
.tl-item:last-child { padding-bottom: 4px; }
.tl-dot {
  position: absolute; left: -23px; top: 5px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--dot, var(--green)); box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--line);
}
.tl-item.current .tl-dot { animation: dotPulse 1.8s ease-in-out infinite; }
@keyframes dotPulse {
  0%, 100% { box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--line), 0 0 0 0 rgba(26, 127, 78, 0.4); }
  50% { box-shadow: 0 0 0 3px #fff, 0 0 0 4.5px var(--line), 0 0 0 8px rgba(26, 127, 78, 0); }
}
.tl-time { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.tl-status { font-weight: 800; font-size: 14.5px; margin: 2px 0; }
.tl-actor {
  display: inline-block; font-size: 11px; font-weight: 800; color: var(--green-dark);
  background: var(--green-bg); border-radius: 999px; padding: 2px 9px; margin-left: 6px; vertical-align: 1px;
}
.tl-comment { font-size: 13.5px; color: var(--muted); }

/* ============ Xarita sahifasi ============ */
.page-full { padding: 0; }
.big-map {
  height: calc(100dvh - var(--header-h) - var(--tabbar-h) - env(safe-area-inset-bottom));
  width: 100%; z-index: 0; background: var(--green-bg);
}
.map-legend {
  background: rgba(255, 255, 255, 0.95); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 13px; font-size: 12px; font-weight: 700; color: var(--ink);
  box-shadow: var(--shadow); line-height: 1.9; font-family: var(--font);
}
.map-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: 7px; vertical-align: -1px; }
.map-legend .lg-note { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.leaflet-popup-content { font-family: var(--font); font-size: 13.5px; line-height: 1.5; }
.leaflet-popup-content-wrapper { border-radius: 12px; }
.map-popup strong { font-size: 14px; }
.map-popup .status-chip { margin-top: 6px; }

/* ============ Skeleton (shimmer) ============ */
.skel {
  position: relative; overflow: hidden; background: #E9F2EC; border-radius: 8px; color: transparent !important;
}
.skel::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 20%, rgba(255, 255, 255, 0.75) 50%, transparent 80%);
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.skel-num { height: 26px; width: 60%; margin: 8px auto 6px; }
.skel-label { height: 12px; width: 80%; margin: 0 auto; }
.skel-line { height: 14px; margin-bottom: 10px; }
.skel-line.w60 { width: 60%; }
.skel-line.w40 { width: 40%; }
.skel-line.w80 { width: 80%; }

/* ============ Toast ============ */
.toasts {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom) + 14px);
  z-index: 1100; display: flex; flex-direction: column; gap: 8px; width: min(420px, calc(100vw - 28px));
}
.toast {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--ink); color: #fff; border-radius: 13px; padding: 12px 16px;
  font-size: 14px; font-weight: 600; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
  animation: toastIn 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}
.toast p { flex: 1; }
.toast--success { background: var(--green-dark); }
.toast--error { background: #7F1D1D; }
.toast--out { animation: toastOut 0.32s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(0.96); } }

/* ============ Desktop (>=768px) ============ */
@media (min-width: 768px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .main-nav { display: flex; }
  .toasts { bottom: 26px; }

  .hero { padding: 84px 0 92px; }
  .stats-grid { grid-template-columns: repeat(6, 1fr); }
  .stats-section { margin-top: -42px; }
  .overview-card { flex-direction: row; padding: 26px 30px; }
  .overview-text { flex: 1; }
  .how-grid { grid-template-columns: repeat(3, 1fr); }
  .how { margin: 56px 0 12px; }
  .cta-band { padding: 52px 30px; }

  .auth-card { padding: 34px 32px; }
  .mini-map { height: 300px; }
  .big-map { height: calc(100dvh - var(--header-h)); }
  .ai-actions { flex-direction: row; }
  .ai-actions .btn { flex: 1; }
  .page-title { margin-top: 30px; font-size: 27px; }
}

@media (min-width: 480px) and (max-width: 767px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 479px) {
  .notif-dropdown { position: fixed; left: 12px; right: 12px; top: calc(var(--header-h) + 8px); width: auto; }
  .otp-cells input { width: 42px; height: 50px; }
}

/* Harakat kamaytirilgan rejim */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
