  :root {
    --font-sans: 'Plus Jakarta Sans', sans-serif;
    --font-ar: 'Tajawal', 'Segoe UI', sans-serif;
    --control-min-height: 40px;
    --control-radius: 0.9rem;
    --control-padding-y: 0.7rem;
    --control-padding-x: 0.95rem;
  }

  body {
    font-family: var(--font-sans);
    background-color: #f8fafc;
    color: #0f172a;
  }

  img,
  svg,
  video,
  canvas {
    max-width: 100%;
    height: auto;
    display: block;
  }

  body[dir="rtl"] .text-left {
    text-align: right;
  }

  body[dir="rtl"] .text-right {
    text-align: left;
  }

  body[dir="rtl"] .justify-between {
    gap: 0.5rem;
  }

  body[dir="rtl"] #languageDropdownContainer {
    margin-left: 0;
    margin-right: auto;
  }

  body[dir="rtl"] #languageDropdownMenu {
    left: 0;
    right: auto;
    max-width: calc(100vw - 1rem);
  }

  @media (max-width: 640px) {
    body[dir="rtl"] #languageDropdownMenu {
      min-width: 128px;
    }
  }

  * {
    box-sizing: border-box;
  }

  html,
  body {
    width: 100%;
    overflow-x: hidden;
  }

  /* Keep mobile sizing consistent across iOS Safari and Samsung/Android browsers. */
  html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }

  @supports (padding: max(0px)) {
    header {
      padding-top: max(0px, env(safe-area-inset-top));
    }
  }

  table {
    width: 100%;
  }

  th,
  td {
    vertical-align: top;
  }

  a,
  button,
  input,
  select,
  textarea {
    min-height: var(--control-min-height);
  }

  #searchInput {
    padding-left: 2.25rem !important;
  }

  select.rounded-xl,
  select.rounded-lg,
  textarea.rounded-xl,
  textarea.rounded-lg {
    border-radius: var(--control-radius);
  }

  button.rounded-xl,
  button.rounded-lg,
  a.rounded-xl,
  a.rounded-lg,
  .aw-cookie-banner__btn,
  .admin-tab-btn {
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }

  input.rounded-xl,
  input.rounded-lg,
  select.rounded-xl,
  select.rounded-lg,
  textarea.rounded-xl,
  textarea.rounded-lg {
    padding-top: var(--control-padding-y) !important;
    padding-bottom: var(--control-padding-y) !important;
    padding-left: var(--control-padding-x) !important;
    padding-right: var(--control-padding-x) !important;
    font-size: 0.94rem;
  }

  #providersGrid > div {
    min-width: 0;
  }

  #submissionModal > div {
    width: min(100%, 42rem);
    max-height: calc(100dvh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  #submissionForm {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
    min-height: 0;
    padding-right: 0.25rem;
  }

  #submissionForm > div:last-child {
    position: sticky;
    bottom: 0;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid #e2e8f0;
    background: #ffffff;
  }

  #submissionForm .submission-security-hint {
    flex: 1 1 16rem;
    min-width: 0;
  }

  #authModal {
    padding: 1rem;
  }

  #authModal > div {
    width: min(100%, 27rem);
    border-radius: 1.25rem;
    border-color: #dbe4ef;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
  }

  #authModal .border-b {
    border-color: #e8eef5;
  }

  #authModal .px-6.py-5 {
    padding: 1.25rem 1.25rem 1rem;
  }

  #authModal .p-6 {
    padding: 1.25rem;
  }

  #authModal h2 {
    font-size: 1.75rem;
    line-height: 1.15;
  }

  #authModal p {
    font-size: 0.92rem;
  }

  #authModal label {
    margin-bottom: 0.4rem;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
  }

  #authModal input,
  #authModal button {
    min-height: 0;
  }

  #authModal input {
    padding: 0.8rem 0.95rem;
    border-radius: 0.9rem;
    border-color: #cfd8e3;
    font-size: 0.98rem;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.03);
  }

  #authModal input::placeholder {
    color: #94a3b8;
  }

  #authModal #authMessage {
    border-radius: 0.9rem;
    font-size: 0.88rem;
  }

  #authModal .flex.gap-3.pt-2 {
    gap: 0.75rem;
    padding-top: 0.15rem;
  }

  #authModal #authLoginBtn,
  #authModal #authSignupBtn {
    padding: 0.72rem 1rem;
    border-radius: 0.9rem;
    font-size: 0.95rem;
    line-height: 1.2;
    font-weight: 700;
  }

  #authModal #authSignupBtn {
    border-color: #d7dee7;
    background: #f8fafc;
  }

  #authModal button[aria-label="Close"] {
    width: 2rem;
    height: 2rem;
    min-width: 0;
    padding: 0;
    border-radius: 999px;
  }

  @media (max-width: 640px) {
    #authModal {
      padding: 0.75rem;
    }

    #authModal > div {
      width: min(100%, 24rem);
    }

    #authModal .px-6.py-5,
    #authModal .p-6 {
      padding: 1rem;
    }

    #authModal .flex.gap-3.pt-2 {
      flex-direction: column;
    }
  }

  .footer-pro {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  }

  .footer-pro-top-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(
      90deg,
      #0284c7 0%,
      #0ea5e9 40%,
      #38bdf8 100%
    );
  }

  /* Site header shell & responsive layout fixes */
  .site-header-shell {
    position: relative;
    width: 100%;
  }

  .site-header-shell .max-w-7xl,
  .site-header-shell header,
  .site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
    gap: 0.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .site-brand-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .site-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .site-brand-text h1,
  .site-brand-text a {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95rem !important;
  }

  .site-brand-text span,
  .site-brand-text p,
  .site-brand-text .text-xs,
  .site-brand-text .text-sm {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.65rem !important;
    display: block !important;
    line-height: 1.1;
    max-width: 100%;
  }

  @media (max-width: 640px) {
    .site-brand-text span,
    .site-brand-text p,
    .site-brand-text .text-xs,
    .site-brand-text .text-sm {
      display: block !important;
    }
  }

  .site-header-shell .site-logo,
  .site-header-shell img[src$="WasselniLogo.png"] {
    width: clamp(4rem, 8vw, 6rem);
    height: clamp(4rem, 8vw, 6rem);
    max-width: none;
    flex-shrink: 0;
    object-fit: contain;
    object-position: center;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none;
    filter: drop-shadow(0 4px 10px rgba(15, 23, 42, 0.12));
  }

  @media (max-width: 639px) {
    .site-header-shell .site-logo,
    .site-header-shell img[src$="WasselniLogo.png"] {
      width: 4.5rem;
      height: 4.5rem;
    }
  }

  /* Hamburger toggle styling */
  .mobile-nav-toggle {
    display: none;
    position: relative;
    z-index: 70;
    flex-shrink: 0;
    width: 2.1rem;
    min-width: 2.1rem;
    height: 2.1rem;
    min-height: 0;
    padding: 0;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #dbe4ef;
    border-radius: 0.6rem;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
  }

  .header-right {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    flex-shrink: 0;
  }

  /* Dropdown absolute overlay menu for mobile - closed by default */
  .site-nav-panel {
    display: none !important;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0.5rem;
    width: 14rem;
    z-index: 60;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.15);
  }

  /* Open state via toggle class */
  .site-header-shell.mobile-nav-open .site-nav-panel {
    display: flex !important;
  }

  /* Backdrop layer to click outside and close menu */
  .site-header-shell.mobile-nav-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 55;
    background: transparent;
    pointer-events: none;
  }

  @media (min-width: 640px) {
    .mobile-nav-toggle {
      display: none;
    }

    .site-header-shell.mobile-nav-open::after {
      display: none;
    }

    .site-nav-panel {
      display: flex !important;
      position: static !important;
      flex-direction: row !important;
      align-items: center;
      gap: 0.2rem;
      padding: 0;
      background: transparent;
      box-shadow: none;
      border: none;
      width: auto;
      right: auto;
    }

    .site-nav-panel-header {
      display: none !important;
    }

    .site-nav-panel .nav-divider {
      width: 1px;
      height: 1rem;
      background: #e2e8f0;
      margin: 0 0.2rem;
    }

    .site-nav-panel .nav-item {
      padding: 0.38rem 0.68rem;
      font-size: 0.83rem;
      width: auto;
      border-radius: 0.55rem;
    }

    .site-nav-panel .nav-item i {
      display: none;
    }
  }

  @media (max-width: 639px) {
    .mobile-nav-toggle {
      display: inline-flex;
    }

    #registerBusinessBtn {
      padding-left: 0.25rem !important;
      padding-right: 0.25rem !important;
      font-size: 0.58rem !important;
      white-space: nowrap;
      letter-spacing: -0.03em;
      min-height: 1.9rem !important;
    }
  }

  @media (max-width: 390px) {
    .site-header-shell {
      gap: 0.35rem !important;
      padding-left: 0.4rem !important;
      padding-right: 0.4rem !important;
    }

    .site-header-shell .site-logo,
    .site-header-shell img[src$="WasselniLogo.png"] {
      width: 3.05rem;
      height: 3.05rem;
    }

    .site-brand-group {
      gap: 0.35rem;
    }

    .site-brand-title,
    .site-brand-text h1,
    .site-brand-text a {
      font-size: 0.78rem !important;
      line-height: 1.02 !important;
      letter-spacing: -0.03em;
      white-space: nowrap;
    }

    #brandTagline {
      display: none !important;
    }

    #registerBusinessBtn {
      padding-left: 0.2rem !important;
      padding-right: 0.2rem !important;
      font-size: 0.52rem !important;
      min-height: 1.85rem !important;
      letter-spacing: -0.035em;
    }
  }

  .nav-item {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.68rem 0.85rem;
    border-radius: 0.75rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    text-decoration: none;
    background: transparent;
    width: 100%;
    cursor: pointer;
    white-space: nowrap;
  }

  .nav-item:hover {
    background: #eff6ff;
    color: #0284c7;
  }

  .nav-divider {
    height: 1px;
    background: #e2e8f0;
    margin: 0.25rem 0;
  }

  .site-nav-panel-header {
    display: none !important;
  }

  @media (max-width: 639px) {
    .site-nav-panel #accountArea,
    .site-nav-panel #languageDropdownContainer {
      width: 100%;
    }

    .site-nav-panel #accountDropdown,
    .site-nav-panel #languageDropdownMenu {
      position: static !important;
      inset: auto !important;
      width: 100%;
      min-width: 0;
      margin-top: 0.3rem;
      border-radius: 0.75rem;
      box-shadow: none !important;
      border-color: #e2e8f0;
    }

    .site-nav-panel #loginBtn,
    .site-nav-panel #accountBtn,
    .site-nav-panel #languageToggleBtn {
      width: 100%;
      justify-content: flex-start !important;
    }
  }

  /* Scroll navigation */
  .scroll-nav {
    position: fixed;
    right: 0.85rem;
    bottom: 0.85rem;
    z-index: 45;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.28rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid #dbeafe;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.15);
    backdrop-filter: blur(7px);
  }

  .scroll-nav-btn {
    width: 2.05rem;
    height: 2.05rem;
    min-height: 0;
    min-width: 0;
    border-radius: 999px;
    border: 1px solid transparent;
    background: linear-gradient(180deg, #0284c7 0%, #0369a1 100%);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
  }

  /* Footer: scoped, responsive alignment */
  footer,
  .footer-pro {
    width: 100%;
  }

  .footer-mobile-center {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    text-align: left;
  }

  .footer-links-center {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
  }

  .footer-mobile-center > span,
  .footer-mobile-center > div,
  .footer-mobile-center > a {
    min-width: 0;
  }

  body[dir="rtl"] .footer-mobile-center {
    text-align: right;
  }

  @media (max-width: 639px) {
    .footer-mobile-center {
      flex-direction: column;
      align-items: flex-start;
      justify-content: flex-start;
    }

    body[dir="rtl"] .footer-mobile-center {
      align-items: flex-end;
    }
  }

  /* Cookie consent banner */
  .aw-cookie-banner {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    display: none;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  }

  .aw-cookie-banner.is-visible {
    display: block;
  }

  .aw-cookie-banner__inner {
    width: min(100%, 72rem);
    margin: 0 auto;
    padding: 0.85rem 1rem;
    border-radius: 1rem;
    border: 1px solid #8b8c8d;
    background: #d2d7e0;
    color: #58595a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.35);
  }

  .aw-cookie-banner__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
    flex: 1 1 26rem;
  }

  .aw-cookie-banner__text a {
    color: #7dd3fc;
    text-decoration: underline;
  }

  .aw-cookie-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
  }

  .aw-cookie-banner__btn {
    min-width: 6.5rem;
    border-radius: 0.7rem;
    border: 1px solid transparent;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
  }

  .aw-cookie-banner__btn--reject {
    background: #1e293b;
    color: #e2e8f0;
    border-color: #334155;
  }

  .aw-cookie-banner__btn--accept {
    background: #0ea5e9;
    color: #ffffff;
  }

  body.has-cookie-banner {
    padding-bottom: 5.5rem;
  }

  body[dir="rtl"] .aw-cookie-banner__text {
    text-align: right;
  }

  @media (max-width: 640px) {
    .aw-cookie-banner {
      padding: 0.6rem 0.65rem calc(0.65rem + env(safe-area-inset-bottom));
    }

    .aw-cookie-banner__inner {
      align-items: stretch;
      flex-direction: column;
      padding: 0.8rem 0.85rem;
    }

    .aw-cookie-banner__actions {
      width: 100%;
      justify-content: stretch;
    }

    .aw-cookie-banner__btn {
      flex: 1 1 0;
      min-width: 0;
    }

    body.has-cookie-banner {
      padding-bottom: 8rem;
    }
  }