/* =====================================================================
   Remote Hire Platform — one design system for every page
   Loaded last in <head>, so it wins over each page's own styles.
   Brand: blue #2563eb (primary), green #10b981 (success/secondary), amber #f59e0b (accent)
   ===================================================================== */
:root {
  --rb-primary: #2563eb;
  --rb-primary-dark: #1d4ed8;
  --rb-primary-darker: #1e3a8a;
  --rb-primary-soft: #eff6ff;
  --rb-secondary: #10b981;
  --rb-secondary-dark: #059669;
  --rb-accent: #f59e0b;
  --rb-danger: #ef4444;
  --rb-ink: #0f172a;
  --rb-text: #1f2937;
  --rb-muted: #64748b;
  --rb-border: #e5e7eb;
  --rb-bg: #f8fafc;
  --rb-surface: #ffffff;
  --rb-radius: 12px;
  --rb-radius-lg: 16px;
  --rb-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 16px rgba(15, 23, 42, .06);
  --rb-shadow-lg: 0 10px 30px rgba(15, 23, 42, .10);
  --rb-hero: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 45%, #2563eb 75%, #0ea5e9 130%);
  --rb-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Bengali', sans-serif;
  --rb-header-h: 64px;

  /* legacy variables used by older pages — mapped onto the brand */
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --secondary: #10b981;
  --secondary-dark: #059669;
  --accent: #f59e0b;
  --primary-color: #2563eb;
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: #1d4ed8;
  --bs-link-hover-color-rgb: 29, 78, 216;
  --bs-body-font-family: var(--rb-font);
  --bs-border-radius: 10px;
}

/* ---------- base ---------- */
html { scroll-padding-top: calc(var(--rb-header-h) + 12px); }
body.rb-site {
  font-family: var(--rb-font) !important;
  color: var(--rb-text);
  background-color: var(--rb-bg);
  padding-top: 0 !important;
  -webkit-font-smoothing: antialiased;
}
body.rb-site h1, body.rb-site h2, body.rb-site h3, body.rb-site h4, body.rb-site h5, body.rb-site h6 {
  font-family: var(--rb-font);
  color: inherit;
  letter-spacing: -0.01em;
}
body.rb-site a { text-decoration-thickness: 1px; }

/* ---------- shared header ---------- */
.rb-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }
.rb-header, .rb-header *, .rb-footer, .rb-footer * { box-sizing: border-box; }
.rb-header {
  position: sticky; top: 0; z-index: 1040;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--rb-border);
  font-family: var(--rb-font); font-size: 15px; line-height: 1.4;
}
.rb-header-inner { display: flex; align-items: center; gap: 24px; height: var(--rb-header-h); }
.rb-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none !important; color: var(--rb-ink) !important; font-weight: 800; font-size: 18px; white-space: nowrap; }
.rb-brand-mark { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: linear-gradient(135deg, var(--rb-primary), var(--rb-secondary)); font-size: 15px; box-shadow: 0 4px 10px rgba(37, 99, 235, .25); }
.rb-brand-light { color: #fff !important; }
.rb-nav { display: flex; align-items: center; flex: 1; gap: 16px; }
.rb-links { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0 auto 0 8px; padding: 0; }
.rb-link { display: block; padding: 8px 12px; border-radius: 8px; color: #475569 !important; font-weight: 500; text-decoration: none !important; transition: color .15s, background .15s; }
.rb-link:hover { color: var(--rb-primary) !important; background: var(--rb-primary-soft); }
.rb-link.is-active { color: var(--rb-primary) !important; font-weight: 600; }
.rb-actions { display: flex; align-items: center; gap: 10px; }
.rb-btn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none !important; white-space: nowrap; border: 1px solid transparent; transition: all .15s; cursor: pointer; }
.rb-btn-primary { background: var(--rb-primary); color: #fff !important; box-shadow: 0 4px 12px rgba(37, 99, 235, .25); }
.rb-btn-primary:hover { background: var(--rb-primary-dark); }
.rb-btn-ghost { color: var(--rb-ink) !important; border-color: var(--rb-border); background: #fff; }
.rb-btn-ghost:hover { border-color: var(--rb-primary); color: var(--rb-primary) !important; }
.rb-account { position: relative; }
.rb-account > summary { list-style: none; display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px 4px 4px; border-radius: 999px; border: 1px solid var(--rb-border); background: #fff; }
.rb-account > summary::-webkit-details-marker { display: none; }
.rb-account[open] > summary, .rb-account > summary:hover { border-color: var(--rb-primary); }
.rb-avatar { width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--rb-primary-soft); color: var(--rb-primary); font-weight: 700; }
.rb-account-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; color: var(--rb-ink); font-size: 14px; }
.rb-caret { font-size: 11px; color: var(--rb-muted); }
.rb-menu { position: absolute; right: 0; top: calc(100% + 8px); width: 250px; background: #fff; border: 1px solid var(--rb-border); border-radius: 14px; box-shadow: var(--rb-shadow-lg); padding: 8px; z-index: 1050; }
.rb-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--rb-border); margin-bottom: 6px; display: flex; flex-direction: column; }
.rb-menu-head strong { color: var(--rb-ink); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-menu-head span { color: var(--rb-muted); font-size: 12px; }
.rb-menu a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 8px; color: #334155 !important; text-decoration: none !important; font-size: 14px; }
.rb-menu a i { width: 16px; text-align: center; color: var(--rb-muted); }
.rb-menu a:hover { background: var(--rb-primary-soft); color: var(--rb-primary) !important; }
.rb-menu a:hover i { color: var(--rb-primary); }
.rb-menu a.rb-menu-logout { margin-top: 6px; border-top: 1px solid var(--rb-border); border-radius: 0 0 8px 8px; color: #dc2626 !important; }
.rb-menu a.rb-menu-logout i { color: #dc2626; }
.rb-burger { display: none; margin-left: auto; width: 42px; height: 42px; border: 1px solid var(--rb-border); border-radius: 10px; background: #fff; padding: 0 10px; flex-direction: column; justify-content: center; gap: 5px; cursor: pointer; }
.rb-burger span { display: block; height: 2px; background: var(--rb-ink); border-radius: 2px; transition: transform .2s, opacity .2s; }
.rb-burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.rb-burger.is-open span:nth-child(2) { opacity: 0; }
.rb-burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1080px) {
  .rb-account-name { display: none; }
  .rb-link { padding: 8px 9px; }
}
@media (max-width: 960px) {
  .rb-burger { display: flex; }
  .rb-nav { display: none; position: absolute; left: 0; right: 0; top: var(--rb-header-h); background: #fff; border-bottom: 1px solid var(--rb-border); box-shadow: var(--rb-shadow-lg); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 12px; max-height: calc(100vh - var(--rb-header-h)); overflow-y: auto; }
  .rb-nav.is-open { display: flex; }
  .rb-links { flex-direction: column; align-items: stretch; margin: 0; }
  .rb-link { padding: 12px; }
  .rb-actions { flex-wrap: wrap; }
  .rb-actions > .rb-btn { flex: 1; justify-content: center; }
  .rb-account { width: 100%; }
  .rb-account > summary { display: none; }
  .rb-account > .rb-menu { display: block; position: static; width: 100%; box-shadow: none; }
  .rb-account-name { display: inline; }
}

/* ---------- shared footer ---------- */
.rb-footer { background: #0f172a; color: #94a3b8; font-family: var(--rb-font); font-size: 14px; line-height: 1.6; padding: 56px 0 0; margin-top: 64px; }
.rb-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; }
.rb-footer-about p { margin: 14px 0 0; max-width: 360px; color: #94a3b8; }
.rb-footer h4 { color: #fff; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 14px; }
.rb-footer a:not(.rb-brand) { display: block; color: #94a3b8 !important; text-decoration: none !important; padding: 4px 0; }
.rb-footer a:not(.rb-brand):hover { color: #fff !important; }
.rb-footer-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid #1e293b; margin-top: 40px; padding-top: 20px; padding-bottom: 24px; font-size: 13px; }
@media (max-width: 860px) { .rb-footer-grid { grid-template-columns: 1fr 1fr; } .rb-footer-about { grid-column: 1 / -1; } }
@media (max-width: 480px) { .rb-footer-grid { grid-template-columns: 1fr; } }

/* ---------- page hero (coloured banner at the top of a page) ---------- */
body.rb-site .rb-hero { background: var(--rb-hero) !important; color: #fff; }
body.rb-site .rb-hero h1, body.rb-site .rb-hero h2, body.rb-site .rb-hero .display-4, body.rb-site .rb-hero .display-5 { color: #fff; }

/* ---------- components: Bootstrap pages ---------- */
body.rb-site .btn { border-radius: 10px; font-weight: 600; }
body.rb-site .btn-primary { background: var(--rb-primary) !important; border-color: var(--rb-primary) !important; color: #fff !important; }
body.rb-site .btn-primary:hover, body.rb-site .btn-primary:focus { background: var(--rb-primary-dark) !important; border-color: var(--rb-primary-dark) !important; }
body.rb-site .btn-outline-primary { color: var(--rb-primary) !important; border-color: var(--rb-primary) !important; background: transparent !important; }
body.rb-site .btn-outline-primary:hover { background: var(--rb-primary) !important; color: #fff !important; }
body.rb-site .btn-success { background: var(--rb-secondary); border-color: var(--rb-secondary); }
body.rb-site .btn-success:hover { background: var(--rb-secondary-dark); border-color: var(--rb-secondary-dark); }
body.rb-site .text-primary { color: var(--rb-primary) !important; }
body.rb-site .bg-primary { background-color: var(--rb-primary) !important; }
body.rb-site .border-primary { border-color: var(--rb-primary) !important; }
body.rb-site .card { border-radius: var(--rb-radius-lg); border-color: var(--rb-border); }
body.rb-site .form-control, body.rb-site .form-select { border-radius: 10px; border-color: #d1d5db; }
body.rb-site .form-control:focus, body.rb-site .form-select:focus { border-color: var(--rb-primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
body.rb-site .form-check-input:checked { background-color: var(--rb-primary); border-color: var(--rb-primary); }
body.rb-site .alert { border-radius: var(--rb-radius); }
body.rb-site .pagination .page-link { color: var(--rb-primary); }
body.rb-site .pagination .page-item.active .page-link { background: var(--rb-primary); border-color: var(--rb-primary); color: #fff; }
body.rb-site .nav-pills .nav-link.active, body.rb-site .nav-pills .show > .nav-link { background: var(--rb-primary); }
body.rb-site .progress-bar { background-color: var(--rb-primary); }
body.rb-site .dropdown-menu { border-radius: var(--rb-radius); border-color: var(--rb-border); box-shadow: var(--rb-shadow-lg); }

/* ---------- member dashboards with a left sidebar ---------- */
body.rb-site.rb-has-sidebar .sidebar { top: var(--rb-header-h) !important; height: calc(100vh - var(--rb-header-h)) !important; background: linear-gradient(180deg, #1e3a8a 0%, #1d4ed8 100%) !important; z-index: 1000; }
body.rb-site.rb-has-sidebar .sidebar .sidebar-header { display: none; }
@media (min-width: 993px) { body.rb-site.rb-has-sidebar .rb-footer { margin-left: 260px; } }

/* ---------- small helpers ---------- */
body.rb-site .rb-page { padding-top: 32px; padding-bottom: 32px; }
