/* ArchiCheck — mobil va yangi komponentlar uchun qo'shimcha uslublar (Tailwind'dan mustaqil) */
:root {
  --ac-bg: #0f172a;
  --ac-panel: rgba(30, 41, 59, 0.7);
  --ac-border: #334155;
  --ac-text: #e2e8f0;
  --ac-muted: #94a3b8;
  --ac-accent: #6366f1;
  --ac-crit: #f43f5e;
  --ac-warn: #f59e0b;
  --ac-verify: #eab308;
  --ac-ok: #10b981;
}

html { -webkit-text-size-adjust: 100%; }
body { background: var(--ac-bg); overflow-x: hidden; }
.hidden { display: none !important; }
img { max-width: 100%; }

/* Tugmalar */
.ac-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 14px; font-size: 14px; font-weight: 700;
  border: 1px solid var(--ac-border); background: #1e293b; color: var(--ac-text);
  cursor: pointer; transition: background .15s, border-color .15s, transform .05s; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.ac-btn:hover { background: #273449; }
.ac-btn:active { transform: scale(0.98); }
.ac-btn-primary { background: linear-gradient(90deg, #2563eb, #4f46e5); border-color: transparent; color: #fff; }
.ac-btn-primary:hover { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.ac-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.ac-btn-sm { min-height: 36px; padding: 6px 12px; font-size: 12px; border-radius: 10px; }

.ac-upload-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
@media (max-width: 420px) { .ac-upload-actions { grid-template-columns: 1fr; } }

/* Tanlangan fayllar ro'yxati */
.ac-staging { margin-top: 14px; border: 1px solid var(--ac-border); border-radius: 18px; background: rgba(15, 23, 42, .6); padding: 12px; }
.ac-staging-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; color: var(--ac-muted); margin-bottom: 8px; }
.ac-file-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.ac-file {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px;
  background: #111c31; border: 1px solid #1f2b40; font-size: 13px; color: var(--ac-text);
}
.ac-file-thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: #1e293b; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--ac-muted); }
.ac-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-file-size { color: var(--ac-muted); font-size: 11px; flex-shrink: 0; }
.ac-file-remove { background: none; border: none; color: var(--ac-muted); font-size: 16px; padding: 8px; cursor: pointer; }
.ac-file-remove:hover { color: var(--ac-crit); }
.ac-start-row { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.ac-start-row .ac-btn-primary { flex: 1; min-width: 200px; }

/* Xato xabari */
.ac-alert { border-radius: 16px; padding: 12px 14px; font-size: 13px; line-height: 1.5; display: flex; gap: 10px; align-items: flex-start; }
.ac-alert-error { background: rgba(244, 63, 94, .12); border: 1px solid rgba(244, 63, 94, .4); color: #fecdd3; }
.ac-alert-warn { background: rgba(245, 158, 11, .1); border: 1px solid rgba(245, 158, 11, .35); color: #fde68a; }
.ac-alert-info { background: rgba(99, 102, 241, .1); border: 1px solid rgba(99, 102, 241, .35); color: #c7d2fe; }
.ac-alert ul { margin: 4px 0 0 16px; list-style: disc; }

/* Jarayon */
.ac-progress { height: 8px; border-radius: 999px; background: #1e293b; overflow: hidden; margin: 14px auto 8px; max-width: 420px; }
.ac-progress > div { height: 100%; width: 10%; background: linear-gradient(90deg, #3b82f6, #8b5cf6); transition: width .6s ease; border-radius: 999px; }
.ac-stage { font-size: 13px; color: #c7d2fe; min-height: 20px; }
.ac-steps { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; font-size: 11px; color: var(--ac-muted); }
.ac-steps span { padding: 4px 10px; border-radius: 999px; border: 1px solid var(--ac-border); }
.ac-steps span.done { color: #a7f3d0; border-color: rgba(16, 185, 129, .4); }
.ac-steps span.active { color: #fff; border-color: var(--ac-accent); background: rgba(99, 102, 241, .2); }

/* Sahifalar paneli */
.ac-pages { display: flex; gap: 8px; overflow-x: auto; padding: 10px 12px; background: #0b1222; border-bottom: 1px solid var(--ac-border); scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; }
.ac-page-tab {
  flex-shrink: 0; scroll-snap-align: start; display: flex; flex-direction: column; gap: 4px; width: 96px;
  padding: 4px; border-radius: 10px; border: 2px solid transparent; background: #111c31; cursor: pointer; color: var(--ac-muted); font-size: 10px; text-align: left;
}
.ac-page-tab img { width: 100%; height: 64px; object-fit: cover; border-radius: 6px; background: #fff; }
.ac-page-tab.active { border-color: var(--ac-accent); color: #fff; }
.ac-page-tab .ac-page-label { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding: 0 2px; }
.ac-page-count { background: var(--ac-crit); color: #fff; border-radius: 999px; padding: 0 6px; font-weight: 700; font-size: 10px; }
.ac-viewer { position: relative; background: #020617; display: flex; align-items: center; justify-content: center; min-height: 260px; max-height: 75vh; overflow: auto; padding: 10px; }
.ac-viewer img { max-height: 72vh; object-fit: contain; border-radius: 10px; cursor: zoom-in; }
.ac-viewer-caption { font-size: 12px; color: var(--ac-muted); padding: 8px 14px; border-top: 1px solid var(--ac-border); display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }

/* Kamchiliklar filtri */
.ac-filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.ac-chip {
  flex-shrink: 0; min-height: 34px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--ac-border);
  background: #111c31; color: var(--ac-muted); font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.ac-chip.active { background: var(--ac-accent); border-color: var(--ac-accent); color: #fff; }
.ac-chip b { margin-left: 4px; }

/* Kamchilik kartasi */
.ac-issue { border-radius: 18px; border: 1px solid var(--ac-border); background: rgba(15, 23, 42, .55); padding: 14px; font-size: 13px; color: var(--ac-text); border-left-width: 5px; }
.ac-issue.crit { border-left-color: var(--ac-crit); }
.ac-issue.warn { border-left-color: var(--ac-warn); }
.ac-issue.verify { border-left-color: var(--ac-verify); }
.ac-issue.info { border-left-color: #64748b; }
.ac-issue-head { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.ac-issue-title { font-weight: 800; font-size: 14px; color: #fff; line-height: 1.35; }
.ac-issue-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ac-tag { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #1e293b; border: 1px solid #2c3a52; color: #cbd5e1; white-space: nowrap; }
.ac-tag.page { cursor: pointer; color: #c7d2fe; border-color: rgba(99, 102, 241, .5); }
.ac-tag.crit { color: #fecdd3; border-color: rgba(244, 63, 94, .5); background: rgba(244, 63, 94, .12); }
.ac-tag.warn { color: #fde68a; border-color: rgba(245, 158, 11, .5); background: rgba(245, 158, 11, .1); }
.ac-tag.verify { color: #fef08a; border-color: rgba(234, 179, 8, .5); background: rgba(234, 179, 8, .1); }
.ac-tag.ai { color: #ddd6fe; border-color: rgba(139, 92, 246, .5); background: rgba(139, 92, 246, .12); }
.ac-issue p { margin-top: 8px; color: #cbd5e1; line-height: 1.5; }
.ac-evidence { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: #0b1222; border: 1px dashed #334155; color: #a5b4fc; font-size: 12px; line-height: 1.45; }
.ac-values { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; }
.ac-values div { padding: 6px 10px; border-radius: 10px; background: #0b1222; font-size: 12px; color: var(--ac-muted); }
.ac-values b { display: block; color: #fff; font-size: 13px; }
.ac-fix { margin-top: 8px; padding: 8px 10px; border-radius: 10px; background: rgba(16, 185, 129, .08); border: 1px solid rgba(16, 185, 129, .25); color: #a7f3d0; font-size: 12px; line-height: 1.45; }
.ac-options { margin-top: 10px; padding: 10px 12px; border: 1px solid rgba(99, 102, 241, .28); border-radius: 12px; background: rgba(99, 102, 241, .08); color: #c7d2fe; font-size: 12px; }
.ac-options-title { font-weight: 700; color: #a5b4fc; margin-bottom: 5px; }
.ac-options-title span { font-weight: 500; color: #94a3b8; }
.ac-options ul { margin: 0; padding-left: 18px; color: #cbd5e1; }
.ac-options li { margin: 3px 0; }
.ac-empty { padding: 24px; text-align: center; border-radius: 18px; border: 1px solid rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .08); color: #a7f3d0; font-size: 13px; }

/* Jadval mobil */
.ac-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* Mobil moslashuv */
@media (max-width: 640px) {
  h1 { font-size: 1.55rem !important; line-height: 1.25 !important; }
  #dropZone { padding: 22px 14px !important; border-radius: 22px !important; }
  #resFilename { font-size: 1rem !important; word-break: break-word; }
  .ac-hide-mobile { display: none !important; }
  .ac-res-head { flex-direction: column; align-items: flex-start !important; gap: 8px; }
  .ac-res-head > * { margin-left: 0 !important; }
  .ac-quota { padding: 4px 8px !important; font-size: 11px !important; white-space: nowrap; }
  .ac-result-actions { width: 100%; display: grid !important; grid-template-columns: 1fr 1fr; }
  .ac-result-actions .ac-btn { width: 100%; }

  .ac-viewer img { max-height: 60vh; }
}
@media (hover: none) {
  .ac-desktop-only { display: none !important; }
}
@media (hover: hover) {
  .ac-touch-only { display: none !important; }
}
