/* ============================================================
   PORTAL OPTK — BARANTIN
   CSS v2.0.0 — Clean rebuild
   Pendekatan baru:
   - Tidak ada fixed column count, pakai auto-fit minmax
   - Semua warna pakai CSS custom properties
   - Modal pakai position:fixed + flex (bukan <dialog>)
   - Tidak ada glass-morphism kompleks di grid items
   ============================================================ */

/* ── Tokens ── */
:root {
  --amber:        #BC8E4F;
  --amber-light:  #f6eee2;
  --amber-mid:    #e5cfad;
  --orange:       #3EBC91;
  --green:        #3D7A49;
  --red:          #0C431A;

  --ivory:        #f2f8f4;
  --surface:      hsl(0, 0%, 100%);
  --border:       #c7d9cb;
  --border-dark:  #8eb598;

  --text-h:       #0C431A;
  --text-b:       #12361f;
  --text-m:       #2d5b3b;

  --font-ui:   'Inter', system-ui, sans-serif;
  --font-head: 'Inter', system-ui, sans-serif;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 3px hsla(30,20%,10%,.06), 0 1px 2px hsla(30,20%,10%,.04);
  --shadow-md: 0 4px 12px hsla(30,20%,10%,.08), 0 2px 4px hsla(30,20%,10%,.05);
  --shadow-lg: 0 12px 32px hsla(30,20%,10%,.12), 0 4px 8px hsla(30,20%,10%,.06);

  --trans: 0.2s ease;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, svg { display: block; }
button { cursor: pointer; font-family: inherit; }
input, select { font-family: inherit; }

html {
  overflow-x: hidden;
}

body {
  font-family: var(--font-ui);
  background: var(--ivory);
  color: var(--text-b);
  line-height: 1.6;
  font-size: 16px;
  min-height: 100vh;
  overflow-x: hidden;
}

/* ── Container ── */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* ════════════════════════════════════════
   HEADER
════════════════════════════════════════ */
.site-header {
  background: var(--surface);
  border-bottom: 2px solid var(--amber);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.9rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-icon {
  width: 36px;
  height: 36px;
  color: var(--amber);
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: .08em;
  color: var(--text-h);
}

.brand-sub {
  font-size: 0.72rem;
  color: var(--text-b);
  letter-spacing: .03em;
  line-height: 1.2;
  font-weight: 600;
}

.status-badge {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-b);
  background: var(--ivory);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 0.35rem 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  flex-shrink: 0;
}

/* JS adds .connected class to #pb-status-wrap */
#pb-status-wrap.connected .status-dot   { background: var(--green); }
#pb-status-wrap.connected               { color: var(--green); border-color: hsla(142,55%,38%,.3); }

/* ════════════════════════════════════════
   HERO
════════════════════════════════════════ */
.hero-section {
  background: linear-gradient(135deg, #edf6ef 0%, #d9f6ec 100%);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0 2rem;
}

.hero-title {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text-h);
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.hero-title span {
  color: var(--amber);
}

.hero-desc {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: var(--text-b);
  max-width: 680px;
  line-height: 1.65;
  font-weight: 500;
}

/* ════════════════════════════════════════
   APP BODY
════════════════════════════════════════ */
.app-body {
  padding-top: 1.75rem;
  padding-bottom: 3rem;
}

/* ════════════════════════════════════════
   TAB NAVIGATION
════════════════════════════════════════ */
.tab-nav {
  display: flex;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.3rem;
  width: 100%;
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

.tab-nav::-webkit-scrollbar {
  display: none;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-m);
  font-size: 0.88rem;
  font-weight: 600;
  transition: var(--trans);
  white-space: nowrap;
}

.tab-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.tab-btn:hover {
  background: var(--amber-light);
  color: var(--text-h);
}

.tab-btn.active {
  background: var(--amber);
  color: var(--text-h);
  box-shadow: 0 2px 8px rgba(188, 142, 79, 0.35);
}

/* ════════════════════════════════════════
   FILTER PANEL
════════════════════════════════════════ */
.filter-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
}

/* Search */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-ico {
  position: absolute;
  left: 0.9rem;
  width: 18px;
  height: 18px;
  color: var(--text-m);
  pointer-events: none;
  flex-shrink: 0;
}

.search-input {
  width: 100%;
  padding: 0.75rem 2.6rem 0.75rem 2.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--ivory);
  color: var(--text-h);
  font-size: 0.95rem;
  outline: none;
  transition: border-color var(--trans), box-shadow var(--trans);
}

.search-input:focus {
  border-color: var(--amber);
  box-shadow: 0 0 0 3px rgba(188, 142, 79, 0.18);
}

.clear-btn {
  position: absolute;
  right: 0.8rem;
  background: none;
  border: none;
  color: var(--text-m);
  font-size: 1.3rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  transition: color var(--trans);
}
.clear-btn:hover { color: var(--text-h); }

/* Filter rows */
.filter-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.filter-select {
  flex: 1 1 180px;
  min-width: 0;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--ivory);
  color: var(--text-h);
  font-size: 0.88rem;
  outline: none;
  transition: border-color var(--trans);
  cursor: pointer;
}
.filter-select:focus { border-color: var(--amber); }

/* ════════════════════════════════════════
   CARD GRID
   Pola sama persis dengan .map-layout yang sudah terbukti
   responsive di semua device: explicit columns + breakpoint tegas.
   Tidak pakai auto-fill/minmax yang bermasalah di Android.
════════════════════════════════════════ */
.results-area {
  width: 100%;
  min-width: 0;
}

.list-cards-section {
  width: 100%;
  min-width: 0;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.1rem;
  width: 100%;
}

/* ── Individual Card ── */
.data-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  min-width: 0;
  cursor: pointer;
  transition: border-color var(--trans), box-shadow var(--trans), transform var(--trans);
  box-shadow: var(--shadow-sm);
}

.data-card:hover {
  border-color: var(--amber);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.data-card:active {
  transform: translateY(0);
}

/* Card top row */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
}

.card-num {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--amber);
  background: var(--amber-light);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}

/* Badges / Tags */
.card-tag {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  border: 1px solid;
  flex-shrink: 0;
}

.tag-a1    { color: hsl(265,70%,55%); background: hsl(265,70%,95%); border-color: hsl(265,70%,85%); }
.tag-a2    { color: var(--amber);      background: var(--amber-light); border-color: var(--amber-mid); }
.tag-hi    { color: var(--red);        background: #deeee2; border-color: #96bca0; }
.tag-med   { color: #2a8b6b;           background: #dcf5ed; border-color: #9fd7c8; }
.tag-lo    { color: var(--green);      background: #e7f3ea; border-color: #b9d8bf; }
.tag-ban   { color: var(--red);        background: #deeee2; border-color: #96bca0; }

/* Card title */
.card-title {
  font-size: clamp(0.95rem, 2.5vw, 1.05rem);
  font-weight: 700;
  color: var(--text-h);
  line-height: 1.35;
  font-style: italic;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-m);
  font-style: normal;
  font-weight: 500;
  margin-top: 0.15rem;
  line-height: 1.4;
  word-break: break-word;
}

/* Card fields */
.card-fields {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  flex: 1;
}

.field-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-m);
  line-height: 1.2;
}

.field-value {
  font-size: 0.83rem;
  color: var(--text-b);
  line-height: 1.45;
  word-break: break-word;
  overflow-wrap: anywhere;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

/* Card footer */
.card-foot {
  display: flex;
  justify-content: flex-end;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--amber);
  margin-top: auto;
}

.card-foot-link {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap var(--trans);
}

.data-card:hover .card-foot-link { gap: 0.55rem; }

/* ════════════════════════════════════════
   STATE: LOADING / EMPTY
════════════════════════════════════════ */
.state-loading,
.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 4rem 1rem;
  text-align: center;
  color: var(--text-m);
}

.state-empty svg {
  width: 52px;
  height: 52px;
  opacity: .4;
}

.state-empty h3 {
  font-size: 1.2rem;
  color: var(--text-h);
  font-weight: 700;
}

.state-empty p {
  font-size: 0.9rem;
}

/* Spinner */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--amber);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.mini-spinner {
  width: 22px;
  height: 22px;
  border-width: 2.5px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ════════════════════════════════════════
   PAGINATION
════════════════════════════════════════ */
.pag-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0.65rem 1rem;
  box-shadow: var(--shadow-sm);
}

.pag-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--ivory);
  color: var(--text-h);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--trans);
}

.pag-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.pag-btn:hover:not(:disabled) {
  background: var(--amber);
  color: var(--text-h);
  border-color: var(--amber);
}

.pag-btn:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pag-info {
  font-size: 0.83rem;
  color: var(--text-b);
  font-weight: 600;
}

/* ════════════════════════════════════════
   MAP TAB
════════════════════════════════════════ */
.map-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 1.25rem;
  min-height: 580px;
}

.map-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-height: 680px;
  box-shadow: var(--shadow-sm);
}

.map-sidebar h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-h);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.6rem;
}

.map-pest-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  overflow-y: auto;
  flex: 1;
}

.map-pest-list::-webkit-scrollbar { width: 4px; }
.map-pest-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

.map-pest-item {
  text-align: left;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.6rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-b);
  transition: var(--trans);
  cursor: pointer;
}

.map-pest-item:hover { border-color: var(--amber); background: var(--amber-light); }
.map-pest-item.active { background: var(--amber); color: var(--text-h); border-color: var(--amber); }
.map-pest-item .pest-sub { font-size: 0.73rem; opacity: .75; font-weight: 400; margin-top: 0.1rem; }

.map-display-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: var(--shadow-sm);
}

.map-toggle-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.map-toggle-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--ivory);
  color: var(--text-m);
  font-size: 0.85rem;
  font-weight: 600;
  transition: var(--trans);
}
.map-toggle-btn:hover { border-color: var(--amber); color: var(--text-h); }
.map-toggle-btn.active { background: var(--amber-light); color: var(--amber); border-color: var(--amber); }

.map-visualizer-container {
  background: hsl(40,20%,94%);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  height: 420px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-loading-indicator {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.2rem 2rem;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 10;
}

.map-svg-wrapper {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.map-svg-wrapper svg { max-width: 100%; max-height: 100%; width: 100%; height: auto; }
.map-svg-wrapper path { fill: #d7e6db; stroke: var(--ivory); stroke-width: 1.2; transition: all .2s ease; cursor: pointer; }
.map-svg-wrapper path:hover { fill: #9fd7c8; stroke: var(--green); stroke-width: 2; }
.map-svg-wrapper path.infected { fill: rgba(61, 122, 73, 0.68); stroke: #0C431A; stroke-width: 1.8; animation: pulse 2s ease-in-out infinite alternate; }
.map-svg-wrapper path.infected:hover { fill: rgba(12, 67, 26, 0.82); }

@keyframes pulse {
  from { fill: rgba(61, 122, 73, 0.5); }
  to   { fill: rgba(61, 122, 73, 0.78); }
}

.floating-tooltip {
  position: absolute;
  pointer-events: none;
  background: hsla(30,20%,12%,.9);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  transform: translate(-50%, -110%);
  z-index: 50;
  white-space: nowrap;
}

.map-legend {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.82rem;
  color: var(--text-b);
  font-weight: 600;
}

.legend-item { display: flex; align-items: center; gap: 0.5rem; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.legend-infected { background: rgba(61, 122, 73, 0.68); border: 1px solid #0C431A; }
.legend-free { background: #d7e6db; border: 1px solid var(--border); }

.map-info-box {
  background: var(--ivory);
  border: 1px solid var(--amber-mid);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
}

.map-info-box h4 { font-size: 1rem; font-weight: 700; color: var(--text-h); margin-bottom: 0.15rem; }
.map-info-box p { font-size: 0.82rem; color: var(--amber); font-style: italic; margin-bottom: 0.5rem; }
.info-box-desc { font-size: 0.83rem; color: var(--text-m); line-height: 1.5; }
.info-box-desc strong { color: var(--text-b); }

/* ════════════════════════════════════════
   MODAL OVERLAY
   Prinsip: position:fixed, inset:0, display:flex
   Paling reliable di semua browser & Android
════════════════════════════════════════ */
.modal-overlay {
  /* Hidden by default */
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.55);
  /* Center the modal-box */
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* JS adds this class to show the modal */
.modal-overlay.open {
  display: flex;
}

.modal-box {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  width: 100%;
  max-width: 620px;
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  animation: slideUp 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(28px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--ivory);
  color: var(--text-m);
  font-size: 1.2rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--trans);
}

.modal-close:hover { background: var(--amber); color: var(--text-h); border-color: var(--amber); }

.modal-badge-wrap { display: flex; }

.modal-badge {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: var(--radius-sm);
  border: 1px solid;
}

.modal-title {
  font-size: clamp(1.2rem, 3vw, 1.7rem);
  font-weight: 700;
  color: var(--text-h);
  line-height: 1.25;
  font-style: italic;
  padding-right: 2.5rem;
}

.modal-subtitle {
  font-size: 0.88rem;
  color: var(--text-m);
  font-weight: 500;
}

.modal-divider {
  height: 1px;
  background: var(--border);
  margin: 0.25rem 0;
}

/* Modal body rows */
.modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.m-field {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.m-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-m);
}

.m-value {
  font-size: 0.92rem;
  color: var(--text-b);
  line-height: 1.55;
}

/* ════════════════════════════════════════
   FOOTER
════════════════════════════════════════ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-m);
}

/* ════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════ */

/* Tablet */
@media (max-width: 900px) {
  .map-layout {
    grid-template-columns: 1fr;
    min-height: unset;
  }
  .map-sidebar {
    max-height: 280px;
  }
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile */
@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .status-badge {
    width: 100%;
    justify-content: center;
  }

  .hero-section {
    padding: 1.5rem 0 1.25rem;
  }

  .tab-btn {
    flex: 0 0 auto;
    justify-content: center;
    font-size: 0.78rem;
    padding: 0.5rem 0.75rem;
  }

  .tab-btn svg {
    width: 15px;
    height: 15px;
  }

  /* Cards media/dilarang: 1 kolom di mobile */
  .card-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.9rem;
  }

  .filter-row {
    flex-direction: column;
  }

  .filter-select {
    flex: 1 1 auto;
    width: 100%;
  }

  /* Pagination compact */
  .pag-bar {
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0.75rem;
    gap: 0.5rem;
  }

  .pag-btn span {
    display: none;
  }

  .pag-btn {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }

  .pag-info {
    flex: 1 1 100%;
    text-align: center;
    font-size: 0.78rem;
    order: -1;
  }

  /* Modal full-width sheet on mobile */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal-box {
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-width: 100%;
    max-height: 90vh;
    padding: 1.5rem 1.25rem;
  }
}

@media (max-width: 400px) {
  .container { padding-inline: 0.9rem; }
  .filter-panel { padding: 0.9rem; }
  .card-grid { gap: 0.85rem; }
  .data-card { padding: 1rem; }
}
