/* ════════════════════════════════════════════════════════════════════════════
   UTM Tracker — CSS propio (sin Tailwind, sin DaisyUI)
   Colorimetría Allianz. Todos los componentes definidos aquí.
════════════════════════════════════════════════════════════════════════════ */

/* ── Variables ──────────────────────────────────────────────────────────── */
:root {
  --navy:      #1e3a6e;
  --navy-dark: #162e58;
  --blue:      #0087DB;
  --green:     #00C851;
  --yellow:    #D97706;
  --red:       #DC2626;
  --gray-50:   #f8fafc;
  --gray-100:  #f1f5f9;
  --gray-200:  #e2e8f0;
  --gray-300:  #cbd5e1;
  --gray-400:  #94a3b8;
  --gray-500:  #64748b;
  --gray-700:  #374151;
  --gray-900:  #111827;
  --sidebar-w: 252px;
  --topbar-h:  56px;
  --radius:    10px;
  --radius-sm: 6px;
  --shadow:    0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
}

/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--gray-900);
  background: #eef2f7;
}
a { color: var(--navy); }
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; font-size: inherit; }
code, .font-mono { font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace; }

/* ── Layout shell ───────────────────────────────────────────────────────── */
.app-sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--navy);
  border-right: none;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 40;
  overflow-y: auto;
}

.app-sidebar-brand {
  padding: 18px 16px 14px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  color: #fff;
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
}

.app-sidebar nav { padding: 8px 8px 24px; flex: 1; }

.nav-section-title {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
  padding: 16px 8px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: rgba(255,255,255,.68);
  text-decoration: none;
  transition: background .12s, color .12s;
  margin-bottom: 1px;
}
.nav-link:hover  { background: rgba(255,255,255,.1); color: #fff; }
.nav-link.active { background: rgba(255,255,255,.18); color: #fff; font-weight: 700; }
.nav-link svg    { opacity: .5; flex-shrink: 0; }
.nav-link.active svg { opacity: 1; }

.sidebar-user {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255,255,255,.1);
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.sidebar-user-avatar span { font-size: .7rem; font-weight: 800; color: #fff; }
.sidebar-user-name  { font-size: .78rem; font-weight: 600; color: rgba(255,255,255,.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role  { font-size: .7rem; color: rgba(255,255,255,.38); }
.sidebar-logout     { margin-left: auto; font-size: .72rem; color: rgba(255,100,100,.75); text-decoration: none; flex-shrink: 0; transition: color .12s; }
.sidebar-logout:hover { color: #ff8080; }

.app-main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #eef2f7;
}

.app-topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 3px solid var(--navy);
  display: flex;
  align-items: center;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 30;
  gap: 12px;
}
.app-topbar-title {
  flex: 1;
  font-size: .78rem;
  color: var(--navy);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.app-content { padding: 28px 28px 48px; flex: 1; }

@media (max-width: 1023px) {
  .app-sidebar { transform: translateX(-100%); transition: transform .2s; }
  .app-sidebar.open { transform: translateX(0); }
  .app-main { margin-left: 0; }
}

/* ── Card ───────────────────────────────────────────────────────────────── */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-body { padding: 1.25rem; }
.card-title { font-size: 1rem; font-weight: 700; margin-bottom: .25rem; }

/* ── Button ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .375rem;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: background .14s, color .14s, border-color .14s;
  white-space: nowrap;
  line-height: 1;
}
.btn-primary   { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-primary:hover { background: var(--navy-dark); border-color: var(--navy-dark); }
.btn-ghost     { background: transparent; color: var(--gray-700); border-color: transparent; }
.btn-ghost:hover { background: var(--gray-100); }
.btn-outline   { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-error     { background: var(--red); color: #fff; border-color: var(--red); }
.btn-error:hover { background: #b91c1c; }
.btn-sm        { padding: .35rem .75rem; font-size: .8rem; }
.btn-xs        { padding: .2rem .5rem; font-size: .72rem; border-radius: 5px; }
.btn-lg        { padding: .75rem 1.5rem; font-size: .95rem; }
.btn-square    { padding: 0; width: 2rem; height: 2rem; border-radius: 6px; }
.btn-circle    { padding: 0; width: 2rem; height: 2rem; border-radius: 50%; }
.btn:disabled  { opacity: .45; cursor: default; pointer-events: none; }

/* ── Badge ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  background: var(--gray-200);
  color: var(--gray-700);
  border: 1px solid transparent;
}
.badge-sm      { font-size: .65rem; padding: .1rem .4rem; }
.badge-xs      { font-size: .6rem;  padding: .05rem .3rem; }
.badge-success { background: #dcfce7; color: #15803d; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-primary { background: #dbeafe; color: var(--navy); }
.badge-secondary { background: #f3e8ff; color: #7e22ce; }
.badge-info    { background: #e0f2fe; color: #0369a1; }
.badge-ghost   { background: var(--gray-100); color: var(--gray-500); }
.badge-neutral { background: var(--gray-200); color: var(--gray-700); }
.badge-error   { background: #fee2e2; color: var(--red); }
.badge-accent  { background: #d1fae5; color: #065f46; }
.badge-outline { background: transparent; border-color: currentColor; }

/* ── Table ──────────────────────────────────────────────────────────────── */
.overflow-x-auto { overflow-x: auto; }

table, .table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}
.table th {
  text-align: left;
  padding: .6rem .75rem;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(0,0,0,.38);
  border-bottom: 2px solid var(--navy);
  white-space: nowrap;
  background: #fff;
}
.table td {
  padding: .55rem .75rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--gray-50); }
.table tfoot td { padding: .55rem .75rem; background: var(--gray-50); font-weight: 700; border-top: 2px solid var(--gray-200); }
.table .text-right, .text-right { text-align: right; }
.table .text-center, .text-center { text-align: center; }

/* ── Forms ──────────────────────────────────────────────────────────────── */
.form-control { display: flex; flex-direction: column; gap: .25rem; }
.label { display: flex; align-items: center; justify-content: space-between; padding: .2rem 0; }
.label-text { font-size: .8rem; font-weight: 600; color: var(--gray-700); }
.label-text-alt { font-size: .72rem; color: var(--gray-400); }

.input, .select {
  width: 100%;
  padding: .55rem .75rem;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: .875rem;
  color: var(--gray-900);
  background: #fff;
  outline: none;
  transition: border-color .15s;
  appearance: auto;
}
.input:focus, .select:focus { border-color: var(--navy); }
.input-sm, .select-sm { padding: .3rem .6rem; font-size: .8rem; }
.input-bordered, .select-bordered { border-color: var(--gray-200); }

/* ── Alert ──────────────────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  border-radius: var(--radius);
  font-size: .875rem;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}
.alert-error   { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.alert-warning { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert-sm      { font-size: .8rem; padding: .6rem .875rem; }

/* ── Stats ──────────────────────────────────────────────────────────────── */
.stats {
  display: flex;
  flex-wrap: wrap;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.stat {
  padding: 1rem 1.5rem;
  flex: 1;
  min-width: 140px;
  border-right: 1px solid var(--gray-100);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat-title  { font-size: .72rem; color: var(--gray-400); margin-bottom: .2rem; text-transform: uppercase; letter-spacing: .04em; }
.stat-value  { font-size: 1.9rem; font-weight: 900; line-height: 1; }
.stat-desc   { font-size: .7rem; color: var(--gray-400); margin-top: .2rem; }
.stat-figure { position: absolute; right: 1rem; top: 50%; transform: translateY(-50%); }

/* ── Modal ──────────────────────────────────────────────────────────────── */
dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: 100vw;
  max-height: 100vh;
  width: 100vw;
  height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
}
dialog[open] { display: flex; }
dialog::backdrop { background: rgba(0,0,0,.45); }

.modal-box {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  padding: 1.5rem;
  max-width: min(90vw, 34rem);
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-box.max-w-xl { max-width: min(90vw, 36rem); }
.modal-box.max-w-lg { max-width: min(90vw, 32rem); }
.modal-box.max-w-md { max-width: min(90vw, 28rem); }

.modal-action {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1rem;
}
dialog form.modal-backdrop { display: none; }

/* ── Tabs ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--gray-200); }
.tab {
  padding: .6rem 1rem;
  font-size: .82rem;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .14s, border-color .14s;
}
.tab:hover { color: var(--gray-900); }
.tab.tab-active { color: var(--navy); border-bottom-color: var(--navy); font-weight: 700; }

/* ── Link ───────────────────────────────────────────────────────────────── */
.link       { color: var(--navy); text-decoration: underline; }
.link-hover { text-decoration: none; }
.link-hover:hover { text-decoration: underline; }
.link-primary { color: var(--navy); }

/* ── Tooltip ────────────────────────────────────────────────────────────── */
.tooltip { position: relative; }
.tooltip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1e293b;
  color: #fff;
  font-size: .7rem;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 100;
}
.tooltip:hover::after { opacity: 1; }
.tooltip-bottom::after { top: calc(100% + 6px); bottom: auto; }

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.avatar-init {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: rgba(0,48,135,.1);
  color: var(--navy);
  font-size: .7rem;
  font-weight: 800;
  flex-shrink: 0;
}
.avatar-init-lg {
  width: 2.5rem; height: 2.5rem;
  font-size: .85rem;
}

/* ── Collapse ───────────────────────────────────────────────────────────── */
.collapse {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}
.collapse > input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 2.4rem;
  top: 0; left: 0;
  cursor: pointer;
  z-index: 1;
  margin: 0;
}
.collapse-title {
  padding: .55rem 2.5rem .55rem .75rem;
  font-size: .8rem;
  font-weight: 500;
  position: relative;
  user-select: none;
}
.collapse-arrow .collapse-title::after {
  content: '›';
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .2s;
  font-size: 1.1rem;
  color: var(--gray-400);
}
.collapse > input[type="checkbox"]:checked ~ .collapse-title::after {
  transform: translateY(-50%) rotate(90deg);
}
.collapse-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
}
.collapse > input[type="checkbox"]:checked ~ .collapse-content {
  max-height: 2000px;
}

/* ── Aura ───────────────────────────────────────────────────────────────── */
.aura {
  position: relative;
  display: inline-flex;
  border-radius: 14px;
  padding: 2px;
}
.aura::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: conic-gradient(
    from var(--_a, 0deg),
    transparent 0deg, currentColor 60deg, transparent 120deg
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: aura-spin 3s linear infinite;
}
@keyframes aura-spin { to { --_a: 360deg; } }
@property --_a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.aura > * { position: relative; z-index: 1; border-radius: 12px; }
.aura-sm { border-radius: 10px; }
.aura-sm > * { border-radius: 8px; }

/* ── Rate chip / semáforo (influencer) ──────────────────────────────────── */
.rate-chip {
  font-family: monospace;
  font-size: .72rem;
  background: var(--gray-100);
  border-radius: 4px;
  padding: 2px 6px;
}
.semaforo-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Layout utilities ───────────────────────────────────────────────────── */
.hidden   { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-nowrap { white-space: nowrap; }
.break-all { word-break: break-all; }
.capitalize { text-transform: capitalize; }
.uppercase  { text-transform: uppercase; }

.flex       { display: flex; }
.flex-col   { flex-direction: column; }
.flex-wrap  { flex-wrap: wrap; }
.flex-1     { flex: 1 1 0%; }
.flex-shrink-0 { flex-shrink: 0; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.items-end     { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.justify-center  { justify-content: center; }
.self-stretch    { align-self: stretch; }

.gap-1   { gap: .25rem; }
.gap-2   { gap: .5rem; }
.gap-3   { gap: .75rem; }
.gap-4   { gap: 1rem; }
.gap-5   { gap: 1.25rem; }
.gap-6   { gap: 1.5rem; }
.gap-x-4 { column-gap: 1rem; }
.gap-y-1 { row-gap: .25rem; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: 1fr 1fr; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.col-span-2  { grid-column: span 2; }

.w-full  { width: 100%; }
.h-full  { height: 100%; }
.min-w-0 { min-width: 0; }
.max-w-2xl { max-width: 42rem; }
.max-w-lg  { max-width: 32rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }

.p-0  { padding: 0; }
.p-3  { padding: .75rem; }
.p-4  { padding: 1rem; }
.p-5  { padding: 1.25rem; }
.px-3 { padding-left: .75rem; padding-right: .75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-5 { padding-left: 1.25rem; padding-right: 1.25rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.py-3 { padding-top: .75rem; padding-bottom: .75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.mt-1 { margin-top: .25rem; }
.mt-2 { margin-top: .5rem; }
.mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; }
.mb-1 { margin-bottom: .25rem; }
.mb-2 { margin-bottom: .5rem; }
.mb-3 { margin-bottom: .75rem; }

.border-t { border-top: 1px solid var(--gray-100); }
.rounded   { border-radius: 6px; }
.rounded-lg { border-radius: 10px; }
.rounded-xl { border-radius: 14px; }
.rounded-full { border-radius: 999px; }

/* ── Typography utilities ───────────────────────────────────────────────── */
.text-xs   { font-size: .72rem; }
.text-sm   { font-size: .82rem; }
.text-base { font-size: .875rem; }
.text-lg   { font-size: 1.1rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-4xl  { font-size: 2.25rem; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }
.tabular-nums  { font-variant-numeric: tabular-nums; }
.leading-tight { line-height: 1.25; }
.leading-snug  { line-height: 1.35; }
.tracking-wide    { letter-spacing: .05em; }
.tracking-widest  { letter-spacing: .12em; }

/* ── Color utilities ────────────────────────────────────────────────────── */
.text-primary { color: var(--navy); }
.text-success { color: #15803d; }
.text-warning { color: var(--yellow); }
.text-error   { color: var(--red); }
.text-muted   { color: var(--gray-400); }
.bg-base-100  { background: #fff; }
.bg-base-200  { background: var(--gray-100); }
.bg-primary   { background: var(--navy); }
.bg-success-soft { background: rgba(0,200,81,.08); }
.opacity-50   { opacity: .5; }

/* ── Misc ───────────────────────────────────────────────────────────────── */
.relative { position: relative; }
.absolute { position: absolute; }
.overflow-hidden { overflow: hidden; }
.cursor-pointer  { cursor: pointer; }
.select-none     { user-select: none; }
.transition      { transition: all .15s; }
.shadow          { box-shadow: var(--shadow); }
.shadow-md       { box-shadow: var(--shadow-md); }
.hover\:shadow-md:hover { box-shadow: var(--shadow-md); }

/* ── Wh-key (webhook preview syntax highlighting) ───────────────────────── */
.wh-key   { color: #93c5fd; }
.wh-val   { color: #86efac; }
.wh-punct { color: #94a3b8; }

/* ── Quick links (acceso rápido) ─────────────────────────────────────────── */
.qlink-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .75rem;
}

.qlink {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  padding: 1.1rem 1.25rem 1rem;
  background: #fff;
  border-radius: var(--radius);
  border: 1.5px solid var(--gray-200);
  border-left: 4px solid var(--qc, var(--navy));
  text-decoration: none;
  transition: box-shadow .15s, border-color .15s, transform .15s;
  position: relative;
  overflow: hidden;
}
.qlink::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--qc, var(--navy));
  opacity: 0;
  transition: opacity .15s;
}
.qlink:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
  transform: translateY(-2px);
}
.qlink:hover::before { opacity: .03; }

.qlink-tag {
  font-size: .6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--qc, var(--navy));
  position: relative;
}
.qlink-title {
  font-size: .9rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
  position: relative;
}
.qlink-desc {
  font-size: .75rem;
  color: var(--gray-400);
  line-height: 1.35;
  position: relative;
  flex: 1;
}
.qlink-cta {
  font-size: .72rem;
  font-weight: 700;
  color: var(--qc, var(--navy));
  margin-top: .5rem;
  position: relative;
  opacity: .7;
  transition: opacity .15s;
}
.qlink:hover .qlink-cta { opacity: 1; }

@media (max-width: 1100px) {
  .qlink-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 700px) {
  .qlink-grid { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 480px) {
  .qlink-grid { grid-template-columns: 1fr !important; }
}

/* ── Filter bar ─────────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: .75rem 1rem;
}

.filter-bar-label {
  font-size: .65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--gray-400);
  white-space: nowrap;
  padding-right: .5rem;
}

.filter-sep {
  width: 1px;
  align-self: stretch;
  background: var(--gray-200);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 130px;
}

.filter-label {
  font-size: .68rem;
  font-weight: 700;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: .06em;
}

.filter-select {
  border: none;
  background: var(--gray-50);
  border-radius: 6px;
  padding: .3rem .5rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--gray-900);
  outline: none;
  cursor: pointer;
  transition: background .12s;
  appearance: auto;
  max-width: 180px;
}
.filter-select:focus,
.filter-select:hover { background: var(--gray-100); }

.filter-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-left: auto;
}

.filter-btn-reset {
  font-size: .78rem;
  font-weight: 600;
  color: var(--gray-400);
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem .6rem;
  border-radius: 6px;
  transition: color .12s, background .12s;
  white-space: nowrap;
}
.filter-btn-reset:hover { color: var(--red); background: #fef2f2; }

.filter-btn-upload {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  font-weight: 700;
  color: var(--navy);
  background: rgba(30,58,110,.06);
  border: 1.5px solid rgba(30,58,110,.2);
  border-radius: 6px;
  padding: .3rem .75rem;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  white-space: nowrap;
}
.filter-btn-upload:hover { background: rgba(30,58,110,.12); border-color: var(--navy); }

.filter-status {
  width: 100%;
  font-size: .72rem;
  color: var(--gray-400);
  margin: 0;
  min-height: 1em;
}

/* responsive */
@media (max-width: 768px) {
  .grid-cols-2, .grid-cols-3, .grid-cols-4 { grid-template-columns: 1fr; }
  .app-content { padding: 16px 16px 32px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-sep { display: none; }
  .filter-group { min-width: 0; }
  .filter-select { max-width: 100%; }
  .filter-actions { margin-left: 0; }
}
