/* ========================================================================
   RasadBox — Site CSS (Light Theme)
   Clean, responsive, SEO-friendly design system
   ======================================================================== */

/* ── Fonts ──────────────────────────────────────────────────────────────── */
@font-face{font-family:"Manrope";font-style:normal;font-weight:200 800;font-display:swap;src:url(../fonts/manrope.woff2)format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"Vazirmatn";font-style:normal;font-weight:100 900;font-display:swap;src:url(../fonts/vazirmatn-arabic.woff2)format("woff2");unicode-range:U+0600-06FF,U+0750-077F,U+0870-088E,U+0890-0891,U+0897-08E1,U+08E3-08FF,U+200C-200E,U+2010-2011,U+204F,U+2E41,U+FB50-FDFF,U+FE70-FE74,U+FE76-FEFC,U+102E0-102FB,U+10E60-10E7E,U+10EC2-10EC4,U+10EFC-10EFF,U+1EE00-1EE03,U+1EE05-1EE1F,U+1EE21-1EE22,U+1EE24,U+1EE27,U+1EE29-1EE32,U+1EE34-1EE37,U+1EE39,U+1EE3B,U+1EE42,U+1EE47,U+1EE49,U+1EE4B,U+1EE4D-1EE4F,U+1EE51-1EE52,U+1EE54,U+1EE57,U+1EE59,U+1EE5B,U+1EE5D,U+1EE5F,U+1EE61-1EE62,U+1EE64,U+1EE67-1EE6A,U+1EE6C-1EE72,U+1EE74-1EE77,U+1EE79-1EE7C,U+1EE7E,U+1EE80-1EE89,U+1EE8B-1EE9B,U+1EEA1-1EEA3,U+1EEA5-1EEA9,U+1EEAB-1EEBB,U+1EEF0-1EEF1}
@font-face{font-family:"Vazirmatn";font-style:normal;font-weight:100 900;font-display:swap;src:url(../fonts/vazirmatn-latin.woff2)format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
/* font-display:block — hide ligature names (key, login, arrow_forward) until icon font is ready */
@font-face{font-family:"Material Symbols Outlined";font-style:normal;font-weight:100 700;font-display:block;src:url(../fonts/material-symbols-outlined.woff2?v=fe4a2925842e)format("woff2")}
.material-symbols-outlined{
  font-family:"Material Symbols Outlined";
  font-weight:normal;
  font-style:normal;
  font-size:24px;
  line-height:1;
  letter-spacing:normal;
  text-transform:none;
  display:inline-block;
  white-space:nowrap;
  word-wrap:normal;
  direction:ltr;
  font-feature-settings:"liga";
  -webkit-font-feature-settings:"liga";
  -moz-font-feature-settings:"liga";
  -moz-osx-font-smoothing:grayscale;
  /* Clip ligature plaintext if font is still loading */
  width:1em;
  height:1em;
  overflow:hidden;
  flex-shrink:0;
  vertical-align:middle;
}

/* Icon font gate: hide ligature names (e.g. "ex" from expand_more) until the subset font is ready.
   site.js adds html.fonts-loaded via document.fonts; the delayed reveal animation is the no-JS / failure
   fallback so icons never stay hidden. Icon list + regeneration: docs/design/system.md §3.4. */
html:not(.fonts-loaded) .material-symbols-outlined{visibility:hidden;animation:rb-icon-font-reveal 0s linear 3.5s forwards}
@keyframes rb-icon-font-reveal{to{visibility:visible}}

/* ── CSS Variables ──────────────────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --primary: #137fec;
    --primary-hover: #0b6dd4;
    --primary-light: #e8f2fd;
    --primary-glow: rgba(19, 127, 236, 0.15);

    /* Surfaces */
    --bg-body: #f7f9fc;
    --bg-white: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8faff;
    --bg-subtle: #f1f5f9;
    --bg-hero-accent: #eef4ff;

    /* Text */
    --text-heading: #0f172a;
    --text-body: #1e293b;
    --text-secondary: #334155;
    --text-muted: #64748b;

    /* Borders */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;
    --border-hover: #cbd5e1;

    /* Accents */
    --green: #10b981;
    --green-light: #ecfdf5;
    --red: #ef4444;
    --indigo: #6366f1;
    --indigo-light: #eef2ff;
    --purple: #8b5cf6;
    --emerald: #10b981;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.08);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.10);
    --shadow-primary: 0 8px 24px rgba(19, 127, 236, 0.2);

    /* Layout */
    --container-max: 1200px;
    --header-height: 72px;

    /* Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Transitions */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] {
    /* Surfaces */
    --bg-body: #0b1121;
    --bg-white: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #1e293b;
    --bg-subtle: #1e293b;
    --bg-hero-accent: rgba(59, 130, 246, 0.05);

    /* Text */
    --text-heading: #f8fafc;
    --text-body: #cbd5e1;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    /* Borders */
    --border-color: #334155;
    --border-light: #1e293b;
    --border-hover: #475569;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.5);
    --shadow-xl: 0 20px 48px rgba(0,0,0,0.6);
}

/* ── Reset & Base ───────────────────────────────────────────────────────── */
/*
 * MUST stay in @layer base. Dashboard layouts also load Tailwind v4
 * (site.generated.css). Unlayered * { margin/padding: 0 } beats every
 * @layer utilities spacing class (p-5, px-5, mb-4, …) and collapses
 * shared modals and other utility-spaced UI.
 */
@layer base {
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height, 72px);
    -webkit-text-size-adjust: 100%;
    line-height: 1.6;
    tab-size: 4;
}

body {
    font-family: var(--font-persian, "Vazirmatn", system-ui, -apple-system, sans-serif);
    background-color: var(--bg-body);
    color: var(--text-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html[dir="rtl"],
html[lang="fa"] {
    font-family: var(--font-persian, "Vazirmatn", system-ui, sans-serif);
}

html[dir="ltr"],
html[lang="en"] {
    font-family: var(--font-latin, "Manrope", system-ui, sans-serif);
}

html[dir="rtl"] body,
html[dir="rtl"] .app-body,
html[lang="fa"] body {
    font-family: var(--font-persian, "Vazirmatn", system-ui, sans-serif);
}

html[dir="ltr"] body,
html[dir="ltr"] .app-body,
html[lang="en"] body {
    font-family: var(--font-latin, "Manrope", system-ui, sans-serif);
}

/* Language switcher — segmented Deep Petrol control */
.lang-switcher {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--color-border, var(--border-color, #d7e0e2));
    border-radius: var(--radius-md, 8px);
    background: var(--color-surface, var(--bg-card, #fff));
    overflow: hidden;
    height: 34px;
}

.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 0 12px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    color: var(--color-text-secondary, var(--text-secondary, #5f7378));
    background: transparent;
    border: 0;
    border-inline-end: 1px solid var(--color-border, var(--border-color, #d7e0e2));
    transition: background-color 0.15s ease, color 0.15s ease;
}

.lang-switcher__btn:last-child {
    border-inline-end: 0;
}

.lang-switcher__btn:hover {
    color: var(--color-text-primary, var(--text-heading, #213439));
    background: var(--color-surface-hover, var(--bg-subtle, #f5f8f8));
}

.lang-switcher__btn.is-active {
    color: #fff;
    background: var(--color-primary, #245f66);
}

.lang-switcher__btn.is-active:hover {
    color: #fff;
    background: var(--color-primary-hover, #1d4c52);
}

.lang-switcher__btn[lang="fa"] {
    font-family: var(--font-persian, "Vazirmatn", system-ui, sans-serif);
}

.lang-switcher__btn[lang="en"] {
    font-family: var(--font-latin, "Manrope", system-ui, sans-serif);
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s var(--ease);
}

button {
    cursor: pointer;
    border: none;
    /* Do not force background — unlayered reset would beat Tailwind bg-* utilities */
    font-family: inherit;
    font-size: inherit;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    line-height: 1.3;
    font-weight: 800;
}

p {
    line-height: 1.7;
}

ul, ol {
    list-style: none;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

.font-english {
    font-family: "Manrope", system-ui, sans-serif;
}

/* ── Scrollbar ──────────────────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-hover);
}

/* ── Container ──────────────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin-inline: auto;
    padding-inline: 20px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    transition: box-shadow 0.3s var(--ease);
}

.site-header:hover {
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 110;
}

.logo-icon {
    width: 36px;
    height: 36px;
    color: var(--primary);
}

.logo-text {
    font-size: 1.3rem;
    font-weight: 900;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

/* Desktop Navigation */
.main-nav {
    display: none;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s var(--ease);
    padding: 8px 0;
    position: relative;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
    transition: width 0.3s var(--ease);
}

.nav-link:hover::after {
    width: 100%;
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 0;
    transition: color 0.2s var(--ease);
}

.nav-dropdown-toggle:hover {
    color: var(--primary);
}

.nav-dropdown-toggle .material-symbols-outlined {
    font-size: 18px;
    transition: transform 0.3s var(--ease);
}

.nav-dropdown:hover .nav-dropdown-toggle .material-symbols-outlined {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    right: -12px;
    width: 260px;
    padding-top: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.3s var(--ease);
    z-index: 120;
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown-content {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 8px;
    overflow: hidden;
}

.dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease);
}

.dropdown-item:hover {
    background: var(--bg-subtle);
}

.dropdown-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s var(--ease);
}

.dropdown-icon.icon-primary {
    background: var(--primary-light);
    color: var(--primary);
}

.dropdown-icon.icon-indigo {
    background: var(--indigo-light);
    color: var(--indigo);
}

.dropdown-icon.icon-emerald {
    background: var(--green-light);
    color: var(--emerald);
}

.dropdown-item:hover .dropdown-icon {
    color: #fff;
}

.dropdown-item:hover .dropdown-icon.icon-primary {
    background: var(--primary);
}

.dropdown-item:hover .dropdown-icon.icon-indigo {
    background: var(--indigo);
}

.dropdown-item:hover .dropdown-icon.icon-emerald {
    background: var(--emerald);
}

.dropdown-icon .material-symbols-outlined {
    font-size: 20px;
}

.dropdown-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-heading);
    margin-bottom: 2px;
}

.dropdown-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Header Actions */
.header-actions {
    display: none;
    align-items: center;
    gap: 8px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 16px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--primary);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    padding: 0 20px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #fff;
    background: var(--primary);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-primary);
    transition: all 0.25s var(--ease);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(19, 127, 236, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 24px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-heading);
    background: var(--bg-white);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all 0.25s var(--ease);
}

.btn-outline:hover {
    border-color: var(--border-hover);
    background: var(--bg-subtle);
}

.btn-large {
    height: 52px;
    padding: 0 32px;
    font-size: 1rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-primary);
}

.btn-large:hover {
    box-shadow: 0 14px 32px rgba(19, 127, 236, 0.35);
}

.btn-dashboard {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 40px;
    padding: 0 14px;
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-body);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.btn-dashboard:hover {
    background: var(--bg-subtle);
    color: var(--primary);
}

.btn-dashboard .material-symbols-outlined {
    font-size: 18px;
    color: var(--primary);
}

.btn-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: var(--red);
    border-radius: var(--radius-sm);
    transition: all 0.2s var(--ease);
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.08);
}

.btn-logout .material-symbols-outlined {
    font-size: 18px;
}

/* ── Header Account Dropdown ────────────────────────────────────────────── */
.account-menu {
    position: relative;
    display: inline-block;
}

.account-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 4px 10px 4px 6px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--color-border, #d8e4e4);
    background: var(--color-surface, #ffffff);
    color: var(--color-text-secondary, #52686a);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.account-menu-trigger:hover,
.account-menu.is-open .account-menu-trigger {
    background: var(--color-surface-subtle, #eff5f5);
    border-color: var(--color-border-strong, #bacbcb);
}

.account-menu-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9999px;
    background: var(--color-primary-soft, #dceaea);
    color: var(--color-primary, #245f66);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    font-family: var(--font-latin, "Manrope", sans-serif);
    flex-shrink: 0;
}

.account-menu-avatar img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.account-menu-avatar-fallback {
    font-size: 18px;
    line-height: 1;
}

.account-menu-name {
    font-size: 0.875rem;
    font-weight: 600;
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-menu-caret {
    font-size: 18px;
    color: var(--color-text-muted, #637a7d);
    transition: transform 0.15s ease;
}

.account-menu.is-open .account-menu-caret {
    transform: rotate(180deg);
}

.account-menu-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    min-width: 200px;
    padding: 6px;
    border-radius: var(--radius-md, 8px);
    border: 1px solid var(--color-border, #d8e4e4);
    background: var(--color-surface, #ffffff);
    box-shadow: var(--shadow-md, 0 8px 24px rgba(33, 52, 57, 0.12));
    z-index: 1000;
}

.account-menu-dropdown[hidden] {
    display: none;
}

.account-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm, 6px);
    color: var(--color-text-primary, #213439);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: background-color 0.15s ease;
}

.account-menu-item .material-symbols-outlined {
    font-size: 20px;
    color: var(--color-text-muted, #637a7d);
}

.account-menu-item:hover {
    background: var(--color-surface-subtle, #eff5f5);
}

.account-menu-item-danger {
    color: var(--status-critical, #b54745);
}

.account-menu-item-danger .material-symbols-outlined {
    color: var(--status-critical, #b54745);
}

.account-menu-item-danger:hover {
    background: var(--status-critical-soft, #fbebeb);
}

/* ── Mobile Menu ────────────────────────────────────────────────────────── */
#mobile-menu-toggle {
    display: none;
}

.menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--text-heading);
    cursor: pointer;
    z-index: 110;
    border-radius: var(--radius-sm);
    transition: background 0.2s var(--ease);
    -webkit-user-select: none;
    user-select: none;
}

.menu-btn:hover {
    background: var(--bg-subtle);
}

.menu-btn .close-icon {
    display: none;
}

#mobile-menu-toggle:checked ~ .menu-btn .open-icon {
    display: none;
}

#mobile-menu-toggle:checked ~ .menu-btn .close-icon {
    display: block;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    z-index: 90;
    flex-direction: column;
    padding: 16px 24px 24px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-xl);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    animation: fadeSlideDown 0.3s var(--ease);
}

#mobile-menu-toggle:checked ~ .mobile-menu {
    display: flex;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-heading);
    border-bottom: 1px solid var(--border-light);
    transition: color 0.2s var(--ease);
}

.mobile-nav-link:hover {
    color: var(--primary);
}

.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.mobile-menu-actions .btn-primary,
.mobile-menu-actions .btn-ghost {
    width: 100%;
    height: 48px;
    justify-content: center;
    border-radius: var(--radius-md);
}

.mobile-menu-actions .btn-ghost {
    border: 1.5px solid var(--border-color);
}

@keyframes fadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Main Site Responsive Nav ───────────────────────────────────────────── */
@media (min-width: 992px) {
    .main-nav {
        display: flex !important;
    }
    .header-actions {
        display: flex !important;
    }
    .menu-btn, #mobile-menu-toggle {
        display: none !important;
    }
    .mobile-menu {
        display: none !important;
    }
}

/* ── Main Content ───────────────────────────────────────────────────────── */
.site-main {
    flex: 1;
}

/* ── Common Typography & Badges ─────────────────────────────────────────── */
.gradient-text {
    background: linear-gradient(135deg, #137fec 0%, #3b82f6 50%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.16);
    padding: 4px 14px;
    border-radius: 99px;
    letter-spacing: 0.02em;
    margin-bottom: 14px;
}

.section-tag .material-symbols-outlined {
    font-size: 16px;
}

.section-title {
    font-size: 1.85rem;
    font-weight: 900;
    color: #0f172a;
    max-width: 720px;
    margin: 0 auto 16px;
    line-height: 1.35;
    letter-spacing: -0.02em;
}

.section-desc {
    font-size: 1.02rem;
    color: #475569;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.8;
}

.section-header {
    text-align: center;
    margin-bottom: 52px;
}

/* ── Hero Section ───────────────────────────────────────────────────────── */
.hero-section {
    padding: 56px 0 72px;
    position: relative;
    overflow: hidden;
}

.hero-mesh-glow {
    position: absolute;
    top: -160px;
    left: 50%;
    transform: translateX(-50%);
    width: 900px;
    height: 650px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.12) 0%, rgba(99, 102, 241, 0.06) 45%, transparent 70%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.hero-grid-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 60%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, #000 60%, transparent 100%);
    pointer-events: none;
    z-index: 0;
}

.hero-content {
    display: flex;
    flex-direction: column;
    gap: 48px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    max-width: 780px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: var(--radius-full);
    font-size: 0.84rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.08);
}

.live-pulse-dot {
    position: relative;
    display: inline-flex;
    width: 10px;
    height: 10px;
}

.live-pulse-dot .pulse-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #22c55e;
    animation: pingAnimation 1.8s cubic-bezier(0, 0, 0.2, 1) infinite;
    opacity: 0.75;
}

.live-pulse-dot .pulse-core {
    position: relative;
    display: inline-flex;
    border-radius: 50%;
    width: 10px;
    height: 10px;
    background: #16a34a;
}

@keyframes pingAnimation {
    75%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.hero-title {
    font-size: 2.35rem;
    font-weight: 900;
    line-height: 1.32;
    color: #0f172a;
    letter-spacing: -0.03em;
}

.hero-description {
    font-size: 1.08rem;
    color: #475569;
    max-width: 660px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 580px;
    margin: 16px 0 10px;
    justify-content: center;
    align-items: center;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 56px;
    padding: 0 38px;
    font-size: 1.02rem;
    font-weight: 800;
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.32);
    transition: all 0.25s var(--ease);
    border: 1px solid rgba(255, 255, 255, 0.15);
    white-space: nowrap;
}

.hero-btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.42);
    color: #ffffff;
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 56px;
    padding: 0 34px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #1e293b;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: all 0.25s var(--ease);
    white-space: nowrap;
}

.hero-btn-secondary:hover {
    border-color: #3b82f6;
    background: #f8fafc;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.hero-btn-primary .material-symbols-outlined,
.hero-btn-secondary .material-symbols-outlined,
.btn-cta-white .material-symbols-outlined,
.btn-cta-ghost .material-symbols-outlined {
    font-size: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hero-btn-primary span:last-child,
.hero-btn-secondary span:last-child,
.btn-cta-white span:last-child,
.btn-cta-ghost span:last-child {
    display: inline-block;
    padding: 0 4px;
}

.hero-trust-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px 24px;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 6px;
}

.hero-trust-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.hero-trust-item .material-symbols-outlined {
    font-size: 18px;
    color: #16a34a;
}

/* ── Hero Interactive Dashboard Mockup ──────────────────────────────────── */
.hero-mockup-wrapper {
    width: 100%;
    max-width: 980px;
    position: relative;
    margin-top: 10px;
}

.hero-mockup-glow {
    position: absolute;
    inset: 10% 15%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(99, 102, 241, 0.2));
    filter: blur(70px);
    z-index: 0;
    pointer-events: none;
}

.hero-mockup-window {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 24px;
    box-shadow: 0 24px 64px -12px rgba(15, 23, 42, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.8);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.mockup-header-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mockup-window-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.mockup-dot.dot-red { background: #ef4444; }
.mockup-dot.dot-yellow { background: #f59e0b; }
.mockup-dot.dot-green { background: #10b981; }

.mockup-url-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 0.8rem;
    color: #475569;
    font-family: 'Manrope', 'Inter', sans-serif;
    flex: 1;
    max-width: 420px;
    margin: 0 auto;
}

.mockup-url-bar .material-symbols-outlined {
    font-size: 16px;
    color: #10b981;
}

.mockup-url-status {
    font-size: 0.72rem;
    font-weight: 700;
    color: #16a34a;
    background: rgba(34, 197, 94, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
    margin-inline-start: auto;
}

.mockup-live-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 4px 10px;
    border-radius: 8px;
}

.mockup-content-body {
    padding: 24px;
    background: #f8fafc;
}

.mockup-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.mockup-stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: all 0.2s ease;
}

.mockup-stat-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.mockup-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.mockup-stat-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mockup-stat-val {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    font-family: 'Manrope', 'Inter', sans-serif;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.mockup-stat-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 6px;
    font-family: 'Vazirmatn', sans-serif;
}

.badge-green-soft {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.badge-blue-soft {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.badge-amber-soft {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

/* Mockup Graph Box */
.mockup-graph-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 20px;
}

.mockup-graph-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.mockup-graph-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mockup-graph-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.75rem;
    color: #64748b;
}

.legend-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.legend-color {
    width: 8px;
    height: 8px;
    border-radius: 2px;
}

.mockup-chart-visual {
    height: 140px;
    width: 100%;
    position: relative;
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding-top: 10px;
}

.chart-bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar-fill {
    width: 100%;
    max-width: 28px;
    background: linear-gradient(180deg, #3b82f6 0%, rgba(59, 130, 246, 0.2) 100%);
    border-radius: 6px 6px 2px 2px;
    transition: height 0.6s ease;
    position: relative;
}

.chart-bar-fill:hover {
    background: linear-gradient(180deg, #2563eb 0%, rgba(37, 99, 235, 0.4) 100%);
}

.chart-bar-time {
    font-size: 0.68rem;
    color: #94a3b8;
    font-family: 'Manrope', sans-serif;
}

/* Floating Mockup Badges */
.floating-alert-badge {
    position: absolute;
    top: -18px;
    right: -16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    animation: gentleFloat 4s ease-in-out infinite;
}

.floating-speed-badge {
    position: absolute;
    bottom: -18px;
    left: -16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px 18px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2;
    animation: gentleFloat 4s ease-in-out infinite 2s;
}

@keyframes gentleFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.badge-avatar-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.badge-text-top {
    font-size: 0.84rem;
    font-weight: 800;
    color: #0f172a;
}

.badge-text-sub {
    font-size: 0.72rem;
    color: #64748b;
}

/* ── Instant URL Quick-Check Section ────────────────────────────────────── */
.quick-check-section {
    padding: 24px 0 56px;
    position: relative;
    z-index: 2;
}

.quick-check-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 1px solid #334155;
    border-radius: 24px;
    padding: 36px 32px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.16);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.quick-check-card::before {
    content: '';
    position: absolute;
    top: -80px;
    right: -80px;
    width: 260px;
    height: 260px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.25) 0%, transparent 70%);
    filter: blur(40px);
    pointer-events: none;
}

.quick-check-header {
    text-align: center;
    margin-bottom: 24px;
}

.quick-check-title {
    font-size: 1.45rem;
    font-weight: 900;
    color: #ffffff;
    margin-bottom: 8px;
}

.quick-check-desc {
    font-size: 0.92rem;
    color: #94a3b8;
    max-width: 540px;
    margin: 0 auto;
}

.quick-check-form-wrap {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
    margin: 0 auto;
}

.quick-check-input-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    padding: 6px 16px;
    transition: all 0.2s ease;
}

.quick-check-input-box:focus-within {
    border-color: #3b82f6;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2);
}

.quick-check-input-box .material-symbols-outlined {
    font-size: 22px;
    color: #94a3b8;
}

.quick-check-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 0.95rem;
    padding: 10px 12px;
    direction: ltr;
    font-family: 'Manrope', system-ui, sans-serif;
}

.quick-check-input::placeholder {
    color: #64748b;
    direction: rtl;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 0.88rem;
}

.quick-check-btn {
    height: 48px;
    padding: 0 28px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.94rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quick-check-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

/* Quick Check Result Container */
.quick-check-result {
    display: none;
    margin-top: 28px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 24px;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.result-card-item {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.result-card-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    flex-shrink: 0;
}

.result-card-title {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 2px;
}

.result-card-val {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    font-family: 'Manrope', 'Vazirmatn', sans-serif;
}

.result-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.result-action-text {
    font-size: 0.85rem;
    color: #cbd5e1;
}

.result-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    background: #22c55e;
    color: #0f172a;
    font-weight: 800;
    font-size: 0.84rem;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.result-action-btn:hover {
    background: #16a34a;
    color: #ffffff;
    transform: translateY(-1px);
}

/* ── Tech Stacks & Platforms Ecosystem ──────────────────────────────────── */
.tech-ecosystem-section {
    padding: 24px 0 48px;
    background: transparent;
}

.tech-ecosystem-label {
    text-align: center;
    font-size: 0.84rem;
    font-weight: 700;
    color: #64748b;
    margin-bottom: 20px;
}

.tech-ecosystem-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 12px 16px;
}

.tech-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #334155;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
    transition: all 0.2s ease;
}

.tech-badge-item:hover {
    border-color: #3b82f6;
    color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.tech-badge-item .material-symbols-outlined {
    font-size: 18px;
    color: #3b82f6;
}

/* ── Webmaster Core Features Grid ───────────────────────────────────────── */
.webmaster-features-section {
    padding: 72px 0;
}

.wm-features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.wm-feature-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wm-feature-card:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.08);
    transform: translateY(-4px);
}

.wm-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.wm-feature-card:hover::before {
    opacity: 1;
}

.wm-feature-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: transform 0.3s ease;
}

.wm-feature-card:hover .wm-feature-icon-wrap {
    transform: scale(1.06);
}

.wm-feature-icon-wrap.icon-blue {
    background: rgba(59, 130, 246, 0.1);
    color: #2563eb;
}

.wm-feature-icon-wrap.icon-emerald {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
}

.wm-feature-icon-wrap.icon-amber {
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.wm-feature-icon-wrap.icon-purple {
    background: rgba(139, 92, 246, 0.1);
    color: #7c3aed;
}

.wm-feature-icon-wrap.icon-rose {
    background: rgba(244, 63, 94, 0.1);
    color: #e11d48;
}

.wm-feature-icon-wrap.icon-indigo {
    background: rgba(99, 102, 241, 0.1);
    color: #4f46e5;
}

.wm-feature-icon-wrap .material-symbols-outlined {
    font-size: 28px;
}

.wm-feature-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 3px 10px;
    border-radius: 6px;
    margin-bottom: 12px;
    width: fit-content;
}

.wm-feature-title {
    font-size: 1.18rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
}

.wm-feature-desc {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.75;
    margin-bottom: 20px;
    flex-grow: 1;
}

.wm-feature-checklist {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
}

.wm-check-point {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.wm-check-point .material-symbols-outlined {
    font-size: 16px;
    color: #16a34a;
}

/* ── Interactive Dashboard Showcase (Tabbed Tour) ───────────────────────── */
.dashboard-showcase-section {
    padding: 72px 0;
    background: linear-gradient(180deg, transparent 0%, #f1f5f9 50%, transparent 100%);
}

.showcase-tabs-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 36px;
}

.showcase-tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #475569;
    cursor: pointer;
    transition: all 0.25s ease;
}

.showcase-tab-btn:hover {
    border-color: #cbd5e1;
    color: #0f172a;
    background: #f8fafc;
}

.showcase-tab-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.2);
}

.showcase-tab-btn .material-symbols-outlined {
    font-size: 20px;
    color: #3b82f6;
}

.showcase-tab-btn.active .material-symbols-outlined {
    color: #60a5fa;
}

.showcase-tab-content {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    box-shadow: 0 20px 48px -8px rgba(15, 23, 42, 0.08);
    padding: 32px;
    position: relative;
}

.showcase-panel {
    display: none;
    animation: tabFadeIn 0.3s ease;
}

.showcase-panel.active {
    display: block;
}

@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.panel-header-desc {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-title-area h3 {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.panel-title-area p {
    font-size: 0.88rem;
    color: #64748b;
}

.panel-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    padding: 8px 16px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.panel-view-btn:hover {
    background: #2563eb;
    color: #ffffff;
}

/* ── Why RasadBox / Local Advantage vs Foreign Tools ─────────────────────── */
.why-rasadbox-section {
    padding: 72px 0;
}

.why-grid-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.why-box-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.25s ease;
}

.why-box-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.why-box-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    flex-shrink: 0;
}

.why-box-icon .material-symbols-outlined {
    font-size: 26px;
}

.why-box-content h3 {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.why-box-content p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.7;
}

/* ── How It Works (3 Simple Steps) ──────────────────────────────────────── */
.how-it-works-section {
    padding: 72px 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    position: relative;
}

.step-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.step-card:hover {
    border-color: #3b82f6;
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.1);
}

.step-num-badge {
    font-size: 1.75rem;
    font-weight: 900;
    color: #3b82f6;
    font-family: 'Manrope', sans-serif;
    opacity: 0.35;
    line-height: 1;
}

.step-card h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
}

.step-card p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.75;
}

/* ── Platform Stats Counter ─────────────────────────────────────────────── */
.platform-stats-section {
    padding: 48px 0;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.stats-grid-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    text-align: center;
}

.stat-item-box {
    padding: 16px;
}

.stat-number-text {
    font-size: 2.25rem;
    font-weight: 900;
    color: #0f172a;
    font-family: 'Manrope', 'Inter', sans-serif;
    margin-bottom: 4px;
}

.stat-number-text.text-blue { color: #2563eb; }
.stat-number-text.text-green { color: #16a34a; }
.stat-number-text.text-purple { color: #7c3aed; }
.stat-number-text.text-amber { color: #d97706; }

.stat-label-text {
    font-size: 0.86rem;
    font-weight: 700;
    color: #64748b;
}

/* ── Pricing & Plans Grid ───────────────────────────────────────────────── */
.pricing-section {
    padding: 72px 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: stretch;
}

.pricing-card {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 24px;
    padding: 36px 28px;
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.06);
    transform: translateY(-3px);
}

.pricing-card.featured {
    border-color: #3b82f6;
    box-shadow: 0 20px 48px rgba(59, 130, 246, 0.14);
}

.pricing-badge-popular {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 4px 16px;
    border-radius: 99px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.pricing-header {
    margin-bottom: 24px;
    text-align: center;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.plan-desc {
    font-size: 0.84rem;
    color: #64748b;
    min-height: 40px;
}

.plan-price-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 6px;
    margin: 18px 0 8px;
}

.plan-price {
    font-size: 2.2rem;
    font-weight: 900;
    color: #0f172a;
    font-family: 'Manrope', 'Vazirmatn', sans-serif;
}

.plan-period {
    font-size: 0.82rem;
    color: #94a3b8;
}

.plan-features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 24px 0 32px;
    flex-grow: 1;
    border-top: 1px solid #f1f5f9;
    padding-top: 24px;
}

.plan-feature-row {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.86rem;
    color: #334155;
}

.plan-feature-row .material-symbols-outlined {
    font-size: 18px;
    color: #16a34a;
    flex-shrink: 0;
}

.plan-feature-row.disabled {
    color: #94a3b8;
    opacity: 0.6;
}

.plan-feature-row.disabled .material-symbols-outlined {
    color: #cbd5e1;
}

.btn-plan {
    height: 48px;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.92rem;
    font-weight: 800;
    border-radius: 12px;
    transition: all 0.25s ease;
    text-align: center;
}

.btn-plan-primary {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #ffffff;
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

.btn-plan-primary:hover {
    background: linear-gradient(135deg, #1d4ed8, #1e40af);
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    color: #ffffff;
}

.btn-plan-outline {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    color: #1e293b;
}

.btn-plan-outline:hover {
    border-color: #3b82f6;
    color: #2563eb;
    background: #f8fafc;
}

/* ── FAQ Section (Accordion) ────────────────────────────────────────────── */
.faq-section {
    padding: 72px 0;
}

.faq-accordion-wrap {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item:hover {
    border-color: #cbd5e1;
}

.faq-item.active {
    border-color: #3b82f6;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.08);
}

.faq-question-btn {
    width: 100%;
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    text-align: start;
    font-size: 0.98rem;
    font-weight: 800;
    color: #0f172a;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s ease;
}

.faq-item.active .faq-question-btn {
    color: #2563eb;
}

.faq-chevron {
    font-size: 20px;
    color: #94a3b8;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    color: #2563eb;
}

.faq-answer-box {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
    padding: 0 22px;
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.8;
}

.faq-item.active .faq-answer-box {
    max-height: 300px;
    padding: 0 22px 20px;
}

/* ── CTA Banner Section ─────────────────────────────────────────────────── */
.cta-banner-section {
    padding: 48px 0 88px;
}

.cta-dark-card {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    border: 1px solid #334155;
    border-radius: 28px;
    padding: 56px 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
}

.cta-dark-card::before {
    content: '';
    position: absolute;
    inset: -50%;
    background: radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.18) 0%, transparent 60%);
    pointer-events: none;
}

.cta-inner-wrap {
    position: relative;
    z-index: 1;
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
}

.cta-main-title {
    font-size: 1.85rem;
    font-weight: 900;
    color: #ffffff;
    line-height: 1.35;
}

.cta-main-desc {
    font-size: 1.02rem;
    color: #cbd5e1;
    line-height: 1.8;
}

.cta-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    max-width: 600px;
    margin: 22px 0 10px;
    justify-content: center;
    align-items: center;
}

.btn-cta-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 56px;
    padding: 0 38px;
    font-size: 1.02rem;
    font-weight: 800;
    color: #0f172a;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-cta-white:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(255, 255, 255, 0.2);
    color: #0f172a;
}

.btn-cta-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: 56px;
    padding: 0 34px;
    font-size: 0.98rem;
    font-weight: 700;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    border-radius: 14px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.btn-cta-ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    border-color: rgba(255, 255, 255, 0.4);
    color: #ffffff;
}

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer {
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    padding-top: 64px;
    padding-bottom: 36px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 36px;
    margin-bottom: 48px;
}

.footer-brand {
    grid-column: 1 / -1;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.footer-logo-icon {
    width: 28px;
    height: 28px;
    color: #2563eb;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 900;
    color: #0f172a;
}

.footer-about {
    font-size: 0.86rem;
    color: #64748b;
    line-height: 1.8;
    max-width: 360px;
    margin-bottom: 16px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.social-link:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.2);
}

.footer-column h4 {
    font-size: 0.95rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 18px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    font-size: 0.85rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #2563eb;
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 28px;
    border-top: 1px solid #f1f5f9;
    font-size: 0.78rem;
    color: #94a3b8;
}

.footer-bottom-links {
    display: flex;
    gap: 20px;
}

.footer-bottom-links a {
    color: #94a3b8;
    transition: color 0.2s ease;
}

.footer-bottom-links a:hover {
    color: #64748b;
}

.footer-trust-seals {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.footer-trust-seals img {
    width: 80px;
    height: auto;
}

/* Enamad seal: lazy third-party image below the fold; the box is reserved so the footer never jumps. */
.footer-enamad {
    display: inline-block;
    width: 80px;
    aspect-ratio: 125 / 136;
    cursor: pointer;
}

.footer-trust-seals .footer-enamad-img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ── Responsive Queries ─────────────────────────────────────────────────── */

/* Mobile Fixes & Performance (< 640px / < 768px) */
@media (max-width: 767px) {
    .floating-alert-badge,
    .floating-speed-badge {
        display: none !important;
    }
}

@media (max-width: 639px) {
    .hero-title {
        font-size: 1.85rem !important;
        line-height: 1.35 !important;
    }
    .hero-description {
        font-size: 0.95rem !important;
    }
    .mockup-header-bar {
        padding: 10px 14px !important;
    }
    .mockup-url-bar {
        font-size: 0.72rem !important;
        padding: 4px 8px !important;
    }
    .mockup-live-indicator {
        display: none !important;
    }
    .quick-check-card {
        padding: 24px 18px !important;
    }
    .quick-check-title {
        font-size: 1.22rem !important;
    }
    .pricing-card {
        padding: 24px 18px !important;
    }
    .cta-main-title {
        font-size: 1.5rem !important;
    }

    .hero-actions,
    .cta-action-buttons {
        width: 100% !important;
        max-width: 380px !important;
        margin-inline: auto !important;
        gap: 14px !important;
    }

    .hero-btn-primary,
    .hero-btn-secondary,
    .btn-cta-white,
    .btn-cta-ghost {
        width: 100% !important;
        padding: 0 24px !important;
    }
}

/* sm: 640px+ */
@media (min-width: 640px) {
    .hero-actions {
        flex-direction: row;
        width: auto;
        max-width: none;
        gap: 20px;
        margin: 20px 0 12px;
    }

    .quick-check-form-wrap {
        flex-direction: row;
    }

    .quick-check-input-box {
        flex: 1;
    }

    .result-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .wm-features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .stats-grid-row {
        grid-template-columns: repeat(4, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .mockup-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .cta-action-buttons {
        flex-direction: row;
        width: auto;
        max-width: none;
        gap: 20px;
        margin-top: 24px;
    }
}

/* md: 768px+ */
@media (min-width: 768px) {
    .hero-title {
        font-size: 2.85rem;
    }

    .section-title {
        font-size: 2.15rem;
    }

    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .footer-brand {
        grid-column: auto;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* lg: 1024px+ */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 3.35rem;
    }

    .wm-features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .main-nav {
        display: flex;
    }

    .header-actions {
        display: flex;
    }

    .menu-btn {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}


/* ========================================================================
   AUTH PAGES — Login / Register / OTP (Light Theme)
   ======================================================================== */

/* Auth Layout */
.auth-page-body {
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px 16px;
    position: relative;
    overflow-x: hidden;
}

.auth-ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 0;
}

.auth-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.12;
}

.auth-orb-1 {
    top: -15%;
    right: -10%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--primary) 0%, rgba(99, 102, 241, 0.3) 100%);
}

.auth-orb-2 {
    bottom: -15%;
    left: -10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #3b82f6 0%, #06b6d4 100%);
}

.auth-grid-bg {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 32px 32px;
    opacity: 0.4;
}

.auth-container {
    width: 100%;
    max-width: 460px;
    z-index: 10;
    margin: auto;
}

/* Brand Header */
.auth-brand {
    text-align: center;
    margin-bottom: 24px;
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    margin-bottom: 8px;
}

.auth-brand-icon {
    width: 44px;
    height: 44px;
    background: var(--color-primary-soft, var(--primary-light, #DCEAEA));
    border: 1px solid var(--color-border, var(--border-color));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary, var(--primary, #245F66));
    box-shadow: none;
}

.auth-brand-icon .brand-logo-icon {
    width: 26px;
    height: 26px;
}

.auth-account-type-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 4px;
}

.auth-account-type-card {
    position: relative;
    cursor: pointer;
    border: 1px solid var(--color-border, var(--border-color));
    background: var(--color-surface, var(--bg-white, #fff));
    padding: 14px 12px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-account-type-card:hover {
    border-color: var(--color-border-strong, #BACBCB);
    background: var(--color-surface-hover, #EFF5F5);
}

.auth-account-type-card.active {
    border-color: var(--color-primary, #245F66);
    background: var(--color-primary-soft, #DCEAEA);
    box-shadow: 0 0 0 1px var(--color-primary, #245F66);
}

.auth-account-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.auth-account-type-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--color-text-primary, var(--text-heading));
}

.auth-account-type-card .material-symbols-outlined {
    font-size: 20px;
    color: var(--color-text-secondary, var(--text-secondary));
}

.auth-account-type-card.active .material-symbols-outlined {
    color: var(--color-primary, #245F66);
}

.auth-account-type-desc {
    font-size: 0.75rem;
    line-height: 1.4;
    color: var(--color-text-muted, var(--text-muted));
}

.auth-brand-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--text-heading);
    letter-spacing: -0.02em;
}

.auth-brand-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Auth Card */
.auth-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 32px 28px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* Tabs */
.auth-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 26px;
}

.auth-tab-btn {
    flex: 1;
    padding: 12px 6px;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
}

.auth-tab-btn .material-symbols-outlined {
    font-size: 24px;
    margin-bottom: 2px;
}

.auth-tab-btn:hover {
    background: var(--bg-subtle);
    border-color: var(--border-hover);
    color: var(--text-heading);
}

.auth-tab-btn.active {
    background: var(--primary-light);
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
}

/* Tab Content */
.auth-tab-pane {
    display: none;
    animation: authFadeIn 0.3s var(--ease) forwards;
}

.auth-tab-pane.active {
    display: block;
}

@keyframes authFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form */
.auth-step-header {
    text-align: center;
    margin-bottom: 20px;
}

.auth-step-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-heading);
    margin-bottom: 6px;
}

.auth-step-desc {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.auth-form-group {
    margin-bottom: 18px;
}

.auth-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-icon {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    font-size: 20px;
    transition: color 0.2s var(--ease);
}

.auth-input {
    width: 100%;
    background: var(--bg-subtle);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 13px 44px 13px 14px;
    color: var(--text-heading);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s var(--ease);
    font-feature-settings: "tnum";
}

.auth-input:focus {
    border-color: var(--primary);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.auth-input:focus ~ .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--primary);
}

.auth-input::placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.auth-input-phone {
    padding-left: 64px;
    letter-spacing: 1px;
    direction: ltr;
    text-align: left;
}

.auth-input-left-btn {
    position: absolute;
    left: 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    border-radius: 6px;
    transition: color 0.2s var(--ease);
}

.auth-input-left-btn:hover {
    color: var(--text-heading);
}

.auth-country-badge {
    position: absolute;
    left: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: var(--bg-white);
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    direction: ltr;
    border: 1px solid var(--border-light);
}

.auth-hint {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Options Row */
.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
    font-size: 0.78rem;
}

.auth-checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    color: var(--text-secondary);
}

.auth-checkbox-label input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border: 1.5px solid var(--border-color);
    border-radius: 5px;
    background: var(--bg-subtle);
    cursor: pointer;
    position: relative;
    transition: all 0.2s var(--ease);
}

.auth-checkbox-label input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--primary);
}

.auth-checkbox-label input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s var(--ease);
}

.auth-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Submit Button */
.auth-btn-submit {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
    border: none;
    color: #fff;
    padding: 13px 20px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: var(--shadow-primary);
    transition: all 0.25s var(--ease);
}

.auth-btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(19, 127, 236, 0.35);
}

.auth-btn-submit:active {
    transform: translateY(1px);
}

.auth-btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Divider & Social Login */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0 18px 0;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-light);
}

.auth-divider span {
    padding: 0 12px;
}

.auth-social-wrap {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.auth-btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 13px 28px;
    background-color: var(--bg-card, #fff);
    border: 1.5px solid var(--border-color);
    border-radius: 100px;
    color: var(--text-heading);
    font-size: 0.92rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    letter-spacing: -0.01em;
}

.auth-btn-google:hover {
    background-color: #f8fafc;
    border-color: #94a3b8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    color: var(--text-heading);
}

.auth-btn-google:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* OTP Inputs */
.auth-otp-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 24px 0;
    direction: ltr;
}

.auth-otp-digit {
    width: 52px;
    height: 58px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--bg-subtle);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-heading);
    outline: none;
    transition: all 0.2s var(--ease);
}

.auth-otp-digit:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
    background: var(--bg-white);
}

.auth-phone-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    color: var(--primary);
    margin-top: 8px;
    direction: ltr;
}

.auth-timer-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.auth-timer-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 700;
    color: var(--primary);
    font-feature-settings: "tnum";
    font-family: "Manrope", sans-serif;
}

.auth-resend-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: opacity 0.2s var(--ease);
}

.auth-resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.5;
}

/* Password Strength */
.auth-password-strength {
    height: 4px;
    width: 100%;
    background: var(--bg-subtle);
    border-radius: 2px;
    margin-top: 6px;
    overflow: hidden;
    display: flex;
    gap: 4px;
}

.auth-strength-seg {
    flex: 1;
    height: 100%;
    border-radius: 2px;
    background: var(--border-color);
    transition: background 0.3s var(--ease);
}

/* Spinner */
.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: authSpin 0.7s linear infinite;
    display: none;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

.loading .auth-spinner { display: inline-block; }
.loading .btn-text { display: none; }
.loading .btn-icon { display: none; }

/* Toast */
.auth-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 420px;
    pointer-events: none;
}

.auth-toast {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 10px;
    border-right: 4px solid var(--primary);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s var(--ease);
    pointer-events: auto;
}

.auth-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.auth-toast-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.auth-toast.toast-success { border-right-color: var(--green); }
.auth-toast.toast-success .auth-toast-icon { color: var(--green); }
.auth-toast.toast-error { border-right-color: var(--red); }
.auth-toast.toast-error .auth-toast-icon { color: var(--red); }
.auth-toast.toast-info .auth-toast-icon { color: var(--primary); }

.auth-toast-content {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--text-heading);
}

/* Dashboard toast — Deep Petrol tokens, above the install modal */
.rb-toast-container {
    position: fixed;
    top: var(--spacing-6, 24px);
    inset-inline: 0;
    z-index: 10050;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-2, 8px);
    padding-inline: var(--spacing-4, 16px);
    pointer-events: none;
}

.rb-toast {
    width: min(26.25rem, 100%);
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-3, 12px);
    padding: 14px 16px;
    background: var(--color-surface, #fff);
    color: var(--color-text-primary, #213439);
    border: 1px solid var(--color-border, #D8E4E4);
    border-inline-start: 4px solid var(--color-primary, #245F66);
    border-radius: var(--radius-lg, 12px);
    box-shadow: var(--shadow-lg, 0 12px 32px -4px rgba(33, 52, 57, 0.12));
    pointer-events: auto;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.rb-toast.show {
    opacity: 1;
    transform: none;
}

.rb-toast-icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
    color: var(--color-primary, #245F66);
}

.rb-toast-content {
    flex: 1;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.375rem;
}

.rb-toast.toast-success {
    background: var(--status-healthy-soft, #E8F5F0);
    border-color: var(--status-healthy-border, #BCE3D4);
    border-inline-start-color: var(--status-healthy, #277A58);
}

.rb-toast.toast-success .rb-toast-icon { color: var(--status-healthy, #277A58); }

.rb-toast.toast-error {
    background: var(--status-critical-soft, #FBEBEB);
    border-color: var(--status-critical-border, #F3C7C6);
    border-inline-start-color: var(--status-critical, #B54745);
}

.rb-toast.toast-error .rb-toast-icon { color: var(--status-critical, #B54745); }

.rb-toast.toast-info {
    background: var(--status-warning-soft, #FEF5E7);
    border-color: var(--status-warning-border, #F8E0B8);
    border-inline-start-color: var(--status-warning, #A76B24);
}

.rb-toast.toast-info .rb-toast-icon { color: var(--status-warning, #A76B24); }

/* Auth Footer */
.auth-footer {
    margin-top: 24px;
    text-align: center;
    z-index: 10;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    transition: all 0.2s var(--ease);
}

.auth-back-link:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: var(--primary-light);
}

.auth-copyright {
    margin-top: 14px;
    font-size: 0.7rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.auth-edit-btn {
    background: transparent;
    border: none;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 2px;
}


/* ========================================================================
   DASHBOARD — Premium Professional Theme
   Designed for Webmasters & DevOps
   ======================================================================== */

/* Dashboard Body */
.dash-body {
    background: #f0f4f8;
    color: #334155;
    min-height: 100vh;
    font-family: "Vazirmatn", system-ui, sans-serif;
}

/* ── Dashboard Top Header ───────────────────────────────────────────────── */
.dash-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 50;
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(20px) saturate(1.6);
    -webkit-backdrop-filter: blur(20px) saturate(1.6);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 4px 12px rgba(15, 23, 42, 0.02);
}

.dash-header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.dash-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-heading);
    cursor: pointer;
    padding: 8px;
    margin-inline-end: 4px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dash-menu-toggle:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

@media (max-width: 767px) {
    .dash-menu-toggle {
        display: flex;
    }
}

.dash-logo {
    font-size: 1.25rem;
    font-weight: 900;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.03em;
}

.dash-header-nav {
    display: none;
    gap: 28px;
}

.dash-header-nav a {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.2s ease;
    padding-bottom: 4px;
}

.dash-header-nav a:hover {
    color: #3b82f6;
}

.dash-header-nav a.active {
    color: #3b82f6;
    border-bottom: 2px solid #3b82f6;
    font-weight: 700;
}

.dash-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dash-icon-btn {
    padding: 8px;
    border-radius: 10px;
    color: #64748b;
    transition: all 0.2s ease;
    position: relative;
}

.dash-icon-btn:hover {
    background: #f1f5f9;
    color: #3b82f6;
}

.dash-notif-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #fff;
}

.dash-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s ease;
}

.dash-avatar:hover {
    border-color: #3b82f6;
}

.dash-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dash-avatar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    padding: 5px 14px 5px 5px;
    border-radius: 50px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.25s ease;
}

.dash-avatar-link:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */
.dash-sidebar {
    position: fixed;
    inset-inline-start: 0;
    top: 0;
    height: 100%;
    width: 264px;
    z-index: 40;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-inline-end: 1px solid #e2e8f0;
    box-shadow: -4px 0 24px rgba(15, 23, 42, 0.04);
    padding-top: 80px;
    display: flex;
    flex-direction: column;
}

.dash-sidebar-brand {
    padding: 0 24px 28px;
    text-align: start;
}

.dash-sidebar-brand h2 {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    margin-bottom: 4px;
}

.dash-sidebar-brand p {
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #94a3b8;
    font-family: "Inter", "Manrope", sans-serif;
}

.dash-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 0 12px;
}

.dash-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 16px;
    font-size: 0.88rem;
    font-weight: 600;
    color: #64748b;
    border-radius: 12px;
    transition: all 0.2s ease;
    position: relative;
}

.dash-nav-item .material-symbols-outlined {
    font-size: 22px;
    color: #94a3b8;
    transition: color 0.2s ease;
}

.dash-nav-item:hover {
    background: #f1f5f9;
    color: #1e293b;
}

.dash-nav-item:hover .material-symbols-outlined {
    color: #3b82f6;
}

.dash-nav-item.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.06));
    color: #3b82f6;
    font-weight: 700;
    border-right: none;
}

.dash-nav-item.active::before {
    content: '';
    position: absolute;
    right: -12px;
    top: 8px;
    bottom: 8px;
    width: 4px;
    background: linear-gradient(180deg, #3b82f6, #6366f1);
    border-radius: 4px 0 0 4px;
}

.dash-nav-item.active .material-symbols-outlined {
    color: #3b82f6;
}

.dash-sidebar-bottom {
    margin-top: auto;
    padding: 16px 12px;
}

.dash-sidebar-bottom .btn-primary {
    width: 100%;
    height: 44px;
    font-size: 0.85rem;
}

.dash-sidebar-footer {
    margin-top: 12px;
    border-top: 1px solid #f1f5f9;
    padding: 12px 0 24px;
}

.dash-sidebar-footer a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #94a3b8;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dash-sidebar-footer a:hover {
    background: #f8fafc;
    color: #475569;
}

.dash-sidebar-footer a.dash-logout:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

/* ── Main Content ───────────────────────────────────────────────────────── */
.dash-main {
    padding: 88px 32px 48px;
    transition: all 0.3s ease;
}

.dash-main-inner {
    max-width: 1320px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ── Hero Card ──────────────────────────────────────────────────────────── */
.dash-hero {
    display: flex;
    flex-direction: column;
    gap: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04), 0 6px 24px rgba(15, 23, 42, 0.03);
    position: relative;
    overflow: hidden;
}

.dash-hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 240px;
    height: 240px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.dash-hero::after {
    content: '';
    position: absolute;
    bottom: -80px;
    left: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

.dash-hero-text {
    flex: 1;
    text-align: start;
    position: relative;
    z-index: 1;
}

.dash-hero-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 10px;
    line-height: 1.4;
}

.dash-hero-desc {
    font-size: 0.9rem;
    color: #64748b;
    margin-bottom: 22px;
    max-width: 520px;
    line-height: 1.7;
}

/* ── Add Form ───────────────────────────────────────────────────────────── */
.dash-add-form {
    display: flex;
    align-items: stretch;
    max-width: 560px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(226, 232, 240, 0.8);
}

.dash-add-input {
    flex: 1;
    background: #ffffff;
    border: none;
    border-radius: 0;
    padding: 14px 18px;
    font-family: "Inter", "Manrope", monospace;
    font-size: 0.92rem;
    color: #0f172a;
    outline: none;
    text-align: left;
    direction: ltr;
    transition: all 0.2s ease;
}

.dash-add-input:focus {
    background: #fafbff;
    box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.dash-add-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

.dash-add-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 24px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    font-weight: 700;
    font-size: 0.88rem;
    border: none;
    border-radius: 0;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.25s ease;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.1);
}

.dash-add-btn:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15), 0 4px 12px rgba(37, 99, 235, 0.3);
}

.dash-add-btn .material-symbols-outlined {
    font-size: 20px;
}

/* ── Health Card ────────────────────────────────────────────────────────── */
.dash-health-card {
    padding: 24px;
    background: linear-gradient(135deg, #f0fdf4 0%, #f8fafc 100%);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: 16px;
    position: relative;
}

.dash-health-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.dash-health-header span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
}

.dash-ping-dot {
    width: 12px;
    height: 12px;
    position: relative;
    display: inline-flex;
}

.dash-ping-dot .ping-anim {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #22c55e;
    opacity: 0.5;
    animation: ping 1.5s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.dash-ping-dot .ping-core {
    position: relative;
    display: inline-flex;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.4);
}

@keyframes ping {
    75%, 100% { transform: scale(2.2); opacity: 0; }
}

.dash-health-bar {
    height: 10px;
    background: rgba(226, 232, 240, 0.5);
    border-radius: 99px;
    overflow: hidden;
    margin-bottom: 10px;
}

.dash-health-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 99px;
    transition: width 0.8s ease;
    box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
}

.dash-health-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #64748b;
    font-weight: 600;
}

/* ── Stat Cards Grid ────────────────────────────────────────────────────── */
.dash-stats-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.dash-stat-card {
    background: var(--color-surface, #FFFFFF);
    border: 1px solid var(--color-border, #D8E4E4);
    border-radius: var(--radius-lg, 12px);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(33, 52, 57, 0.05));
}

.dash-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    inset-inline-end: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--color-primary, #245F66), var(--color-chart-secondary, #76A9AC));
    border-radius: 0 0 0 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dash-stat-card:hover {
    border-color: var(--color-border-strong, #BACBCB);
    box-shadow: var(--shadow-md, 0 4px 12px -2px rgba(33, 52, 57, 0.08));
    transform: translateY(-2px);
}

.dash-stat-card:hover::before {
    opacity: 1;
}

.dash-stat-card.stat-highlight {
    border: 1.5px solid var(--color-border-strong, #BACBCB);
    background: var(--color-surface, #FFFFFF);
}

.dash-stat-card.stat-highlight::before {
    background: linear-gradient(180deg, var(--color-primary, #245F66), var(--color-primary-hover, #18484F));
    opacity: 1;
}

.dash-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.dash-stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.dash-stat-icon .material-symbols-outlined {
    font-size: 24px;
}

.dash-stat-icon.icon-blue {
    background: var(--color-primary-soft, #DCEAEA);
    color: var(--color-primary, #245F66);
}
.dash-stat-icon.icon-green {
    background: var(--status-healthy-soft, #E8F5F0);
    color: var(--status-healthy, #277A58);
}
.dash-stat-icon.icon-indigo {
    background: var(--color-surface-subtle, #E5EFEF);
    color: var(--color-chart-secondary, #76A9AC);
}

.dash-stat-card:hover .dash-stat-icon.icon-blue { background: var(--color-primary, #245F66); color: #fff; }
.dash-stat-card:hover .dash-stat-icon.icon-green { background: var(--status-healthy, #277A58); color: #fff; }
.dash-stat-card:hover .dash-stat-icon.icon-indigo { background: var(--color-chart-secondary, #76A9AC); color: #fff; }

.dash-stat-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--color-text-muted, #637A7D);
}

.dash-stat-bottom {
    text-align: start;
}

.dash-stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: #0f172a;
    font-family: var(--font-latin, "Manrope", system-ui, sans-serif);
    line-height: 1.2;
}

.dash-stat-value .unit {
    font-size: 0.82rem;
    font-weight: 500;
    color: #94a3b8;
    margin-inline-start: 4px;
}

.dash-stat-change {
    font-size: 0.72rem;
    color: #22c55e;
    margin-top: 4px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.dash-stat-status {
    font-size: 1rem;
    font-weight: 700;
    color: #22c55e;
}

.dash-stat-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 6px;
    line-height: 1.5;
}

/* ── Chart + Alerts Grid ────────────────────────────────────────────────── */
.dash-content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.dash-chart-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.dash-chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.dash-chart-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
}

.dash-chart-btns {
    display: flex;
    gap: 6px;
}

.dash-chart-btn {
    padding: 5px 14px;
    font-size: 0.78rem;
    border-radius: 99px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.dash-chart-btn:hover {
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.3);
}

.dash-chart-btn.active {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(99, 102, 241, 0.06));
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.25);
}

.dash-chart-area {
    position: relative;
    height: 200px;
    width: 100%;
}

.dash-chart-grid {
    position: absolute;
    inset: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    pointer-events: none;
    opacity: 0.08;
}

.dash-chart-grid div {
    width: 1px;
    height: 100%;
    background: #94a3b8;
}

.dash-chart-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 14px;
    font-size: 0.68rem;
    color: #94a3b8;
    font-family: "Inter", "Manrope", monospace;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.dash-alerts-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.dash-alerts-title {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    text-align: start;
}

.dash-alerts-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.dash-alert-item {
    display: flex;
    gap: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    border-right: 4px solid #3b82f6;
    transition: all 0.2s ease;
}

.dash-alert-item:hover {
    background: #f1f5f9;
    transform: translateX(-2px);
}

.dash-alert-item.alert-error { border-right-color: #ef4444; }
.dash-alert-item.alert-success { border-right-color: #22c55e; }
.dash-alert-item.alert-info { border-right-color: #3b82f6; }

.dash-alert-icon {
    margin-top: 2px;
    flex-shrink: 0;
}

.dash-alert-icon .material-symbols-outlined {
    font-size: 20px;
}

.dash-alert-item.alert-error .dash-alert-icon { color: #ef4444; }
.dash-alert-item.alert-success .dash-alert-icon { color: #22c55e; }
.dash-alert-item.alert-info .dash-alert-icon { color: #3b82f6; }

.dash-alert-text {
    text-align: start;
    flex: 1;
    min-width: 0;
}

.dash-alert-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
}

.dash-alert-meta {
    font-size: 0.72rem;
    color: #94a3b8;
    font-family: "Inter", "Manrope", sans-serif;
}

.dash-view-all-btn {
    margin-top: 16px;
    width: 100%;
    padding: 11px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #3b82f6;
    background: transparent;
    border: 1.5px solid rgba(59, 130, 246, 0.2);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.dash-view-all-btn:hover {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.35);
}

/* ── Table ───────────────────────────────────────────────────────────────── */
.dash-table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.dash-table-header {
    padding: 22px 28px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(180deg, #ffffff, #fafbfc);
}

.dash-table-title {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-search-wrap {
    position: relative;
}

.dash-search-input {
    background: #f1f5f9;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding-block: 10px; padding-inline-start: 36px; padding-inline-end: 14px;
    font-size: 0.85rem;
    width: 240px;
    outline: none;
    color: #0f172a;
    font-weight: 500;
    transition: all 0.25s ease;
}

.dash-search-input:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.dash-search-icon {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

.dash-search-icon .material-symbols-outlined {
    font-size: 18px;
}

.dash-table-wrap {
    overflow-x: auto;
}

.dash-table {
    width: 100%;
    text-align: start;
    border-collapse: collapse;
}

.dash-table thead {
    background: #f8fafc;
}

.dash-table th {
    padding: 14px 28px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.dash-table td {
    padding: 16px 28px;
    font-size: 0.88rem;
    border-top: 1px solid #f1f5f9;
    color: #334155;
}

.dash-table tbody tr {
    transition: all 0.2s ease;
}

.dash-table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.dash-table tbody tr:hover {
    background: #f1f5f9;
}

.dash-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 99px;
    letter-spacing: 0.02em;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
    vertical-align: middle;
}

.dash-status-badge.online {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.06));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.2);
}

.dash-status-badge.offline {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(239, 68, 68, 0.06));
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.dash-status-badge.pending {
    background: linear-gradient(135deg, rgba(217, 119, 6, 0.12), rgba(217, 119, 6, 0.06));
    color: #b45309;
    border: 1px solid rgba(217, 119, 6, 0.28);
}

.dash-status-dot {
    display: inline-block;
    flex: none;
    width: 8px;
    height: 8px;
    min-width: 8px;
    min-height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 6px currentColor;
}

.dash-table .mono {
    font-family: "Inter", "Manrope", monospace;
    font-size: 0.82rem;
    direction: ltr;
    text-align: left;
    font-weight: 600;
    color: #475569;
}

.dash-table .target {
    font-weight: 600;
    direction: ltr;
    text-align: left;
}

.dash-table .target strong {
    color: #0f172a;
    font-weight: 700;
}

.dash-table .target small {
    font-family: "Inter", "Manrope", sans-serif;
}

.dash-more-btn {
    padding: 6px;
    color: #94a3b8;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dash-more-btn:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.06);
}

/* View Report Button */
.dash-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    background: #f8fafc;
    color: #3b82f6;
    padding: 7px 14px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.25s ease;
}

.dash-view-btn:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.04));
    border-color: rgba(59, 130, 246, 0.3);
    color: #2563eb;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.1);
    transform: translateY(-1px);
}

/* ── Dashboard Responsive ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    .dash-sidebar {
        display: flex !important;
        transform: translateX(100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -8px 0 32px rgba(15, 23, 42, 0.08);
    }
    [dir="ltr"] .dash-sidebar:not(.active) { transform: translateX(-100%); }
    .dash-sidebar.active {
        transform: translateX(0);
    }
    .dash-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.5);
        z-index: 30;
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
    }
    .dash-overlay.active {
        display: block;
    }
    .dash-main {
        padding: 80px 16px 36px;
    }
    .dash-hero {
        padding: 24px;
    }
    .dash-add-form {
        flex-direction: column;
        border-radius: 12px;
    }
    .dash-add-input {
        border-radius: 12px 12px 0 0;
        border-bottom: 1px solid #e2e8f0;
    }
    .dash-add-btn {
        border-radius: 0 0 12px 12px;
        padding: 14px;
        justify-content: center;
    }
}

@media (min-width: 640px) {
    .dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .dash-header-nav {
        display: flex;
    }

    .dash-sidebar {
        display: flex;
        transform: translateX(0) !important;
    }

    .dash-main {
        margin-inline-start: 264px;
    }

    .dash-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dash-hero {
        flex-direction: row;
        align-items: center;
    }
}

/* Main Dashboard Highlight Cards */
.dash-main-card {
    background: linear-gradient(145deg, var(--bg-white), var(--bg-subtle));
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 28px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.dash-main-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.dash-main-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.dash-main-card:hover::before {
    transform: scaleX(1);
}

.dash-main-card .dash-stat-top {
    margin-bottom: 20px;
}

.dash-main-card .dash-stat-label {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-heading);
}

.dash-main-card .dash-stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-white);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: transform 0.3s var(--ease);
}

.dash-main-card:hover .dash-stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.dash-main-card .dash-stat-meta {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (min-width: 1024px) {
    .dash-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .dash-content-grid {
        grid-template-columns: 2fr 1fr;
    }

    .dash-hero-title {
        font-size: 1.75rem;
    }
}

/* ========================================================================
   UNIFIED MODERN MODAL DESIGN SYSTEM
   ======================================================================== */
.modal-overlay,
.local-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(12px) saturate(1.4);
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active,
.local-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content,
.local-modal-content {
    background: #ffffff;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.12), 0 8px 24px rgba(15, 23, 42, 0.06);
    transform: scale(0.94) translateY(16px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal-overlay.active .modal-content,
.local-modal-overlay.active .local-modal-content {
    transform: scale(1) translateY(0);
}

.modal-content.large,
.local-modal-content.large {
    max-width: 820px;
}

.modal-header,
.local-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 18px;
    margin-bottom: 24px;
}

.modal-title,
.local-modal-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header .close-btn,
.local-close-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
}

.modal-header .close-btn:hover,
.local-close-btn:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
    transform: rotate(90deg);
}

/* Modal Form Elements */
.modal-content .form-group,
.local-form-group {
    margin-bottom: 20px;
}

.modal-content .form-group label,
.local-form-group label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 8px;
    color: #0f172a;
    font-weight: 700;
}

.modal-content .form-group input,
.modal-content .form-group select,
.modal-content .form-control,
.local-form-group input,
.local-form-group select {
    width: 100%;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    color: #0f172a;
    border-radius: 12px;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 500;
    transition: all 0.25s ease;
}

.modal-content .form-group input:focus,
.modal-content .form-group select:focus,
.modal-content .form-control:focus,
.local-form-group input:focus,
.local-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.modal-content .form-check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 600;
}

.modal-content .form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

/* Channel Card */
.modal-content .channel-select-card,
.local-channel-card {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.modal-content .channel-select-card:hover,
.local-channel-card:hover {
    border-color: #cbd5e1;
    background: #f1f5f9;
}

.modal-content .badge-status,
.local-badge {
    font-size: 0.72rem;
    padding: 5px 12px;
    border-radius: 99px;
    font-weight: 700;
}

.modal-content .badge-configured,
.local-badge-ok {
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
}

.modal-content .badge-unconfigured,
.local-badge-err {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
}

/* Modal Tables */
.modal-content .dash-table-card {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
}

.modal-content .dash-table,
.local-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
}

.modal-content .dash-table thead th,
.local-table th {
    background: #f8fafc;
    color: #64748b;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: start;
}

.modal-content .dash-table tbody td,
.local-table td {
    background: #ffffff;
    color: #334155;
    font-size: 0.88rem;
    padding: 14px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.modal-content .dash-table tbody tr:last-child td,
.local-table tr:last-child td {
    border-bottom: none;
}

.modal-content .dash-table tbody tr:hover td,
.local-table tr:hover td {
    background: #f8fafc;
}

/* Modal Buttons */
.modal-content .btn-group,
.local-btn-group {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
}

.modal-content .btn-save,
.local-btn.local-btn-primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #ffffff;
    border: none;
    padding: 11px 24px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-content .btn-save:hover,
.local-btn.local-btn-primary:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.modal-content .btn-cancel,
.local-btn.local-btn-outline {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    color: #475569;
    padding: 11px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-content .btn-cancel:hover,
.local-btn.local-btn-outline:hover {
    background: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

.modal-content .btn-danger,
.local-btn.local-btn-danger-outline {
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
    border: 1.5px solid rgba(239, 68, 68, 0.2);
    padding: 11px 22px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.92rem;
    transition: all 0.25s ease;
    margin-left: auto;
    margin-right: 0;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.modal-content .btn-danger:hover,
.local-btn.local-btn-danger-outline:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* Pagination */
.modal-content .pagination,
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.modal-content .page-btn {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 7px 14px;
    border-radius: 10px;
    cursor: pointer;
    color: #475569;
    font-size: 0.86rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.modal-content .page-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.modal-content .page-btn.active {
    background: #3b82f6;
    color: #ffffff;
    border-color: #3b82f6;
}

/* ── Service Cards (Dashboard Index) ────────────────────────────────────── */
.dash-service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 28px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dash-service-card:hover {
    border-color: rgba(59, 130, 246, 0.25);
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
    transform: translateY(-3px);
}

.dash-service-card .service-icon-wrap {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
    transition: all 0.3s ease;
}

.dash-service-card:hover .service-icon-wrap {
    transform: scale(1.05);
}

.dash-service-card .service-icon-wrap .material-symbols-outlined {
    font-size: 28px;
}

.dash-service-card .service-name {
    font-size: 1rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 6px;
}

.dash-service-card .service-desc {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 16px;
}

.dash-service-card .service-action {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #3b82f6;
}

.dash-service-card .service-action .material-symbols-outlined {
    font-size: 16px;
    transition: transform 0.2s ease;
}

.dash-service-card:hover .service-action .material-symbols-outlined {
    transform: translateX(-4px);
}

.dash-service-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.dash-service-card .coming-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 99px;
    margin-bottom: 16px;
}

/* ── Empty State ────────────────────────────────────────────────────────── */
.dash-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
}

.dash-empty-state .material-symbols-outlined {
    font-size: 56px;
    color: #cbd5e1;
    margin-bottom: 16px;
}

.dash-empty-state h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 8px;
}

.dash-empty-state p {
    font-size: 0.88rem;
    color: #94a3b8;
    max-width: 360px;
    margin: 0 auto;
}

/* ── Dark Mode Dashboard Overrides ──────────────────────────────────────── */
/* Body & Layout */
[data-theme="dark"] .dash-body { background-color: var(--bg-body); }
[data-theme="dark"] .dash-main { background-color: transparent; }

/* Sidebar */
[data-theme="dark"] .dash-sidebar { background: var(--bg-card); border-left-color: var(--border-color); }
[data-theme="dark"] .dash-sidebar-brand h2 { color: var(--text-heading); }
[data-theme="dark"] .dash-nav-item { color: var(--text-secondary); }
[data-theme="dark"] .dash-nav-item:hover, [data-theme="dark"] .dash-nav-item.active { background: var(--bg-subtle); color: var(--primary); }
[data-theme="dark"] .dash-sidebar-footer a { color: var(--text-secondary); }
[data-theme="dark"] .dash-sidebar-footer a:hover { background: var(--bg-subtle); color: var(--text-heading); }

/* Header */
[data-theme="dark"] .dash-header { background: rgba(15, 23, 42, 0.92); border-bottom-color: var(--border-color); }
[data-theme="dark"] .dash-logo { color: var(--text-heading); }
[data-theme="dark"] .dash-menu-toggle { color: var(--text-heading); }
[data-theme="dark"] .dash-avatar-link { background: var(--bg-subtle); border-color: var(--border-color); }
[data-theme="dark"] .dash-avatar-link:hover { background: var(--bg-card); border-color: var(--border-hover); }

/* Hero */
[data-theme="dark"] .dash-hero { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dash-hero-title { color: var(--text-heading); }
[data-theme="dark"] .dash-hero-desc { color: var(--text-secondary); }

/* Health Card */
[data-theme="dark"] .dash-health-card { background: linear-gradient(135deg, rgba(34, 197, 94, 0.06) 0%, var(--bg-subtle) 100%); border-color: var(--border-color); }
[data-theme="dark"] .dash-health-header span { color: var(--text-secondary); }
[data-theme="dark"] .dash-health-bar { background: rgba(51, 65, 85, 0.5); }
[data-theme="dark"] .dash-health-stats { color: var(--text-secondary); }

/* Add Form */
[data-theme="dark"] .dash-add-form { box-shadow: 0 2px 8px rgba(0,0,0,0.2), 0 0 0 1px var(--border-color); }
[data-theme="dark"] .dash-add-input { background: var(--bg-subtle); color: var(--text-heading); }
[data-theme="dark"] .dash-add-input:focus { background: var(--bg-card); box-shadow: inset 0 0 0 2px rgba(59, 130, 246, 0.25); }
[data-theme="dark"] .dash-add-input::placeholder { color: var(--text-muted); }

/* Stat Cards */
[data-theme="dark"] .dash-stat-card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dash-stat-card:hover { border-color: var(--color-border-strong, #BACBCB); box-shadow: 0 4px 16px rgba(0,0,0,0.2); }
[data-theme="dark"] .dash-stat-card.stat-highlight { background: var(--bg-card); border-color: var(--color-primary, #245F66); }
[data-theme="dark"] .dash-stat-label { color: var(--text-secondary); }
[data-theme="dark"] .dash-stat-value { color: var(--text-heading); }
[data-theme="dark"] .dash-stat-value .unit { color: var(--text-muted); }
[data-theme="dark"] .dash-stat-change { color: var(--text-secondary); }
[data-theme="dark"] .dash-stat-meta { color: var(--text-secondary); }
[data-theme="dark"] .dash-stat-status { color: var(--text-secondary); }

/* Chart Card */
[data-theme="dark"] .dash-chart-card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dash-chart-title { color: var(--text-heading); }
[data-theme="dark"] .dash-chart-grid div { background: var(--text-muted); }
[data-theme="dark"] .dash-chart-labels { color: var(--text-muted); }

/* Alerts Card */
[data-theme="dark"] .dash-alerts-card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dash-alerts-title { color: var(--text-heading); }
[data-theme="dark"] .dash-alert-item { background: var(--bg-subtle); }
[data-theme="dark"] .dash-alert-item:hover { background: rgba(51, 65, 85, 0.6); }
[data-theme="dark"] .dash-alert-title { color: var(--text-heading); }
[data-theme="dark"] .dash-alert-meta { color: var(--text-secondary); }
[data-theme="dark"] .dash-view-all-btn { background: var(--bg-subtle); color: var(--text-secondary); border-color: var(--border-color); }
[data-theme="dark"] .dash-view-all-btn:hover { background: var(--bg-card); color: var(--text-heading); }

/* Table Card */
[data-theme="dark"] .dash-table-card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dash-table-header { background: linear-gradient(180deg, var(--bg-card), var(--bg-subtle)); border-bottom-color: var(--border-color); }
[data-theme="dark"] .dash-table-title { color: var(--text-heading); }
[data-theme="dark"] .dash-search-wrap .dash-search-icon { color: var(--text-muted); }
[data-theme="dark"] .dash-search-input { background: var(--bg-subtle); border-color: var(--border-color); color: var(--text-heading); }
[data-theme="dark"] .dash-search-input:focus { background: var(--bg-card); border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .dash-table thead { background: var(--bg-subtle); }
[data-theme="dark"] .dash-table th { color: var(--text-secondary); border-bottom-color: var(--border-color); }
[data-theme="dark"] .dash-table td { color: var(--text-body); border-top-color: var(--border-light); }
[data-theme="dark"] .dash-table tbody tr:nth-child(even) { background: rgba(30, 41, 59, 0.4); }
[data-theme="dark"] .dash-table tbody tr:hover { background: var(--bg-subtle); }
[data-theme="dark"] .dash-table .target strong { color: var(--text-heading); }
[data-theme="dark"] .dash-table .target small { color: var(--text-secondary) !important; }

/* Service Cards (Dashboard Index) */
[data-theme="dark"] .dash-service-card { background: var(--bg-card); border-color: var(--border-color); }
[data-theme="dark"] .dash-service-card:hover { background: var(--bg-subtle); border-color: var(--border-hover); }
[data-theme="dark"] .dash-service-card .service-name { color: var(--text-heading); }
[data-theme="dark"] .dash-service-card .service-desc { color: var(--text-secondary); }
[data-theme="dark"] .dash-service-card .service-action { color: var(--primary); }

/* View Button */
[data-theme="dark"] .dash-view-btn { color: var(--primary); background: var(--bg-subtle); border-color: var(--border-color); }
[data-theme="dark"] .dash-view-btn:hover { background: var(--bg-card); border-color: var(--border-hover); }

/* ── Language Switcher Refactor (Icon Rail, Flyout, and Public Navbar) ── */
.rail-lang-toggle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary, #52686A);
  background: transparent;
  border: 1px solid transparent;
  transition: all var(--transition-fast, 150ms ease);
  cursor: pointer;
  position: relative;
  text-decoration: none;
  font-family: var(--font-latin, 'Manrope', sans-serif);
  font-weight: 700;
  font-size: 0.75rem;
  line-height: 1;
  padding: 0;
  margin: 2px 0;
}

.rail-lang-toggle:hover {
  background-color: var(--color-surface-hover, #EFF5F5);
  border-color: var(--color-border, #D8E4E4);
  color: var(--color-primary, #245F66);
}

.rail-lang-code {
  font-family: var(--font-latin, 'Manrope', sans-serif);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  line-height: 1;
}

.app-shell.rail-expanded .rail-lang-toggle {
  width: 100%;
  height: 40px;
  border-radius: var(--radius-md, 8px);
  justify-content: flex-start;
  gap: 10px;
  padding-inline: 10px;
}

.app-shell.rail-expanded .rail-lang-toggle .rail-lang-code {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm, 6px);
  background-color: var(--color-surface-subtle, #E5EFEF);
  border: 1px solid var(--color-border, #D8E4E4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Flyout & Mobile Drawer Full Language Selector Row */
.flyout-lang-card {
  margin-top: 12px;
  padding: 8px 12px;
  background-color: var(--color-surface, #FFFFFF);
  border: 1px solid var(--color-border, #D8E4E4);
  border-radius: var(--radius-md, 8px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.flyout-lang-info {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-text-secondary, #52686A);
  font-size: 0.8125rem;
  font-weight: 600;
}

.flyout-lang-icon {
  font-size: 18px;
  color: var(--color-text-muted, #637A7D);
}

.flyout-lang-pills {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px;
  background-color: var(--color-surface-subtle, #E5EFEF);
  border: 1px solid var(--color-border, #D8E4E4);
  border-radius: var(--radius-sm, 6px);
}

.flyout-lang-pill {
  padding: 3px 8px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: var(--font-latin, 'Manrope', sans-serif);
  text-decoration: none;
  border-radius: 4px;
  color: var(--color-text-secondary, #52686A);
  transition: all 150ms ease;
  line-height: 1.2;
}

.flyout-lang-pill:hover {
  color: var(--color-primary, #245F66);
  background-color: var(--color-surface-hover, #EFF5F5);
}

.flyout-lang-pill.active {
  background-color: var(--color-primary, #245F66);
  color: #FFFFFF;
  box-shadow: 0 1px 2px rgba(36, 95, 102, 0.2);
}

/* Public Navbar Single Ghost Language Switcher */
.btn-lang-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md, 8px);
  color: var(--color-text-secondary, #52686A);
  text-decoration: none;
  font-family: var(--font-latin, 'Manrope', sans-serif);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease;
  cursor: pointer;
}

.btn-lang-ghost:hover {
  background-color: var(--color-surface-hover, #EFF5F5);
  border-color: var(--color-border, #D8E4E4);
  color: var(--color-primary, #245F66);
}

.btn-lang-ghost .globe-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--color-text-muted, #637A7D);
  transition: color 150ms ease;
}

.btn-lang-ghost:hover .globe-icon {
  color: var(--color-primary, #245F66);
}

.btn-lang-ghost .lang-code-text {
  font-family: var(--font-latin, 'Manrope', sans-serif);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

/* Direction-aware glyphs (design/system.md §12.6): icons authored for RTL reading order
   (arrow_back = "forward/next" in FA) are mirrored in LTR so EN arrows point the right way. */
html[dir="ltr"] .icon-dir { display: inline-block; transform: scaleX(-1); }

/* Grid row navigation (double-click / keyboard) */
.rb-row-nav { cursor: pointer; user-select: none; -webkit-user-select: none; }
.rb-row-nav:focus-visible { outline: 2px solid var(--color-primary, #0d7377); outline-offset: -2px; }
.rb-row-nav .no-row-nav,
.rb-row-nav a,
.rb-row-nav button,
.rb-row-nav input,
.rb-row-nav select,
.rb-row-nav textarea {
  user-select: auto;
  -webkit-user-select: auto;
}
.btn-icon-action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2rem; height: 2rem; padding: 0; border-radius: 0.5rem;
  border: 1px solid var(--color-border, #d5e0e0); background: var(--color-surface, #fff);
  color: var(--color-text-secondary, #5a6b6b); text-decoration: none; cursor: pointer;
}
.btn-icon-action:hover { color: var(--color-text-primary, #213439); border-color: var(--color-primary, #0d7377); }
.btn-icon-action .material-symbols-outlined { font-size: 18px; }
.btn-icon-action.danger { color: var(--status-critical, #b42318); }


/* Icon actions: keep tooltips when control is disabled (wrap with title on parent). */
.btn-icon-action:disabled,
.btn-icon-action[aria-disabled="true"],
.btn-icon-action.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-icon-action-wrap {
  display: inline-flex;
  vertical-align: middle;
}
.btn-icon-action-wrap[title]:hover::after {
  /* native title on wrapper remains available when child has pointer-events:none */
}


/* Shared international phone row: physical LTR — compact country LEFT, national number RIGHT */
.rb-phone-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 8px;
  width: 100%;
  max-width: 100%;
  direction: ltr; /* keep physical order on Persian RTL pages */
  box-sizing: border-box;
}
.rb-phone-row > .rb-phone-country,
.rb-phone-row select.rb-phone-country {
  flex: 0 0 5.75rem;
  width: 5.75rem;
  max-width: 5.75rem;
  min-width: 5.25rem;
  padding-inline: 6px !important;
  font-size: 0.82rem;
  font-weight: 700;
  direction: ltr;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}
.rb-phone-row > .rb-phone-national-wrap {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
}
.rb-phone-row .rb-phone-national,
.rb-phone-row > input.rb-phone-national {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  direction: ltr;
  text-align: left;
  box-sizing: border-box;
}
@media (max-width: 420px) {
  .rb-phone-row { gap: 6px; }
  .rb-phone-row > .rb-phone-country,
  .rb-phone-row select.rb-phone-country {
    flex-basis: 5.25rem;
    width: 5.25rem;
    max-width: 5.25rem;
    min-width: 4.85rem;
    font-size: 0.78rem;
    padding-inline: 4px !important;
  }
}


/* ── Detail pages + breadcrumbs (design/system.md §7.7) ── */
.rb-breadcrumb {
  margin-bottom: var(--spacing-3, 12px);
}
.rb-breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px var(--spacing-1, 4px);
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.75rem; /* design/system.md caption — intentional, not a screenshot scale bug */
  font-weight: 600;
  color: var(--color-text-muted);
  row-gap: 4px;
}
.rb-breadcrumb__item {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.rb-breadcrumb__link {
  color: var(--color-text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm, 6px);
  padding: 2px 4px;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rb-breadcrumb__link:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}
.rb-breadcrumb__link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.rb-breadcrumb__current {
  color: var(--color-text-primary);
  padding: 2px 4px;
  max-width: 16rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rb-breadcrumb__sep {
  font-size: 14px !important;
  color: var(--color-text-muted);
  opacity: 0.7;
}

/* Mobile deterministic back (explicit parent href — not history.back) */
.rb-detail-back-mobile {
  display: none;
  align-items: center;
  justify-content: flex-start;
  gap: var(--spacing-2, 8px);
  min-height: 44px;
  padding: var(--spacing-2, 8px) var(--spacing-3, 12px);
  margin-bottom: var(--spacing-3, 12px);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  background: var(--color-surface);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.rb-detail-back-mobile .material-symbols-outlined {
  font-size: 20px;
  color: var(--color-primary);
}
.rb-detail-back-mobile:hover {
  background: var(--color-surface-hover);
}
.rb-detail-back-mobile:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.rb-detail-page {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-4, 16px);
  padding-bottom: var(--spacing-8, 32px);
  width: 100%;
  min-width: 0;
  max-width: none;
}
.rb-detail-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2, 8px);
  align-items: center;
}
.rb-detail-header-actions .rb-detail-back-desktop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 14px;
  border-radius: var(--radius-md, 8px);
  border: 1.5px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 0.8125rem;
  font-weight: 700;
  text-decoration: none;
}
.rb-detail-header-actions .rb-detail-back-desktop:hover {
  background: var(--color-surface-subtle);
  color: var(--color-text-primary);
}

.rb-detail-section {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg, 12px);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.rb-detail-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-3, 12px);
  padding: var(--spacing-3, 12px) var(--spacing-4, 16px);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface-subtle);
}
.rb-detail-section__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--color-text-primary);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.rb-detail-section__body {
  padding: var(--spacing-4, 16px);
}

.rb-kv-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--spacing-3, 12px) var(--spacing-4, 16px);
}
.rb-kv {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--spacing-3, 12px);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  background: var(--color-bg);
}
.rb-kv__label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.01em;
}
.rb-kv__value {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--color-text-primary);
  word-break: break-word;
  overflow-wrap: anywhere;
}
.rb-kv__value.ltr-island,
.rb-kv__value .ltr-island {
  font-family: var(--font-latin), var(--font-mono);
  font-weight: 600;
  direction: ltr;
  text-align: start;
}

.rb-detail-pre {
  margin: 0;
  padding: var(--spacing-3, 12px);
  border-radius: var(--radius-md, 8px);
  background: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  font-size: 0.8125rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  max-height: 28rem;
  overflow: auto;
  direction: ltr;
  text-align: start;
}
.rb-detail-pre.is-danger {
  background: var(--status-critical-soft);
  border-color: var(--status-critical-border);
}

.rb-detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-2, 8px);
  align-items: stretch; /* equal visual height across <a>, <button>, form wrappers */
}

/* Equal-height action controls inside detail action bars (design/system.md §7.7) */
.rb-detail-actions > a,
.rb-detail-actions > button,
.rb-detail-actions > .btn-primary,
.rb-detail-actions > .btn-secondary,
.rb-detail-actions > .btn-ghost,
.rb-detail-actions > .btn-primary-action,
.rb-detail-actions form > button,
.rb-detail-actions form > .btn-primary,
.rb-detail-actions form > .btn-secondary,
.rb-detail-actions form > .btn-ghost,
.rb-detail-actions form > .btn-primary-action {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;          /* desktop/tablet — matches DS control height */
  min-height: 40px;
  max-height: 40px;
  padding-block: 0;
  padding-inline: 14px;
  margin: 0;
  line-height: 1.2;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: var(--radius-md, 8px);
  border-width: 1.5px;
  border-style: solid;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  transform: none !important; /* avoid hover translate changing perceived height */
}

.rb-detail-actions form {
  display: inline-flex;
  align-items: stretch;
  margin: 0;
  padding: 0;
  border: 0;
  min-height: 40px;
}

.rb-detail-actions form > input[type="hidden"] {
  display: none;
}

.rb-detail-actions .btn-icon-action,
.rb-detail-actions > a.btn-icon-action,
.rb-detail-actions button.btn-icon-action {
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  padding-inline: 0;
}

@media (max-width: 767.98px) {
  /* Breadcrumbs stay visually visible on mobile (wrap + soft horizontal scroll).
     Back strip remains a separate, larger touch target — not a breadcrumb replacement. */
  .rb-breadcrumb {
    display: block;
    margin-bottom: var(--spacing-2, 8px);
    max-width: 100%;
  }
  .rb-breadcrumb__list {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    padding-block: 2px;
    gap: 2px var(--spacing-1, 4px);
  }
  .rb-breadcrumb__link,
  .rb-breadcrumb__current {
    max-width: 10rem;
    white-space: nowrap;
  }
  .rb-detail-back-mobile { display: inline-flex; width: 100%; box-sizing: border-box; }

  /* Mobile action grid: 2 equal columns for peers; featured/primary full row.
     Avoids trailing empty half-cells (sibling after featured also full-width). */
  .rb-detail-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--spacing-2, 8px);
    width: 100%;
    align-items: stretch;
  }
  .rb-detail-actions > a,
  .rb-detail-actions > button,
  .rb-detail-actions > form {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .rb-detail-actions > a,
  .rb-detail-actions > button,
  .rb-detail-actions > .btn-primary,
  .rb-detail-actions > .btn-secondary,
  .rb-detail-actions > .btn-ghost,
  .rb-detail-actions > .btn-primary-action,
  .rb-detail-actions form > button,
  .rb-detail-actions form > .btn-primary,
  .rb-detail-actions form > .btn-secondary,
  .rb-detail-actions form > .btn-ghost,
  .rb-detail-actions form > .btn-primary-action {
    width: 100%;
    height: auto;
    min-height: 44px;
    max-height: none;
    white-space: normal;
    text-align: center;
    padding-inline: 12px;
  }
  .rb-detail-actions form {
    display: flex;
    width: 100%;
    min-height: 44px;
  }
  .rb-detail-actions form > button {
    flex: 1 1 auto;
  }
  /* Featured / primary spans full row */
  .rb-detail-actions > .btn-primary,
  .rb-detail-actions > .btn-primary-action,
  .rb-detail-actions > .rb-detail-action--featured,
  .rb-detail-actions > form:has(> .btn-primary),
  .rb-detail-actions > form:has(> .btn-primary-action),
  .rb-detail-actions > form.rb-detail-action--featured {
    grid-column: 1 / -1;
  }
  /* Avoid half-empty row: item immediately after a featured/primary spans full */
  .rb-detail-actions > .btn-primary + *,
  .rb-detail-actions > .btn-primary-action + *,
  .rb-detail-actions > .rb-detail-action--featured + *,
  .rb-detail-actions > form:has(> .btn-primary) + *,
  .rb-detail-actions > form:has(> .btn-primary-action) + *,
  .rb-detail-actions > form.rb-detail-action--featured + * {
    grid-column: 1 / -1;
  }
  /* Lone first peer when only two children and second is featured → full width */
  .rb-detail-actions > *:first-child:nth-last-child(2):not(.btn-primary):not(.btn-primary-action):not(.rb-detail-action--featured):not(:has(> .btn-primary)):not(:has(> .btn-primary-action)) {
    grid-column: 1 / -1;
  }
  .rb-detail-actions .btn-icon-action,
  .rb-detail-actions > a.btn-icon-action,
  .rb-detail-actions button.btn-icon-action {
    width: 100%;
    min-width: 0;
    max-width: none;
    height: auto;
    min-height: 44px;
    max-height: none;
  }
  .rb-detail-header-actions .rb-detail-back-desktop { display: none; }
  .rb-kv-grid { grid-template-columns: 1fr; }
  .rb-detail-page { gap: var(--spacing-3, 12px); }
  .rb-detail-section__body { padding: var(--spacing-3, 12px); }
}

/* Very narrow: stack every action full width (no half-empty cells) */
@media (max-width: 359.98px) {
  .rb-detail-actions {
    grid-template-columns: 1fr;
  }
  .rb-detail-actions > * {
    grid-column: 1 / -1;
  }
}

@media (min-width: 768px) {
  .rb-kv-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .rb-kv-grid.rb-kv-grid--dense { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Async monitoring details: existing DS chrome + bounded, safely wrapped evidence. */
.ai-analysis { white-space: pre-wrap; overflow-wrap: anywhere; }
.ai-command { white-space: pre-wrap; overflow-wrap: anywhere; max-width: 100%; }
.ai-chart { min-height: 320px; width: 100%; }
.rb-table-scroll { overflow-x: auto; }

/* RasadBox contextual AI: original petrol/indigo identity, compact composer-first native dialog. */
.rb-ai-dialog {
  width: min(520px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto;
  box-sizing: border-box; margin: auto; padding: var(--spacing-6, 24px);
  border: 1px solid transparent; border-radius: var(--radius-lg);
  background: linear-gradient(var(--color-surface), var(--color-surface)) padding-box,
    linear-gradient(125deg, #0f766e, #6366f1, #8b5cf6) border-box;
  color: var(--color-text-primary); box-shadow: var(--shadow-lg);
}
.rb-ai-dialog [hidden] { display: none; }
.rb-ai-dialog::backdrop { background: rgb(0 0 0 / 50%); backdrop-filter: blur(3px); }
.rb-ai-dialog__header, .rb-ai-brand { display: flex; align-items: center; gap: 12px; }
.rb-ai-dialog__header { justify-content: space-between; }
.rb-ai-dialog__header h2 { font-size: 1.125rem; font-weight: 800; margin: 0; }
.rb-ai-dialog__header button { min-width: 44px; min-height: 44px; }
.rb-ai-mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, #0f766e, #4f46e5); }
.rb-ai-context, .rb-ai-intro, .rb-ai-range__label, .rb-ai-privacy, .rb-ai-reveal { color: var(--color-text-secondary); font-size: .8125rem; }
.rb-ai-intro { margin: 8px 0; }
.rb-ai-examples { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 8px 12px; }
.rb-ai-examples button { min-height: 44px; padding: 5px 12px; font: inherit; font-size: .8125rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-text-primary); background: var(--color-surface); cursor: pointer; }
.rb-ai-examples button:hover { border-color: var(--color-primary); background: color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)); }
.rb-ai-dialog form { display: grid; gap: 12px; }
.rb-ai-dialog .form-input { width: 100%; min-width: 0; box-sizing: border-box; }
.rb-ai-composer { display: grid; gap: 6px; }
.rb-ai-composer label { font-weight: 700; font-size: .875rem; }
.rb-ai-input-frame { min-width: 0; padding: 2px; border-radius: 14px; background: linear-gradient(125deg, #0f766e, #6366f1, #8b5cf6); }
.rb-ai-composer textarea { display: block; width: 100%; min-width: 0; box-sizing: border-box; height: 88px; min-height: 88px; margin: 0; resize: vertical; line-height: 1.5; padding: 10px 12px; border: 0; border-radius: 12px; box-shadow: none; background: var(--color-bg, #f5f8f8); color: var(--color-text-primary); }
.rb-ai-composer textarea::placeholder { color: var(--color-text-secondary, #52666b); opacity: 1; }
.rb-ai-composer textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 4px; }
.rb-ai-filled { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin: 0 0 10px; padding: 10px 12px; border: 1px solid var(--color-border-subtle, var(--border-subtle)); border-radius: 12px; background: var(--color-surface-subtle, var(--surface-subtle)); }
.rb-ai-filled p { margin: 0; font-size: .8125rem; line-height: 1.6; }
.rb-ai-filled button { flex: none; }
.rb-ai-range .rb-kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.rb-probe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.rb-probe-form { display: flex; flex-direction: column; gap: 10px; }
.rb-probe-form label { display: flex; flex-direction: column; gap: 6px; font-size: .8125rem; }
.rb-probe-hint { margin: 0; color: var(--color-text-secondary); font-size: .75rem; }
.rb-probe-notice { margin: 0 0 12px; }
.rb-probe-notice.is-warning { color: var(--status-warning); }
.rb-probe-form .form-label { display: flex; flex-direction: column; gap: 6px; }
.rb-probe-command-text { font-family: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, monospace; font-size: 0.8125rem; background: var(--color-surface-subtle); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: 12px; }
.rb-probe-actions { display: flex; gap: 6px; }
.rb-probe-actions form { margin: 0; }
.rb-probe-command { padding: 16px; }
.rb-probe-command-text { direction: ltr; white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.rb-probe-chart { margin-top: 20px; width: 100%; max-width: 100%; min-width: 0; }
.rb-probe-chart-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; margin-bottom: 12px; flex: 0 0 auto; }
.rb-probe-chart-copy p, #probeChartEmpty, #overviewProbeEmpty { margin: 0; font-size: 0.8rem; line-height: 1.55; color: var(--color-text-muted); }
.rb-probe-plot, .overview-probe-chart { width: 100%; height: 240px; min-width: 0; }
@media (max-width: 767.98px) { .rb-probe-grid { grid-template-columns: 1fr; } }
.rb-ai-range .rb-kv { min-width: 0; padding: 0; }
.rb-ai-range label { font-size: .75rem; }
.rb-ai-range input { direction: ltr; font-size: .8125rem; padding: 6px 8px; min-height: 40px; }
.rb-ai-range__label { margin-bottom: 4px; }
.rb-ai-privacy summary, .rb-ai-command summary { cursor: pointer; min-height: 24px; }
.rb-ai-privacy p { margin-block: 4px; line-height: 1.7; }
.rb-ai-footer { justify-content: space-between; gap: 8px; margin: 0; }
.rb-ai-submit, .rb-ai-entry { background: linear-gradient(115deg, #0f766e, #4f46e5); color: #fff; border-color: transparent; }
.rb-ai-submit:hover, .rb-ai-entry:hover { background: linear-gradient(115deg, #115e59, #4338ca); color: #fff; }
.rb-ai-submit:disabled { opacity: .65; cursor: wait; }
.rb-ai-progress { display: flex; align-items: center; gap: 12px; padding: 14px; margin-top: 16px; border-radius: 14px; background: color-mix(in srgb, var(--color-primary) 6%, var(--color-surface)); }
.rb-ai-progress[hidden], .rb-ai-reveal[hidden], .rb-ai-answer[hidden] { display: none; }
.rb-ai-orbit { color: var(--color-primary); animation: rb-ai-breathe 1.8s ease-in-out infinite; }
.rb-ai-skeleton { display: grid; gap: 8px; flex: 1; }
.rb-ai-skeleton span { display: block; height: 8px; border-radius: 999px; background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--color-primary) 25%, var(--color-surface)), transparent); background-size: 200% 100%; animation: rb-ai-shimmer 2s linear infinite; }
.rb-ai-skeleton span:last-child { width: 65%; }
.rb-ai-feedback { font-size: .8125rem; margin-block: 8px; }
.rb-ai-feedback:empty { display: none; }
.rb-ai-reveal { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.rb-ai-reveal button { min-height: 44px; white-space: nowrap; }
.rb-ai-answer { margin-top: 12px; }
.rb-ai-answer .ai-chart { min-height: 240px; }
.rb-ai-command { margin-block: 12px; font-size: .8125rem; }
@keyframes rb-ai-shimmer { to { background-position: -200% 0; } }
@keyframes rb-ai-breathe { 50% { opacity: .45; transform: scale(.9); } }
@media (max-width: 767.98px) {
  .rb-ai-dialog { width: calc(100% - 16px); max-height: calc(100dvh - 16px); padding: 16px; }
  .rb-ai-composer textarea { height: 72px; min-height: 72px; }
  .rb-ai-range input { font-size: .6875rem; padding-inline: 4px; }
  .rb-ai-footer > * { flex: 1; justify-content: center; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rb-ai-orbit, .rb-ai-skeleton span { animation: none; }
}
@media (forced-colors: active) {
  .rb-ai-dialog { border: 2px solid CanvasText; }
  .rb-ai-input-frame { background: CanvasText; }
  .rb-ai-mark, .rb-ai-submit, .rb-ai-entry { background: Canvas; color: CanvasText; border: 1px solid CanvasText; }
}

.rb-ai-usage { font-size: .8125rem; color: var(--color-text-secondary); }
.rb-ai-usage summary { cursor: pointer; min-height: 32px; }
.rb-ai-usage p { margin-block: 4px; }
.rb-ai-usage-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.rb-ai-usage-card { padding: 8px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-primary); }
.rb-ai-usage-card strong { display: block; font-size: .75rem; margin-bottom: 4px; }
.rb-ai-usage-card span { display: block; font-size: .75rem; color: var(--color-text-secondary); }
@media (max-width: 520px) { .rb-ai-usage-grid { grid-template-columns: 1fr; } }
.ai-request-table { width: 100%; border-collapse: collapse; }
.ai-request-table th, .ai-request-table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--color-border); white-space: nowrap; vertical-align: middle; }
.ai-request-table th { font-size: .75rem; font-weight: 700; color: var(--color-text-secondary); background: var(--color-surface-subtle); }
.ai-request-table td:first-child { white-space: normal; min-width: 12rem; }
.ai-request-table tr.is-empty td { text-align: center; color: var(--color-text-muted); white-space: normal; }

/* Signed-in workspace standards: full-width roots, readable responsive latency plot. */
.workspace-content { min-width: 0; }
.workspace-content:has(.rb-breadcrumb) .rb-detail-back-desktop,
.workspace-content:has(.rb-breadcrumb) .rb-detail-back-mobile { display: none; }
.overview-latency-chart { height: clamp(240px, 30vh, 360px); min-width: 0; }
.overview-chart-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.overview-monitor-picker, .overview-range-picker { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.overview-monitor-picker label { display: inline-flex; align-items: center; gap: 4px; font-size: 0.75rem; color: var(--color-text-secondary); }
.overview-range-picker .is-active { background: var(--color-primary-soft); color: var(--color-primary); }
.overview-chart-status { font-size: 0.75rem; color: var(--color-text-secondary); margin-bottom: 6px; }
.rb-sales-notice { padding: 12px 16px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface-subtle); color: var(--color-text-primary); }
@media (max-width: 767px) { .overview-latency-chart { height: 240px; } }

.rb-service-count { cursor: pointer; font-family: inherit; }
.rb-service-count:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 3px; }
.rb-user-service { display:flex; align-items:center; gap:10px; padding:12px; background:var(--color-surface-subtle); border:1px solid var(--color-border); border-radius:var(--radius-md); }
.rb-user-service__text { display:flex; flex-direction:column; min-width:0; flex:1; }
.rb-user-service__text > * { overflow-wrap:anywhere; }
@media(max-width:480px) { .rb-user-service .status-badge { display:none; } }

.rb-action-message { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0 0 12px; }
.rb-action-notices { position:fixed; inset-inline-end:20px; bottom:24px; z-index:10000; display:flex; flex-direction:column; gap:10px; max-height:60vh; overflow:auto; max-width:min(420px,calc(100vw - 40px)); }
.rb-action-notice { padding:14px 18px; color:var(--color-text-primary); background:var(--color-surface); border:1px solid var(--color-border); border-radius:var(--radius-md); box-shadow:var(--shadow-lg); white-space:pre-wrap; overflow-wrap:anywhere; }
.btn-danger { padding:10px 16px; border-radius:var(--radius-md); border:1px solid var(--status-critical); background:var(--status-critical); color:var(--color-text-inverse,#fff); font-weight:700; cursor:pointer; }
.btn-danger:focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }

.workspace-content:has(.rb-breadcrumb) [data-breadcrumb-back] { display:none; }

.workspace-content > :where(div, section, article, form) { min-width:0; width:100%; }

.rb-latency-explanation { margin:8px 0 0; font-size:12px; color:var(--color-text-secondary); line-height:1.6; }

/* Panel action hierarchy uses the existing DS palette, including forms inside shared modals. */
:is(.app-shell,.rasadbox-modal-overlay) :is(.btn-primary,.btn-primary-action) { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; height:auto; padding:10px 18px; border:1px solid var(--color-primary); border-radius:var(--radius-md); background:var(--color-primary); color:var(--color-text-inverse); box-shadow:var(--shadow-sm); font:inherit; font-size:.875rem; font-weight:700; text-decoration:none; cursor:pointer; }
:is(.app-shell,.rasadbox-modal-overlay) :is(.btn-primary,.btn-primary-action):hover { background:var(--color-primary-hover); border-color:var(--color-primary-hover); box-shadow:var(--shadow-sm); transform:none; }
:is(.app-shell,.rasadbox-modal-overlay) :is(.btn-primary,.btn-primary-action,.btn-secondary):focus-visible { outline:2px solid var(--color-primary); outline-offset:3px; }
:is(.app-shell,.rasadbox-modal-overlay) :is(.btn-primary,.btn-primary-action):disabled { opacity:.6; cursor:not-allowed; }
.rb-ticket-message { width:100%; min-height:160px; resize:vertical; }
.rb-form-actions { display:flex; justify-content:flex-end; gap:12px; padding-top:16px; border-top:1px solid var(--color-border); }
.rb-form-feedback { margin:0; color:var(--color-text-secondary); white-space:pre-wrap; overflow-wrap:anywhere; }
.rb-plan-summary { display:flex; justify-content:space-between; align-items:flex-start; gap:24px; flex-wrap:wrap; margin-bottom:28px; padding:24px; border:1px solid var(--color-border); border-inline-start:4px solid var(--color-primary); border-radius:var(--radius-lg); background:var(--color-surface); color:var(--color-text-primary); }
.rb-plan-summary__main { min-width:0; flex:1 1 240px; }
.rb-plan-summary__meta { display:flex; align-items:center; flex-wrap:wrap; gap:10px; }
.rb-plan-summary__badge { background:var(--color-primary-soft); color:var(--color-primary); border:1px solid var(--color-border); border-radius:var(--radius-sm); padding:4px 10px; font-size:.8rem; font-weight:700; }
.rb-plan-summary__code { color:var(--color-text-secondary); overflow-wrap:anywhere; }
.rb-plan-summary h2 { margin:10px 0 6px; color:var(--color-text-primary); font-size:1.6rem; font-weight:800; overflow-wrap:anywhere; }
.rb-plan-summary p { margin:4px 0 0; color:var(--color-text-secondary); font-size:.875rem; }
.rb-plan-summary__price { text-align:end; min-width:0; }
.rb-plan-summary__price strong { color:var(--color-text-primary); font-size:1.5rem; overflow-wrap:anywhere; }

/* Shared semantic form controls also work in _Modal (not only the legacy .modal-content wrapper). */
:is(.app-shell,.rasadbox-modal-overlay) .form-control { box-sizing:border-box; width:100%; padding:10px 12px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); color:var(--color-text-primary); font:inherit; line-height:1.5; }
:is(.app-shell,.rasadbox-modal-overlay) .form-control:is(input,select) { min-height:40px; }
:is(.app-shell,.rasadbox-modal-overlay) .form-control:focus-visible { border-color:var(--color-primary); outline:2px solid var(--color-primary); outline-offset:2px; box-shadow:none; }
:is(.app-shell,.rasadbox-modal-overlay) .form-label { display:block; margin-bottom:6px; font-size:.875rem; font-weight:700; color:var(--color-text-primary); }

.ar-rule-entity { display:block; font-size:.8125rem; color:var(--color-text-secondary); overflow-wrap:anywhere; }
.ar-delivery-editor { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:10px; }
.ar-delivery-editor p { flex-basis:100%; margin:4px 0; color:var(--color-text-secondary); font-size:.8rem; }
.ar-delivery-editor .ar-channel-pill { font:inherit; font-size:.8125rem; }
.ar-delivery-editor .ar-channel-pill:focus-visible { outline:2px solid var(--color-primary); outline-offset:2px; }
.ar-delivery-editor .ar-channel-pill:disabled { opacity:.65; cursor:not-allowed; }

/* DS list actions: one Details icon, secondary actions in an accessible top-layer menu. */
.rb-row-actions { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }
.rb-row-menu { position:fixed; inset:auto; margin:0; padding:6px; min-width:190px; max-width:calc(100vw - 16px); max-height:min(420px,calc(100dvh - 16px)); overflow:auto; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); color:var(--color-text-primary); box-shadow:var(--shadow-md); z-index:1100; text-align:start; }
.rb-row-menu[hidden] { display:none !important; }
.rb-row-menu::backdrop { background:transparent; }
.rb-row-menu form { display:block; margin:0; }
.rb-row-menu .rb-row-menu-item { display:flex !important; align-items:center; gap:10px; width:100% !important; height:auto !important; min-height:40px; padding:8px 12px !important; border:0 !important; border-radius:var(--radius-sm); background:transparent !important; color:var(--color-text-primary) !important; text-align:start; white-space:normal; font:inherit; text-decoration:none; cursor:pointer; }
.rb-row-menu .rb-row-menu-item .material-symbols-outlined { flex-shrink:0; font-size:20px; }
.rb-row-menu .rb-row-menu-item:hover,.rb-row-menu .rb-row-menu-item:focus-visible { background:var(--color-primary-soft); outline:2px solid var(--color-primary); outline-offset:-2px; }
.rb-row-menu .rb-row-menu-item:is(.rb-row-danger,.danger,.action-danger,.btn-danger,.text-red-500,.text-red-600) { color:var(--status-critical) !important; }
.rb-row-menu .rb-row-menu-item:disabled,.rb-row-menu .rb-row-menu-item[aria-disabled="true"] { opacity:.5; cursor:not-allowed; }
.rb-row-details { min-width:34px; flex:none; }
/* Operator link-grant choices keep real checkboxes, labels, checked/disabled and keyboard behavior. */
.rb-permission-groups { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr)); gap:12px; }
.rb-permission-group { min-width:0; margin:0; padding:12px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface); }
.rb-permission-group legend { display:flex; align-items:center; gap:6px; padding-inline:6px; color:var(--color-text-primary); font-weight:700; }
.rb-permission-option { display:flex; align-items:center; gap:10px; min-height:44px; margin-block:6px; padding:10px; border:1px solid var(--color-border); border-radius:var(--radius-sm); color:var(--color-text-primary); cursor:pointer; }
.rb-permission-option input { width:18px; height:18px; accent-color:var(--color-primary); flex:none; }
.rb-permission-option:has(input:checked) { border-color:var(--color-primary); background:var(--color-primary-soft); }
.rb-permission-option:focus-within { outline:2px solid var(--color-primary); outline-offset:2px; }
.rb-permission-option:has(input:disabled) { opacity:.6; cursor:not-allowed; }

/* Dashboard overview chart cards: consistent card, chip legend, mobile-friendly */
.overview-chart-card .technical-card-header { gap: 8px; flex-wrap: wrap; }
.overview-chart-card .technical-card-title { font-size: 0.9375rem; line-height: 1.5; }
.overview-chart-body { padding: 12px 16px 14px; display: flex; flex-direction: column; gap: 10px; }
.overview-chart-body .overview-chart-toolbar { margin-bottom: 0; align-items: flex-start; }
.overview-chart-body .rb-latency-explanation { margin: 0; }
.overview-probe-hint { padding: 8px 10px; border-radius: 8px; background: var(--color-surface-subtle, rgba(36,95,102,0.05)); }
.overview-monitor-picker { gap: 6px; }
.overview-picker-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 4px 10px; border: 1px solid var(--color-border, #D8E4E4); border-radius: 999px; background: var(--color-surface, #fff); font-size: 0.75rem; color: var(--color-text-primary, #213439); cursor: pointer; user-select: none; transition: background .15s, opacity .15s, border-color .15s; }
.overview-picker-chip input { position: absolute; opacity: 0; pointer-events: none; }
.overview-picker-chip:has(input:focus-visible) { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.overview-picker-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.overview-picker-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 14ch; }
.overview-picker-chip:has(input:not(:checked)) { opacity: .45; background: transparent; }
.overview-picker-chip:has(input:not(:checked)) .overview-picker-swatch { background: transparent !important; box-shadow: inset 0 0 0 1.5px var(--color-text-muted, #637A7D); }
.overview-picker-chip.is-empty { border-style: dashed; color: var(--color-text-muted, #637A7D); }
.overview-picker-chip.is-empty::after { content: "—"; font-size: 0.7rem; }
.overview-range-picker { flex-wrap: nowrap; padding: 2px; border-radius: 8px; background: rgba(36,95,102,0.06); }
.overview-range-picker button { padding: 4px 10px; font-size: 0.75rem; border-radius: 6px; min-height: 28px; }
.overview-range-picker .is-active { background: var(--color-surface, #fff); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.overview-missing-latency { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border: 1px dashed var(--color-warning, #A76B24); border-radius: 8px; background: rgba(167,107,36,0.06); font-size: 0.75rem; line-height: 1.7; color: var(--color-text-secondary, #52686A); }
.overview-missing-latency[hidden] { display: none; }
.overview-missing-latency .material-symbols-outlined { font-size: 18px; color: var(--color-warning, #A76B24); }
.overview-missing-latency strong { color: var(--color-text-primary, #213439); }
.overview-probe-chart { height: 260px; }
@media (max-width: 767px) {
  .overview-chart-body { padding: 10px 12px 12px; }
  .overview-chart-body .overview-chart-toolbar { flex-direction: column; align-items: stretch; }
  .overview-range-picker { align-self: flex-start; }
  .overview-latency-chart { height: 260px; }
  .overview-probe-chart { height: 280px; }
  .overview-chart-card .technical-card-header .btn-ghost span:first-child { display: none; }
}
@media (max-width: 767px) {
  .overview-range-picker { align-self: stretch; }
  .overview-range-picker button { flex: 1; }
}

/* Per-location vital phases (main checker + probe nodes) */
.rb-phases { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rb-phases-locations { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; flex: 0 0 auto; min-height: 34px; }
.rb-phases-locations::-webkit-scrollbar { display: none; }
.rb-phases-location { display: inline-flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; white-space: nowrap; flex-shrink: 0; padding: 6px 12px 5px; border: 1px solid var(--color-border, #D8E4E4); border-radius: 12px; background: var(--color-surface, #fff); color: var(--color-text-secondary, #52686A); font: inherit; font-size: 0.75rem; cursor: pointer; }
.rb-phases-location-body { display: inline-flex; align-items: center; gap: 4px; }
.rb-phases-location .material-symbols-outlined { font-size: 15px; }
.rb-phases-location.is-active { background: var(--color-primary, #245F66); border-color: var(--color-primary, #245F66); color: #fff; }
.rb-node-cell { display: inline-flex; flex-direction: row; flex-wrap: nowrap; align-items: center; gap: 8px; min-width: 0; max-width: 100%; vertical-align: middle; }
.rb-node-cell-name { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; }
/* Presence is physically LEFT of the name in both FA/RTL and EN/LTR.
   The name/body keeps its own inherited reading direction. */
[dir="rtl"] .rb-phases-location > .rb-node-light,
[dir="rtl"] .rb-node-cell > .rb-node-light { order: 1; }
.rb-phases-table .rb-node-cell-name { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-node-cell > .rb-node-light { align-self: flex-start; margin-block-start: 0.3em; }
.rb-node-light { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; background: var(--status-unknown, #647477); box-shadow: 0 0 0 3px var(--status-unknown-soft, #EDF2F2); }
.rb-node-light.is-on { background: var(--status-healthy, #277A58); box-shadow: 0 0 0 3px var(--status-healthy-soft, #E8F5F0), 0 0 8px rgba(39, 122, 88, 0.85); }
.rb-node-light.is-off { background: var(--status-critical, #B54745); opacity: 0.45; box-shadow: none; }
.rb-phases-location.is-active .rb-node-light.is-on { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28), 0 0 8px rgba(232, 245, 240, 0.95); }
.rb-phases-location.is-active .rb-node-light.is-off { opacity: 0.7; }
.rb-phases-chart { width: 100%; height: 280px; min-width: 0; flex: 0 0 auto; overflow: hidden; position: relative; }
.rb-phases-table-wrap { overflow-x: auto; border: 1px solid var(--color-border, #D8E4E4); border-radius: 10px; }
.rb-phases-table-wrap[hidden] { display: none; }
.rb-phases-table { width: 100%; border-collapse: collapse; font-size: 0.75rem; white-space: nowrap; }
.rb-phases-table th, .rb-phases-table td { padding: 7px 10px; text-align: center; border-bottom: 1px solid var(--color-border-subtle, #E5EFEF); }
.rb-phases-table thead th { font-weight: 600; color: var(--color-text-secondary, #52686A); background: rgba(36,95,102,0.04); }
.rb-phases-table tbody th { text-align: start; font-weight: 600; color: var(--color-text-primary, #213439); }
.rb-phases-table tbody tr { cursor: pointer; }
.rb-phases-table tbody tr:last-child th, .rb-phases-table tbody tr:last-child td { border-bottom: 0; }
.rb-phases-table tbody tr.is-active { background: rgba(36,95,102,0.07); }
.rb-phases-table td { font-variant-numeric: tabular-nums; direction: ltr; }
.rb-phases-table small { color: var(--color-text-muted, #637A7D); }
.rb-phase-dot { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-inline-end: 4px; vertical-align: middle; }
.overview-probe-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.overview-probe-toolbar select { font: inherit; font-size: 0.8125rem; padding: 5px 10px; border: 1px solid var(--color-border, #D8E4E4); border-radius: 8px; background: var(--color-surface, #fff); color: var(--color-text-primary, #213439); min-width: 0; max-width: 100%; }
@media (max-width: 767px) {
  .rb-phases-chart { height: 300px; }
  .overview-probe-toolbar { flex-direction: column; align-items: stretch; }
}
@media (max-width: 520px) {
  .rb-phases-table-wrap { overflow-x: visible; }
  .rb-phases-table { table-layout: fixed; font-size: 0.6875rem; white-space: normal; }
  .rb-phases-table th, .rb-phases-table td { padding: 6px 3px; }
  .rb-phases-table thead th:first-child, .rb-phases-table tbody th { width: 28%; padding-inline-start: 8px; overflow-wrap: anywhere; }
  .rb-phases-table small { display: none; }
  .rb-phase-dot { width: 6px; height: 6px; margin-inline-end: 2px; }
}

/* Server detail filters: compact rows without native-picker/full-height overrides. */
.server-logs-card { padding: 20px; }
.server-logs-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.server-log-filters { display: grid; grid-template-columns: repeat(2, minmax(140px, 180px)) repeat(2, max-content); gap: 8px; align-items: end; }
.server-log-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.server-log-field label { font-size: .75rem; font-weight: 600; color: var(--color-text-secondary); }
.server-log-date { width: 100%; height: 40px; min-height: 40px; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); color: var(--color-text-primary); font: inherit; font-size: .8125rem; text-align: center; }
.server-log-filters > button { min-height: 40px; height: auto; padding: 8px 14px; justify-content: center; }
@media (max-width: 767.98px) {
  .server-logs-card { padding: 16px; }
  .server-log-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .server-log-filters > button { width: 100%; white-space: normal; }
}
@media (max-width: 359.98px) { .server-log-filters { grid-template-columns: minmax(0, 1fr); } }

/* Record id: muted badge beside detail titles; plain culture-formatted number in lists. */
.id-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--color-surface-subtle, #E5EFEF);
  color: var(--color-text-muted, #637A7D);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.5;
  white-space: nowrap;
  vertical-align: middle;
}
.id-number {
  color: var(--color-text-secondary, #52686A);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 1.8.0 modal rule: short CRUD forms rendered inside #rbFormModal (docs/design/system.md §7.15). */
.rb-modal-form { display:flex; flex-direction:column; gap:14px; }
.rb-modal-form__grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.rb-modal-form__grid--3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.rb-modal-form__field { display:flex; flex-direction:column; min-width:0; }
.rb-modal-form__hint { margin:4px 0 0; color:var(--color-text-secondary); font-size:.8rem; }
.rb-modal-form__check { display:flex; align-items:center; gap:8px; cursor:pointer; font-size:.875rem; }
.rb-modal-form__checks { display:flex; flex-wrap:wrap; gap:10px 18px; }
.rb-modal-form__actions { display:flex; justify-content:flex-end; gap:10px; padding-top:12px; border-top:1px solid var(--color-border); }
.rb-modal-form .field-validation-error, .rb-modal-form .validation-summary-errors, .rb-modal-form-error { color:var(--status-critical); font-size:.8rem; margin:4px 0 0; }
.rb-modal-form .validation-summary-valid { display:none; }
.rb-modal-form .validation-summary-errors ul { margin:0; padding-inline-start:18px; }
@media (max-width: 640px) { .rb-modal-form__grid, .rb-modal-form__grid--3 { grid-template-columns:1fr; } }

/* 1.8.0: page stacks never squeeze cards. A flex:1/min-height:0 page wrapper inside the workspace shrank
   .technical-card (overflow:hidden) and clipped its content (/admin/system-health). Cards keep content height;
   .workspace-content scrolls. */
.rb-autoheight-stack { display:flex; flex-direction:column; gap:14px; }
.rb-autoheight-stack > * { flex-shrink:0; min-height:auto; }
.rb-autoheight-stack .kpi-row .kpi-tile { height:auto; min-height:0; }

/* 1.8.0 header dropdowns (wallet, notifications): same model-B panel as the account menu; triggers never navigate. */
button.header-wallet-chip, button.header-notif-bell { font-family:inherit; cursor:pointer; }
.header-dropdown.is-open .header-wallet-chip, .header-dropdown.is-open .header-notif-bell { border-color:var(--color-primary); color:var(--color-primary); background:var(--color-primary-soft); }
.header-dropdown-panel { min-width:260px; max-width:min(360px, calc(100vw - 16px)); }
.header-notif-panel { width:min(360px, calc(100vw - 16px)); }
.header-dropdown-head { display:flex; flex-direction:column; gap:2px; padding:8px 10px 10px; }
.header-dropdown-head--row { flex-direction:row; align-items:center; justify-content:space-between; gap:8px; }
.header-dropdown-label { font-size:.75rem; color:var(--color-text-secondary); }
.header-dropdown-title { font-size:.9rem; font-weight:700; color:var(--color-text-primary); overflow-wrap:break-word; }
.header-dropdown-link { border:0; background:transparent; color:var(--color-primary); font:inherit; font-size:.78rem; font-weight:700; cursor:pointer; padding:4px 6px; border-radius:var(--radius-sm); }
.header-dropdown-link:hover, .header-dropdown-link:focus-visible { background:var(--color-primary-soft); outline:none; }
.header-wallet-balance { display:flex; flex-direction:column; gap:2px; margin:0 4px 6px; padding:10px 12px; border:1px solid var(--color-border); border-radius:var(--radius-md); background:var(--color-surface-subtle); }
.header-wallet-balance-value { font-size:1.05rem; font-weight:800; color:var(--color-text-primary); }
.header-wallet-balance.is-low { border-color:var(--status-warning); }
.header-wallet-low { font-size:.75rem; font-weight:700; color:var(--status-warning); }
.account-menu-separator { height:1px; margin:6px 4px; background:var(--color-border); }
.header-notif-list { list-style:none; margin:0; padding:0; max-height:min(360px, 60vh); overflow-y:auto; }
.header-notif-item { display:flex; align-items:flex-start; gap:10px; padding:10px; border-radius:var(--radius-sm); color:var(--color-text-primary); text-decoration:none; }
a.header-notif-item:hover, a.header-notif-item:focus-visible { background:var(--color-surface-subtle); outline:none; }
.header-notif-item.is-unread { background:var(--color-primary-soft); }
.header-notif-dot { width:8px; height:8px; margin-top:6px; border-radius:9999px; flex-shrink:0; background:var(--color-text-muted); }
.header-notif-dot.sev-critical { background:var(--status-critical); }
.header-notif-dot.sev-warning { background:var(--status-warning); }
.header-notif-dot.sev-healthy { background:var(--status-healthy); }
.header-notif-dot.sev-info { background:var(--color-primary); }
.header-notif-item:not(.is-unread) .header-notif-dot { opacity:.45; }
.header-notif-text { display:flex; flex-direction:column; gap:2px; min-width:0; }
.header-notif-title { font-size:.84rem; font-weight:700; overflow-wrap:break-word; }
.header-notif-msg { font-size:.78rem; color:var(--color-text-secondary); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.header-notif-time { font-size:.72rem; color:var(--color-text-muted); }
.header-notif-empty { display:flex; align-items:center; gap:8px; justify-content:center; padding:18px 10px; color:var(--color-text-secondary); font-size:.84rem; }
@media (max-width: 767.98px) { .header-dropdown-panel, .header-notif-panel { position:fixed; top:60px; inset-inline:8px; width:auto; max-width:none; } }

/* 1.8.1 admin design-system helpers (replace repeated inline styles; docs/design/system.md §7.21) */
.technical-card.rb-x-scroll { overflow-x: auto; }
.rb-cell-strong { font-weight: 700; color: var(--color-text-primary); }
.rb-cell-muted { color: var(--color-text-secondary, var(--text-secondary)); }
.rb-cell-sub { font-size: 0.75rem; font-weight: 400; color: var(--color-text-secondary, var(--text-secondary)); margin-top: 2px; }
.rb-cell-healthy { color: var(--status-healthy-text); }
.rb-admin-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.rb-admin-title { font-size: 1.5rem; font-weight: 800; color: var(--color-text-primary); margin: 0; }
.rb-admin-subtitle { color: var(--color-text-secondary, var(--text-secondary)); margin: 4px 0 0; font-size: 0.9rem; }
.rb-admin-section-title { font-size: 1.05rem; font-weight: 700; margin: 0 0 10px; }
.rb-admin-card { border: 1px solid var(--color-border); border-radius: 12px; background: var(--color-surface); padding: 16px 18px; margin-bottom: 16px; }
.rb-flash { padding: 12px 18px; border-radius: 12px; margin-bottom: 20px; font-weight: 600; font-size: 0.9rem; }
.rb-flash--success { background: var(--status-healthy-soft); color: var(--status-healthy-text); }
.rb-flash--critical { background: var(--status-critical-soft); color: var(--status-critical-text); }
.rb-empty-note { padding: 20px; border-radius: 12px; background: var(--color-surface-subtle); color: var(--color-text-secondary, var(--text-secondary)); }
.rb-admin-filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; align-items: center; }
.rb-admin-filters .form-control, .rb-admin-filters .form-select { width: auto; min-width: 160px; padding: 8px 12px; }

/* 1.8.2 upsell box (team invite on free plan): message + real buttons in the same box */
.rb-upsell-box { display: flex; flex-direction: column; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--status-warning-border, var(--color-border)); background: var(--status-warning-soft); color: var(--status-warning-text, var(--color-text-primary)); }
.rb-upsell-box__text { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; font-weight: 600; line-height: 1.6; }
.rb-upsell-box__text .material-symbols-outlined { font-size: 20px; flex-shrink: 0; }
.rb-upsell-box__actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* 1.8.2 header account trigger: organization context shows org name + role badge */
.account-menu-name-wrap { display: inline-flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.15; }
.account-menu-context-badge { font-size: 0.68rem; font-weight: 700; color: var(--color-primary); background: var(--color-primary-soft, var(--color-surface-subtle)); border-radius: 999px; padding: 1px 8px; margin-top: 2px; white-space: nowrap; }
/* Org context: thin 1px primary border + soft fill — never a thick/black double border. */
.account-menu-trigger.is-org-context {
  border: 1px solid color-mix(in srgb, var(--color-primary) 45%, var(--color-border));
  background: var(--color-primary-soft, #dceaea);
  box-shadow: none;
}
.account-menu-trigger.is-org-context:hover,
.account-menu.is-open .account-menu-trigger.is-org-context {
  border-color: var(--color-primary);
  background: color-mix(in srgb, var(--color-primary-soft, #dceaea) 80%, var(--color-surface-subtle));
}
.account-menu-trigger.is-org-context .account-menu-avatar { background: var(--color-primary); color: #fff; }
.account-menu-signed-in { display: flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 0.8rem; color: var(--color-text-secondary); border-bottom: 1px solid var(--color-border); }
.account-menu-signed-in .material-symbols-outlined { font-size: 16px; }
@media (max-width: 767px) { .mobile-topbar .account-menu-context-badge { display: none; } }

/* ── 1.8.2 Compact header dropdowns (user menu, wallet, notifications) — model B, minimal ── */
.account-menu-dropdown { min-width: 180px; padding: 4px; top: calc(100% + 4px); }
.account-menu-item { gap: 8px; padding: 6px 8px; font-size: 12.5px; line-height: 1.35; }
.account-menu-item .material-symbols-outlined { font-size: 17px; }
.account-menu-separator { margin: 4px 2px; }
.account-menu-signed-in { padding: 5px 8px 6px; font-size: .74rem; gap: 5px; }
.account-menu-signed-in .material-symbols-outlined { font-size: 15px; }
.header-dropdown-panel { min-width: 200px; max-width: min(280px, calc(100vw - 16px)); }
.header-notif-panel { width: min(300px, calc(100vw - 16px)); }
.header-dropdown-head { padding: 4px 8px 6px; gap: 0; }
.header-dropdown-label { font-size: .7rem; }
.header-dropdown-title { font-size: .82rem; }
.header-dropdown-link { font-size: .72rem; padding: 2px 4px; }
.header-wallet-balance { margin: 0 2px 4px; padding: 6px 8px; gap: 0; border-radius: var(--radius-sm); }
.header-wallet-balance-value { font-size: .92rem; font-weight: 800; }
.header-wallet-low { font-size: .7rem; }
.header-notif-list { max-height: min(300px, 55vh); }
.header-notif-item { gap: 8px; padding: 6px 8px; }
.header-notif-dot { width: 7px; height: 7px; margin-top: 5px; }
.header-notif-text { gap: 1px; }
.header-notif-title { font-size: .76rem; }
.header-notif-msg { font-size: .7rem; -webkit-line-clamp: 1; }
.header-notif-time { font-size: .66rem; }
.header-notif-empty { padding: 10px 8px; font-size: .76rem; gap: 6px; }

/* Audit Before/After human-readable block */
.rb-audit-changes { margin-top: 16px; }
.rb-audit-changes__title { margin: 0 0 8px; }
.rb-audit-changes dl, .rb-audit-changes dd { margin: 0; }
.rb-audit-raw { margin-top: 8px; }
.rb-audit-raw > summary { cursor: pointer; font-size: .78rem; color: var(--color-text-secondary); padding: 4px 0; }
.rb-audit-raw[open] > summary { margin-bottom: 6px; }
.account-menu-switcher { padding: 2px 0 4px; margin-bottom: 2px; }
.account-menu-switcher-label { font-size: .68rem; padding: 2px 8px; }
.account-menu-account { padding: 5px 8px; gap: 6px; border-radius: var(--radius-sm, 6px); font-size: 12.5px; }
.account-menu-account .material-symbols-outlined { font-size: 16px; margin-top: 1px; }
.account-menu-account-text { gap: 0; }
.account-menu-account-meta { font-size: .66rem; }

/* Status light sits in front of the entity name. First flex child + inherited
   dir puts it at the logical start (right in RTL, left in LTR). Do not use
   row-reverse or physical left/right margins here. */
.rb-status-name {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-weight: 700;
  color: var(--color-text-primary);
}
.rb-status-name .status-dot {
  flex: none;
  margin: 0;
  position: relative;
}
.rb-status-name__text {
  min-width: 0;
  overflow-wrap: anywhere;
}
@keyframes pulse-ring {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.6); opacity: 0; }
  100% { transform: scale(0.9); opacity: 0; }
}
.rb-status-name .status-dot-healthy::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 9999px;
  border: 2px solid var(--status-healthy);
  animation: pulse-ring 2.2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
  opacity: 0.6;
}
@media (prefers-reduced-motion: reduce) {
  .rb-status-name .status-dot-healthy::after { animation: none; }
}
.rb-uptime-list-address {
  font-size: 12px;
  color: var(--color-text-muted);
}
.rb-monitor-identity__title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

/* 1.8.18 public landing header: same _AccountMenu as the panel, but the
   marketing header is a tight flex row. Keep the trigger compact and force
   the dropdown out of that row so «حساب جاری · نوع · نقش» cannot sit next
   to the user name. Do not change panel (workspace-header) rules. */
.site-header .account-menu {
  position: relative;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(100%, 16rem);
  z-index: 110;
}
.site-header .account-menu-trigger {
  max-width: 100%;
  min-width: 0;
}
.site-header .account-menu-name-wrap {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
}
.site-header .account-menu-name {
  min-width: 0;
  max-width: 8.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header .account-menu-context-badge {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 7rem;
  margin-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.site-header .account-menu-dropdown {
  position: absolute;
  inset-inline-end: 0;
  inset-inline-start: auto;
  top: calc(100% + 4px);
  z-index: 200;
}
.site-header .account-menu-dropdown[hidden] {
  display: none !important;
}
@media (max-width: 991.98px) {
  .site-header .account-menu-context-badge {
    display: none;
  }
}
