/* VAT on Services (/vat/services/) — table like the source Excel sheet, green look of the tariff/act pages */
.vs-page {
  --vs-green: #2e7d32;
  --vs-green-2: #43a047;
  --vs-bg: #ffffff;
  --vs-soft: #f1f8f1;
  --vs-line: #e5e7eb;
  --vs-text: #1f2937;
  --vs-muted: #6b7280;
  --vs-panel: #f9fafb;
  --vs-orange: #f17414;
  --vs-group: #fbfcfb;
  margin-left: auto; margin-right: auto;
  padding-bottom: 24px;
  color: var(--vs-text);
}
[data-bs-theme="dark"] .vs-page {
  --vs-bg: #1f2937;
  --vs-soft: #1b3a24;
  --vs-line: #374151;
  --vs-text: #e5e7eb;
  --vs-muted: #9ca3af;
  --vs-panel: #273244;
  --vs-group: #233041;
}

/* ---- Header: title left, category dropdown right ---- */
.vs-page .vs-header {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, var(--vs-green) 0%, var(--vs-green-2) 100%);
  color: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 14px;
  box-shadow: 0 4px 14px rgba(46, 125, 50, .22);
}
.vs-page .vs-header-icon {
  width: 46px; height: 46px; flex-shrink: 0; border-radius: 10px;
  background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.vs-page .vs-header h1 { flex: 1; min-width: 0; font-size: 24px; font-weight: 600; line-height: 1.25; margin: 0; color: #fff; }
.vs-page .vs-cat-select { position: relative; flex: 0 1 340px; min-width: 0; margin: 0; }
.vs-page .vs-cat-select select {
  width: 100%; height: 44px; padding: 0 38px 0 14px; cursor: pointer;
  -webkit-appearance: none; appearance: none;
  background: #fff; color: #1f2937; border: 0; border-radius: 10px;
  font: inherit; font-size: 14.5px; font-weight: 600;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  text-overflow: ellipsis;
}
.vs-page .vs-cat-select select:focus { outline: 3px solid rgba(255,255,255,.55); outline-offset: 1px; }
.vs-page .vs-cat-select i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--vs-green); pointer-events: none; font-size: 13px; }

/* ---- Search + filters ---- */
.vs-page .vs-filters { display: flex; gap: 10px; margin-bottom: 8px; }
.vs-page .vs-search {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 46px; margin: 0;
  background: var(--vs-bg); border: 1.5px solid var(--vs-green-2); border-radius: 12px;
  padding: 0 6px 0 14px; box-shadow: 0 2px 6px rgba(46,125,50,.10); cursor: text;
}
.vs-page .vs-search:focus-within { border-color: var(--vs-green); box-shadow: 0 0 0 3px rgba(67,160,71,.18); }
.vs-page .vs-search > i { color: var(--vs-muted); }
.vs-page .vs-search input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font-size: 16px; color: var(--vs-text);
}
.vs-page .vs-search input::-webkit-search-cancel-button { display: none; }
.vs-page .vs-clear {
  border: 0; background: transparent; color: var(--vs-muted); font-size: 18px;
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
}
.vs-page .vs-clear[hidden], .vs-page .vs-reset[hidden], .vs-page .vs-empty[hidden] { display: none; }
.vs-page .vs-select {
  height: 46px; max-width: 250px; padding: 0 34px 0 12px; border-radius: 12px;
  border: 1.5px solid var(--vs-line); background-color: var(--vs-bg); color: var(--vs-text);
  font: inherit; font-size: 14px; cursor: pointer;
}
.vs-page .vs-select:focus { outline: none; border-color: var(--vs-green-2); }
.vs-page .vs-status {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 13px; color: var(--vs-muted); margin: 0 4px 10px;
}
.vs-page .vs-reset { border: 0; background: transparent; color: var(--vs-green); font-size: 13px; font-weight: 600; cursor: pointer; }

/* ---- Table ---- */
.vs-page .vs-table-wrap {
  background: var(--vs-bg); border: 1px solid var(--vs-line); border-radius: 14px;
  overflow: auto; max-height: calc(100vh - 150px); scroll-margin-top: 70px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.vs-page .vs-table { width: 100%; min-width: 1100px; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: 14px; }
/* fixed column widths: both reference columns equal, Name of Service takes the rest */
.vs-page .vs-table col.w-sn { width: 46px; }
.vs-page .vs-table col.w-code { width: 100px; }
.vs-page .vs-table col.w-rate { width: 70px; }
.vs-page .vs-table col.w-ref { width: 210px; }
.vs-page .vs-table col.w-def { width: 84px; }
.vs-page .vs-table td, .vs-page .vs-table th { overflow-wrap: anywhere; }
.vs-page .vs-table thead th { white-space: normal !important; }
.vs-page .vs-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--vs-green); color: #fff; font-size: 13px; font-weight: 700;
  text-align: left; padding: 11px 10px; white-space: nowrap; border-right: 1px solid rgba(255,255,255,.18);
}
.vs-page .vs-table thead th:last-child { border-right: 0; }
.vs-page .vs-table thead[hidden] { display: none; }
.vs-page .vs-table td {
  padding: 9px 10px; vertical-align: top; line-height: 1.45;
  border-bottom: 1px solid var(--vs-line); border-right: 1px solid var(--vs-line);
}
.vs-page .vs-table td:last-child { border-right: 0; }
.vs-page .vs-table tr[hidden] { display: none; }
.vs-page .vs-row:hover td { background: var(--vs-soft); }
/* a new service code starts: thicker line above it */
.vs-page .vs-row.is-first td { border-top: 2px solid var(--vs-line); }
.vs-page .vs-table tbody tr:first-child td { border-top: 0; }
.vs-page .vs-row.is-target td { background: #fff8e1; }
[data-bs-theme="dark"] .vs-page .vs-row.is-target td { background: #3b3320; }

.vs-page .c-sn { width: 52px; text-align: center !important; color: var(--vs-muted); font-variant-numeric: tabular-nums; }
.vs-page .c-code { width: 108px; white-space: nowrap; }
.vs-page .c-code a {
  display: inline-block; font-weight: 700; color: #fff; background: var(--vs-orange);
  padding: 2px 8px; border-radius: 6px; text-decoration: none; font-variant-numeric: tabular-nums;
}
.vs-page .c-code a:hover { filter: brightness(.95); }
.vs-page .c-code a mark.vs-hit { background: #fff3c4; color: #7c2d12; }
.vs-page td.c-name { font-family: 'Hind Siliguri', 'Nunito Sans', sans-serif; font-size: 14.5px; font-weight: 500; }
.vs-page .c-rate { width: 78px; text-align: center !important; }
.vs-page .vs-pill {
  display: inline-block; min-width: 46px; padding: 2px 8px; border-radius: 6px;
  font-weight: 700; font-size: 13.5px; color: var(--vs-muted); background: var(--vs-panel);
  font-variant-numeric: tabular-nums;
}
.vs-page .vs-pill.sd { color: #b91c1c; background: #fef2f2; }
.vs-page .vs-pill.vat { color: #c2410c; background: #fff7ed; }
.vs-page .vs-pill.vds { color: #0e7490; background: #ecfeff; }
.vs-page .vs-pill.exempt { color: #047857; background: #ecfdf5; }
[data-bs-theme="dark"] .vs-page .vs-pill.sd { background: #3f1d1d; color: #fca5a5; }
[data-bs-theme="dark"] .vs-page .vs-pill.vat { background: #3b2412; color: #fdba74; }
[data-bs-theme="dark"] .vs-page .vs-pill.vds { background: #123238; color: #67e8f9; }
[data-bs-theme="dark"] .vs-page .vs-pill.exempt { background: #064e3b; color: #a7f3d0; }
.vs-page td.c-ref { font-size: 12.5px; color: var(--vs-text); }
.vs-page .c-def { width: 90px; text-align: center !important; }
.vs-page .vs-muted { color: var(--vs-muted); }
.vs-page .vs-def-btn {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; cursor: pointer;
  font-family: 'Hind Siliguri', sans-serif; font-size: 13px; font-weight: 600;
  color: var(--vs-green); background: transparent; border: 1px solid var(--vs-green-2);
  border-radius: 8px; padding: 3px 9px;
}
.vs-page .vs-def-btn:hover, .vs-page .vs-def-btn.is-open { background: var(--vs-green); color: #fff; }

.vs-page .vs-def-row td { background: var(--vs-group); padding: 0; }
.vs-page .vs-def-body {
  /* keep the text readable on screen while the table scrolls sideways */
  position: sticky; left: 0; max-width: min(100vw - 48px, 1100px);
  padding: 12px 16px 14px; font-family: 'Hind Siliguri', 'Noto Sans Bengali', sans-serif;
  font-size: 15.5px; line-height: 1.75; text-align: justify;
}
.vs-page .vs-def-title { font-weight: 600; color: var(--vs-green); margin-bottom: 6px; font-size: 14.5px; }
.vs-page .vs-def-body p { margin: 0 0 8px; }
.vs-page .vs-def-body p:last-child { margin-bottom: 0; }
.vs-page mark.vs-hit { background: #fde68a; color: #111827; padding: 0 1px; border-radius: 3px; }

.vs-page .vs-empty { text-align: center; padding: 48px 16px; color: var(--vs-muted); }
.vs-page .vs-empty i { font-size: 28px; opacity: .5; }
.vs-page .vs-empty p { margin: 10px 0 2px; font-size: 16px; color: var(--vs-text); }

/* ---- Phones / tablets ---- */
@media (max-width: 767px) {
  .vs-page .vs-header { flex-wrap: wrap; gap: 10px 12px; padding: 12px; }
  .vs-page .vs-header-icon { width: 40px; height: 40px; font-size: 18px; }
  .vs-page .vs-header h1 { font-size: 20px; }
  .vs-page .vs-cat-select { flex: 1 1 100%; }
  .vs-page .vs-filters { flex-wrap: wrap; }
  .vs-page .vs-search { flex-basis: 100%; }
  .vs-page .vs-select { flex: 1; min-width: 0; max-width: none; height: 44px; font-size: 13.5px; }
  .vs-page .vs-table-wrap { max-height: calc(100vh - 120px); }
  .vs-page .vs-table { font-size: 13px; }
  /* keep the code + name visible while scrolling sideways */
  .vs-page .vs-table .c-code { position: sticky; left: 0; z-index: 1; background: var(--vs-bg); }
  .vs-page .vs-table thead .c-code { z-index: 3; background: var(--vs-green); }
  .vs-page .vs-table { min-width: 1100px; }
  .vs-page .vs-table col.w-sn { width: 40px; }
}
