/* =====================================================================
   Parvoz admin — design system (plain CSS, no build step)
   Prefix: .a-*   Tokens: --a-*
   ===================================================================== */

:root {
  --a-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --a-bg: #F5F6F8;
  --a-surface: #FFFFFF;
  --a-surface-2: #FAFBFC;
  --a-border: #E6E8EC;
  --a-border-strong: #D7DAE0;
  --a-divider: #EEF0F3;

  --a-text: #1A1D26;
  --a-text-2: #3F4554;
  --a-muted: #6B7280;
  --a-faint: #9AA1AE;

  --a-ink: #161922;
  --a-ink-2: #1D212C;
  --a-ink-3: #262B38;
  --a-ink-text: #C3C8D2;
  --a-ink-muted: #727A8C;

  --a-primary: #6A2E4D;
  --a-primary-600: #5C2843;
  --a-primary-700: #4D2138;
  --a-primary-50: #F8F1F4;
  --a-primary-100: #F0DFE8;
  --a-primary-200: #E0BED0;
  --a-primary-soft: #F3C9DD;

  --a-success: #15803D;
  --a-success-bg: #E9F7EF;
  --a-danger: #DC2626;
  --a-danger-600: #B91C1C;
  --a-danger-bg: #FDEDED;
  --a-warning: #B45309;
  --a-warning-bg: #FEF4E4;
  --a-info: #1D4ED8;
  --a-info-bg: #EBF1FE;

  --a-radius: 14px;
  --a-radius-md: 10px;
  --a-radius-sm: 8px;

  --a-shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --a-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 6px 16px -6px rgba(16, 24, 40, .08);
  --a-shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, .22), 0 2px 6px rgba(16, 24, 40, .06);
  --a-ring: 0 0 0 3px rgba(106, 46, 77, .18);
  --a-ring-danger: 0 0 0 3px rgba(220, 38, 38, .16);

  --a-sidebar-w: 264px;
  --a-topbar-h: 64px;
  --a-pad-x: 32px;
  --a-pad-y: 28px;
  --a-ease: cubic-bezier(.2, .7, .3, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--a-font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--a-text);
  background: var(--a-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv11", "ss01";
}
img { display: block; max-width: 100%; }
svg.a-icon { display: inline-block; vertical-align: middle; flex: none; }
a { color: var(--a-primary); text-decoration: none; }
a:hover { color: var(--a-primary-600); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4, p { margin: 0; }
[hidden] { display: none !important; }
::selection { background: var(--a-primary-100); }

:focus-visible { outline: 2px solid var(--a-primary); outline-offset: 2px; }
.a-sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.a-skip {
  position: fixed; left: 12px; top: -120px; z-index: 200; padding: 10px 14px;
  background: var(--a-surface); border-radius: var(--a-radius-md); box-shadow: var(--a-shadow-lg);
  font-weight: 600; transition: top .15s;
}
.a-skip:focus { top: 12px; }

/* ---------- Shell ---------- */
.a-shell { min-height: 100vh; }

.a-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 60;
  width: var(--a-sidebar-w);
  display: flex; flex-direction: column;
  background: var(--a-ink);
  color: var(--a-ink-text);
  border-right: 1px solid rgba(255, 255, 255, .04);
}
.a-sidebar-head {
  display: flex; align-items: center; gap: 10px;
  height: var(--a-topbar-h); padding: 0 18px; flex: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.a-brand { display: flex; align-items: center; gap: 11px; min-width: 0; color: #fff; }
.a-brand:hover { color: #fff; }
.a-brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, #8A3E66 0%, var(--a-primary) 55%, #4A1F36 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 6px 14px -6px rgba(106, 46, 77, .8);
  color: #fff;
}
.a-brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.a-brand-name { font-weight: 700; font-size: 14.5px; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-brand-sub { font-size: 11.5px; color: var(--a-ink-muted); font-weight: 500; }
.a-brand-logo { max-height: 34px; max-width: 180px; width: auto; object-fit: contain; }
.a-sidebar .a-sidebar-close { margin-left: auto; display: none; color: var(--a-ink-text); }
.a-sidebar .a-sidebar-close:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.a-nav { flex: 1; overflow-y: auto; padding: 14px 12px 20px; scrollbar-width: thin; scrollbar-color: #343a49 transparent; }
.a-nav::-webkit-scrollbar { width: 6px; }
.a-nav::-webkit-scrollbar-thumb { background: #343a49; border-radius: 6px; }
.a-nav-group + .a-nav-group { margin-top: 18px; }
.a-nav-label {
  padding: 0 12px 6px; font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .08em; color: var(--a-ink-muted);
}
.a-nav-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.a-nav-link {
  display: flex; align-items: center; gap: 11px;
  min-height: 40px; padding: 8px 12px; border-radius: 10px;
  color: var(--a-ink-text); font-weight: 500; font-size: 13.5px;
  transition: background-color .15s, color .15s;
}
.a-nav-link .a-icon { color: #8C93A4; transition: color .15s; }
.a-nav-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.a-nav-link:hover .a-icon { color: #D9DCE3; }
.a-nav-link:focus-visible { outline: 2px solid var(--a-primary-soft); outline-offset: 0; }
.a-nav-link.is-active {
  background: var(--a-primary);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 8px 18px -10px rgba(106, 46, 77, .95);
}
.a-nav-link.is-active .a-icon { color: var(--a-primary-soft); }
.a-nav-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-nav-badge {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: #EF4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 1;
  box-shadow: 0 0 0 2px var(--a-ink);
}
.a-nav-link.is-active .a-nav-badge { box-shadow: 0 0 0 2px var(--a-primary); }

.a-sidebar-foot { flex: none; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .06); }
.a-me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.a-me:hover { background: rgba(255, 255, 255, .05); }
.a-me-link { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; color: var(--a-ink-text); }
.a-me-link:hover { color: #fff; }
.a-me-name { font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-me-email { font-size: 11.5px; color: var(--a-ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-me-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.a-me-logout {
  width: 34px; height: 34px; border-radius: 9px; border: 0; background: transparent;
  display: grid; place-items: center; color: var(--a-ink-muted);
}
.a-me-logout:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.a-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--a-primary-100); color: var(--a-primary);
  font-weight: 700; font-size: 12.5px; letter-spacing: .02em;
}
.a-avatar-dark { background: #2E3341; color: #F1D4E2; }
.a-avatar-lg { width: 44px; height: 44px; font-size: 15px; }

.a-overlay {
  position: fixed; inset: 0; z-index: 55;
  background: rgba(17, 19, 26, .5);
  backdrop-filter: blur(2px);
  opacity: 0; transition: opacity .2s;
}

.a-main { margin-left: var(--a-sidebar-w); min-width: 0; min-height: 100vh; display: flex; flex-direction: column; }

/* ---------- Topbar ---------- */
.a-topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--a-topbar-h);
  display: flex; align-items: center; gap: 12px;
  padding: 0 var(--a-pad-x);
  background: rgba(245, 246, 248, .86);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--a-border);
}
.a-topbar .a-burger { display: none; }
.a-crumbs { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 13.5px; color: var(--a-muted); }
.a-crumbs a { color: var(--a-muted); font-weight: 500; }
.a-crumbs a:hover { color: var(--a-text); }
.a-crumbs .a-icon { color: var(--a-faint); }
.a-crumb-current { color: var(--a-text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-crumb-hide-sm { display: contents; }
.a-topbar-spacer { flex: 1; }
.a-topbar-actions { display: flex; align-items: center; gap: 8px; }

.a-dropdown { position: relative; }
.a-user-btn {
  display: flex; align-items: center; gap: 9px;
  height: 40px; padding: 0 8px 0 4px; border-radius: 999px;
  border: 1px solid var(--a-border); background: var(--a-surface);
  font-weight: 600; font-size: 13.5px; color: var(--a-text);
  transition: border-color .15s, box-shadow .15s;
}
.a-user-btn:hover { border-color: var(--a-border-strong); box-shadow: var(--a-shadow-sm); }
.a-user-btn .a-avatar { width: 30px; height: 30px; font-size: 11.5px; }
.a-user-btn .a-icon { color: var(--a-muted); }
.a-user-name { max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 70;
  min-width: 220px; padding: 6px;
  background: var(--a-surface); border: 1px solid var(--a-border);
  border-radius: 12px; box-shadow: var(--a-shadow-lg);
}
.a-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--a-divider); margin-bottom: 6px; }
.a-menu-head strong { display: block; font-size: 13.5px; }
.a-menu-head span { display: block; font-size: 12px; color: var(--a-muted); overflow: hidden; text-overflow: ellipsis; }
.a-menu-item {
  width: 100%; display: flex; align-items: center; gap: 10px;
  min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px;
  background: transparent; color: var(--a-text); font-size: 13.5px; font-weight: 500; text-align: left;
}
.a-menu-item .a-icon { color: var(--a-muted); }
.a-menu-item:hover { background: var(--a-bg); color: var(--a-text); }
.a-menu-item.is-danger { color: var(--a-danger-600); }
.a-menu-item.is-danger .a-icon { color: var(--a-danger); }
.a-menu-item.is-danger:hover { background: var(--a-danger-bg); }

/* ---------- Content ---------- */
.a-content {
  flex: 1; width: 100%; max-width: 1320px; margin: 0 auto;
  padding: var(--a-pad-y) var(--a-pad-x) 56px;
}

.a-page-header { margin-bottom: 24px; }
.a-back {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px;
  color: var(--a-muted); font-weight: 500; font-size: 13px;
}
.a-back:hover { color: var(--a-text); }
.a-page-header-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.a-page-title { font-size: 22px; line-height: 1.3; font-weight: 700; letter-spacing: -.015em; color: var(--a-text); }
.a-page-subtitle { margin-top: 4px; color: var(--a-muted); font-size: 14px; }
.a-page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- Layout utilities ---------- */
.a-stack { display: flex; flex-direction: column; gap: 20px; }
.a-stack-sm { display: flex; flex-direction: column; gap: 12px; }
.a-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.a-grid-2, .a-grid-3, .a-grid-4 { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) {
  .a-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .a-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1100px) {
  .a-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .a-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.a-span-2 { grid-column: 1 / -1; }
.a-form-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) {
  .a-form-grid { grid-template-columns: minmax(0, 1fr) 340px; }
  .a-form-side { position: sticky; top: calc(var(--a-topbar-h) + 20px); }
}
.a-form-main, .a-form-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.a-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.a-toolbar-start, .a-toolbar-end { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.a-muted { color: var(--a-muted); }
.a-text-sm { font-size: 12.5px; }
.a-nowrap { white-space: nowrap; }
.a-strong { font-weight: 600; }
.a-mt-0 { margin-top: 0 !important; }
.a-divider { height: 1px; background: var(--a-divider); border: 0; margin: 4px 0; }

/* ---------- Card ---------- */
.a-card {
  background: var(--a-surface); border: 1px solid var(--a-border);
  border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm);
  min-width: 0;
}
.a-card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--a-divider);
}
.a-card-title { font-size: 15px; font-weight: 600; letter-spacing: -.005em; }
.a-card-desc { margin-top: 2px; font-size: 13px; color: var(--a-muted); }
.a-card-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.a-card-body { padding: 20px; }
.a-card-body > .a-stack, .a-card-body > .a-grid-2, .a-card-body > .a-grid-3 { gap: 18px; }
.a-card.is-flush .a-card-body { padding: 0; }
.a-card-foot { padding: 14px 20px; border-top: 1px solid var(--a-divider); }

/* ---------- Buttons ---------- */
.a-btn {
  --a-btn-h: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--a-btn-h); padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--a-radius-md);
  background: transparent; color: var(--a-text);
  font-size: 14px; font-weight: 600; line-height: 1; white-space: nowrap;
  text-decoration: none; user-select: none;
  transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.a-btn:active:not(:disabled) { transform: translateY(1px); }
.a-btn:focus-visible { outline: none; box-shadow: var(--a-ring); }
.a-btn:disabled, .a-btn.is-disabled { opacity: .55; cursor: not-allowed; pointer-events: none; }
.a-btn-primary { background: var(--a-primary); color: #fff; box-shadow: 0 1px 2px rgba(74, 31, 54, .25), inset 0 1px 0 rgba(255, 255, 255, .1); }
.a-btn-primary:hover { background: var(--a-primary-600); color: #fff; }
.a-btn-primary:active { background: var(--a-primary-700); }
.a-btn-secondary { background: var(--a-surface); border-color: var(--a-border-strong); color: var(--a-text); box-shadow: var(--a-shadow-sm); }
.a-btn-secondary:hover { background: var(--a-surface-2); border-color: #C8CCD4; color: var(--a-text); }
.a-btn-ghost { color: var(--a-text-2); }
.a-btn-ghost:hover { background: #EEF0F3; color: var(--a-text); }
.a-btn-danger { background: var(--a-danger); color: #fff; }
.a-btn-danger:hover { background: var(--a-danger-600); color: #fff; }
.a-btn-danger:focus-visible { box-shadow: var(--a-ring-danger); }
.a-btn-danger-soft { background: var(--a-danger-bg); color: var(--a-danger-600); }
.a-btn-danger-soft:hover { background: #FBDADA; color: var(--a-danger-600); }
.a-btn-ghost.is-danger:hover, .a-btn-icon.is-danger:hover { background: var(--a-danger-bg); color: var(--a-danger-600); }
.a-btn-success-soft { background: var(--a-success-bg); color: var(--a-success); }
.a-btn-success-soft:hover { background: #D7F0E1; color: var(--a-success); }
.a-btn-sm { --a-btn-h: 34px; padding: 0 12px; font-size: 13px; gap: 6px; border-radius: 9px; }
.a-btn-lg { --a-btn-h: 46px; padding: 0 20px; font-size: 15px; }
.a-btn-block { width: 100%; }
.a-btn-icon { width: var(--a-btn-h); padding: 0; color: var(--a-muted); }
.a-btn-icon:hover { color: var(--a-text); background: #EEF0F3; }
.a-btn-icon.a-btn-secondary { color: var(--a-text-2); }
.a-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.a-btn.is-loading > * { visibility: hidden; }
.a-btn.is-loading::after {
  content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: a-spin .7s linear infinite;
}
.a-btn-primary.is-loading::after, .a-btn-danger.is-loading::after { border-color: #fff; border-right-color: transparent; }
.a-btn-secondary.is-loading::after, .a-btn-ghost.is-loading::after { border-color: var(--a-primary); border-right-color: transparent; }
@keyframes a-spin { to { transform: rotate(360deg); } }
.a-inline-form { display: inline-flex; margin: 0; }
.a-inline-form:has(> .a-btn-block) { display: flex; width: 100%; }
.a-actions { display: inline-flex; align-items: center; gap: 2px; justify-content: flex-end; }

/* ---------- Form fields ---------- */
.a-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.a-field-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.a-label { font-size: 13px; font-weight: 600; color: var(--a-text-2); display: inline-flex; align-items: center; gap: 6px; padding: 0; }
legend.a-label { margin-bottom: 6px; }
.a-req { color: var(--a-danger); font-weight: 700; }
.a-optional { color: var(--a-faint); font-weight: 500; font-size: 12px; }
.a-hint { font-size: 12.5px; color: var(--a-muted); line-height: 1.45; }
.a-error { font-size: 12.5px; color: var(--a-danger-600); font-weight: 500; line-height: 1.45; }

.a-input, .a-select, .a-textarea {
  width: 100%; min-height: 42px;
  padding: 9px 12px;
  background: var(--a-surface);
  border: 1px solid var(--a-border-strong);
  border-radius: var(--a-radius-md);
  font-size: 14px; line-height: 1.4; color: var(--a-text);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance: none; appearance: none;
}
.a-input::placeholder, .a-textarea::placeholder { color: var(--a-faint); }
.a-input:hover, .a-select:hover, .a-textarea:hover { border-color: #C3C7CF; }
.a-input:focus, .a-select:focus, .a-textarea:focus { outline: none; border-color: var(--a-primary); box-shadow: var(--a-ring); }
.a-input:disabled, .a-select:disabled, .a-textarea:disabled, .a-input[readonly] { background: var(--a-bg); color: var(--a-muted); }
.a-input.is-invalid, .a-select.is-invalid, .a-textarea.is-invalid { border-color: var(--a-danger); }
.a-input.is-invalid:focus, .a-select.is-invalid:focus, .a-textarea.is-invalid:focus { box-shadow: var(--a-ring-danger); }
.a-textarea { resize: vertical; min-height: 96px; }
.a-select {
  padding-right: 36px; cursor: pointer;
  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='%236B7280' stroke-width='2' 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 12px center;
}
.a-input[type="date"], .a-input[type="time"], .a-input[type="number"] { font-variant-numeric: tabular-nums; }
.a-input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.a-input-group { position: relative; display: flex; align-items: stretch; }
.a-input-group .a-input { padding-right: 46px; }
.a-input-addon {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 34px; border: 0; border-radius: 8px; background: transparent;
  display: grid; place-items: center; color: var(--a-muted);
}
.a-input-addon:hover { background: var(--a-bg); color: var(--a-text); }

.a-check { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; color: var(--a-text-2); user-select: none; }
.a-check input {
  width: 18px; height: 18px; margin: 0; flex: none;
  accent-color: var(--a-primary); cursor: pointer;
}

.a-color-field { display: flex; align-items: center; gap: 10px; }
.a-color-swatch {
  position: relative; width: 42px; height: 42px; flex: none; border-radius: var(--a-radius-md);
  border: 1px solid var(--a-border-strong); overflow: hidden; cursor: pointer;
}
.a-color-swatch input[type="color"] { position: absolute; inset: -8px; width: calc(100% + 16px); height: calc(100% + 16px); border: 0; padding: 0; cursor: pointer; }
.a-color-field .a-input { max-width: 160px; text-transform: uppercase; font-variant-numeric: tabular-nums; }

/* Translatable (RU · UZ · EN) */
.a-lang-tabs { display: inline-flex; gap: 2px; padding: 3px; background: #EEF0F3; border-radius: 9px; }
.a-lang-tab {
  position: relative; display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px; border: 0; border-radius: 7px; background: transparent;
  font-size: 12px; font-weight: 600; color: var(--a-muted); letter-spacing: .02em;
}
.a-lang-tab:hover { color: var(--a-text); }
.a-lang-tab.is-active { background: var(--a-surface); color: var(--a-text); box-shadow: var(--a-shadow-sm); }
.a-lang-tab:focus-visible { outline: none; box-shadow: var(--a-ring); }
.a-lang-opt { font-weight: 500; font-size: 11px; color: var(--a-faint); letter-spacing: 0; }
.a-lang-tab .a-req { font-size: 12px; }
.a-lang-state { width: 6px; height: 6px; border-radius: 50%; background: transparent; flex: none; }
.a-lang-tab.is-filled .a-lang-state { background: #22C55E; }
.a-lang-tab.has-error .a-lang-state { background: var(--a-danger); box-shadow: 0 0 0 2px rgba(220, 38, 38, .18); }
.a-lang-panel { display: flex; flex-direction: column; gap: 6px; }

/* Switch (form) + Toggle (list) */
.a-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; min-height: 40px; }
.a-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.a-switch-track {
  position: relative; flex: none; width: 40px; height: 24px; border-radius: 999px;
  background: #D2D6DD; transition: background-color .18s var(--a-ease);
}
.a-switch-thumb {
  position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .25);
  transition: transform .18s var(--a-ease);
}
.a-switch input:checked + .a-switch-track { background: var(--a-primary); }
.a-switch input:checked + .a-switch-track .a-switch-thumb { transform: translateX(16px); }
.a-switch input:focus-visible + .a-switch-track { box-shadow: var(--a-ring); }
.a-switch-text { display: flex; flex-direction: column; line-height: 1.35; }
.a-switch-label { font-weight: 600; font-size: 13.5px; color: var(--a-text); }
.a-switch-hint { font-size: 12.5px; color: var(--a-muted); }

.a-toggle {
  display: inline-flex; align-items: center; padding: 6px; margin: -6px; border: 0; background: transparent; border-radius: 999px;
}
.a-toggle:focus-visible { outline: none; }
.a-toggle:focus-visible .a-switch-track { box-shadow: var(--a-ring); }
.a-toggle[aria-checked="true"] .a-switch-track { background: var(--a-primary); }
.a-toggle[aria-checked="true"] .a-switch-thumb { transform: translateX(16px); }
.a-toggle.is-busy { opacity: .6; pointer-events: none; }

/* Days picker */
.a-days { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.a-day { position: relative; cursor: pointer; }
.a-day input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.a-day span {
  display: grid; place-items: center; width: 46px; height: 40px;
  border: 1px solid var(--a-border-strong); border-radius: var(--a-radius-md); background: var(--a-surface);
  font-weight: 600; font-size: 13px; color: var(--a-text-2);
  transition: background-color .15s, border-color .15s, color .15s;
}
.a-day:hover span { border-color: var(--a-primary-200); background: var(--a-primary-50); }
.a-day input:checked + span { background: var(--a-primary); border-color: var(--a-primary); color: #fff; }
.a-day input:focus-visible + span { box-shadow: var(--a-ring); }
.a-days-field.has-error .a-day span { border-color: var(--a-danger); }

/* Image input */
.a-dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 156px; padding: 16px; text-align: center; cursor: pointer;
  border: 1.5px dashed #CBD0D8; border-radius: 12px; background: var(--a-surface-2);
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.a-dropzone:hover, .a-dropzone.is-drag { border-color: var(--a-primary); background: var(--a-primary-50); }
.a-dropzone:focus-within { border-color: var(--a-primary); box-shadow: var(--a-ring); }
.a-dropzone.is-invalid { border-color: var(--a-danger); }
.a-dropzone input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.a-dropzone-preview { max-height: 180px; max-width: 100%; width: auto; border-radius: 8px; object-fit: contain; background: repeating-conic-gradient(#F1F2F4 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.a-dropzone-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--a-muted); font-size: 13px; }
.a-dropzone-icon {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: var(--a-surface); border: 1px solid var(--a-border); color: var(--a-primary);
}
.a-dropzone-cta { color: var(--a-text); font-weight: 600; }
.a-dropzone-change {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--a-primary);
}
.a-dropzone-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 0; font-size: 12.5px; color: var(--a-muted); }
.a-dropzone-meta:empty { display: none; }
.a-dropzone-file { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-new-badge { display: inline-flex; align-items: center; gap: 4px; color: var(--a-success); font-weight: 600; }

/* Rich text (Quill) */
.a-rich { border: 1px solid var(--a-border-strong); border-radius: var(--a-radius-md); background: var(--a-surface); overflow: hidden; transition: border-color .15s, box-shadow .15s; }
.a-rich:focus-within { border-color: var(--a-primary); box-shadow: var(--a-ring); }
.a-rich.is-invalid { border-color: var(--a-danger); }
.a-rich .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--a-divider); background: var(--a-surface-2); padding: 6px 8px; font-family: var(--a-font); }
.a-rich .ql-container.ql-snow { border: 0; font-family: var(--a-font); font-size: 14px; }
.a-rich .ql-editor { min-height: 180px; max-height: 560px; overflow-y: auto; line-height: 1.6; padding: 12px 14px; }
.a-rich .ql-editor.ql-blank::before { color: var(--a-faint); font-style: normal; left: 14px; }
.a-rich .ql-snow .ql-stroke { stroke: var(--a-text-2); }
.a-rich .ql-snow .ql-fill { fill: var(--a-text-2); }
.a-rich .ql-snow .ql-picker { color: var(--a-text-2); }
.a-rich .ql-snow button:hover .ql-stroke, .a-rich .ql-snow button.ql-active .ql-stroke { stroke: var(--a-primary); }
.a-rich .ql-snow button:hover .ql-fill, .a-rich .ql-snow button.ql-active .ql-fill { fill: var(--a-primary); }
.a-rich .ql-snow .ql-tooltip { z-index: 5; border-radius: 10px; box-shadow: var(--a-shadow-lg); border-color: var(--a-border); }
/* Quill UI strings in Uzbek (the snow theme prints them from CSS) */
.a-rich .ql-snow .ql-picker.ql-header .ql-picker-label::before,
.a-rich .ql-snow .ql-picker.ql-header .ql-picker-item::before { content: "Oddiy matn"; }
.a-rich .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]::before,
.a-rich .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]::before { content: "Sarlavha"; }
.a-rich .ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]::before,
.a-rich .ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]::before { content: "Kichik sarlavha"; }
.a-rich .ql-snow .ql-picker.ql-header { width: 128px; }
.a-rich .ql-snow .ql-tooltip::before { content: "Havola:"; }
.a-rich .ql-snow .ql-tooltip[data-mode="link"]::before { content: "Havolani kiriting:"; }
.a-rich .ql-snow .ql-tooltip a.ql-action::after { content: "Tahrirlash"; }
.a-rich .ql-snow .ql-tooltip a.ql-remove::before { content: "O'chirish"; }
.a-rich .ql-snow .ql-tooltip.ql-editing a.ql-action::after { content: "Saqlash"; }

/* ---------- Tables ---------- */
.a-table-wrap {
  position: relative; /* contains the absolutely positioned .a-sr-only header labels inside the scroll area */
  background: var(--a-surface); border: 1px solid var(--a-border);
  border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm);
  overflow-x: auto; -webkit-overflow-scrolling: touch;
}
.a-card .a-table-wrap { border: 0; border-radius: 0 0 var(--a-radius) var(--a-radius); box-shadow: none; }
.a-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.a-table th {
  padding: 11px 16px; text-align: left; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--a-muted); letter-spacing: .01em;
  background: var(--a-surface-2); border-bottom: 1px solid var(--a-border);
}
.a-table th:first-child { border-top-left-radius: var(--a-radius); }
.a-table th:last-child { border-top-right-radius: var(--a-radius); }
.a-table td { padding: 12px 16px; border-bottom: 1px solid var(--a-divider); vertical-align: middle; color: var(--a-text-2); }
.a-table tbody tr:last-child td { border-bottom: 0; }
.a-table tbody tr { transition: background-color .12s; }
.a-table tbody tr:hover td { background: #FAFAFC; }
.a-table tr[data-href] { cursor: pointer; }
.a-table .a-col-actions { width: 1%; white-space: nowrap; text-align: right; }
.a-table .a-col-thumb { width: 1%; padding-right: 4px; }
.a-table .a-col-handle { width: 1%; padding-right: 0; padding-left: 10px; }
.a-table .a-col-toggle { width: 1%; white-space: nowrap; }
.a-table .a-col-num { text-align: right; font-variant-numeric: tabular-nums; }
.a-cell-title { display: block; font-weight: 600; font-size: 13.5px; color: var(--a-text); line-height: 1.35; }
a.a-cell-title:hover { color: var(--a-primary); }
.a-cell-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--a-muted); line-height: 1.4; }
.a-cell-clip { display: block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-drag-handle {
  display: inline-grid; place-items: center; width: 28px; height: 32px; border-radius: 7px;
  color: #A6ACB8; cursor: grab; touch-action: none;
}
.a-drag-handle:hover { background: #EEF0F3; color: var(--a-text-2); }
.a-drag-handle:active { cursor: grabbing; }
.a-sortable-ghost td { background: var(--a-primary-50) !important; }
.a-sortable-ghost { opacity: .9; }
.a-sortable-chosen td { background: #FBF7F9; }
.a-sortable-drag { box-shadow: var(--a-shadow-lg); }
/* Hidden-from-site rows fade, but their switch and actions stay fully visible. */
tr.is-muted td:not(.a-col-toggle):not(.a-col-actions) { opacity: .55; }

/* Thumbnails */
.a-thumb {
  position: relative; display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: 48px; height: 48px; border-radius: 10px;
  background: #F1F2F5; border: 1px solid var(--a-divider); color: #B4BAC5;
}
.a-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.a-thumb.is-contain { background: #fff; }
.a-thumb.is-contain img { object-fit: contain; padding: 4px; }
.a-thumb-sm { width: 36px; height: 36px; border-radius: 8px; }
.a-thumb-lg { width: 72px; height: 72px; border-radius: 12px; }
.a-thumb-wide { width: 96px; height: 56px; border-radius: 9px; }
.a-thumb-xl { width: 160px; height: 100px; border-radius: 12px; }

/* ---------- Badges ---------- */
.a-badge {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap;
  background: #F0F1F4; color: #4B5263;
}
.a-badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.a-badge-gray { background: #F0F1F4; color: #4B5263; }
.a-badge-green { background: var(--a-success-bg); color: var(--a-success); }
.a-badge-red { background: var(--a-danger-bg); color: var(--a-danger-600); }
.a-badge-amber { background: var(--a-warning-bg); color: var(--a-warning); }
.a-badge-blue { background: var(--a-info-bg); color: var(--a-info); }
.a-badge-primary { background: var(--a-primary-50); color: var(--a-primary); }

/* ---------- Filter tabs ---------- */
.a-tabs {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  padding: 4px; background: #E9EBEF; border-radius: 12px; overflow-x: auto; scrollbar-width: none;
}
.a-tabs::-webkit-scrollbar { display: none; }
.a-tab {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent;
  font-size: 13px; font-weight: 600; color: var(--a-text-2); white-space: nowrap;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.a-tab:hover { color: var(--a-text); background: rgba(255, 255, 255, .5); }
.a-tab.is-active { background: var(--a-surface); color: var(--a-text); box-shadow: var(--a-shadow-sm); }
.a-tab:focus-visible { outline: none; box-shadow: var(--a-ring); }
.a-tab-count {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  display: inline-grid; place-items: center;
  background: rgba(26, 29, 38, .07); color: var(--a-muted); font-size: 11.5px; font-weight: 600;
}
.a-tab.is-active .a-tab-count { background: var(--a-primary-50); color: var(--a-primary); }
.a-tab .a-dot-error { width: 7px; height: 7px; border-radius: 50%; background: var(--a-danger); }

/* Section tabs (settings) */
.a-section-tabs { margin-bottom: 20px; }

/* ---------- Search ---------- */
.a-search { position: relative; display: flex; align-items: center; width: 300px; max-width: 100%; margin: 0; }
.a-search-icon { position: absolute; left: 12px; color: var(--a-faint); pointer-events: none; }
.a-search-input {
  width: 100%; height: 40px; padding: 0 38px 0 38px;
  border: 1px solid var(--a-border-strong); border-radius: var(--a-radius-md); background: var(--a-surface);
  font-size: 14px; transition: border-color .15s, box-shadow .15s;
  -webkit-appearance: none; appearance: none;
}
.a-search-input:focus { outline: none; border-color: var(--a-primary); box-shadow: var(--a-ring); }
.a-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.a-search-clear {
  position: absolute; right: 6px; width: 28px; height: 28px; border-radius: 7px;
  display: grid; place-items: center; color: var(--a-muted);
}
.a-search-clear:hover { background: var(--a-bg); color: var(--a-text); }

/* ---------- Empty state ---------- */
.a-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px;
  padding: 48px 24px; background: var(--a-surface);
  border: 1px solid var(--a-border); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm);
}
.a-card .a-empty, .a-empty.is-plain { border: 0; box-shadow: none; background: transparent; }
.a-empty-icon {
  width: 52px; height: 52px; border-radius: 16px; margin-bottom: 6px;
  display: grid; place-items: center; background: var(--a-primary-50); color: var(--a-primary);
}
.a-empty-title { font-size: 15px; font-weight: 600; color: var(--a-text); }
.a-empty-text { max-width: 420px; color: var(--a-muted); font-size: 13.5px; }
.a-empty .a-btn { margin-top: 10px; }

/* ---------- Alerts ---------- */
.a-alert {
  display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
  border-radius: 12px; border: 1px solid transparent; font-size: 13.5px; line-height: 1.5;
}
.a-alert .a-icon { margin-top: 1px; }
.a-alert-danger { background: var(--a-danger-bg); border-color: #F8CFCF; color: #991B1B; }
.a-alert-warning { background: var(--a-warning-bg); border-color: #F8DDB2; color: #92400E; }
.a-alert-success { background: var(--a-success-bg); border-color: #C3E8D1; color: #166534; }
.a-alert-info { background: var(--a-info-bg); border-color: #CCDBFB; color: #1E3A8A; }

/* ---------- Form actions (sticky) ---------- */
.a-form-actions {
  position: sticky; bottom: 16px; z-index: 30;
  display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
  margin-top: 24px; padding: 12px 14px 12px 18px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(8px);
  -webkit-backdrop-filter: saturate(160%) blur(8px);
  border: 1px solid var(--a-border); border-radius: var(--a-radius);
  box-shadow: 0 10px 30px -12px rgba(16, 24, 40, .2), 0 1px 2px rgba(16, 24, 40, .04);
}
.a-form-actions-extra { margin-right: auto; display: flex; align-items: center; gap: 10px; color: var(--a-muted); font-size: 13px; }
.a-form-actions-extra:empty { display: none; }

/* ---------- Pagination ---------- */
.a-pagination { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 16px; }
.a-pagination-info { font-size: 13px; color: var(--a-muted); font-variant-numeric: tabular-nums; }
.a-pagination-list { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; flex-wrap: wrap; }
.a-page {
  min-width: 36px; height: 36px; padding: 0 10px; border-radius: 9px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--a-border); background: var(--a-surface);
  font-size: 13px; font-weight: 600; color: var(--a-text-2); font-variant-numeric: tabular-nums;
}
a.a-page:hover { border-color: var(--a-border-strong); color: var(--a-text); background: var(--a-surface-2); }
.a-page.is-active { background: var(--a-primary); border-color: var(--a-primary); color: #fff; }
.a-page.is-disabled { color: var(--a-faint); background: transparent; }
.a-page.is-dots { border-color: transparent; background: transparent; color: var(--a-faint); }

/* ---------- Toasts ---------- */
.a-toasts {
  /* Bottom-right, above the sticky form bar, so a toast never covers the page's primary action. */
  position: fixed; right: 20px; bottom: 96px; z-index: 120;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
  pointer-events: none;
}
.a-toast {
  pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  width: 360px; max-width: calc(100vw - 32px);
  padding: 12px 10px 12px 14px;
  background: var(--a-surface); color: var(--a-text);
  border: 1px solid var(--a-border); border-radius: 12px; box-shadow: var(--a-shadow-lg);
  font-size: 13.5px; font-weight: 500; line-height: 1.45;
  animation: a-toast-in .22s var(--a-ease);
}
.a-toast.is-leaving { animation: a-toast-out .2s ease forwards; }
.a-toast-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; margin-top: -1px; }
.a-toast-success .a-toast-icon { background: var(--a-success-bg); color: var(--a-success); }
.a-toast-error .a-toast-icon { background: var(--a-danger-bg); color: var(--a-danger); }
.a-toast-info .a-toast-icon { background: var(--a-info-bg); color: var(--a-info); }
.a-toast-text { flex: 1; padding-top: 2px; }
.a-toast-close {
  width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; flex: none;
  display: grid; place-items: center; color: var(--a-faint);
}
.a-toast-close:hover { background: var(--a-bg); color: var(--a-text); }
@keyframes a-toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes a-toast-out { to { opacity: 0; transform: translateY(6px); } }

/* ---------- Modal ---------- */
.a-modal {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: center; padding: 16px;
  background: rgba(17, 19, 26, .48);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: a-fade .15s ease;
}
.a-modal-dialog {
  width: 100%; max-width: 420px; padding: 24px;
  background: var(--a-surface); border-radius: 16px; box-shadow: var(--a-shadow-lg);
  animation: a-pop .2s var(--a-ease);
}
.a-modal-icon {
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px;
  background: var(--a-danger-bg); color: var(--a-danger);
}
.a-modal-title { font-size: 16px; font-weight: 600; color: var(--a-text); }
.a-modal-text { margin-top: 6px; color: var(--a-muted); font-size: 14px; }
.a-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
@keyframes a-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes a-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } to { opacity: 1; transform: none; } }
body.a-no-scroll { overflow: hidden; }

/* ---------- Dashboard ---------- */
.a-kpis { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 24px; }
@media (min-width: 1100px) { .a-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.a-kpi {
  position: relative; display: flex; flex-direction: column; gap: 14px;
  padding: 18px 18px 16px; background: var(--a-surface);
  border: 1px solid var(--a-border); border-radius: var(--a-radius); box-shadow: var(--a-shadow-sm);
  color: var(--a-text); transition: border-color .15s, box-shadow .15s, transform .15s;
}
a.a-kpi:hover { border-color: var(--a-primary-200); box-shadow: var(--a-shadow); color: var(--a-text); }
.a-kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.a-kpi-icon { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--a-primary-50); color: var(--a-primary); }
.a-kpi-icon.is-red { background: var(--a-danger-bg); color: var(--a-danger); }
.a-kpi-icon.is-blue { background: var(--a-info-bg); color: var(--a-info); }
.a-kpi-icon.is-green { background: var(--a-success-bg); color: var(--a-success); }
.a-kpi-icon.is-amber { background: var(--a-warning-bg); color: var(--a-warning); }
.a-kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.a-kpi-label { font-size: 13px; color: var(--a-muted); font-weight: 500; margin-top: 6px; }
.a-kpi-arrow { color: var(--a-faint); }
a.a-kpi:hover .a-kpi-arrow { color: var(--a-primary); }

.a-dash-grid { display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 1100px) { .a-dash-grid { grid-template-columns: minmax(0, 1fr) 360px; } }

.a-list { list-style: none; margin: 0; padding: 0; }
.a-list-item { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--a-divider); }
.a-list-item:last-child { border-bottom: 0; }
.a-list-main { flex: 1; min-width: 0; }
.a-list-main .a-cell-title, .a-list-main .a-cell-sub { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.a-list-side { display: flex; align-items: center; gap: 8px; flex: none; }
a.a-list-item { color: var(--a-text); }
a.a-list-item:hover { background: #FAFAFC; color: var(--a-text); }

.a-quick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.a-quick-item {
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
  padding: 14px; border-radius: 12px; border: 1px solid var(--a-border); background: var(--a-surface-2);
  color: var(--a-text); font-weight: 600; font-size: 13.5px; line-height: 1.3;
  transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.a-quick-item:hover { border-color: var(--a-primary-200); background: var(--a-primary-50); color: var(--a-text); }
.a-quick-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--a-surface); color: var(--a-primary); border: 1px solid var(--a-border); }

.a-warn-card { border-color: #F5D9A8; }
.a-warn-card .a-card-head { background: #FFFAF0; border-bottom-color: #F7E6C6; border-radius: var(--a-radius) var(--a-radius) 0 0; }
.a-warn-title { display: flex; align-items: center; gap: 8px; color: var(--a-warning); }

/* ---------- Detail (lead) ---------- */
.a-dl { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0; margin: 0; }
.a-dl-row { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--a-divider); }
.a-dl-row:last-child { border-bottom: 0; }
.a-dl dt { color: var(--a-muted); font-size: 13px; font-weight: 500; }
.a-dl dd { margin: 0; color: var(--a-text); font-size: 14px; overflow-wrap: anywhere; }
.a-message { white-space: pre-line; line-height: 1.6; }
.a-contact-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.a-btn-whatsapp { background: #E7F8EE; color: #128C4A; }
.a-btn-whatsapp:hover { background: #D3F2E0; color: #0F7A40; }

/* ---------- Auth (login) ---------- */
.a-auth {
  min-height: 100vh; display: grid; place-items: center; padding: 32px 16px;
  background:
    radial-gradient(900px 480px at 0% 0%, rgba(106, 46, 77, .10), transparent 60%),
    radial-gradient(700px 420px at 100% 100%, rgba(106, 46, 77, .08), transparent 60%),
    var(--a-bg);
}
.a-auth-card {
  width: 100%; max-width: 420px; padding: 32px;
  background: var(--a-surface); border: 1px solid var(--a-border);
  border-radius: 18px; box-shadow: var(--a-shadow-lg);
}
.a-auth-brand { display: flex; justify-content: center; align-items: center; gap: 10px; min-height: 48px; margin-bottom: 22px; }
.a-auth-brand img { max-height: 52px; max-width: 240px; width: auto; object-fit: contain; }
.a-auth-brand .a-brand-name { color: var(--a-text); font-size: 17px; }
.a-auth-title { font-size: 20px; font-weight: 700; text-align: center; letter-spacing: -.01em; }
.a-auth-sub { margin-top: 4px; text-align: center; color: var(--a-muted); font-size: 13.5px; }
.a-auth-form { margin-top: 24px; }
.a-auth-foot { margin-top: 20px; text-align: center; font-size: 12.5px; color: var(--a-faint); }
.a-error-card { text-align: center; }
.a-error-code { margin-bottom: 14px; font-size: 56px; font-weight: 700; line-height: 1; letter-spacing: -.04em; color: var(--a-primary); font-variant-numeric: tabular-nums; }
.a-error-card .a-auth-sub { margin-top: 8px; }
.a-error-actions { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 1023.98px) {
  :root { --a-pad-x: 20px; --a-pad-y: 22px; }
  .a-sidebar {
    width: min(300px, 86vw); box-shadow: none;
    transform: translateX(-100%); visibility: hidden;
    transition: transform .25s var(--a-ease), visibility 0s linear .25s;
  }
  .a-sidebar-open .a-sidebar { transform: none; visibility: visible; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); transition: transform .25s var(--a-ease); }
  .a-sidebar-open .a-overlay { opacity: 1; }
  .a-sidebar .a-sidebar-close { display: inline-grid; }
  .a-main { margin-left: 0; }
  .a-topbar .a-burger { display: inline-grid; margin-left: -6px; }
}
@media (max-width: 767.98px) {
  :root { --a-pad-x: 16px; --a-pad-y: 18px; }
  .a-topbar { gap: 8px; }
  .a-crumb-hide-sm { display: none; }
  .a-user-name, .a-user-btn > .a-icon { display: none; }
  .a-user-btn { padding: 0 4px; }
  .a-site-link-text { display: none; }
  .a-site-link { width: 40px; padding: 0; }
  .a-page-title { font-size: 20px; }
  .a-page-header-row { align-items: flex-start; }
  .a-page-actions { width: 100%; }
  .a-toolbar { align-items: stretch; }
  .a-toolbar-start, .a-toolbar-end { width: 100%; }
  .a-search { width: 100%; }
  .a-card-head, .a-card-body { padding-left: 16px; padding-right: 16px; }
  .a-list-item { padding-left: 16px; padding-right: 16px; }
  .a-dl-row { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .a-kpi-value { font-size: 24px; }
  .a-toasts { left: 12px; right: 12px; bottom: 84px; align-items: stretch; }
  .a-toast { width: auto; max-width: none; }
  .a-form-actions { bottom: 10px; padding: 10px; }
  .a-form-actions .a-btn { flex: 1; }
  .a-auth-card { padding: 24px 20px; }
  .a-table th, .a-table td { padding-left: 12px; padding-right: 12px; }
  .a-table .a-hide-sm { display: none; }
  .a-cell-clip { max-width: 52vw; }
  .a-table .a-thumb-wide { width: 72px; height: 44px; }
}

@media (pointer: coarse) {
  .a-btn-sm { --a-btn-h: 40px; }
  .a-drag-handle { width: 36px; height: 40px; }
  .a-lang-tab { height: 32px; padding: 0 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

@media print {
  .a-sidebar, .a-topbar, .a-form-actions, .a-toasts { display: none !important; }
  .a-main { margin: 0; }
}
