:root{
  --ink-strong:#1f2733;
  --ink:#2a3443;
  --ink-muted:#6f7a89;
  --line:#e6eaf0;
  --line-soft:#eef2f7;
  --lime:#ceff65;        /* lime for caret + accents */
  --lime-deep:#bfe266;   /* darker lime hint */
  --bg:#fff;
}

/* ---------- Desktop tabs: compact, calm, lime fill on select ---------- */
.sheets-bar{
  background:#fff;
  border-bottom:1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 30;
}

.sheet-tabs{
  display:flex;
  flex-wrap:nowrap;
  gap:6px;
  padding:.30rem 0 .32rem;  /* slightly tighter bar */
}

/* Make the card boundary equal to the old inner ring box:
   - remove inset ring
   - reduce padding so the visible card = previous ring rect */
.sheet-tab{
  position:relative;
  flex:1 1 0%;
  min-width:0;
  display:flex;
  align-items:center;
  background:#fff;
  border:1px solid var(--line);   /* simple hairline */
  border-radius:8px;
  box-shadow:none;                /* no inner ring */
  padding:0;                      /* inner control owns spacing */
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

/* (Optional) very light left accent when idle; hidden on select */
.sheet-tab::before{
  content:"";
  position:absolute; left:0; top:0; bottom:0;
  width:2px; border-radius:8px 0 0 8px;
  background: linear-gradient(180deg, rgba(191,226,102,.35), rgba(206,255,101,.2));
}

/* Selected/Focused tab: full lime fill, no ring, no size change */
.sheet-tab[data-active="true"],
.sheet-tab:focus-within{
  background: var(--lime);
  border-color: var(--lime-deep);
  box-shadow:none;
}
.sheet-tab[data-active="true"]::before,
.sheet-tab:focus-within::before{
  display:none;
}

/* Inner button sets the compact content box size (tightened ~ the old ring’s inner box) */
.sheet-btn{
  flex:1 1 auto;
  background:transparent;
  color: var(--ink-strong);
  border:none;
  padding:.40rem 1.45rem .40rem .62rem;  /* trimmed to match the old selected-box footprint */
  font-size:.92rem;
  font-weight:700;
  letter-spacing:.002em;
  cursor:pointer;
  text-align:left;
  border-radius:8px;
}

/* Remove the old bounding box (focus outline). We now use lime fill instead. */
.sheet-btn:focus{ outline: none; }

/* Ensure readable contrast on lime */
.sheet-tab[data-active="true"] .sheet-btn,
.sheet-tab:focus-within .sheet-btn{
  color:#0b0c0d;
}

/* Caret: subtle by default, inverted on select/focus */
.sheet-caret{
  position:absolute;
  right:6px;
  top:50%;
  transform: translateY(-50%);
  background: var(--lime);
  color:#0b0c0d;
  border:none;
  border-radius:6px;
  padding:.14rem .34rem;
  cursor:pointer;
  font-weight:800;
  font-size:.84rem;
  box-shadow: inset 0 -1px 0 rgba(0,0,0,.06);
}
.sheet-caret:focus{ outline: none; }
.sheet-tab[data-active="true"] .sheet-caret,
.sheet-tab:focus-within .sheet-caret{
  background:#0b0c0d;
  color:#fff;
  box-shadow:none;
}
.caret{ display:inline-block; transform: translateY(-1px); }

/* Hover keeps things quiet */
.sheet-tab:hover{
  box-shadow: inset 0 0 0 1px rgba(191,226,102,.25);
}

/* ---------- Dropdown anchored to tab ---------- */
.sheet-dropdown{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 6px);
  background:#fff;
  border:1px solid var(--line);
  border-radius:10px;
  box-shadow:0 12px 24px rgba(17,24,39,.12);
  padding:.35rem;
  z-index: 5;
}
.dd-title{
  font-size:.72rem; color:var(--ink-muted);
  text-transform:uppercase; letter-spacing:.06em;
  margin:.3rem .2rem .15rem;
}
.dd-item{
  width:100%; text-align:left; background:#fff; border:1px solid transparent;
  border-radius:8px; padding:.42rem .55rem; margin:2px 0; cursor:pointer;
}
.dd-item:hover{ background:#fbfcff; border-color:var(--line-soft); }
.dd-all{ font-weight:700; }

/* ---------- Mobile selectors ---------- */
.sheets-mobile{
  display:none;
  padding:.6rem 0 .4rem;
  border-bottom:1px solid var(--line);
}
.sm-row{ display:flex; align-items:center; gap:.6rem; margin:.35rem 0; }
.sm-label{ min-width:126px; font-size:.95rem; color:var(--ink-strong); font-weight:700; }
.sm-select{
  flex:1; height:42px; border:1px solid var(--line);
  border-radius:8px; background:#fff; padding:0 .6rem;
}

@media (max-width: 991px){
  .sheets-bar{ display:none; }
  .sheets-mobile{ display:block; }
}

/* ---------- Table bits ---------- */
.table-header{
  display:flex; align-items:center; justify-content:space-between;
  gap:.75rem; padding: 12px 0 8px;
}
.table-heading{ margin:0; color:#80b000; font-weight:800; letter-spacing:.01em; }
.badge.active-filter{
  background:#f4ffe0; border:1px solid #dcebaf; border-radius:999px;
  color:#2a3b05; padding:.25rem .6rem; font-weight:700;
}

.table-wrap{ width:100%; overflow:auto; }
.data-table{
  width:100%; border-collapse:separate; border-spacing:0;
  background:#fff; border:1px solid var(--line); border-radius:12px;
}
.data-table thead th{
  position:sticky; top:0; background:#fbfcfe; border-bottom:1px solid var(--line);
  font-weight:700; color:#1f2733; padding:.55rem .6rem; text-align:left;
}
.data-table tbody td{ padding:.5rem .6rem; border-top:1px solid var(--line-soft); vertical-align:top; }
.data-table tbody tr:nth-child(even){ background:#fcfdff; }

.empty{
  background:#fff; color:#6f7a89; border:1px dashed var(--line); border-radius:12px;
  padding:1.25rem; text-align:center; margin-top:.75rem;
}

main.container-large{ padding-top: 12px !important; }
