:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-alt: #f1f4f9;
  --border: #e3e7ef;
  --text: #0f172a;
  --text-soft: #475569;
  --text-muted: #64748b;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --brand-soft: #dbeafe;
  --accent: #0ea5e9;
  --success: #16a34a;
  --warn: #d97706;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 1px rgba(15,23,42,.04);
  --shadow-md: 0 4px 16px rgba(15,23,42,.06);
  --radius: 12px;
  --radius-sm: 8px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; }

.sr-container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ============ HEADER ============ */
.sr-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(8px);
}
.sr-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px; gap: 16px;
}
.sr-brand {
  display: inline-flex; align-items: center;
  text-decoration: none;
}
.sr-brand:hover { text-decoration: none; }
.sr-brand-logo {
  display: block; height: 56px; width: auto; flex-shrink: 0;
}
@media (max-width: 480px) {
  .sr-brand-logo { height: 44px; }
  .sr-header-inner { height: 60px; }
}
.sr-nav { display: flex; align-items: center; gap: 22px; }
.sr-nav a { color: var(--text-soft); font-weight: 500; font-size: 14.5px; }
.sr-nav a:hover { color: var(--text); }
.sr-nav-cta {
  background: var(--brand); color: #fff !important;
  padding: 9px 16px; border-radius: var(--radius-sm);
  font-weight: 600 !important;
}
.sr-nav-cta:hover { background: var(--brand-dark); text-decoration: none !important; }

@media (max-width: 640px) {
  .sr-nav a:not(.sr-nav-cta) { display: none; }
}

/* ============ HERO ============ */
.sr-hero {
  padding: 64px 0 56px;
  text-align: center;
  background: linear-gradient(180deg, #eef4ff 0%, #f7f8fb 100%);
  border-bottom: 1px solid var(--border);
}
.sr-hero h1 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -0.02em;
}
.sr-hero .sr-lede {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--text-soft);
  max-width: 640px;
  margin: 0 auto 28px;
}
.sr-hero-cta {
  display: inline-flex; gap: 12px; flex-wrap: wrap; justify-content: center;
}
.sr-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s, transform .05s;
}
.sr-btn-primary { background: var(--brand); color: #fff; }
.sr-btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.sr-btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border);
}
.sr-btn-secondary:hover { border-color: var(--text-muted); text-decoration: none; }
.sr-btn-success { background: var(--success); color: #fff; }
.sr-btn-success:hover { background: #15803d; text-decoration: none; }
.sr-btn:active { transform: translateY(1px); }
.sr-btn-block { width: 100%; justify-content: center; }
.sr-btn-lg { padding: 14px 24px; font-size: 16px; }

/* ============ PAGINATION ============ */
.sr-pagination {
  display: flex; flex-wrap: wrap; gap: 6px;
  justify-content: center; align-items: center;
  margin-top: 24px;
}
.sr-page {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 38px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 600; text-decoration: none;
}
.sr-page:hover { border-color: var(--text-muted); text-decoration: none; }
.sr-page.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.sr-page.is-disabled { opacity: .45; pointer-events: none; }
.sr-page-gap { padding: 0 4px; color: var(--text-muted); }

/* ============ ADMIN FILTER BAR ============ */
.sr-admin-filters {
  display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: flex-end;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 20px;
}
.sr-af-field { display: flex; flex-direction: column; gap: 4px; }
.sr-af-field label { font-size: 11.5px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.sr-af-field input, .sr-af-field select {
  height: 38px; padding: 0 10px; font-size: 14px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--bg); color: var(--text); font-family: inherit;
}
.sr-af-field input:focus, .sr-af-field select:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.sr-af-grow { flex: 1 1 200px; min-width: 160px; }
.sr-af-grow input { width: 100%; }
.sr-af-narrow input { width: 86px; }
.sr-af-actions { display: flex; gap: 8px; margin-left: auto; }
.sr-af-actions .sr-btn { height: 38px; }

.sr-hero-pills {
  display: inline-flex; gap: 8px; margin-top: 28px; flex-wrap: wrap; justify-content: center;
}
.sr-pill {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; font-size: 13px;
  color: var(--text-soft);
}

/* ============ SECTIONS ============ */
.sr-section { padding: 56px 0; }
.sr-section-tight { padding: 40px 0; }
.sr-section-head {
  display: flex; align-items: end; justify-content: space-between;
  gap: 16px; margin-bottom: 24px;
}
.sr-section-head h2 {
  margin: 0; font-size: 22px; letter-spacing: -0.01em;
}
.sr-section-head .sr-link-more { font-size: 14px; color: var(--text-soft); }

/* ============ CARDS GRID ============ */
.sr-grid {
  display: grid; gap: 18px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.sr-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex; flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.sr-card:hover { border-color: #c7d2fe; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.sr-card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 10px;
}
.sr-card-host {
  font-family: var(--font-mono); font-size: 12.5px;
  color: var(--text-muted); text-transform: lowercase;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sr-card-tag {
  font-size: 11.5px; font-weight: 600;
  background: var(--brand-soft); color: var(--brand-dark);
  padding: 3px 10px; border-radius: 999px;
  white-space: nowrap;
}
.sr-card-tag:hover { text-decoration: none; background: #c7d8ff; }
.sr-card-title { margin: 0 0 8px; font-size: 17px; line-height: 1.3; }
.sr-card-title a { color: var(--text); }
.sr-card-title a:hover { color: var(--brand); text-decoration: none; }
.sr-card-desc { color: var(--text-soft); font-size: 14px; margin: 0 0 16px; flex: 1; }
.sr-card-rating { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-soft); margin-bottom: 12px; }
.sr-stars { color: #f59e0b; letter-spacing: 1px; }
.sr-card-foot { margin-top: auto; }
.sr-card-link { font-size: 13.5px; font-weight: 600; }

/* ============ CATEGORY GRID ============ */
.sr-cat-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.sr-cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: block;
  color: var(--text);
}
.sr-cat-card:hover { border-color: var(--brand); text-decoration: none; }
.sr-cat-card-name { font-weight: 600; margin-bottom: 4px; font-size: 15px; }
.sr-cat-card-desc { font-size: 13px; color: var(--text-muted); line-height: 1.45; }
.sr-cat-card-children {
  margin-top: 10px; font-size: 12.5px; color: var(--text-muted);
  display: flex; flex-wrap: wrap; gap: 4px 10px;
}
.sr-cat-card-children span { white-space: nowrap; }

/* ============ FORMS ============ */
.sr-form { max-width: 640px; margin: 0 auto; background: var(--surface); padding: 32px; border-radius: var(--radius); border: 1px solid var(--border); }
.sr-form h1 { margin: 0 0 6px; font-size: 26px; }
.sr-form .sr-form-lede { color: var(--text-soft); margin: 0 0 28px; font-size: 15px; }
.sr-field { margin-bottom: 18px; }
.sr-field label {
  display: block; font-weight: 600; font-size: 13.5px;
  margin-bottom: 6px; color: var(--text);
}
.sr-field .sr-hint { font-size: 12.5px; color: var(--text-muted); margin-top: 5px; }
.sr-field input[type=text],
.sr-field input[type=url],
.sr-field input[type=email],
.sr-field input[type=number],
.sr-field input[type=password],
.sr-field select,
.sr-field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 14.5px;
  background: var(--surface);
  color: var(--text);
  transition: border-color .12s, box-shadow .12s;
}
.sr-field input:focus, .sr-field select:focus, .sr-field textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.sr-field textarea { min-height: 140px; resize: vertical; }
.sr-error {
  background: #fef2f2; color: #991b1b; border: 1px solid #fecaca;
  padding: 10px 14px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 18px;
}
.sr-error ul { margin: 4px 0 0 16px; padding: 0; }
.sr-success {
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0;
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 18px;
}
.sr-info {
  background: var(--brand-soft); color: var(--brand-dark);
  border: 1px solid #bfdbfe;
  padding: 14px 16px; border-radius: var(--radius-sm);
  font-size: 14px;
}

/* ============ REVIEW DETAIL ============ */
.sr-review { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 32px; }
@media (max-width: 880px) { .sr-review { grid-template-columns: 1fr; } }
.sr-review-main { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.sr-review-side { display: flex; flex-direction: column; gap: 16px; }
.sr-review-side .sr-card { padding: 18px; }
.sr-crumbs { font-size: 13px; color: var(--text-muted); margin-bottom: 12px; }
.sr-crumbs a { color: var(--text-soft); }
.sr-review h1 { margin: 0 0 8px; font-size: 30px; line-height: 1.2; letter-spacing: -0.01em; }
.sr-review-meta { color: var(--text-muted); font-size: 13.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.sr-review-meta a { color: var(--text-soft); }
.sr-review-rating { display: inline-flex; align-items: center; gap: 8px; background: #fffbeb; border: 1px solid #fde68a; padding: 6px 12px; border-radius: 999px; font-size: 13.5px; color: #78350f; }
.sr-review-body { font-size: 16px; color: #1e293b; white-space: pre-wrap; word-wrap: break-word; }
.sr-review-tags { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--border); display: flex; gap: 8px; flex-wrap: wrap; }
.sr-tag { background: var(--surface-alt); color: var(--text-soft); padding: 5px 12px; border-radius: 999px; font-size: 12.5px; }
.sr-tag:hover { background: var(--brand-soft); color: var(--brand-dark); text-decoration: none; }
.sr-side-cta { background: linear-gradient(135deg, #2563eb, #4f46e5); color: #fff; padding: 22px; border-radius: var(--radius); }
.sr-side-cta h3 { margin: 0 0 6px; color: #fff; font-size: 18px; }
.sr-side-cta p { margin: 0 0 14px; color: #dbeafe; font-size: 14px; }
.sr-side-cta a { background: #fff; color: var(--brand-dark); display: inline-block; padding: 9px 16px; border-radius: var(--radius-sm); font-weight: 600; font-size: 14px; }
.sr-side-cta a:hover { text-decoration: none; background: #f1f5f9; }

/* ============ FOOTER ============ */
.sr-footer { background: #0f172a; color: #cbd5e1; margin-top: 80px; padding: 56px 0 24px; }
.sr-footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 720px) { .sr-footer-inner { grid-template-columns: 1fr 1fr; } }
.sr-footer-col { display: flex; flex-direction: column; gap: 8px; }
.sr-footer-col strong { color: #fff; font-size: 14px; margin-bottom: 4px; }
.sr-footer-col a { color: #cbd5e1; font-size: 14px; }
.sr-footer-col a:hover { color: #fff; }
.sr-footer-brand { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.sr-footer-muted { color: #94a3b8; font-size: 13.5px; margin: 0; max-width: 360px; }
.sr-footer-base { font-size: 12.5px; color: #64748b; margin-top: 36px; padding-top: 24px; border-top: 1px solid #1e293b; text-align: center; }

/* ============ TABLES (admin) ============ */
.sr-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sr-table th, .sr-table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: top; }
.sr-table th { background: var(--surface-alt); font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.sr-table tr:last-child td { border-bottom: 0; }
.sr-badge { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; }
.sr-badge-pending { background: #fef3c7; color: #92400e; }
.sr-badge-paid { background: #dbeafe; color: #1e40af; }
.sr-badge-approved { background: #dcfce7; color: #166534; }
.sr-badge-rejected { background: #fee2e2; color: #991b1b; }

/* ============ MISC ============ */
.sr-empty {
  text-align: center; padding: 48px 20px;
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}
.sr-pricing-card {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  border: 1px solid #c7d2fe;
  padding: 28px;
  border-radius: var(--radius);
  text-align: center;
}
.sr-pricing-card .sr-price { font-size: 40px; font-weight: 800; color: var(--brand-dark); letter-spacing: -0.02em; }
.sr-pricing-card .sr-price small { font-size: 14px; font-weight: 500; color: var(--text-soft); }

.sr-stat-row { display: flex; flex-wrap: wrap; gap: 20px; justify-content: center; margin-top: 32px; }
.sr-stat { text-align: center; }
.sr-stat-num { font-size: 28px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.sr-stat-lbl { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }

/* ============ LANGUAGE TOGGLE ============ */
.sr-lang { position: relative; }
.sr-lang-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text-soft);
  cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.sr-lang-btn:hover { border-color: var(--text-muted); color: var(--text); }
.sr-lang-btn[aria-expanded="true"] { border-color: var(--brand); color: var(--brand-dark); }
.sr-lang-btn .sr-lang-code { letter-spacing: .04em; }
.sr-lang-flag {
  display: block; flex-shrink: 0;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(15,23,42,.08);
}

.sr-lang-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(15,23,42,.12), 0 2px 6px rgba(15,23,42,.06);
  z-index: 100;
  overflow: hidden;
  max-height: 70vh;
  display: flex; flex-direction: column;
}
/* Important: the display:flex above wins over the HTML [hidden] default,
   so we re-assert hidden here. Without this the panel shows on first load. */
.sr-lang-panel[hidden] { display: none; }
.sr-lang-search-wrap {
  padding: 10px; border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.sr-lang-search {
  width: 100%; padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit; font-size: 14px;
  background: var(--surface);
  color: var(--text);
}
.sr-lang-search:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(37,99,235,.15);
}
.sr-lang-list { overflow-y: auto; padding: 6px; flex: 1; }
.sr-lang-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 8px 10px;
  background: transparent; border: 0; border-radius: 6px;
  cursor: pointer; text-align: left;
  font: inherit; font-size: 14px; color: var(--text);
}
.sr-lang-row:hover { background: var(--surface-alt); }
.sr-lang-row.is-active { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.sr-lang-name { flex: 1; }
.sr-lang-native { color: var(--text-muted); font-size: 12.5px; }
.sr-lang-row.is-active .sr-lang-native { color: var(--brand-dark); opacity: .75; }
.sr-lang-tick { color: var(--brand); font-weight: 700; margin-left: 4px; }
.sr-lang-empty {
  padding: 16px; text-align: center; color: var(--text-muted); font-size: 13px;
}

/* Hide every piece of Google Translate's injected UI — we drive translation via cookie + reload.
   Covers the top banner, hover-tooltip, suggest-balloon, all frames, plus the body
   offset Google applies. Class names below cover both the legacy and current builds
   of translate_a/element.js. */
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover,
#goog-gt-tt,
.goog-te-spinner-pos,
.VIpgJd-ZVi9od-ORHb-OEVmcd,
.VIpgJd-ZVi9od-ORHb,
.VIpgJd-ZVi9od-l4eHX-hSRGPd,
.VIpgJd-yAWNEb-VIpgJd-fmcmS-sn54Q,
iframe.goog-te-menu-frame,
iframe.skiptranslate {
  display: none !important;
  visibility: hidden !important;
}
/* Mount point: keep it in the layout (offscreen) — `display: none` prevents
   Google's Translate Element from initialising properly, which leaves chunks
   of the page (nav, footer) untranslated. */
#google_translate_element {
  position: absolute !important;
  left: -10000px !important;
  top: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}
.goog-text-highlight {
  background: transparent !important;
  box-shadow: none !important;
  position: static !important;
}
/* Undo the top: 40px Google forces on <body> when its banner shows. */
html, body { top: 0 !important; position: static !important; }
/* Don't let Google decorate our translated text with hover state. */
font[style*="vertical-align"] { vertical-align: inherit !important; }

@media (max-width: 640px) {
  .sr-lang { order: 99; } /* sit at end of mobile nav */
  .sr-lang-panel { width: 92vw; right: -10px; }
  .sr-lang-btn .sr-lang-code { display: none; }
}
