/* =========================================================
   Lab Reports Directory — Elite SaaS UI (v6.1)
   Fixes:
   - Action buttons: TRUE uniform width + centered + sane spacing (no weird 192/150 mismatch)
   - Meta typography: fixes ACTUAL selectors you’re using (.lr-meta-k / .lr-meta-v)
   - Removes broken grid rules on a flex container (your 720px media block was wrong)
   ========================================================= */

.lr-dir-wrap{
  --lr-text: #0f172a;
  --lr-muted: rgba(15,23,42,.66);

  --lr-accent: #0ea5a4;
  --lr-accent-2: #0891b2;

  --lr-dark: #0b1220;

  --lr-border: rgba(15,23,42,.10);
  --lr-border-2: rgba(15,23,42,.16);

  --lr-bg: #eef2f6;
  --lr-surface: #ffffff;
  --lr-surface-2: #f6f8fb;
  --lr-surface-3: #f2f5f9;

  --lr-shadow: 0 18px 60px rgba(15,23,42,.12);
  --lr-shadow-2: 0 10px 28px rgba(15,23,42,.12);

  --lr-radius: 18px;
  --lr-radius-sm: 14px;

  color: var(--lr-text);
  padding-bottom: 24px;
}

/* =========================================================
   General link containment
   ========================================================= */
.lr-dir-wrap a,
.lr-dir-wrap a:visited{
  text-decoration: none;
}

.lr-dir-wrap a.lr-btn,
.lr-dir-wrap button.lr-btn{
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  letter-spacing: -0.01em;
  text-transform: none;
  outline: none;
}

/* =========================================================
   HERO
   ========================================================= */
.lr-dir-hero{ padding: 26px 0 14px; }

.lr-dir-title{
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.lr-dir-intro{
  margin: 0 0 14px;
  max-width: 76ch;
  color: var(--lr-muted);
  font-size: 16px;
  line-height: 1.55;
}

.lr-dir-badges{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.lr-badge{
  display:inline-flex;
  align-items:center;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--lr-border);
  background: rgba(255,255,255,.86);
  box-shadow: 0 8px 22px rgba(15,23,42,.06);
  font-size: 12px;
  color: rgba(15,23,42,.72);
}

/* =========================================================
   FILTER BAR
   ========================================================= */
.lr-dir-filters{
  position: sticky;
  top: 14px;
  z-index: 20;
  margin: 14px 0 18px;
}

.lr-filter-row{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 0.9fr auto auto;
  gap: 12px;
  align-items: end;

  padding: 14px;
  border-radius: var(--lr-radius);
  border: 1px solid var(--lr-border);
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 50px rgba(15,23,42,.10);
}

.lr-field{ display: grid; gap: 6px; min-width: 0; }
.lr-field-label{ font-size: 12px; color: rgba(15,23,42,.68); }

.lr-input,
.lr-select{
  width: 100%;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.14);
  background: #fff;
  padding: 0 12px;
  font-size: 14px;
  outline: none;
}

.lr-input:focus,
.lr-select:focus{
  border-color: rgba(14,165,164,.55);
  box-shadow: 0 0 0 4px rgba(14,165,164,.14);
}

.lr-filter-actions{ display:flex; justify-content:flex-end; }

/* Toggle */
.lr-toggle{ position: relative; display: inline-flex; align-items: center; height: 44px; }
.lr-toggle input{ position:absolute; opacity:0; inset:0; cursor:pointer; }
.lr-toggle-ui{
  width: 52px; height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.16);
  background: #fff;
  position: relative;
  box-shadow: 0 10px 26px rgba(15,23,42,.08);
}
.lr-toggle-ui::after{
  content:"";
  position:absolute;
  top: 50%;
  left: 4px;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  transform: translateY(-50%);
  background: rgba(15,23,42,.22);
  transition: transform 160ms ease, background 160ms ease;
}
.lr-toggle input:checked + .lr-toggle-ui{ border-color: rgba(14,165,164,.32); }
.lr-toggle input:checked + .lr-toggle-ui::after{
  transform: translate(20px, -50%);
  background: var(--lr-accent);
}

/* =========================================================
   PRODUCT CARDS
   ========================================================= */
.lr-dir-list{ display:grid; gap: 16px; }

.lr-prod-card{
  border-radius: var(--lr-radius);
  border: 1px solid var(--lr-border);
  background: linear-gradient(180deg, rgba(14,165,164,.07), rgba(255,255,255,1));
  box-shadow: var(--lr-shadow);
  overflow:hidden;
}

.lr-prod-head{
  display:grid;
  grid-template-columns: 86px 1fr;
  gap: 14px;
  padding: 16px;

  border-bottom: 1px solid rgba(15,23,42,.08);
  background: transparent;
}

.lr-prod-media{
  display:block;
  width: 86px;
  height: 86px;
  border-radius: 16px;
  border: 1px solid rgba(15,23,42,.12);
  background: #fff;
  overflow:hidden;
  box-shadow: var(--lr-shadow-2);
}

.lr-prod-img{ width:100%; height:100%; object-fit: cover; display:block; }
.lr-prod-img--placeholder{
  width:100%; height:100%;
  background: radial-gradient(circle at 30% 30%, rgba(37,99,235,.14), rgba(14,165,164,.10));
}

.lr-prod-title{ margin: 0; font-size: 18px; letter-spacing: -0.01em; }
.lr-prod-title a{ color: var(--lr-text); }

.lr-prod-actions{
  display:flex;
  align-items:center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap:wrap;
}

.lr-prod-count{ font-size: 13px; color: rgba(15,23,42,.60); }

/* Product header "View product" should be quiet, not a competing CTA */
.lr-dir-wrap .lr-prod-actions .lr-btn{
  height: 38px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12) !important;
  background: rgba(255,255,255,.92) !important;
  color: rgba(15,23,42,.86) !important;
  box-shadow: 0 10px 22px rgba(15,23,42,.08) !important;
}
.lr-dir-wrap .lr-prod-actions .lr-btn:hover{
  transform: translateY(-1px);
}

/* =========================================================
   BATCH CARDS
   ========================================================= */
.lr-batch-list{
  display:grid;
  gap: 10px;
  padding: 14px 16px 18px;
}

.lr-batch-card{
  border-radius: var(--lr-radius-sm);
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  overflow:hidden;
}

/* toggle */
.lr-batch-toggle{
  width:100%;
  text-align:left;
  border:0;
  padding:0;
  cursor:pointer;
  outline: none;
  background: transparent;
}

.lr-batch-toggle:focus,
.lr-batch-toggle:active{ outline: none !important; }

.lr-batch-toggle:focus-visible .lr-batch-top{
  box-shadow: 0 0 0 4px rgba(14,165,164,.18);
}

.lr-batch-top{
  display:grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 14px;
  align-items:center;
  padding-right: 36px; /* increase/decrease to taste */

  background: linear-gradient(180deg, rgba(246,248,252,.96), rgba(255,255,255,1));
  border-bottom: 1px solid rgba(15,23,42,.06);
  transition: background 140ms ease;
}

.lr-batch-toggle:hover .lr-batch-top{
  background: linear-gradient(180deg, rgba(14,165,164,.10), rgba(255,255,255,1));
}

.lr-batch-primary{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lr-label{ display:block; font-size: 11px; color: rgba(15,23,42,.60); margin-bottom: 4px; }

.lr-value{
  display:inline-flex;
  align-items:center;
  font-size: 15px;
  font-weight: 650;
  color: rgba(15,23,42,.92);
  letter-spacing: -0.01em;
}

/* chips */
.lr-chip{
  display:inline-flex;
  align-items:center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(246,248,252,.98);
  color: rgba(15,23,42,.72);
  font-size: 12px;
}

.lr-chip--current{
  border-color: rgba(14,165,164,.35);
  background: rgba(14,165,164,.12);
  color: #065f46;
}

.lr-chip--inline{
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  margin-left: 10px;
  transform: translateY(-1px);
}

/* chevron — border caret (no gaps) */
.lr-chevron{
  width: 34px;
  height: 34px;
  border-radius: 12px;
  border: 1px solid rgba(15,23,42,.12);
  background: rgba(255,255,255,.98);
  position: relative;
  box-shadow: 0 10px 20px rgba(15,23,42,.10);
}

.lr-chevron::before{
  content:"";
  position:absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid rgba(15,23,42,.65);
  border-bottom: 3px solid rgba(15,23,42,.65);
  transform: translate(-50%, -60%) rotate(45deg); /* down chevron */
}


/* If a real icon is inside the chevron container, hide it so only the CSS chevron shows */
.lr-dir-wrap .lr-chevron > svg,
.lr-dir-wrap .lr-chevron i,
.lr-dir-wrap .lr-chevron span,
.lr-dir-wrap .lr-chevron::marker{
  display: none !important;
}

/* Also prevent any stray text glyph from showing */
.lr-dir-wrap .lr-chevron{
  font-size: 0 !important;
  line-height: 0 !important;
}


/* expanded */
.lr-batch-panel-inner{
  padding: 14px;
  background: linear-gradient(180deg, rgba(242,245,249,.92), rgba(255,255,255,1));
}

.lr-batch-meta-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  margin-bottom: 10px;
}

.lr-meta{ display:grid; gap:4px; }

/* ✅ THIS is your real meta typography (not lr-meta-label/value) */
.lr-meta-k{
  font-size: 12px;
  letter-spacing: .02em;
  color: rgba(15,23,42,.70);
  line-height: 1.1;
}
.lr-meta-v{
  font-size: 14px;
  color: rgba(15,23,42,.92);
  font-weight: 650;
  line-height: 1.2;
}

/* =========================================================
   ACTION BUTTONS — FIXED
   - container min-width removed (it was wrong)
   - gap reduced (60 was insane)
   - all 3 buttons forced to the SAME width (no 192/150 mismatch)
   ========================================================= */

.lr-dir-wrap .lr-batch-actions{
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(15,23,42,.08);

  display:flex;
  justify-content:center;
  align-items:center;
  flex-wrap:wrap;

  gap: 14px;
}

/* Base button look + force uniform width */
.lr-dir-wrap .lr-batch-actions .lr-btn{
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  height: 42px;
  padding: 0 14px;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 600;
  line-height: 1;

  /* ✅ uniform sizing */
  width: 168px;
  flex: 0 0 168px;

  border: 1px solid rgba(15,23,42,.14) !important;
  background: rgba(255,255,255,.94) !important;
  color: rgba(15,23,42,.90) !important;

  box-shadow: 0 12px 26px rgba(15,23,42,.10) !important;
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.lr-dir-wrap .lr-batch-actions .lr-btn:hover{
  transform: translateY(-1px);
  box-shadow: 0 18px 36px rgba(15,23,42,.14) !important;
}

/* 1) PRIMARY CTA (View report) */
.lr-dir-wrap .lr-batch-actions .lr-btn:nth-child(1),
.lr-dir-wrap .lr-batch-actions a.lr-btn:nth-child(1):visited{
  border-color: rgba(8,13,23,.18) !important;
  background: linear-gradient(135deg, rgba(11,18,32,.98), rgba(15,23,42,.92)) !important;
  color: #ffffff !important;
  box-shadow: 0 18px 44px rgba(15,23,42,.22) !important;
}
.lr-dir-wrap .lr-batch-actions .lr-btn:nth-child(1):hover{
  background: linear-gradient(135deg, rgba(8,13,23,.98), rgba(11,18,32,.92)) !important;
  color: #ffffff !important;
}

/* 2) SECONDARY CTA (Verify) */
.lr-dir-wrap .lr-batch-actions .lr-btn:nth-child(2),
.lr-dir-wrap .lr-batch-actions a.lr-btn:nth-child(2):visited{
  border-color: rgba(14,165,164,.40) !important;
  background: rgba(14,165,164,.12) !important;
  color: rgba(11,18,32,.92) !important;
}
.lr-dir-wrap .lr-batch-actions .lr-btn:nth-child(2):hover{
  border-color: rgba(14,165,164,.62) !important;
  background: rgba(14,165,164,.18) !important;
  color: rgba(11,18,32,.95) !important;
}

/* 3) QUIET (View product) */
.lr-dir-wrap .lr-batch-actions .lr-btn:nth-child(3),
.lr-dir-wrap .lr-batch-actions a.lr-btn:nth-child(3):visited{
  border-color: rgba(15,23,42,.12) !important;
  background: rgba(246,248,252,.96) !important;
  color: rgba(15,23,42,.82) !important;
  box-shadow: 0 10px 20px rgba(15,23,42,.08) !important;
}
.lr-dir-wrap .lr-batch-actions .lr-btn:nth-child(3):hover{
  background: rgba(255,255,255,.98) !important;
  color: rgba(15,23,42,.92) !important;
}

/* =========================================================
   Empty states
   ========================================================= */
.lr-dir-zero{ padding: 22px 0 0; }
.lr-dir-zero-card,
.lr-dir-empty{
  border-radius: var(--lr-radius);
  border: 1px solid rgba(15,23,42,.10);
  background: #fff;
  box-shadow: var(--lr-shadow);
  padding: 18px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 980px){
  .lr-filter-row{ grid-template-columns: 1fr 1fr; }
  .lr-filter-actions{ grid-column: 1 / -1; justify-content:flex-start; }
}

/* ✅ remove the broken grid-template-columns rule (actions is flex, not grid) */
/* @media (max-width: 720px){ ... }  intentionally omitted */

@media (max-width: 640px){
  .lr-prod-head{ grid-template-columns: 70px 1fr; }
  .lr-prod-media{ width: 70px; height: 70px; }

  .lr-batch-primary{ grid-template-columns: 1fr; }
  .lr-batch-top{ grid-template-columns: 1fr; }
  .lr-batch-meta-grid{ grid-template-columns: 1fr; }

  /* stack buttons on mobile */
  .lr-dir-wrap .lr-batch-actions .lr-btn{
    width: 100%;
    flex: 1 1 100%;
  }
}
/* =========================================================
   FORCE meta label/value sizing (wins specificity + overrides)
   ========================================================= */

/* Expanded panel meta grid (Lab, Received, Size, Status) */
.lr-dir-wrap .lr-batch-panel-inner .lr-meta-k{
  font-size: 16px !important;
  letter-spacing: .02em !important;
  color: rgba(15,23,42,.72) !important;
  line-height: 1.15 !important;
}

.lr-dir-wrap .lr-batch-panel-inner .lr-meta-v{
  font-size: 18px !important;
  font-weight: 650 !important;
  color: rgba(15,23,42,.92) !important;
  line-height: 1.25 !important;
}

/* Top row labels inside the collapsed header (Batch / Contents etc) */
.lr-dir-wrap .lr-batch-top .lr-label{
  font-size: 15px !important;
  letter-spacing: .02em !important;
  color: rgba(15,23,42,.70) !important;
}

.lr-dir-wrap .lr-batch-top .lr-value{
  font-size: 18px !important;
  font-weight: 650 !important;
  color: rgba(15,23,42,.92) !important;
}
/* Directory: show Size in collapsed batch header */
.lr-dir-wrap .lr-batch-primary{
  display: grid;
  grid-template-columns: 1.1fr .9fr .7fr; /* Batch | Contents | Size */
  gap: 14px;
  align-items: center;
}

@media (max-width: 780px){
  .lr-dir-wrap .lr-batch-primary{
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

/* Keep the “Size” value reading like a pill-lite without adding a new component */
.lr-dir-wrap .lr-batch-size .lr-value{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(2, 132, 199, .08);
  border: 1px solid rgba(2, 132, 199, .18);
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}
/* =========================================================
   Directory: Contents pill styling (measured value)
   ========================================================= */

/* Target ONLY collapsed header contents value */
.lr-dir-wrap .lr-batch-contents .lr-value{
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;

  /* Softer + more neutral than Size */
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.14);

  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
}

/* Optional: visually label it as measured */
.lr-dir-wrap .lr-batch-contents .lr-label{
  margin-bottom: 6px;
}
/* =========================================================
   Directory: Product title hierarchy fix
   ========================================================= */

.lr-dir-wrap .lr-prod-title{
  font-size: 22px;              /* up from 18 */
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 4px;
}

/* Make sure link inherits heading weight */
.lr-dir-wrap .lr-prod-title a{
  color: var(--lr-text);
}

/* Push actions slightly down so title reads first */
.lr-dir-wrap .lr-prod-actions{
  margin-top: 6px;
}

/* De-emphasize report count just a bit */
.lr-dir-wrap .lr-prod-count{
  font-size: 12px;
  color: rgba(15,23,42,.55);
}
.lr-dir-wrap .lr-batch-contents .lr-value{
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
