/* ╔═══════════════════════════════════════════════════════════════════════╗
   ║  ë-HQ v3 — PREMIUM INTERNAL SHELL                                     ║
   ║  The official dark cockpit chrome for the ë administrative suite.      ║
   ║  Owns: shell grid, sidebar rail, topbar, breadcrumb, command center,  ║
   ║  shared components and the dark re-theme of module content.           ║
   ║                                                                       ║
   ║  Black = depth/structure · White = readability                        ║
   ║  Yellow = primary action · Red = live system signal (never dominant). ║
   ║  CSS ONLY. No logic, no data, no permission changes.                  ║
   ╚═══════════════════════════════════════════════════════════════════════╝ */

/* ──────────────────────────────────────────────────────────────────────
   1 — DESIGN TOKENS (global — the shell is the outer chrome)
   ────────────────────────────────────────────────────────────────────── */
:root {
    /* Surfaces — black base, layered depth */
    --ehq3-bg:            #05070d;
    --ehq3-bg-deep:       #03040a;
    --ehq3-surface:       rgba(255, 255, 255, 0.03);
    --ehq3-surface-2:     rgba(255, 255, 255, 0.05);
    --ehq3-surface-3:     rgba(255, 255, 255, 0.07);
    --ehq3-card:          #0b0e16;
    --ehq3-card-2:        #0e1220;
    --ehq3-rail:          #070910;

    /* Lines */
    --ehq3-line:          rgba(255, 255, 255, 0.08);
    --ehq3-line-strong:   rgba(255, 255, 255, 0.16);

    /* Text */
    --ehq3-text:          #ffffff;
    --ehq3-text-soft:     #f2f5fb;
    --ehq3-text-muted:    #d5dbe7;
    --ehq3-text-dim:      #a6afbf;

    /* Brand — yellow is the primary action colour */
    --ehq3-primary:       #f2cf2f;
    --ehq3-primary-hover: #ffe04d;
    --ehq3-primary-press: #d8b71f;
    --ehq3-primary-soft:  rgba(242, 207, 47, 0.12);
    --ehq3-primary-line:  rgba(242, 207, 47, 0.35);
    --ehq3-on-primary:    #05070d;

    /* System red — a living signal, never the main colour */
    --ehq3-red:           #ff3b30;
    --ehq3-red-soft:      rgba(255, 59, 48, 0.12);
    --ehq3-red-line:      rgba(255, 59, 48, 0.4);

    /* Secondary semantics — subtle */
    --ehq3-green:         #36c98a;
    --ehq3-green-soft:    rgba(54, 201, 138, 0.12);
    --ehq3-blue:          #5b9dff;
    --ehq3-blue-soft:     rgba(91, 157, 255, 0.12);
    --ehq3-violet:        #9d8bff;
    --ehq3-violet-soft:   rgba(157, 139, 255, 0.12);
    --ehq3-amber:         #f2cf2f;

    /* Spacing — 4-point grid */
    --ehq3-s1: 4px;  --ehq3-s2: 8px;  --ehq3-s3: 12px; --ehq3-s4: 16px;
    --ehq3-s5: 20px; --ehq3-s6: 24px; --ehq3-s8: 32px; --ehq3-s10: 40px;
    --ehq3-s12: 48px;

    /* Radius */
    --ehq3-r-sm: 8px; --ehq3-r-md: 12px; --ehq3-r-lg: 16px; --ehq3-r-full: 999px;

    /* Shadow */
    --ehq3-shadow:    0 1px 2px rgba(0, 0, 0, 0.4), 0 12px 32px rgba(0, 0, 0, 0.4);
    --ehq3-shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.6);
    --ehq3-glow-y:    0 0 0 1px var(--ehq3-primary-line), 0 8px 28px rgba(242, 207, 47, 0.14);

    /* Module UI tokens — consumed by plugin-neutral classes */
    --ehq-ui-canvas:       transparent;
    --ehq-ui-panel:        var(--ehq3-card);
    --ehq-ui-panel-2:      var(--ehq3-card-2);
    --ehq-ui-table-head:   rgba(255, 255, 255, 0.07);
    --ehq-ui-table-row:    rgba(255, 255, 255, 0.025);
    --ehq-ui-table-hover:  rgba(255, 255, 255, 0.075);
    --ehq-ui-text:         var(--ehq3-text);
    --ehq-ui-text-muted:   var(--ehq3-text-muted);
    --ehq-ui-line:         var(--ehq3-line);
    --ehq-ui-line-strong:  var(--ehq3-line-strong);
    --ehq-ui-focus:        0 0 0 3px var(--ehq3-primary-soft);
    --ehq-ui-link:         var(--ehq3-primary);
    --ehq-ui-button-bg:    var(--ehq3-surface-3);
    --ehq-ui-button-text:  var(--ehq3-text);
    --ehq-ui-primary-bg:   var(--ehq3-primary);
    --ehq-ui-primary-text: var(--ehq3-on-primary);

    /* Type */
    --ehq3-font:      var(--ehq-font, "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --ehq3-font-mono: var(--ehq-font, "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --ehq3-font-head: var(--ehq-font, "Open Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
    --ehq3-bg-grid:   url("../identity/backgrounds/bg-grid-subtle.svg");
    --ehq3-bg-globe:  url("../identity/backgrounds/bg-command-center-globe.webp");

    /* Layout */
    --ehq3-rail-w:      248px;
    --ehq3-rail-w-min:  76px;
    --ehq3-topbar-h:    64px;

    /* Motion */
    --ehq3-ease:   cubic-bezier(.2, .7, .3, 1);
    --ehq3-fast:   140ms;
    --ehq3-normal: 220ms;

    /* Z-index */
    --ehq3-z-rail:   1100;
    --ehq3-z-topbar: 1050;
    --ehq3-z-scrim:  1090;
}

/* ──────────────────────────────────────────────────────────────────────
   2 — SHELL ROOT + RESET
   ────────────────────────────────────────────────────────────────────── */
body.ehq3 {
    margin: 0;
    background: var(--ehq3-bg);
    color: var(--ehq3-text);
    font-family: var(--ehq3-font);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}
.ehq3-shell, .ehq3-shell *, .ehq3-shell *::before, .ehq3-shell *::after,
.ehq3-public-gate, .ehq3-public-gate *, .ehq3-public-gate *::before, .ehq3-public-gate *::after { box-sizing: border-box; }
.ehq3-shell { position: relative; min-height: 100vh; }
.ehq3-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: var(--ehq3-bg-grid), var(--ehq3-bg-globe);
    background-position: center, right -10vw top 4vh;
    background-repeat: repeat, no-repeat;
    background-size: auto, min(780px, 64vw);
    opacity: 0.28;
    z-index: 0;
}
.ehq3-viewport {
    position: relative;
    z-index: 1;
}
.ehq3-shell a { color: inherit; text-decoration: none; }
.ehq3-shell h1, .ehq3-shell h2, .ehq3-shell h3 {
    font-family: var(--ehq3-font-head);
    font-weight: 600;
    margin: 0;
    letter-spacing: 0;
    color: var(--ehq3-text);
}
.ehq3-visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Technical / meta type — Open Sans compact labels */
.ehq3-meta {
    font-family: var(--ehq3-font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ehq3-text-muted);
}
.ehq3-num { font-variant-numeric: tabular-nums; }

/* ──────────────────────────────────────────────────────────────────────
   3 — LOGO BADGE (the official lightweight mark in a white circle)
   ────────────────────────────────────────────────────────────────────── */
.ehq-logo-badge {
    width: 72px;
    height: 72px;
    border-radius: var(--ehq3-r-full);
    background: #fff;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: none;
}
.ehq-logo-badge img { width: 58px; height: 58px; object-fit: contain; display: block; }
.ehq-logo-badge.is-sm  { width: 44px; height: 44px; }
.ehq-logo-badge.is-sm img  { width: 34px; height: 34px; }
.ehq-logo-badge.is-lg  { width: 104px; height: 104px; }
.ehq-logo-badge.is-lg img  { width: 84px; height: 84px; }

/* ──────────────────────────────────────────────────────────────────────
   4 — SIDEBAR RAIL
   ────────────────────────────────────────────────────────────────────── */
.ehq3-rail {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--ehq3-rail-w);
    background: var(--ehq3-rail);
    border-right: 1px solid var(--ehq3-line);
    display: flex;
    flex-direction: column;
    z-index: var(--ehq3-z-rail);
    transition: width var(--ehq3-normal) var(--ehq3-ease),
                transform var(--ehq3-normal) var(--ehq3-ease);
}
.ehq3-rail-brand {
    display: flex;
    align-items: center;
    gap: var(--ehq3-s3);
    padding: var(--ehq3-s5) var(--ehq3-s5) var(--ehq3-s4);
    border-bottom: 1px solid var(--ehq3-line);
}
.ehq3-rail-brand .ehq-logo-badge { width: 40px; height: 40px; }
.ehq3-rail-brand .ehq-logo-badge img { width: 32px; height: 32px; }
.ehq3-rail-wordmark { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ehq3-rail-wordmark b {
    font-family: var(--ehq3-font-head);
    font-size: 15px;
    font-weight: 600;
    color: var(--ehq3-text);
}
.ehq3-rail-wordmark span { font-family: var(--ehq3-font-mono); font-size: 9.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ehq3-text-dim); }

.ehq3-rail-scroll { flex: 1; overflow-y: auto; padding: var(--ehq3-s4) var(--ehq3-s3); }
.ehq3-rail-group + .ehq3-rail-group { margin-top: var(--ehq3-s5); }
.ehq3-rail-group-label {
    font-family: var(--ehq3-font-mono);
    font-size: 9.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ehq3-text-dim);
    padding: 0 var(--ehq3-s3) var(--ehq3-s2);
}

.ehq3-nav-item {
    display: flex;
    align-items: center;
    gap: var(--ehq3-s3);
    padding: 10px var(--ehq3-s3);
    border-radius: var(--ehq3-r-sm);
    color: var(--ehq3-text-muted);
    font-size: 13.5px;
    font-weight: 600;
    white-space: nowrap;
    transition: background var(--ehq3-fast) var(--ehq3-ease),
                color var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-nav-item + .ehq3-nav-item { margin-top: 2px; }
.ehq3-nav-item .dashicons,
.ehq3-nav-item .ehq3-ico {
    flex: none; width: 20px; height: 20px; font-size: 20px;
    display: grid; place-items: center; color: var(--ehq3-text-dim);
    transition: color var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-nav-item:hover { background: var(--ehq3-surface-2); color: var(--ehq3-text); }
.ehq3-nav-item:hover .dashicons, .ehq3-nav-item:hover .ehq3-ico { color: var(--ehq3-text-soft); }
.ehq3-nav-item.is-active {
    background: var(--ehq3-primary-soft);
    color: var(--ehq3-primary);
    box-shadow: inset 2px 0 0 var(--ehq3-primary);
}
.ehq3-nav-item.is-active .dashicons,
.ehq3-nav-item.is-active .ehq3-ico { color: var(--ehq3-primary); }
.ehq3-nav-item .ehq3-nav-count {
    margin-left: auto;
    font-family: var(--ehq3-font-mono);
    font-size: 10.5px;
    padding: 1px 7px;
    border-radius: var(--ehq3-r-full);
    background: var(--ehq3-surface-3);
    color: var(--ehq3-text-soft);
}
.ehq3-nav-item .ehq3-nav-count.is-alert { background: var(--ehq3-red-soft); color: var(--ehq3-red); }
.ehq3-nav-lock {
    margin-left: auto;
    width: 14px;
    height: 14px;
    font-size: 14px;
}

.ehq3-rail-foot { border-top: 1px solid var(--ehq3-line); padding: var(--ehq3-s3); }
.ehq3-user {
    display: flex; align-items: center; gap: var(--ehq3-s3);
    padding: var(--ehq3-s2) var(--ehq3-s3);
    border-radius: var(--ehq3-r-sm);
}
.ehq3-user-avatar {
    width: 36px; height: 36px; flex: none;
    border-radius: var(--ehq3-r-full);
    background: var(--ehq3-surface-3);
    display: grid; place-items: center;
    font-family: var(--ehq3-font-head); font-weight: 600; font-size: 13px;
    color: var(--ehq3-primary);
    border: 1px solid var(--ehq3-line-strong);
}
.ehq3-user-meta { min-width: 0; line-height: 1.3; }
.ehq3-user-meta b { display: block; font-size: 13px; font-weight: 600; color: var(--ehq3-text); overflow: hidden; text-overflow: ellipsis; }
.ehq3-user-meta span { font-size: 11px; color: var(--ehq3-text-dim); }
.ehq3-signout {
    display: flex; align-items: center; justify-content: center; gap: var(--ehq3-s2);
    margin-top: var(--ehq3-s2);
    width: 100%; padding: 9px;
    border-radius: var(--ehq3-r-sm);
    border: 1px solid var(--ehq3-line);
    color: var(--ehq3-text-muted);
    font-size: 12.5px; font-weight: 600;
    transition: all var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-signout:hover { border-color: var(--ehq3-red-line); color: var(--ehq3-red); background: var(--ehq3-red-soft); }
.ehq3-signout .dashicons { font-size: 16px; width: 16px; height: 16px; }

/* Collapsed rail */
.ehq3-shell.is-collapsed .ehq3-rail { width: var(--ehq3-rail-w-min); }
.ehq3-shell.is-collapsed .ehq3-rail-wordmark,
.ehq3-shell.is-collapsed .ehq3-rail-group-label,
.ehq3-shell.is-collapsed .ehq3-nav-item span:not(.dashicons):not(.ehq3-ico):not(.ehq3-nav-count),
.ehq3-shell.is-collapsed .ehq3-nav-item .ehq3-nav-count,
.ehq3-shell.is-collapsed .ehq3-user-meta,
.ehq3-shell.is-collapsed .ehq3-signout span:not(.dashicons) { display: none; }
.ehq3-shell.is-collapsed .ehq3-rail-brand,
.ehq3-shell.is-collapsed .ehq3-nav-item,
.ehq3-shell.is-collapsed .ehq3-user { justify-content: center; }
.ehq3-shell.is-collapsed .ehq3-viewport { margin-left: var(--ehq3-rail-w-min); }

/* ──────────────────────────────────────────────────────────────────────
   5 — VIEWPORT + TOPBAR + BREADCRUMB
   ────────────────────────────────────────────────────────────────────── */
.ehq3-viewport {
    margin-left: var(--ehq3-rail-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left var(--ehq3-normal) var(--ehq3-ease);
}
.ehq3-topbar {
    position: sticky; top: 0;
    height: var(--ehq3-topbar-h);
    display: flex; align-items: center;
    gap: var(--ehq3-s4);
    padding: 0 var(--ehq3-s6);
    background: rgba(5, 7, 13, 0.86);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--ehq3-line);
    z-index: var(--ehq3-z-topbar);
}
.ehq3-rail-toggle {
    flex: none;
    width: 34px; height: 34px;
    display: grid; place-items: center;
    border-radius: var(--ehq3-r-sm);
    border: 1px solid var(--ehq3-line);
    background: var(--ehq3-surface);
    color: var(--ehq3-text-muted);
    cursor: pointer;
    transition: all var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-rail-toggle:hover { color: var(--ehq3-text); border-color: var(--ehq3-line-strong); }
.ehq3-rail-toggle .dashicons { font-size: 18px; }

.ehq3-breadcrumb { display: flex; align-items: center; gap: var(--ehq3-s2); min-width: 0; flex: 1; }
.ehq3-breadcrumb a, .ehq3-breadcrumb span {
    font-family: var(--ehq3-font-mono);
    font-size: 11.5px;
    letter-spacing: 0.06em;
    color: var(--ehq3-text-muted);
    white-space: nowrap;
}
.ehq3-breadcrumb a:hover { color: var(--ehq3-primary); }
.ehq3-breadcrumb .ehq3-crumb-sep { color: var(--ehq3-text-dim); }
.ehq3-breadcrumb .is-current { color: var(--ehq3-text); }
.ehq3-breadcrumb .is-current.is-truncate { overflow: hidden; text-overflow: ellipsis; }

.ehq3-topbar-actions { display: flex; align-items: center; gap: var(--ehq3-s3); margin-left: auto; }
.ehq3-iconbtn {
    position: relative;
    width: 36px; height: 36px;
    display: grid; place-items: center;
    border-radius: var(--ehq3-r-sm);
    border: 1px solid var(--ehq3-line);
    background: var(--ehq3-surface);
    color: var(--ehq3-text-muted);
    cursor: pointer;
    transition: all var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-iconbtn:hover { color: var(--ehq3-text); border-color: var(--ehq3-line-strong); }
.ehq3-iconbtn .dashicons { font-size: 18px; }
.ehq3-iconbtn .ehq3-notif-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: var(--ehq3-r-full);
}
.ehq3-topbar-user {
    display: flex; align-items: center; gap: var(--ehq3-s2);
    padding: 4px 12px 4px 4px;
    border-radius: var(--ehq3-r-full);
    border: 1px solid var(--ehq3-line);
    background: var(--ehq3-surface);
}
.ehq3-topbar-user .ehq3-user-avatar { width: 28px; height: 28px; font-size: 11px; }
.ehq3-topbar-user b { font-size: 12.5px; font-weight: 600; }

/* ──────────────────────────────────────────────────────────────────────
   6 — CONTENT AREA + PAGE HEADER
   ────────────────────────────────────────────────────────────────────── */
.ehq3-content {
    flex: 1;
    padding: var(--ehq3-s8) var(--ehq3-s8) var(--ehq3-s12);
    width: 100%;
    max-width: 1680px;
    margin-inline: auto;
}
/* Module pages stay left-aligned and capped so dense dashboards do not sprawl on ultrawide screens. */
.ehq3-content.ehq3-content-module {
    max-width: 1920px;
    margin-inline: 0 auto;
}
.ehq3-content.ehq3-content-flush { padding: 0; }
.ehq3-page-head {
    display: flex;
    align-items: flex-start;
    gap: var(--ehq3-s5);
    flex-wrap: wrap;
    margin-bottom: var(--ehq3-s8);
}
.ehq3-page-head-text { flex: 1; min-width: 240px; }
.ehq3-page-head h1 { font-size: 28px; line-height: 1.2; }
.ehq3-page-head .ehq3-eyebrow {
    font-family: var(--ehq3-font-mono);
    font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ehq3-primary);
    margin-bottom: var(--ehq3-s2);
    display: flex; align-items: center; gap: var(--ehq3-s2);
}
.ehq3-page-head p { margin: var(--ehq3-s2) 0 0; color: var(--ehq3-text-muted); font-size: 14px; max-width: 70ch; }
.ehq3-page-head-actions { display: flex; align-items: center; gap: var(--ehq3-s3); flex-wrap: wrap; }

/* ──────────────────────────────────────────────────────────────────────
   7 — BUTTONS
   ────────────────────────────────────────────────────────────────────── */
.ehq3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--ehq3-s2);
    min-height: 40px;
    padding: 0 var(--ehq3-s5);
    border-radius: var(--ehq3-r-sm);
    border: 1px solid var(--ehq3-line-strong);
    background: var(--ehq3-surface-2);
    color: var(--ehq3-text);
    font-family: var(--ehq3-font);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-btn .dashicons { font-size: 16px; width: 16px; height: 16px; }
.ehq3-btn:hover { background: var(--ehq3-surface-3); border-color: var(--ehq3-line-strong); }
.ehq3-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ehq3-primary-soft); }

.ehq3-btn-primary {
    background: var(--ehq3-primary);
    border-color: var(--ehq3-primary);
    color: var(--ehq3-on-primary) !important;
}
.ehq3-btn-primary:hover { background: var(--ehq3-primary-hover); border-color: var(--ehq3-primary-hover); }
.ehq3-btn-primary:active { background: var(--ehq3-primary-press); }

.ehq3-btn-ghost { background: transparent; border-color: var(--ehq3-line); color: var(--ehq3-text-muted); }
.ehq3-btn-ghost:hover { background: var(--ehq3-surface); color: var(--ehq3-text); border-color: var(--ehq3-line-strong); }

.ehq3-btn-danger { background: var(--ehq3-red-soft); border-color: var(--ehq3-red-line); color: var(--ehq3-red); }
.ehq3-btn-danger:hover { background: var(--ehq3-red); border-color: var(--ehq3-red); color: #fff; }

.ehq3-btn-sm { min-height: 32px; padding: 0 var(--ehq3-s3); font-size: 12px; }
.ehq3-btn-lg { min-height: 48px; padding: 0 var(--ehq3-s6); font-size: 14px; }
.ehq3-btn[disabled], .ehq3-btn.is-disabled { opacity: 0.45; pointer-events: none; }

/* ──────────────────────────────────────────────────────────────────────
   8 — CARDS / PANELS
   ────────────────────────────────────────────────────────────────────── */
.ehq3-panel {
    background: var(--ehq3-card);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-lg);
    padding: var(--ehq3-s6);
}
.ehq3-panel-head {
    display: flex; align-items: center; gap: var(--ehq3-s3);
    margin-bottom: var(--ehq3-s5);
}
.ehq3-panel-head h3 { font-size: 15px; }
.ehq3-panel-head .ehq3-panel-link { margin-left: auto; }
.ehq3-panel-link {
    font-family: var(--ehq3-font-mono);
    font-size: 11px; letter-spacing: 0.06em;
    color: var(--ehq3-text-muted);
    display: inline-flex; align-items: center; gap: 4px;
}
.ehq3-panel-link:hover { color: var(--ehq3-primary); }

.ehq3-grid { display: grid; gap: var(--ehq3-s5); }
.ehq3-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ehq3-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ehq3-grid.cols-2-1 { grid-template-columns: 2fr 1fr; }

/* ──────────────────────────────────────────────────────────────────────
   9 — KPI CARDS
   ────────────────────────────────────────────────────────────────────── */
.ehq3-kpi-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--ehq3-s4);
    margin-bottom: var(--ehq3-s6);
}
.ehq3-kpi {
    background: var(--ehq3-card);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-md);
    padding: var(--ehq3-s5);
    transition: border-color var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-kpi:hover { border-color: var(--ehq3-line-strong); }
.ehq3-kpi-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--ehq3-s4); }
.ehq3-kpi-label {
    font-family: var(--ehq3-font-mono);
    font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ehq3-text-muted);
}
.ehq3-kpi-ico {
    width: 32px; height: 32px;
    display: grid; place-items: center;
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-surface-2);
    color: var(--ehq3-text-soft);
}
.ehq3-kpi-ico .dashicons { font-size: 18px; }
.ehq3-kpi-value {
    font-family: var(--ehq3-font-head);
    font-size: 26px; font-weight: 700;
    color: var(--ehq3-text);
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}
.ehq3-kpi-sub { margin-top: var(--ehq3-s2); font-size: 12px; color: var(--ehq3-text-dim); }
.ehq3-kpi.tone-yellow .ehq3-kpi-ico { background: var(--ehq3-primary-soft); color: var(--ehq3-primary); }
.ehq3-kpi.tone-red .ehq3-kpi-ico { background: var(--ehq3-red-soft); color: var(--ehq3-red); }
.ehq3-kpi.tone-green .ehq3-kpi-ico { background: var(--ehq3-green-soft); color: var(--ehq3-green); }
.ehq3-kpi.tone-blue .ehq3-kpi-ico { background: var(--ehq3-blue-soft); color: var(--ehq3-blue); }
.ehq3-kpi-strip-exec .ehq3-kpi {
    background: linear-gradient(180deg, var(--ehq3-card), var(--ehq3-card-2));
}

/* trend chips */
.ehq3-trend { font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.ehq3-trend.is-up { color: var(--ehq3-green); }
.ehq3-trend.is-down { color: var(--ehq3-red); }

/* ──────────────────────────────────────────────────────────────────────
   10 — COMMAND CENTER
   ────────────────────────────────────────────────────────────────────── */
.ehq3-welcome {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: var(--ehq3-s6); flex-wrap: wrap;
    margin-bottom: var(--ehq3-s8);
    padding-bottom: var(--ehq3-s6);
    border-bottom: 1px solid var(--ehq3-line);
}
.ehq3-welcome h1 { font-size: 30px; line-height: 1.15; }
.ehq3-welcome h1 b { color: var(--ehq3-primary); font-weight: 600; }
.ehq3-welcome p { margin: var(--ehq3-s2) 0 0; color: var(--ehq3-text-muted); }
.ehq3-welcome-stat { text-align: right; }
.ehq3-welcome-stat strong {
    font-family: var(--ehq3-font-head);
    font-size: 22px; color: var(--ehq3-text);
}
.ehq3-welcome-stat span { display: block; }

.ehq3-modules {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ehq3-s5);
    margin-bottom: var(--ehq3-s8);
}
.ehq3-module-card {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--ehq3-card);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-lg);
    padding: var(--ehq3-s6);
    overflow: hidden;
    transition: border-color var(--ehq3-normal) var(--ehq3-ease),
                transform var(--ehq3-normal) var(--ehq3-ease);
}
.ehq3-module-card::before {
    content: ""; position: absolute; inset: 0 0 auto 0; height: 3px;
    background: var(--ehq3-line-strong);
}
.ehq3-module-card.tone-office::before { background: linear-gradient(90deg, var(--ehq3-primary), transparent); }
.ehq3-module-card.tone-distribution::before { background: linear-gradient(90deg, var(--ehq3-blue), transparent); }
.ehq3-module-card.tone-system::before { background: linear-gradient(90deg, var(--ehq3-violet), transparent); }
.ehq3-module-card:hover { border-color: var(--ehq3-line-strong); transform: translateY(-2px); }
.ehq3-module-card.is-missing { opacity: 0.6; }

.ehq3-module-top { display: flex; align-items: center; gap: var(--ehq3-s3); margin-bottom: var(--ehq3-s4); }
.ehq3-module-ico {
    width: 48px; height: 48px; flex: none;
    display: grid; place-items: center;
    border-radius: var(--ehq3-r-md);
    background: var(--ehq3-surface-2);
    color: var(--ehq3-text-soft);
}
.ehq3-module-ico .dashicons { font-size: 26px; }
.ehq3-module-card.tone-office .ehq3-module-ico { background: var(--ehq3-primary-soft); color: var(--ehq3-primary); }
.ehq3-module-card.tone-distribution .ehq3-module-ico { background: var(--ehq3-blue-soft); color: var(--ehq3-blue); }
.ehq3-module-card.tone-system .ehq3-module-ico { background: var(--ehq3-violet-soft); color: var(--ehq3-violet); }
.ehq3-module-card h3 { font-size: 17px; }
.ehq3-module-card .ehq3-module-kicker {
    font-family: var(--ehq3-font-mono);
    font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
    color: var(--ehq3-text-dim);
}
.ehq3-module-desc { color: var(--ehq3-text-muted); font-size: 13px; margin: 0 0 var(--ehq3-s5); flex: 1; }
.ehq3-module-insight {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--ehq3-s3);
    align-items: center;
    margin: 0 0 var(--ehq3-s4);
    padding: var(--ehq3-s3);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-surface);
    color: var(--ehq3-text-soft);
}
.ehq3-module-insight .dashicons {
    width: 18px;
    height: 18px;
    font-size: 18px;
}
.ehq3-module-insight strong,
.ehq3-module-insight small {
    display: block;
}
.ehq3-module-insight strong {
    color: var(--ehq3-text);
    font-size: 12.5px;
}
.ehq3-module-insight small {
    margin-top: 2px;
    color: var(--ehq3-text-muted);
    font-size: 11.5px;
    line-height: 1.35;
}
.ehq3-module-insight.is-priority {
    background: var(--ehq3-primary-soft);
    border-color: var(--ehq3-primary-line);
}
.ehq3-module-insight.is-priority .dashicons,
.ehq3-module-insight.is-priority strong {
    color: var(--ehq3-primary);
}
.ehq3-module-insight.is-success {
    background: var(--ehq3-green-soft);
    border-color: rgba(54, 201, 138, 0.36);
}
.ehq3-module-insight.is-success .dashicons,
.ehq3-module-insight.is-success strong {
    color: var(--ehq3-green);
}
.ehq3-module-insight.is-danger {
    background: var(--ehq3-red-soft);
    border-color: var(--ehq3-red-line);
}
.ehq3-module-insight.is-danger .dashicons,
.ehq3-module-insight.is-danger strong {
    color: var(--ehq3-red);
}
.ehq3-module-stats {
    display: flex; gap: var(--ehq3-s5);
    padding: var(--ehq3-s4) 0;
    border-top: 1px solid var(--ehq3-line);
    margin-bottom: var(--ehq3-s4);
}
.ehq3-module-stat strong {
    display: block;
    font-family: var(--ehq3-font-head);
    font-size: 18px; color: var(--ehq3-text);
}
.ehq3-module-stat span {
    font-family: var(--ehq3-font-mono);
    font-size: 9.5px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ehq3-text-dim);
}
.ehq3-module-foot { display: flex; align-items: center; gap: var(--ehq3-s3); }
.ehq3-module-foot .ehq3-version { margin-left: auto; }

.ehq3-priority-grid {
    margin-bottom: var(--ehq3-s8);
}

.ehq3-action-list {
    display: grid;
    gap: var(--ehq3-s3);
}

.ehq3-action-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px var(--ehq3-s3);
    align-items: center;
    padding: var(--ehq3-s4);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-surface);
    color: var(--ehq3-text);
    transition: border-color var(--ehq3-fast) var(--ehq3-ease),
                background var(--ehq3-fast) var(--ehq3-ease),
                transform var(--ehq3-fast) var(--ehq3-ease);
}

.ehq3-action-row:hover {
    border-color: var(--ehq3-primary-line);
    background: var(--ehq3-primary-soft);
    transform: translateY(-1px);
}

.ehq3-action-row.is-success:hover {
    border-color: rgba(54, 201, 138, 0.42);
    background: var(--ehq3-green-soft);
}

.ehq3-action-row.is-danger:hover {
    border-color: var(--ehq3-red-line);
    background: var(--ehq3-red-soft);
}

.ehq3-action-module {
    grid-column: 1 / -1;
    font-family: var(--ehq3-font-mono);
    font-size: 10px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ehq3-text-dim);
}

.ehq3-action-row strong {
    font-size: 14px;
    color: var(--ehq3-text);
}

.ehq3-action-row > span:not(.ehq3-action-module) {
    color: var(--ehq3-text-muted);
    font-size: 12.5px;
}

.ehq3-action-row .ehq3-badge {
    grid-row: 2 / span 2;
    grid-column: 2;
    align-self: center;
}

.ehq3-health-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: var(--ehq3-s2) var(--ehq3-s3);
    align-items: center;
    padding: var(--ehq3-s5);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-md);
    background: var(--ehq3-surface);
}

.ehq3-health-summary .dashicons {
    grid-row: 1 / span 2;
    width: 26px;
    height: 26px;
    font-size: 26px;
}

.ehq3-health-summary strong {
    font-size: 15px;
}

.ehq3-health-summary p {
    margin: 0;
    color: var(--ehq3-text-muted);
    font-size: 12.5px;
}

.ehq3-health-summary.is-ready {
    border-color: rgba(54, 201, 138, 0.34);
    background: var(--ehq3-green-soft);
}

.ehq3-health-summary.is-ready .dashicons,
.ehq3-health-summary.is-ready strong {
    color: var(--ehq3-green);
}

.ehq3-health-summary.is-attention {
    border-color: var(--ehq3-primary-line);
    background: var(--ehq3-primary-soft);
}

.ehq3-health-summary.is-attention .dashicons,
.ehq3-health-summary.is-attention strong {
    color: var(--ehq3-primary);
}

/* ──────────────────────────────────────────────────────────────────────
   11 — BADGES / STATUS PILLS / VERSION
   ────────────────────────────────────────────────────────────────────── */
.ehq3-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 9px;
    border-radius: var(--ehq3-r-full);
    font-family: var(--ehq3-font-mono);
    font-size: 10px; letter-spacing: 0.06em; text-transform: uppercase;
    font-weight: 400;
    font-style: normal;
    border: 1px solid var(--ehq3-line-strong);
    background: var(--ehq3-surface-2);
    color: var(--ehq3-text-soft);
    white-space: nowrap;
}
.ehq3-badge-lock {
    width: 12px;
    height: 12px;
    font-size: 12px;
}
/* Yellow = review / pending / action */
.ehq3-badge.is-pending,  .ehq3-badge.is-review, .ehq3-badge.is-draft,
.ehq3-badge.is-unmatched, .ehq3-badge.is-unassigned {
    background: var(--ehq3-primary-soft); color: var(--ehq3-primary); border-color: var(--ehq3-primary-line);
}
/* Red = error / blocked / alert */
.ehq3-badge.is-error, .ehq3-badge.is-danger, .ehq3-badge.is-suspense,
.ehq3-badge.is-blocked, .ehq3-badge.is-invalid, .ehq3-badge.is-missing {
    background: var(--ehq3-red-soft); color: var(--ehq3-red); border-color: var(--ehq3-red-line);
}
/* Green = validated / paid / success (subtle) */
.ehq3-badge.is-validated, .ehq3-badge.is-paid, .ehq3-badge.is-success,
.ehq3-badge.is-reconciled, .ehq3-badge.is-posted, .ehq3-badge.is-allocated {
    background: var(--ehq3-green-soft); color: var(--ehq3-green); border-color: rgba(54, 201, 138, 0.4);
}
/* Blue / violet = info / import / system (subtle) */
.ehq3-badge.is-imported, .ehq3-badge.is-info, .ehq3-badge.is-mapped,
.ehq3-badge.is-ready, .ehq3-badge.is-locked {
    background: var(--ehq3-blue-soft); color: var(--ehq3-blue); border-color: rgba(91, 157, 255, 0.4);
}
/* Grey = inactive / archived */
.ehq3-badge.is-ignored, .ehq3-badge.is-archived, .ehq3-badge.is-inactive {
    background: var(--ehq3-surface); color: var(--ehq3-text-dim);
}

.ehq3-version {
    font-family: var(--ehq3-font-mono);
    font-size: 10.5px;
    color: var(--ehq3-text-dim);
    padding: 2px 8px;
    border-radius: var(--ehq3-r-full);
    border: 1px solid var(--ehq3-line);
}

/* ──────────────────────────────────────────────────────────────────────
   12 — RED MICRO-INTERACTION (the blinking system signal — logo eyes)
   ────────────────────────────────────────────────────────────────────── */
.ehq-pulse-red {
    background: #ff3b30;
    box-shadow: 0 0 8px rgba(255, 59, 48, 0.7);
    animation: ehqPulse 1.8s ease-in-out infinite;
}
@keyframes ehqPulse {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.92);
        box-shadow: 0 0 4px rgba(255, 59, 48, 0.35);
    }
    50% {
        opacity: 1;
        transform: scale(1.08);
        box-shadow: 0 0 14px rgba(255, 59, 48, 0.85);
    }
}
.ehq3-pulse-dot {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: var(--ehq3-r-full);
}
.ehq3-status-line {
    display: inline-flex; align-items: center; gap: 7px;
    font-family: var(--ehq3-font-mono);
    font-size: 11px; letter-spacing: 0.06em;
    color: var(--ehq3-text-muted);
}
.ehq3-status-line .ehq3-pulse-dot.is-live { background: var(--ehq3-green); box-shadow: 0 0 8px rgba(54, 201, 138, 0.6); }

@media (prefers-reduced-motion: reduce) {
    .ehq-pulse-red { animation: none; opacity: 0.9; }
}

/* ──────────────────────────────────────────────────────────────────────
   13 — ACTIVITY FEED / LISTS
   ────────────────────────────────────────────────────────────────────── */
.ehq3-feed { display: flex; flex-direction: column; }
.ehq3-feed-item {
    display: flex; gap: var(--ehq3-s3);
    padding: var(--ehq3-s3) 0;
    border-bottom: 1px solid var(--ehq3-line);
}
.ehq3-feed-item:last-child { border-bottom: 0; }
.ehq3-feed-mark {
    width: 8px; height: 8px; margin-top: 6px; flex: none;
    border-radius: var(--ehq3-r-full);
    background: var(--ehq3-text-dim);
}
.ehq3-feed-mark.is-yellow { background: var(--ehq3-primary); }
.ehq3-feed-mark.is-red { background: var(--ehq3-red); }
.ehq3-feed-mark.is-green { background: var(--ehq3-green); }
.ehq3-feed-body { min-width: 0; flex: 1; }
.ehq3-feed-body .ehq3-feed-kind {
    font-family: var(--ehq3-font-mono);
    font-size: 9.5px; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--ehq3-text-dim);
}
.ehq3-feed-body p { margin: 2px 0 0; font-size: 13px; color: var(--ehq3-text-soft); }
.ehq3-feed-time { font-family: var(--ehq3-font-mono); font-size: 10.5px; color: var(--ehq3-text-dim); white-space: nowrap; }

/* ──────────────────────────────────────────────────────────────────────
   13b — QUICK ACCESS GRID
   ────────────────────────────────────────────────────────────────────── */
.ehq3-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--ehq3-s2);
}
.ehq3-quick-link {
    display: flex; align-items: center; gap: var(--ehq3-s2);
    padding: 10px var(--ehq3-s3);
    border-radius: var(--ehq3-r-sm);
    border: 1px solid var(--ehq3-line);
    background: var(--ehq3-surface);
    color: var(--ehq3-text-soft);
    font-size: 12.5px; font-weight: 600;
    transition: all var(--ehq3-fast) var(--ehq3-ease);
}
.ehq3-quick-link:hover {
    border-color: var(--ehq3-primary-line);
    color: var(--ehq3-primary);
    background: var(--ehq3-primary-soft);
}
.ehq3-quick-link .dashicons { font-size: 16px; width: 16px; height: 16px; flex: none; color: var(--ehq3-text-dim); }
.ehq3-quick-link:hover .dashicons { color: var(--ehq3-primary); }
.ehq3-module-foot-version { letter-spacing: 0.1em; }

/* ──────────────────────────────────────────────────────────────────────
   13c — PUBLIC GATE (pre-auth landing → themed wp-login.php)
   ────────────────────────────────────────────────────────────────────── */
.ehq3-public-gate {
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    padding: var(--ehq3-s8);
    background: var(--ehq3-bg);
    color: var(--ehq3-text);
}
.ehq3-public-gate::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image: var(--ehq3-bg-grid), var(--ehq3-bg-globe);
    background-position: center, right -8vw center;
    background-repeat: repeat, no-repeat;
    background-size: auto, min(820px, 72vw);
    opacity: 0.34;
}
.ehq3-public-shell {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1120px;
    min-height: calc(100vh - 64px);
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: var(--ehq3-s10);
}
.ehq3-public-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--ehq3-s4);
    min-height: 64px;
    border-bottom: 1px solid var(--ehq3-line);
}
.ehq3-public-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--ehq3-s3);
    color: var(--ehq3-text);
    text-decoration: none;
    min-width: 0;
}
.ehq3-public-brand-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.ehq3-public-brand-text strong {
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
}
.ehq3-public-brand-text span,
.ehq3-public-status,
.ehq3-public-eyebrow,
.ehq3-public-assurance {
    font-family: var(--ehq3-font-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.ehq3-public-brand-text span { color: var(--ehq3-text-dim); }
.ehq3-public-status {
    display: inline-flex;
    align-items: center;
    gap: var(--ehq3-s2);
    min-height: 32px;
    padding: 0 var(--ehq3-s3);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-card);
    color: var(--ehq3-text-muted);
    white-space: nowrap;
}
.ehq3-public-status .ehq3-pulse-dot.is-live {
    background: var(--ehq3-green);
    box-shadow: 0 0 8px rgba(54, 201, 138, 0.6);
}
.ehq3-public-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    align-items: center;
    gap: var(--ehq3-s12);
    padding: var(--ehq3-s6) 0 var(--ehq3-s10);
}
.ehq3-public-copy {
    max-width: 680px;
    min-width: 0;
}
.ehq3-public-logo {
    margin-bottom: var(--ehq3-s8);
    box-shadow: 0 0 0 1px var(--ehq3-line-strong), 0 18px 48px rgba(0, 0, 0, 0.5);
}
.ehq3-public-eyebrow {
    margin: 0 0 var(--ehq3-s3);
    color: var(--ehq3-primary);
}
.ehq3-public-copy h1 {
    margin: 0;
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-size: 44px;
    line-height: 1.08;
    font-weight: 700;
    letter-spacing: 0;
}
.ehq3-public-sub {
    max-width: 580px;
    margin: var(--ehq3-s5) 0 0;
    color: var(--ehq3-text-muted);
    font-size: 17px;
    line-height: 1.65;
}
.ehq3-public-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--ehq3-s3);
    margin-top: var(--ehq3-s8);
}
.ehq3-public-assurance {
    display: inline-flex;
    align-items: center;
    gap: var(--ehq3-s2);
    margin: var(--ehq3-s5) 0 0;
    color: var(--ehq3-text-dim);
}
.ehq3-public-assurance .dashicons {
    width: 15px;
    height: 15px;
    font-size: 15px;
    color: var(--ehq3-green);
}
.ehq3-public-modules {
    display: grid;
    gap: var(--ehq3-s3);
}
.ehq3-public-module {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: var(--ehq3-s3);
    min-height: 76px;
    padding: var(--ehq3-s4);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-card);
}
.ehq3-public-module.is-active {
    border-color: var(--ehq3-primary-line);
    background: var(--ehq3-primary-soft);
    box-shadow: var(--ehq3-glow-y);
}
.ehq3-public-module-icon {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-surface-3);
    color: var(--ehq3-text-soft);
}
.ehq3-public-module.is-active .ehq3-public-module-icon {
    background: var(--ehq3-primary);
    color: var(--ehq3-on-primary);
}
.ehq3-public-module-icon .dashicons {
    width: 19px;
    height: 19px;
    font-size: 19px;
}
.ehq3-public-module-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.ehq3-public-module-text strong {
    color: var(--ehq3-text);
    font-size: 14px;
    line-height: 1.25;
}
.ehq3-public-module-text span {
    color: var(--ehq3-text-dim);
    font-size: 12.5px;
    line-height: 1.35;
}

/* ──────────────────────────────────────────────────────────────────────
   14 — STATE PAGES (empty / denied / loading)
   ────────────────────────────────────────────────────────────────────── */
.ehq3-state {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: var(--ehq3-s4);
    max-width: 460px; margin: var(--ehq3-s12) auto;
    padding: var(--ehq3-s10) var(--ehq3-s8);
    background: var(--ehq3-card);
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-lg);
}
.ehq3-state-ico {
    width: 64px; height: 64px;
    display: grid; place-items: center;
    border-radius: var(--ehq3-r-full);
    background: var(--ehq3-surface-2);
    color: var(--ehq3-text-muted);
}
.ehq3-state-ico .dashicons { font-size: 32px; }
.ehq3-state.is-denied .ehq3-state-ico { background: var(--ehq3-red-soft); color: var(--ehq3-red); }
.ehq3-state h2 { font-size: 18px; }
.ehq3-state p { margin: 0; color: var(--ehq3-text-muted); font-size: 13.5px; }
.ehq3-state-plain {
    margin: 0;
    border: 0;
    padding: 24px 0;
}
.ehq3-state-brand {
    margin: 16px 0 8px;
}

.ehq3-skeleton {
    background: linear-gradient(100deg, var(--ehq3-surface) 30%, var(--ehq3-surface-3) 50%, var(--ehq3-surface) 70%);
    background-size: 200% 100%;
    animation: ehq3Shimmer 1.4s linear infinite;
    border-radius: var(--ehq3-r-sm);
}
@keyframes ehq3Shimmer { to { background-position: -200% 0; } }
.ehq3-spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--ehq3-line-strong);
    border-top-color: var(--ehq3-primary);
    border-radius: var(--ehq3-r-full);
    animation: ehq3Spin 0.8s linear infinite;
}
@keyframes ehq3Spin { to { transform: rotate(360deg); } }

/* ──────────────────────────────────────────────────────────────────────
   15 — MODULE HOST (where office / distribution render inside the shell)
   ────────────────────────────────────────────────────────────────────── */
.ehq3-module-host { position: relative; }
.ehq3-module-host.is-office { padding: 0; }
/* Office React SPA mount: let it own its inner workspace, dark surface. */
.ehq3-module-host .eof-app-root,
.ehq3-module-host #e-office-financial-admin {
    display: block;
    min-height: 60vh;
    background: transparent;
    color: var(--ehq3-text);
}
.ehq3-module-host .eof-app-loading {
    display: flex; align-items: center; justify-content: center; gap: var(--ehq3-s3);
    min-height: 60vh;
    font-family: var(--ehq3-font-mono);
    font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ehq3-text-muted);
}

/* ──────────────────────────────────────────────────────────────────────
   16 — DARK RE-THEME OF DISTRIBUTION CONTENT
   v2 (e-hq-v2.css) is token-driven and scoped to .erh-render-context.
   v3 loads AFTER v2; redefining the tokens here re-themes every
   distribution page dark without editing the 11k-line v2 stylesheet.
   ────────────────────────────────────────────────────────────────────── */
.ehq3-content .erh-render-context,
.ehq3-module-host .erh-render-context {
    --ehq-bg:             transparent;
    --ehq-surface:        var(--ehq3-card);
    --ehq-surface-alt:    var(--ehq3-card-2);
    --ehq-card:           var(--ehq3-card);
    --ehq-border:         var(--ehq3-line);
    --ehq-border-strong:  var(--ehq3-line-strong);
    --ehq-text:           var(--ehq3-text);
    --ehq-text-muted:     var(--ehq3-text-muted);
    --ehq-text-soft:      var(--ehq3-text-dim);

    --ehq-primary:        var(--ehq3-primary);
    --ehq-primary-hover:  var(--ehq3-primary-hover);
    --ehq-primary-soft:   var(--ehq3-primary-soft);
    --ehq-primary-border: var(--ehq3-primary-line);
    --ehq-accent:         var(--ehq3-violet);
    --ehq-accent-soft:    var(--ehq3-violet-soft);

    --ehq-success:        var(--ehq3-green);
    --ehq-success-hover:  #2bb178;
    --ehq-success-soft:   var(--ehq3-green-soft);
    --ehq-warning:        var(--ehq3-primary);
    --ehq-warning-soft:   var(--ehq3-primary-soft);
    --ehq-danger:         var(--ehq3-red);
    --ehq-danger-soft:    var(--ehq3-red-soft);
    --ehq-info:           var(--ehq3-blue);
    --ehq-info-soft:      var(--ehq3-blue-soft);

    --ehq-income:         var(--ehq3-green);
    --ehq-expense:        var(--ehq3-red);
    --ehq-profit:         var(--ehq3-green);
    --ehq-loss:           var(--ehq3-red);
    --ehq-pending:        var(--ehq3-primary);
    --ehq-approved:       var(--ehq3-green);
    --ehq-reconciled:     var(--ehq3-blue);

    --ehq-shadow-xs:      0 1px 1px rgba(0, 0, 0, 0.4);
    --ehq-shadow-sm:      0 1px 2px rgba(0, 0, 0, 0.4);
    --ehq-shadow-md:      0 2px 8px rgba(0, 0, 0, 0.45);
    --ehq-shadow-lg:      0 12px 32px rgba(0, 0, 0, 0.55);
    --ehq-shadow-xl:      0 24px 64px rgba(0, 0, 0, 0.6);
    --ehq-ring-focus:     0 0 0 3px var(--ehq3-primary-soft);
    --ehq-table-bg:       var(--ehq-ui-panel);
    --ehq-table-head-bg:  var(--ehq-ui-table-head);
    --ehq-table-row-bg:   var(--ehq-ui-table-row);
    --ehq-table-hover-bg: var(--ehq-ui-table-hover);
    --ehq-table-text:     var(--ehq-ui-text);
    --ehq-table-border:   var(--ehq-ui-line);
    --ehq-button-bg:      var(--ehq-ui-button-bg);
    --ehq-button-text:    var(--ehq-ui-button-text);
    --ehq-button-primary-bg: var(--ehq-ui-primary-bg);
    --ehq-button-primary-text: var(--ehq-ui-primary-text);
    color-scheme: dark;
}
/* Primary buttons: yellow background needs dark text (v2 sets #fff). */
.ehq3-content .erh-render-context .btn-primary,
.ehq3-content .erh-render-context .ehq-btn-primary,
.ehq3-module-host .erh-render-context .btn-primary,
.ehq3-module-host .erh-render-context .ehq-btn-primary {
    color: var(--ehq3-on-primary);
}
/* Inputs / selects on dark surfaces */
.ehq3-content .erh-render-context input,
.ehq3-content .erh-render-context select,
.ehq3-content .erh-render-context textarea {
    background: var(--ehq3-bg-deep);
    color: var(--ehq3-text);
    border-color: var(--ehq3-line);
}
.ehq3-content .erh-render-context input::placeholder,
.ehq3-content .erh-render-context textarea::placeholder { color: var(--ehq3-text-dim); }

/* ──────────────────────────────────────────────────────────────────────
   17 — SCROLLBARS
   ────────────────────────────────────────────────────────────────────── */
.ehq3-shell ::-webkit-scrollbar { width: 10px; height: 10px; }
.ehq3-shell ::-webkit-scrollbar-track { background: transparent; }
.ehq3-shell ::-webkit-scrollbar-thumb {
    background: var(--ehq3-line-strong);
    border-radius: var(--ehq3-r-full);
    border: 2px solid var(--ehq3-bg);
}
.ehq3-shell ::-webkit-scrollbar-thumb:hover { background: var(--ehq3-text-dim); }

/* ──────────────────────────────────────────────────────────────────────
   18 — MOBILE OFF-CANVAS RAIL
   ────────────────────────────────────────────────────────────────────── */
.ehq3-scrim {
    position: fixed; inset: 0;
    background: rgba(3, 4, 10, 0.7);
    backdrop-filter: blur(2px);
    z-index: var(--ehq3-z-scrim);
    opacity: 0; pointer-events: none;
    transition: opacity var(--ehq3-normal) var(--ehq3-ease);
}
.ehq3-shell.is-mobile-open .ehq3-scrim { opacity: 1; pointer-events: auto; }

@media (max-width: 1024px) {
    .ehq3-rail { transform: translateX(-100%); width: var(--ehq3-rail-w); }
    .ehq3-shell.is-mobile-open .ehq3-rail { transform: translateX(0); box-shadow: var(--ehq3-shadow-lg); }
    .ehq3-viewport, .ehq3-shell.is-collapsed .ehq3-viewport { margin-left: 0; }
    .ehq3-shell.is-collapsed .ehq3-rail { width: var(--ehq3-rail-w); }
    .ehq3-shell.is-collapsed .ehq3-rail-wordmark,
    .ehq3-shell.is-collapsed .ehq3-rail-group-label,
    .ehq3-shell.is-collapsed .ehq3-nav-item span:not(.dashicons):not(.ehq3-ico):not(.ehq3-nav-count),
    .ehq3-shell.is-collapsed .ehq3-nav-item .ehq3-nav-count,
    .ehq3-shell.is-collapsed .ehq3-user-meta,
    .ehq3-shell.is-collapsed .ehq3-signout span:not(.dashicons) { display: revert; }
    .ehq3-shell.is-collapsed .ehq3-rail-brand,
    .ehq3-shell.is-collapsed .ehq3-nav-item,
    .ehq3-shell.is-collapsed .ehq3-user { justify-content: flex-start; }
}
@media (min-width: 1025px) { .ehq3-scrim { display: none; } }

/* ──────────────────────────────────────────────────────────────────────
   19 — RESPONSIVE GRIDS
   ────────────────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .ehq3-kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .ehq3-modules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
    .ehq3-content { padding: var(--ehq3-s6) var(--ehq3-s5) var(--ehq3-s10); }
    .ehq3-grid.cols-2, .ehq3-grid.cols-3, .ehq3-grid.cols-2-1 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .ehq3-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ehq3-modules { grid-template-columns: 1fr; }
    .ehq3-page-head h1 { font-size: 23px; }
    .ehq3-welcome h1 { font-size: 24px; }
    .ehq3-topbar { padding: 0 var(--ehq3-s4); }
    .ehq3-public-gate { padding: var(--ehq3-s5); }
    .ehq3-public-shell {
        min-height: calc(100vh - 40px);
        gap: var(--ehq3-s8);
    }
    .ehq3-public-main {
        grid-template-columns: 1fr;
        align-items: start;
        gap: var(--ehq3-s8);
        padding: var(--ehq3-s4) 0 var(--ehq3-s8);
    }
    .ehq3-public-status {
        width: 32px;
        justify-content: center;
        padding: 0;
        font-size: 0;
    }
    .ehq3-public-copy h1 { font-size: 34px; }
    .ehq3-public-sub { font-size: 15.5px; }
    .ehq3-public-modules { grid-template-columns: 1fr; }
    .ehq3-public-module {
        grid-template-columns: 40px minmax(0, 1fr);
        min-height: 72px;
    }
}
@media (max-width: 480px) {
    .ehq3-kpi-strip { grid-template-columns: 1fr; }
    .ehq3-content { padding: var(--ehq3-s5) var(--ehq3-s4) var(--ehq3-s8); }
    .ehq3-topbar-user b { display: none; }
    .ehq3-public-gate { padding: var(--ehq3-s4); }
    .ehq3-public-shell {
        min-height: calc(100vh - 32px);
        gap: var(--ehq3-s6);
    }
    .ehq3-public-topbar { min-height: 56px; }
    .ehq3-public-brand-text span { display: none; }
    .ehq3-public-status {
        min-height: 30px;
    }
    .ehq3-public-logo {
        width: 88px;
        height: 88px;
        margin-bottom: var(--ehq3-s6);
    }
    .ehq3-public-logo img {
        width: 70px;
        height: 70px;
    }
    .ehq3-public-copy h1 { font-size: 30px; }
    .ehq3-public-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
    .ehq3-public-actions .ehq3-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ──────────────────────────────────────────────────────────────────────
   20 — AUTH SHELL  (wp-login.php — login / lost password / reset / etc.)
   Themed via login_enqueue_scripts. Covers every wp-login action state.
   ────────────────────────────────────────────────────────────────────── */
body.login {
    background: var(--ehq3-bg) !important;
    background-image: var(--ehq3-bg-grid), var(--ehq3-bg-globe) !important;
    background-position: center, right -10vw center !important;
    background-repeat: repeat, no-repeat !important;
    background-size: auto, min(820px, 72vw) !important;
    color: var(--ehq3-text);
    font-family: var(--ehq3-font);
}
body.login #login {
    width: min(420px, calc(100% - 32px));
    padding: 7vh 0 4vh;
}

/* Logo → official mark inside a white circular badge (set as background-image
   in functions.php; the image itself is never redrawn). */
body.login #login h1 { margin-bottom: var(--ehq3-s5); }
body.login #login h1 a {
    width: 104px; height: 104px;
    margin: 0 auto;
    border-radius: var(--ehq3-r-full);
    background-color: #fff;
    background-size: 80px 80px;
    background-position: center;
    background-repeat: no-repeat;
    box-shadow: 0 0 0 1px var(--ehq3-line-strong), 0 16px 48px rgba(0, 0, 0, 0.6);
}
body.login #login::after {
    content: "secure workspace access";
    display: block;
    text-align: center;
    font-family: var(--ehq3-font-mono);
    font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ehq3-text-dim);
    margin-top: calc(var(--ehq3-s4) * -1);
    margin-bottom: var(--ehq3-s5);
}

body.login form {
    background: var(--ehq3-card) !important;
    border: 1px solid var(--ehq3-line);
    border-radius: var(--ehq3-r-sm);
    box-shadow: var(--ehq3-shadow-lg);
    padding: var(--ehq3-s8) var(--ehq3-s6);
}
body.login form label { color: var(--ehq3-text-soft); font-size: 13px; }
body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    background: var(--ehq3-bg-deep) !important;
    border: 1px solid var(--ehq3-line) !important;
    border-radius: var(--ehq3-r-sm) !important;
    color: var(--ehq3-text) !important;
    font-size: 14px;
    padding: 10px 12px;
    box-shadow: none !important;
}
body.login input[type="text"]:focus,
body.login input[type="password"]:focus,
body.login input[type="email"]:focus {
    border-color: var(--ehq3-primary-line) !important;
    box-shadow: 0 0 0 3px var(--ehq3-primary-soft) !important;
}
body.login .wp-pwd button.button { background: transparent; border: 0; color: var(--ehq3-text-muted); }

/* Yellow sign-in button */
body.login .button-primary,
body.login #wp-submit {
    background: var(--ehq3-primary) !important;
    border-color: var(--ehq3-primary) !important;
    color: var(--ehq3-on-primary) !important;
    text-shadow: none !important;
    box-shadow: none !important;
    border-radius: var(--ehq3-r-sm) !important;
    min-height: 44px;
    font-weight: 700;
    font-family: var(--ehq3-font);
    transition: background var(--ehq3-fast) var(--ehq3-ease);
}
body.login .button-primary:hover,
body.login #wp-submit:hover { background: var(--ehq3-primary-hover) !important; }

/* Discrete secondary links */
body.login #nav, body.login #backtoblog { text-align: center; padding: var(--ehq3-s3) 0 0; }
body.login #nav a, body.login #backtoblog a {
    color: var(--ehq3-text-muted) !important;
    font-size: 12px;
}
body.login #nav a:hover, body.login #backtoblog a:hover { color: var(--ehq3-primary) !important; }
body.login .privacy-policy-page-link { display: none; }

/* Red error / yellow notice states */
body.login #login_error,
body.login .login .message,
body.login .notice {
    background: var(--ehq3-card) !important;
    color: var(--ehq3-text-soft) !important;
    border-radius: var(--ehq3-r-sm) !important;
    box-shadow: none !important;
}
body.login #login_error {
    border-left: 3px solid var(--ehq3-red) !important;
    background: var(--ehq3-red-soft) !important;
    color: #ffd9d6 !important;
}
body.login .login .message,
body.login .notice-success {
    border-left: 3px solid var(--ehq3-primary) !important;
}
body.login .login #login .success { border-left-color: var(--ehq3-green) !important; }

/* ──────────────────────────────────────────────────────────────────────
   21 — VISUAL IDENTITY PASS 3.0.51 (landing, generic pages, login)
   Theme-only image integration. Module business surfaces keep their shell.
   ────────────────────────────────────────────────────────────────────── */
.ehq3-landing,
.ehq3-generic-page {
    min-height: 100vh;
    color: var(--ehq3-text);
    font-family: var(--ehq3-font);
    background:
        linear-gradient(180deg, rgba(3, 4, 10, 0.12), var(--ehq3-bg-deep) 82%),
        url("../visuals/heroes/landing-hero-command-center.webp") center top / cover no-repeat,
        var(--ehq3-bg);
    overflow-x: hidden;
}

.ehq3-landing *,
.ehq3-landing *::before,
.ehq3-landing *::after,
.ehq3-generic-page *,
.ehq3-generic-page *::before,
.ehq3-generic-page *::after {
    box-sizing: border-box;
}

.ehq3-landing a,
.ehq3-generic-page a {
    color: inherit;
    text-decoration: none;
}

.ehq3-landing-topbar,
.ehq3-generic-topbar {
    min-height: 76px;
    display: grid;
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: var(--ehq3-s5);
    padding: var(--ehq3-s4) clamp(20px, 4vw, 64px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(3, 4, 10, 0.66);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.ehq3-landing-brand {
    display: inline-flex;
    align-items: center;
    gap: var(--ehq3-s3);
    min-width: 0;
}

.ehq3-landing-brand span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.ehq3-landing-brand strong {
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.1;
}

.ehq3-landing-brand small,
.ehq3-landing-eyebrow {
    color: var(--ehq3-text-dim);
    font-family: var(--ehq3-font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ehq3-landing-nav {
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--ehq3-s2);
    min-width: 0;
}

.ehq3-landing-nav a,
.ehq3-landing-nav span {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 var(--ehq3-s4);
    border: 1px solid transparent;
    border-radius: var(--ehq3-r-full);
    color: var(--ehq3-text-muted);
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.ehq3-landing-nav a:hover,
.ehq3-landing-nav a[aria-current="page"] {
    border-color: var(--ehq3-primary-line);
    background: var(--ehq3-primary-soft);
    color: var(--ehq3-primary);
}

.ehq3-landing-nav span {
    opacity: 0.45;
}

.ehq3-landing-user {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: var(--ehq3-s3);
}

.ehq3-landing-hero {
    min-height: clamp(360px, 46vh, 560px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    align-items: end;
    gap: var(--ehq3-s8);
    padding: clamp(56px, 10vh, 132px) clamp(20px, 4vw, 64px) var(--ehq3-s8);
    background:
        radial-gradient(circle at 28% 28%, rgba(242, 207, 47, 0.18), transparent 28%),
        linear-gradient(180deg, transparent 0%, rgba(3, 4, 10, 0.82) 84%, var(--ehq3-bg-deep) 100%);
}

.ehq3-landing-copy {
    max-width: 780px;
}

.ehq3-landing-eyebrow {
    margin: 0 0 var(--ehq3-s4);
    color: var(--ehq3-primary);
}

.ehq3-landing h1,
.ehq3-generic-hero h1 {
    margin: 0;
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-size: clamp(42px, 5.8vw, 86px);
    font-weight: 700;
    line-height: 0.98;
    letter-spacing: 0;
}

.ehq3-landing-copy > p:last-child {
    max-width: 620px;
    margin: var(--ehq3-s5) 0 0;
    color: var(--ehq3-text-muted);
    font-size: 17px;
    line-height: 1.7;
}

.ehq3-landing-pulse {
    justify-self: end;
    width: min(100%, 300px);
    min-height: 140px;
    display: grid;
    align-content: center;
    gap: var(--ehq3-s2);
    padding: var(--ehq3-s5);
    border: 1px solid var(--ehq3-line-strong);
    border-radius: var(--ehq3-r-sm);
    background: rgba(3, 4, 10, 0.66);
    box-shadow: var(--ehq3-shadow-lg);
}

.ehq3-landing-pulse span,
.ehq3-landing-pulse small {
    color: var(--ehq3-text-dim);
    font-family: var(--ehq3-font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.ehq3-landing-pulse strong {
    color: var(--ehq3-primary);
    font-family: var(--ehq3-font-head);
    font-size: 30px;
    line-height: 1;
}

.ehq3-landing-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--ehq3-s5);
    padding: 0 clamp(20px, 4vw, 64px) clamp(40px, 7vh, 88px);
}

.ehq3-landing-card {
    min-height: 430px;
    display: grid;
    grid-template-rows: minmax(168px, 1fr) auto;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--ehq3-r-sm);
    background: rgba(9, 12, 20, 0.92);
    box-shadow: var(--ehq3-shadow-lg);
    transition:
        border-color var(--ehq3-normal) var(--ehq3-ease),
        transform var(--ehq3-normal) var(--ehq3-ease);
}

.ehq3-landing-card:hover {
    border-color: var(--ehq3-primary-line);
    transform: translateY(-3px);
}

.ehq3-landing-card.is-disabled {
    opacity: 0.72;
}

.ehq3-landing-card-media {
    min-height: 190px;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    border-bottom: 1px solid var(--ehq3-line);
}

.ehq3-landing-card.is-hq .ehq3-landing-card-media {
    background-image: linear-gradient(180deg, transparent, rgba(3, 4, 10, 0.18)), url("../visuals/cards/landing-card-hq.webp");
}

.ehq3-landing-card.is-office .ehq3-landing-card-media {
    background-image: linear-gradient(180deg, transparent, rgba(3, 4, 10, 0.18)), url("../visuals/cards/landing-card-office.webp");
}

.ehq3-landing-card.is-distribution .ehq3-landing-card-media {
    background-image: linear-gradient(180deg, transparent, rgba(3, 4, 10, 0.18)), url("../visuals/cards/landing-card-distribution.webp");
}

.ehq3-landing-card-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--ehq3-s3);
    align-content: start;
    padding: var(--ehq3-s5);
}

.ehq3-landing-card-body p {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--ehq3-primary);
    font-family: var(--ehq3-font-mono);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.ehq3-landing-card-body h2 {
    margin: 0;
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-size: 26px;
    line-height: 1.1;
}

.ehq3-landing-card-body .ehq3-badge {
    align-self: center;
    justify-self: end;
}

.ehq3-landing-card-body small {
    grid-column: 1 / -1;
    color: var(--ehq3-text-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.ehq3-landing-card-action {
    grid-column: 1 / -1;
    width: max-content;
    display: inline-flex;
    align-items: center;
    gap: var(--ehq3-s2);
    min-height: 38px;
    margin-top: var(--ehq3-s2);
    padding: 0 var(--ehq3-s4);
    border-radius: var(--ehq3-r-sm);
    background: var(--ehq3-primary);
    color: var(--ehq3-on-primary);
    font-size: 13px;
    font-weight: 800;
}

.ehq3-landing-card-action .dashicons {
    width: 16px;
    height: 16px;
    font-size: 16px;
}

.ehq3-landing-card-action.is-locked {
    background: var(--ehq3-surface-3);
    color: var(--ehq3-text-muted);
}

.ehq3-generic-page {
    background:
        linear-gradient(180deg, rgba(3, 4, 10, 0.12), var(--ehq3-bg-deep) 74%),
        url("../visuals/backgrounds/generic-page-hero-network.webp") center top / cover no-repeat,
        var(--ehq3-bg);
}

.ehq3-generic-hero {
    min-height: clamp(300px, 42vh, 520px);
    display: flex;
    align-items: end;
    padding: clamp(56px, 10vh, 128px) clamp(20px, 4vw, 64px) var(--ehq3-s10);
    background:
        radial-gradient(circle at 26% 40%, rgba(242, 207, 47, 0.16), transparent 28%),
        linear-gradient(180deg, transparent 0%, rgba(3, 4, 10, 0.84) 100%);
}

.ehq3-generic-hero > div {
    max-width: 860px;
}

.ehq3-generic-body {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
    gap: clamp(24px, 4vw, 64px);
    align-items: start;
    padding: clamp(32px, 6vh, 76px) clamp(20px, 4vw, 64px) clamp(48px, 8vh, 96px);
    background:
        linear-gradient(90deg, rgba(3, 4, 10, 0.98), rgba(3, 4, 10, 0.88)),
        url("../visuals/backgrounds/generic-page-map.webp") right center / min(720px, 58vw) auto no-repeat;
}

.ehq3-generic-content {
    color: var(--ehq3-text-muted);
    font-size: 16px;
    line-height: 1.78;
}

.ehq3-generic-content > *:first-child {
    margin-top: 0;
}

.ehq3-generic-content h2,
.ehq3-generic-content h3,
.ehq3-generic-content h4 {
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.ehq3-generic-content a {
    color: var(--ehq3-primary);
}

.ehq3-generic-visual {
    min-height: clamp(320px, 46vw, 540px);
    border: 1px solid var(--ehq3-line-strong);
    border-radius: var(--ehq3-r-sm);
    background:
        linear-gradient(180deg, rgba(3, 4, 10, 0.02), rgba(3, 4, 10, 0.28)),
        url("../visuals/cards/generic-page-card-globe.webp") center / cover no-repeat;
    box-shadow: var(--ehq3-shadow-lg);
}

body.login {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(360px, 44vw) minmax(0, 1fr);
    align-items: center;
    background-color: var(--ehq3-bg-deep) !important;
    background-image:
        linear-gradient(90deg, var(--ehq3-bg-deep) 0%, rgba(3, 4, 10, 0.96) 42%, rgba(3, 4, 10, 0.2) 68%),
        url("../visuals/heroes/login-hero-office-night.webp") !important;
    background-position: left center, calc(100% + 120px) center !important;
    background-repeat: no-repeat, no-repeat !important;
    background-size: 62vw 100%, auto 100% !important;
}

body.login::before {
    content: "";
    position: fixed;
    inset: 0 auto 0 0;
    width: min(520px, 46vw);
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(242, 207, 47, 0.08), transparent 34%),
        rgba(3, 4, 10, 0.72);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

body.login #login {
    position: relative;
    z-index: 1;
    grid-column: 1;
    width: min(420px, calc(100vw - 40px));
    margin: 0 auto;
    padding: clamp(32px, 6vh, 68px) 0;
}

body.login #login h1 {
    margin-bottom: var(--ehq3-s5);
    text-align: left;
}

body.login #login h1 a {
    width: 92px;
    height: 92px;
    margin: 0;
    background-color: transparent;
    background-size: 72px 72px;
    box-shadow: none;
}

body.login #login::before {
    content: "Welcome back";
    display: block;
    margin: 0 0 var(--ehq3-s2);
    color: var(--ehq3-text);
    font-family: var(--ehq3-font-head);
    font-size: 34px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0;
}

body.login #login::after {
    content: "SECURE WORKSPACE ACCESS";
    text-align: left;
    margin-top: var(--ehq3-s5);
    margin-bottom: 0;
}

body.login form {
    padding: var(--ehq3-s6) 0 0;
    border: 0;
    border-top: 1px solid var(--ehq3-line);
    border-radius: 0;
    background: transparent !important;
    box-shadow: none;
}

body.login form label {
    color: var(--ehq3-text-muted);
    font-weight: 700;
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"] {
    min-height: 48px;
    border-radius: var(--ehq3-r-sm) !important;
    background: rgba(255, 255, 255, 0.045) !important;
}

body.login .forgetmenot {
    display: flex;
    align-items: center;
}

body.login .submit {
    float: none;
    clear: both;
}

body.login #wp-submit {
    width: 100%;
    min-height: 48px;
    margin-top: var(--ehq3-s3);
}

body.login #nav,
body.login #backtoblog {
    text-align: left;
    padding-top: var(--ehq3-s4);
}

@media (max-width: 1180px) {
    .ehq3-landing-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ehq3-landing-topbar,
    .ehq3-generic-topbar {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .ehq3-landing-nav {
        grid-column: 1 / -1;
        justify-self: start;
        justify-content: flex-start;
        max-width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .ehq3-landing-user .ehq3-status-line {
        display: none;
    }

    .ehq3-landing-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ehq3-landing-pulse {
        justify-self: start;
    }

    .ehq3-landing-cards,
    .ehq3-generic-body {
        grid-template-columns: 1fr;
    }

    .ehq3-generic-body {
        background: var(--ehq3-bg-deep);
    }

    .ehq3-generic-visual {
        min-height: 320px;
    }

    body.login {
        display: block;
        background-image:
            linear-gradient(180deg, rgba(3, 4, 10, 0.82), var(--ehq3-bg-deep) 58%),
            url("../visuals/heroes/login-hero-office-night.webp") !important;
        background-position: center top, center top !important;
        background-size: 100% 100%, auto 62vh !important;
    }

    body.login::before {
        width: 100%;
        background: rgba(3, 4, 10, 0.68);
    }
}

@media (max-width: 620px) {
    .ehq3-landing-topbar,
    .ehq3-generic-topbar {
        padding: var(--ehq3-s4);
    }

    .ehq3-landing-hero,
    .ehq3-generic-hero {
        padding: var(--ehq3-s10) var(--ehq3-s4) var(--ehq3-s6);
    }

    .ehq3-landing h1,
    .ehq3-generic-hero h1 {
        font-size: 42px;
    }

    .ehq3-landing-copy > p:last-child {
        font-size: 15.5px;
    }

    .ehq3-landing-cards,
    .ehq3-generic-body {
        padding-inline: var(--ehq3-s4);
    }

    .ehq3-landing-card {
        min-height: 390px;
    }

    .ehq3-landing-card-body {
        grid-template-columns: 1fr;
    }

    .ehq3-landing-card-body .ehq3-badge {
        justify-self: start;
    }

    body.login #login {
        width: calc(100vw - 32px);
    }

    body.login #login::before {
        font-size: 30px;
    }
}

/* Distribution flow surfaces */
.ehq3-flow-band,
.ehq3-module-intro {
    margin-top: 32px;
}

.ehq3-flow-band {
    padding: 24px;
    border: 1px solid rgba(18, 31, 51, 0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.ehq3-flow-grid,
.ehq3-module-intro-grid {
    display: grid;
    gap: 16px;
}

.ehq3-flow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ehq3-module-intro-grid {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.95fr);
}

.ehq3-flow-card,
.ehq3-module-note {
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(18, 31, 51, 0.08);
    background: rgba(255, 255, 255, 0.9);
}

.ehq3-flow-card.is-done,
.ehq3-flow-card.is-complete,
.ehq3-flow-card.is-live {
    border-color: rgba(22, 163, 74, 0.22);
    box-shadow: inset 0 0 0 1px rgba(22, 163, 74, 0.08);
}

.ehq3-flow-card h3,
.ehq3-module-note h3 {
    margin: 12px 0 8px;
    font-size: 1.05rem;
    line-height: 1.25;
}

.ehq3-flow-card p,
.ehq3-module-note p {
    margin: 0;
    color: #475569;
}

.ehq3-module-note .ehq3-action-list {
    margin-top: 16px;
}

@media (max-width: 960px) {
    .ehq3-flow-grid,
    .ehq3-module-intro-grid {
        grid-template-columns: 1fr;
    }
}
