:root {
    color-scheme: light;
    --hm-navy-950: #07111f;
    --hm-navy-900: #0b1728;
    --hm-navy-800: #0f2138;
    --hm-orange-500: #f97316;
    --hm-blue-600: #2563eb;
    --hm-green-500: #10b981;
    --hm-red-500: #ef4444;
    --hm-yellow-500: #f59e0b;
    --hm-bg: #f4f7fb;
    --hm-bg-soft: #f8fafc;
    --hm-surface: #ffffff;
    --hm-border: #e2e8f0;
    --hm-text: #0f172a;
    --hm-muted: #64748b;
    --hm-radius-lg: 14px;
    --hm-radius-xl: 20px;
    --hm-shadow-card: 0 10px 30px rgba(2, 8, 23, 0.06);
    --hm-space-2: 8px;
    --hm-space-3: 12px;
    --hm-space-4: 16px;
    --hm-space-5: 20px;
    --hm-space-6: 24px;
    --hm-sidebar-width: 270px;
    --hm-topbar-height: 82px;
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body { background: var(--hm-bg); color: var(--hm-text); }
.container { max-width: 760px; margin: 64px auto; padding: 24px; background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-radius-lg); }

.hm-shell { min-height: 100vh; display: grid; grid-template-columns: var(--hm-sidebar-width) 1fr; background: var(--hm-bg); }
.hm-sidebar { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--hm-navy-950), var(--hm-navy-900)); color: #e5edf8; padding: var(--hm-space-5); display: flex; flex-direction: column; gap: var(--hm-space-5); }
.hm-sidebar__brand, .app-sidebar__brand { display: flex; align-items: center; gap: 10px; }
.hm-sidebar__logo, .app-sidebar__logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: rgba(249,115,22,.18); color: var(--hm-orange-500); font-weight: 800; }
.hm-sidebar__meta { margin-top: auto; border: 1px solid rgba(255,255,255,.15); border-radius: 12px; padding: 12px; background: rgba(148,163,184,.08); }
.hm-sidebar__meta strong { display: block; color: #fff; }
.hm-sidebar__meta small { color: #d0dbeb; display:block; margin-top: 2px; }
.hm-sidebar__nav, .app-sidebar__nav { display: grid; gap: 6px; }
.hm-sidebar__item, .app-sidebar__item { color: #d0dbeb; text-decoration: none; display: flex; gap: 10px; align-items: center; border: 1px solid transparent; border-radius: 12px; padding: 11px 12px; }
.hm-sidebar__item:hover, .hm-sidebar__item.is-active, .app-sidebar__item:hover, .app-sidebar__item.is-active { background: rgba(255,255,255,.06); color: #fff; border-color: rgba(249,115,22,.4); box-shadow: inset 3px 0 0 var(--hm-orange-500); }
.app-sidebar__logout { margin-top: 10px; }
.app-sidebar__logout button { width: 100%; border: 1px solid rgba(255,255,255,.18); border-radius: 12px; background: rgba(148,163,184,.12); color: #f8fafc; padding: 11px; }

.hm-main, .app-main { display: flex; flex-direction: column; min-width: 0; }
.hm-topbar, .app-topbar { min-height: var(--hm-topbar-height); background: var(--hm-surface); border-bottom: 1px solid var(--hm-border); padding: 14px var(--hm-space-6); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.app-topbar p { margin: 4px 0 0; color: var(--hm-muted); }
.app-content { padding: var(--hm-space-6); }
.hm-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-page-header, .dashboard-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; }
.hm-page-title { margin: 0; font-size: 1.5rem; }
.hm-page-subtitle { margin: 6px 0 0; color: var(--hm-muted); }
.hm-section { margin-top: 14px; }
.hm-section-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.hm-card, .module-card, .hm-module-card { background: var(--hm-surface); border: 1px solid var(--hm-border); border-radius: var(--hm-radius-lg); box-shadow: var(--hm-shadow-card); padding: var(--hm-space-5); }
.hm-card-grid, .dashboard-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-kpi-grid { display: grid; gap: 14px; grid-template-columns: repeat(5, minmax(140px, 1fr)); }
.hm-kpi { padding: var(--hm-space-4); border-radius: var(--hm-radius-lg); border: 1px solid var(--hm-border); background: #fff; }
.hm-kpi__label { margin: 0 0 8px; font-size: .88rem; color: var(--hm-muted); display:block; }
.hm-kpi__value { font-size: 2rem; font-weight: 700; display:block; }
.hm-kpi__delta { margin-top: 6px; font-size: .8rem; color: var(--hm-muted); display:block; }
.hm-table-wrap { overflow-x: auto; border: 1px solid var(--hm-border); border-radius: 12px; background: #fff; }
.hm-table, .table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.hm-table th, .hm-table td, .table th, .table td { border-bottom: 1px solid var(--hm-border); padding: 10px 10px; text-align: left; }
.hm-table th, .table th { background: var(--hm-bg-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #475569; }
.hm-badge, .badge { display: inline-flex; padding: 4px 10px; border-radius: 999px; background: #eef2ff; color: #1e3a8a; font-size: .78rem; }
.hm-status { padding: 2px 8px; border-radius: 999px; font-size: .75rem; display:inline-flex; align-items:center; }
.hm-status--ok { background: #dcfce7; color: #166534; }
.hm-status--progress { background: #ffedd5; color: #9a3412; }
.hm-status--warning { background: #fef3c7; color: #92400e; }
.hm-status--danger { background: #fee2e2; color: #991b1b; }
.hm-status--neutral { background: #e2e8f0; color: #334155; }
.hm-empty-state { padding: 18px; border: 1px dashed var(--hm-border); border-radius: 12px; color: var(--hm-muted); background: #fff; text-align: center; }
.hm-quick-actions, .quick-access { margin-top: 20px; }
.hm-action-link, .quick-access__items a { text-decoration:none; color:var(--hm-text); border:1px solid var(--hm-border); background:#fff; padding:8px 12px; border-radius:10px; display:inline-flex; gap:6px; }
.quick-access__items { display:flex; flex-wrap:wrap; gap:10px; }
.hm-product-card { border: 1px solid var(--hm-border); border-radius: 12px; padding: 12px; background: #fff; }
.dashboard-products { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap:10px; }
.hm-flow { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }
.hm-flow__step { border: 1px solid var(--hm-border); border-radius: 10px; padding: 8px; text-align: center; background: #fff; font-size: .8rem; }
.hm-alert-list { display: grid; gap: 8px; }
.hm-alert-item { border: 1px solid var(--hm-border); border-left: 4px solid var(--hm-orange-500); border-radius: 10px; padding: 10px; background: #fff; }
.hm-btn { border: 1px solid var(--hm-border); background: #fff; padding: 10px 14px; border-radius: 10px; cursor: pointer; }
.hm-btn-primary { background: var(--hm-orange-500); border-color: var(--hm-orange-500); color: #fff; font-weight: 700; }

@media (max-width: 1180px) { .hm-kpi-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .hm-card-grid,.dashboard-grid { grid-template-columns:1fr; } .dashboard-products { grid-template-columns:repeat(2,minmax(0,1fr)); } .hm-flow { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 920px) { .hm-shell { grid-template-columns: 1fr; } .hm-sidebar, .app-sidebar { position: static; height: auto; } .app-content { padding: 16px; } .hm-page-header,.dashboard-header { flex-direction: column; } }


/* HERMES icon system refresh - SVG inline, no emojis */
.hm-icon,
.hm-sidebar__icon,
.module-card__icon-svg,
.hm-kpi__icon-svg,
.hm-btn__icon,
.hm-badge__icon,
.hm-action-link__icon {
    width: 1.1rem;
    height: 1.1rem;
    display: inline-block;
    flex: 0 0 auto;
    vertical-align: middle;
}

.hm-sidebar {
    background:
        radial-gradient(circle at 20% 0%, rgba(249, 115, 22, .12), transparent 28%),
        linear-gradient(180deg, #06111f 0%, #081827 100%);
}

.hm-sidebar__logo,
.app-sidebar__logo {
    background: linear-gradient(135deg, rgba(249, 115, 22, .22), rgba(249, 115, 22, .08));
    border: 1px solid rgba(249, 115, 22, .25);
    color: var(--hm-orange-500);
}

.hm-sidebar__icon-wrap {
    width: 32px;
    height: 32px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: #9fb1c7;
    background: rgba(148, 163, 184, .07);
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.hm-sidebar__item {
    min-height: 48px;
    font-weight: 650;
}

.hm-sidebar__item:hover .hm-sidebar__icon-wrap,
.hm-sidebar__item.is-active .hm-sidebar__icon-wrap {
    color: var(--hm-orange-500);
    background: rgba(249, 115, 22, .14);
    transform: translateX(1px);
}

.hm-dashboard-hero {
    align-items: center;
    border-radius: 18px;
}

.hm-eyebrow {
    display: inline-flex;
    margin-bottom: 6px;
    color: var(--hm-orange-500);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hm-dashboard-controls {
    justify-content: flex-end;
}

.hm-badge-soft {
    gap: 6px;
    align-items: center;
    background: #eef2ff;
}

.hm-badge__icon {
    width: .95rem;
    height: .95rem;
}

.hm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.hm-btn-primary {
    box-shadow: 0 10px 24px rgba(249, 115, 22, .22);
}

.hm-kpi {
    position: relative;
    overflow: hidden;
    padding: 18px;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255,255,255,1), rgba(248,250,252,.95));
    box-shadow: 0 14px 35px rgba(2, 8, 23, .065);
}

.hm-kpi::after {
    content: "";
    position: absolute;
    inset: auto -32px -42px auto;
    width: 96px;
    height: 96px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .07);
}

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

.hm-kpi__icon {
    width: 36px;
    height: 36px;
    display: inline-grid;
    place-items: center;
    border-radius: 12px;
    color: var(--hm-orange-500);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-kpi__label {
    margin: 0;
    color: #475569;
    font-weight: 700;
}

.hm-kpi__value {
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    letter-spacing: -.04em;
}

.hm-kpi__delta {
    display: inline-flex;
    margin-top: 10px;
    font-size: .82rem;
    font-weight: 800;
}

.hm-kpi__delta--up {
    color: #16a34a;
}

.hm-kpi__delta--info {
    color: #2563eb;
}

.hm-kpi__hint {
    display: block;
    margin-top: 2px;
    color: var(--hm-muted);
    font-size: .74rem;
}

.module-card header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-card__icon-wrap {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.module-card__icon-svg {
    width: 1.25rem;
    height: 1.25rem;
}

.hm-action-link {
    align-items: center;
    font-weight: 700;
}

.hm-action-link__icon {
    width: 1rem;
    height: 1rem;
    color: var(--hm-orange-500);
}

@media (max-width: 720px) {
    .hm-dashboard-controls {
        width: 100%;
        justify-content: flex-start;
    }

    .hm-dashboard-controls .hm-btn {
        width: 100%;
    }
}

/* HERMES sidebar informative refresh */
:root {
    --hm-sidebar-width: 300px;
}

.hm-sidebar--informative {
    padding: 18px;
    gap: 16px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(249, 115, 22, .45) rgba(255,255,255,.06);
}

.hm-sidebar--informative::-webkit-scrollbar {
    width: 8px;
}

.hm-sidebar--informative::-webkit-scrollbar-track {
    background: rgba(255,255,255,.05);
}

.hm-sidebar--informative::-webkit-scrollbar-thumb {
    background: rgba(249, 115, 22, .45);
    border-radius: 999px;
}

.hm-sidebar__brand {
    padding: 4px 2px 10px;
}

.hm-sidebar__brand strong {
    letter-spacing: .02em;
}

.hm-sidebar__brand small {
    max-width: 190px;
    line-height: 1.35;
}

.hm-sidebar__nav {
    gap: 8px;
}

.hm-sidebar__item {
    position: relative;
    padding: 10px 12px;
}

.hm-sidebar__item-text {
    min-width: 0;
    line-height: 1.2;
}

.hm-sidebar-panel {
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    padding: 13px;
    background:
        linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.035));
    box-shadow: 0 18px 45px rgba(0,0,0,.12);
}

.hm-sidebar-panel__eyebrow {
    display: block;
    margin-bottom: 10px;
    color: rgba(255,255,255,.52);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.hm-sidebar-active {
    display: flex;
    align-items: flex-start;
    gap: 11px;
}

.hm-sidebar-active__icon {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: var(--hm-orange-500);
    background: rgba(249, 115, 22, .13);
    border: 1px solid rgba(249, 115, 22, .22);
    flex: 0 0 auto;
}

.hm-sidebar-active__svg {
    width: 1.15rem;
    height: 1.15rem;
}

.hm-sidebar-active strong {
    display: block;
    color: #fff;
    line-height: 1.2;
}

.hm-sidebar-active small {
    display: block;
    margin-top: 4px;
    color: #b8c6d8;
    font-size: .77rem;
    line-height: 1.35;
}

.hm-sidebar-context {
    display: grid;
    gap: 10px;
}

.hm-sidebar-context__row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border-radius: 13px;
    background: rgba(15, 33, 56, .72);
    border: 1px solid rgba(148, 163, 184, .13);
}

.hm-sidebar-context__row > span {
    width: 31px;
    height: 31px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: #f97316;
    background: rgba(249, 115, 22, .10);
    flex: 0 0 auto;
}

.hm-sidebar-context__icon {
    width: 1rem;
    height: 1rem;
}

.hm-sidebar-context__row small {
    display: block;
    color: rgba(226, 232, 240, .68);
    font-size: .7rem;
    line-height: 1.2;
}

.hm-sidebar-context__row strong {
    display: block;
    color: #f8fafc;
    font-size: .84rem;
    line-height: 1.25;
}

.hm-sidebar__meta {
    margin-top: auto;
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background:
        linear-gradient(180deg, rgba(148, 163, 184, .10), rgba(148, 163, 184, .055));
}

.hm-sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
}

.hm-sidebar-user__avatar {
    width: 38px;
    height: 38px;
    display: inline-grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(135deg, #f97316, #c2410c);
    font-weight: 900;
    letter-spacing: .02em;
    flex: 0 0 auto;
}

.hm-sidebar-user strong {
    max-width: 185px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-sidebar__logout {
    margin-top: 0;
}

.app-sidebar__logout button {
    font-weight: 750;
    transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.app-sidebar__logout button:hover {
    border-color: rgba(249, 115, 22, .52);
    background: rgba(249, 115, 22, .12);
    transform: translateY(-1px);
}

.hm-sidebar-footer {
    padding: 12px;
    border-radius: 16px;
    background:
        radial-gradient(circle at 10% 0%, rgba(249, 115, 22, .22), transparent 34%),
        #07111f;
    border: 1px solid rgba(249, 115, 22, .22);
}

.hm-sidebar-footer strong {
    display: block;
    color: #fff;
    font-size: .86rem;
}

.hm-sidebar-footer small {
    display: block;
    margin-top: 4px;
    color: #b8c6d8;
    font-size: .72rem;
    line-height: 1.35;
}

@media (max-width: 920px) {
    :root {
        --hm-sidebar-width: 100%;
    }

    .hm-sidebar--informative {
        height: auto;
        max-height: none;
    }

    .hm-sidebar-panel,
    .hm-sidebar-footer {
        display: none;
    }
}

/* HERMES full height sidebar fix */
html,
body {
    min-height: 100%;
}

body {
    overflow-x: hidden;
}

.hm-shell {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: var(--hm-sidebar-width) minmax(0, 1fr);
    align-items: stretch;
}

.hm-sidebar,
.app-sidebar,
.hm-sidebar--informative {
    position: fixed;
    inset: 0 auto 0 0;
    width: var(--hm-sidebar-width);
    height: 100vh;
    height: 100dvh;
    max-height: 100vh;
    max-height: 100dvh;
    z-index: 40;
}

.hm-main,
.app-main {
    grid-column: 2;
    min-height: 100vh;
    min-height: 100dvh;
    width: 100%;
}

.app-content {
    min-height: calc(100vh - var(--hm-topbar-height));
    min-height: calc(100dvh - var(--hm-topbar-height));
}

@media (max-width: 920px) {
    .hm-shell {
        grid-template-columns: 1fr;
    }

    .hm-sidebar,
    .app-sidebar,
    .hm-sidebar--informative {
        position: static;
        width: 100%;
        height: auto;
        max-height: none;
    }

    .hm-main,
    .app-main {
        grid-column: 1;
    }
}

/* HERMES commercial premium refresh */
.hm-commercial-hero {
    margin-bottom: 20px;
    background:
        radial-gradient(circle at 92% 16%, rgba(249, 115, 22, .08), transparent 24%),
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.hm-commercial-kpi-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hm-commercial-kpi .hm-kpi__value {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.hm-kpi__delta--warning {
    color: #d97706;
}

.hm-commercial-actions h2,
.hm-commercial-panels h3 {
    margin: 0;
}

.hm-commercial-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-commercial-action {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--hm-border);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--hm-text);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-commercial-action::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .075);
}

.hm-commercial-action:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .35);
    box-shadow: 0 18px 42px rgba(2, 8, 23, .09);
}

.hm-commercial-action > span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-commercial-action__icon {
    width: 1.22rem;
    height: 1.22rem;
}

.hm-commercial-action strong {
    font-size: 1rem;
}

.hm-commercial-action small {
    max-width: 260px;
    color: var(--hm-muted);
    line-height: 1.4;
}

.hm-link-action {
    color: var(--hm-blue-600);
    font-size: .86rem;
    font-weight: 800;
    text-decoration: none;
}

.hm-link-action:hover {
    text-decoration: underline;
}

.hm-code-link {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 9px;
    color: #1e3a8a;
    background: #eef2ff;
    font-size: .82rem;
    font-weight: 800;
    text-decoration: none;
}

.hm-empty-state {
    display: grid;
    gap: 4px;
    min-height: 112px;
    place-items: center;
}

.hm-empty-state strong {
    color: var(--hm-text);
}

.hm-empty-state span {
    color: var(--hm-muted);
    font-size: .9rem;
}

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

    .hm-commercial-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hm-commercial-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* HERMES catalog premium refresh */
.hm-catalog-hero {
    margin-bottom: 20px;
    background:
        radial-gradient(circle at 92% 16%, rgba(249, 115, 22, .08), transparent 24%),
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.hm-catalog-kpi-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hm-catalog-kpi .hm-kpi__value {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.hm-catalog-overview,
.hm-catalog-actions {
    margin-top: 20px;
}

.hm-catalog-actions h2,
.hm-catalog-panels h3,
.hm-catalog-overview h2 {
    margin: 0;
}

.hm-catalog-mini-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.hm-catalog-mini-metrics span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: .82rem;
    font-weight: 750;
}

.hm-catalog-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-catalog-action {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--hm-text, #020617);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-catalog-action::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .075);
}

.hm-catalog-action:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .35);
    box-shadow: 0 18px 42px rgba(2, 8, 23, .09);
}

.hm-catalog-action > span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500, #f97316);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-catalog-action__icon {
    width: 1.22rem;
    height: 1.22rem;
}

.hm-catalog-action strong {
    font-size: 1rem;
}

.hm-catalog-action small {
    max-width: 280px;
    color: var(--hm-muted, #64748b);
    line-height: 1.4;
}

.hm-code-inline {
    display: inline-flex;
    align-items: center;
    padding: 2px 6px;
    border-radius: 7px;
    color: #334155;
    background: #f1f5f9;
    font-size: .8rem;
    font-weight: 800;
}

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

    .hm-catalog-action-grid {
        grid-template-columns: 1fr;
    }

    .hm-catalog-mini-metrics {
        justify-content: flex-start;
    }
}

@media (max-width: 720px) {
    .hm-catalog-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* HERMES production premium refresh */
.hm-production-hero {
    margin-bottom: 20px;
    background:
        radial-gradient(circle at 92% 16%, rgba(249, 115, 22, .08), transparent 24%),
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.hm-production-kpi-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hm-production-kpi .hm-kpi__value {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.hm-production-flow,
.hm-production-actions {
    margin-top: 20px;
}

.hm-production-actions h2,
.hm-production-panels h3,
.hm-production-flow h2 {
    margin: 0;
}

.hm-production-stage-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 6px 0 18px;
}

.hm-production-stage-strip span {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 999px;
    color: #1e3a8a;
    background: #eef2ff;
    border: 1px solid #dbe4ff;
    font-weight: 750;
}

.hm-production-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-production-action {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--hm-text, #020617);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-production-action::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .075);
}

.hm-production-action:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .35);
    box-shadow: 0 18px 42px rgba(2, 8, 23, .09);
}

.hm-production-action > span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500, #f97316);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-production-action__icon {
    width: 1.22rem;
    height: 1.22rem;
}

.hm-production-action strong {
    font-size: 1rem;
}

.hm-production-action small {
    max-width: 280px;
    color: var(--hm-muted, #64748b);
    line-height: 1.4;
}

.hm-status--neutral {
    background: #f1f5f9;
    color: #475569;
}

.hm-status--danger {
    background: #fee2e2;
    color: #991b1b;
}

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

    .hm-production-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hm-production-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* HERMES quality premium refresh */
.hm-quality-hero {
    margin-bottom: 20px;
    background:
        radial-gradient(circle at 92% 16%, rgba(249, 115, 22, .08), transparent 24%),
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.hm-quality-kpi-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hm-quality-kpi .hm-kpi__value {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.hm-quality-actions {
    margin-top: 20px;
}

.hm-quality-actions h2,
.hm-quality-panels h3 {
    margin: 0;
}

.hm-quality-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-quality-action {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--hm-text, #020617);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-quality-action::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .075);
}

.hm-quality-action:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .35);
    box-shadow: 0 18px 42px rgba(2, 8, 23, .09);
}

.hm-quality-action > span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500, #f97316);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-quality-action__icon {
    width: 1.22rem;
    height: 1.22rem;
}

.hm-quality-action strong {
    font-size: 1rem;
}

.hm-quality-action small {
    max-width: 280px;
    color: var(--hm-muted, #64748b);
    line-height: 1.4;
}

.hm-quality-check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hm-quality-check {
    min-height: 92px;
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--hm-border, #e5e7eb);
}

.hm-quality-check strong {
    display: block;
    color: var(--hm-text, #020617);
    margin-bottom: 5px;
}

.hm-quality-check span {
    color: var(--hm-muted, #64748b);
    font-size: .9rem;
    line-height: 1.4;
}

.hm-status--neutral {
    background: #f1f5f9;
    color: #475569;
}

.hm-status--danger {
    background: #fee2e2;
    color: #991b1b;
}

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

    .hm-quality-action-grid,
    .hm-quality-check-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hm-quality-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* HERMES BI premium refresh */
.hm-bi-hero {
    margin-bottom: 20px;
    background:
        radial-gradient(circle at 92% 16%, rgba(249, 115, 22, .08), transparent 24%),
        linear-gradient(180deg, #ffffff, #fbfdff);
}

.hm-bi-kpi-grid {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.hm-bi-kpi .hm-kpi__value {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.hm-bi-actions,
.hm-bi-visual {
    margin-top: 20px;
}

.hm-bi-actions h2,
.hm-bi-visual h2,
.hm-bi-panels h3 {
    margin: 0;
}

.hm-bi-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-bi-action {
    position: relative;
    overflow: hidden;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 18px;
    background:
        linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--hm-text, #020617);
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-bi-action::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .075);
}

.hm-bi-action:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .35);
    box-shadow: 0 18px 42px rgba(2, 8, 23, .09);
}

.hm-bi-action > span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500, #f97316);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-bi-action__icon {
    width: 1.22rem;
    height: 1.22rem;
}

.hm-bi-action strong {
    font-size: 1rem;
}

.hm-bi-action small {
    max-width: 280px;
    color: var(--hm-muted, #64748b);
    line-height: 1.4;
}

.hm-bi-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-bi-chart-card {
    min-height: 190px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 18px;
    border-radius: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    background:
        radial-gradient(circle at 82% 16%, rgba(37, 99, 235, .09), transparent 26%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
}

.hm-bi-chart-card__head {
    display: grid;
    gap: 4px;
}

.hm-bi-chart-card__head strong {
    color: var(--hm-text, #020617);
    font-size: 1rem;
}

.hm-bi-chart-card__head span {
    color: var(--hm-muted, #64748b);
    font-size: .86rem;
}

.hm-bi-bars {
    height: 112px;
    display: flex;
    align-items: end;
    gap: 10px;
    padding-top: 18px;
}

.hm-bi-bars i {
    width: 100%;
    min-height: 18px;
    height: var(--bar, 50%);
    border-radius: 12px 12px 6px 6px;
    background:
        linear-gradient(180deg, rgba(249, 115, 22, .86), rgba(234, 88, 12, .22));
    box-shadow: 0 10px 20px rgba(249, 115, 22, .12);
}

.hm-status--neutral {
    background: #f1f5f9;
    color: #475569;
}

.hm-status--danger {
    background: #fee2e2;
    color: #991b1b;
}

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

    .hm-bi-action-grid,
    .hm-bi-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hm-bi-kpi-grid {
        grid-template-columns: 1fr;
    }
}

/* HERMES BI premium components refresh */
.hm-bi-role-grid,
.hm-bi-report-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-bi-role-card,
.hm-bi-report-card,
.hm-bi-quick-link {
    text-decoration: none;
}

.hm-bi-role-card,
.hm-bi-report-card {
    position: relative;
    overflow: hidden;
    min-height: 136px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    color: var(--hm-text, #020617);
    box-shadow: 0 12px 28px rgba(2, 8, 23, .055);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hm-bi-role-card::after,
.hm-bi-report-card::after {
    content: "";
    position: absolute;
    right: -28px;
    bottom: -34px;
    width: 92px;
    height: 92px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .075);
}

.hm-bi-role-card:hover,
.hm-bi-report-card:hover {
    transform: translateY(-2px);
    border-color: rgba(249, 115, 22, .35);
    box-shadow: 0 18px 42px rgba(2, 8, 23, .09);
}

.hm-bi-role-card.is-active {
    border-color: rgba(249, 115, 22, .48);
    background:
        radial-gradient(circle at 92% 12%, rgba(249, 115, 22, .10), transparent 28%),
        linear-gradient(180deg, #ffffff, #fff7ed);
}

.hm-bi-role-card > span,
.hm-bi-report-card > span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 14px;
    color: var(--hm-orange-500, #f97316);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .16);
}

.hm-bi-role-card__icon,
.hm-bi-report-card__icon,
.hm-bi-quick-link__icon {
    width: 1.18rem;
    height: 1.18rem;
}

.hm-bi-role-card strong,
.hm-bi-report-card strong {
    font-size: 1rem;
}

.hm-bi-role-card small,
.hm-bi-report-card small {
    color: var(--hm-muted, #64748b);
    line-height: 1.4;
}

.hm-bi-report-card em {
    margin-top: auto;
    color: #1e3a8a;
    font-size: .8rem;
    font-style: normal;
    font-weight: 800;
}

.hm-bi-quick-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 14px;
    background: #f8fafc;
    color: var(--hm-text, #020617);
    border: 1px solid var(--hm-border, #e5e7eb);
    font-weight: 750;
}

.hm-bi-quick-link:hover {
    border-color: rgba(249, 115, 22, .35);
}

@media (max-width: 1180px) {
    .hm-bi-role-grid,
    .hm-bi-report-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .hm-bi-role-grid,
    .hm-bi-report-grid {
        grid-template-columns: 1fr;
    }
}

/* HERMES dashboard inventory alerts visual refresh */
.hm-dashboard-inventory,
.hm-dashboard-alerts {
    margin-top: 20px;
}

.hm-dashboard-inventory h3,
.hm-dashboard-alerts h3 {
    margin: 0;
}

.hm-inventory-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hm-inventory-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-rows: 128px 1fr;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(2, 8, 23, .06);
}

.hm-inventory-card::after {
    content: "";
    position: absolute;
    right: -36px;
    top: 78px;
    width: 110px;
    height: 110px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .07);
}

.hm-inventory-card__visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 72% 22%, rgba(249, 115, 22, .20), transparent 28%),
        linear-gradient(135deg, #07111f, #0b1f35);
    color: #fff;
}

.hm-inventory-card__visual span {
    font-size: 2.35rem;
    font-weight: 950;
    letter-spacing: -.05em;
    opacity: .96;
}

.hm-inventory-card__icon {
    position: absolute;
    right: 14px;
    bottom: 14px;
    width: 1.3rem;
    height: 1.3rem;
    color: #fb923c;
}

.hm-inventory-card__body {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 14px;
    padding: 16px;
}

.hm-inventory-card__head {
    display: grid;
    gap: 10px;
}

.hm-inventory-card__head strong {
    display: block;
    color: var(--hm-text, #020617);
    font-size: 1rem;
    line-height: 1.2;
}

.hm-inventory-card__head small {
    display: block;
    margin-top: 4px;
    color: #1e3a8a;
    font-size: .82rem;
    font-weight: 850;
}

.hm-inventory-status {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 850;
}

.hm-inventory-status--ok {
    color: #166534;
    background: #dcfce7;
}

.hm-inventory-status--warning {
    color: #92400e;
    background: #ffedd5;
}

.hm-inventory-status--progress {
    color: #1e3a8a;
    background: #eef2ff;
}

.hm-inventory-card__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.hm-inventory-card__chips span {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: .76rem;
    font-weight: 750;
}

.hm-stock-meter {
    display: grid;
    gap: 8px;
}

.hm-stock-meter__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--hm-muted, #64748b);
    font-size: .8rem;
}

.hm-stock-meter__top strong {
    color: var(--hm-text, #020617);
}

.hm-stock-meter__bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.hm-stock-meter__bar i {
    display: block;
    width: var(--stock-level, 50%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97316, #fb923c);
    box-shadow: 0 8px 18px rgba(249, 115, 22, .22);
}

.hm-dashboard-alert-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-dashboard-alert {
    position: relative;
    overflow: hidden;
    min-height: 156px;
    display: flex;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(2, 8, 23, .06);
}

.hm-dashboard-alert::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: var(--alert-accent, #f97316);
}

.hm-dashboard-alert::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: var(--alert-glow, rgba(249, 115, 22, .08));
}

.hm-dashboard-alert--danger {
    --alert-accent: #ef4444;
    --alert-bg: #fef2f2;
    --alert-color: #991b1b;
    --alert-glow: rgba(239, 68, 68, .08);
}

.hm-dashboard-alert--warning {
    --alert-accent: #f97316;
    --alert-bg: #fff7ed;
    --alert-color: #9a3412;
    --alert-glow: rgba(249, 115, 22, .10);
}

.hm-dashboard-alert--info {
    --alert-accent: #2563eb;
    --alert-bg: #eff6ff;
    --alert-color: #1e3a8a;
    --alert-glow: rgba(37, 99, 235, .08);
}

.hm-dashboard-alert__icon {
    width: 44px;
    height: 44px;
    display: inline-grid;
    place-items: center;
    border-radius: 15px;
    background: var(--alert-bg, #fff7ed);
    color: var(--alert-color, #9a3412);
    border: 1px solid rgba(148, 163, 184, .16);
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
}

.hm-dashboard-alert__svg {
    width: 1.25rem;
    height: 1.25rem;
}

.hm-dashboard-alert__content {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
    min-width: 0;
}

.hm-dashboard-alert__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.hm-dashboard-alert__head strong {
    color: var(--hm-text, #020617);
    font-size: 1rem;
}

.hm-dashboard-alert__head span {
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--alert-color, #9a3412);
    background: var(--alert-bg, #fff7ed);
    font-size: .72rem;
    font-weight: 900;
}

.hm-dashboard-alert p {
    margin: 0;
    color: #334155;
    line-height: 1.4;
}

.hm-dashboard-alert small {
    color: var(--hm-muted, #64748b);
    font-size: .8rem;
    font-weight: 750;
}

@media (max-width: 1280px) {
    .hm-inventory-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-dashboard-alert-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 720px) {
    .hm-inventory-grid {
        grid-template-columns: 1fr;
    }

    .hm-dashboard-alert {
        flex-direction: column;
    }
}

/* HERMES commercial submodules visual refresh */
.hm-commercial-subnav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 20px;
}

.hm-commercial-subnav a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 999px;
    color: #334155;
    background: #ffffff;
    border: 1px solid var(--hm-border, #e5e7eb);
    text-decoration: none;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(2, 8, 23, .045);
}

.hm-commercial-subnav a.is-active,
.hm-commercial-subnav a:hover {
    color: #9a3412;
    background: #fff7ed;
    border-color: rgba(249, 115, 22, .35);
}

.hm-commercial-subnav__icon {
    width: 1rem;
    height: 1rem;
}

.hm-commercial-list {
    margin-top: 20px;
}

.hm-commercial-list h2 {
    margin: 0;
}

.hm-customer-grid,
.hm-quote-grid,
.hm-order-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.hm-customer-card,
.hm-quote-card,
.hm-order-card {
    position: relative;
    overflow: hidden;
    display: grid;
    gap: 14px;
    min-height: 250px;
    padding: 18px;
    border: 1px solid var(--hm-border, #e5e7eb);
    border-radius: 20px;
    background:
        radial-gradient(circle at 92% 18%, rgba(249, 115, 22, .08), transparent 26%),
        linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 14px 34px rgba(2, 8, 23, .06);
}

.hm-customer-card.is-blocked {
    border-color: rgba(239, 68, 68, .30);
    background:
        radial-gradient(circle at 92% 18%, rgba(239, 68, 68, .08), transparent 26%),
        linear-gradient(180deg, #ffffff, #fff7f7);
}

.hm-customer-card::after,
.hm-quote-card::after,
.hm-order-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -48px;
    width: 124px;
    height: 124px;
    border-radius: 999px;
    background: rgba(249, 115, 22, .07);
}

.hm-customer-card__top,
.hm-quote-card__top,
.hm-order-card__top {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.hm-customer-avatar,
.hm-quote-card__icon,
.hm-order-card__icon {
    width: 46px;
    height: 46px;
    display: inline-grid;
    place-items: center;
    border-radius: 15px;
    color: var(--hm-orange-500, #f97316);
    background: rgba(249, 115, 22, .10);
    border: 1px solid rgba(249, 115, 22, .18);
    flex: 0 0 auto;
    font-weight: 950;
}

.hm-quote-card__svg,
.hm-order-card__svg {
    width: 1.25rem;
    height: 1.25rem;
}

.hm-customer-card__top strong,
.hm-quote-card__top strong,
.hm-order-card__top strong {
    display: block;
    color: var(--hm-text, #020617);
    font-size: 1rem;
    line-height: 1.2;
}

.hm-customer-card__top small,
.hm-quote-card__top small,
.hm-order-card__top small {
    display: block;
    margin-top: 4px;
    color: var(--hm-muted, #64748b);
    line-height: 1.35;
}

.hm-customer-card__meta,
.hm-quote-card__meta,
.hm-order-card__meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hm-quote-card__meta > span:not(.hm-status),
.hm-order-card__meta > span:not(.hm-status) {
    padding: 5px 8px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: .76rem;
    font-weight: 800;
}

.hm-credit-meter {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 8px;
}

.hm-credit-meter__top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: var(--hm-muted, #64748b);
    font-size: .8rem;
}

.hm-credit-meter__top strong {
    color: var(--hm-text, #020617);
}

.hm-credit-meter__bar {
    height: 9px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.hm-credit-meter__bar i {
    display: block;
    width: var(--credit-level, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #f97316, #fb923c);
    box-shadow: 0 8px 18px rgba(249, 115, 22, .22);
}

.hm-backorder-meter .hm-credit-meter__bar i {
    background: linear-gradient(90deg, #ef4444, #f97316);
}

.hm-customer-card__numbers,
.hm-order-card__numbers {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.hm-customer-card__numbers div,
.hm-order-card__numbers div {
    padding: 10px;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, .9);
}

.hm-customer-card__numbers small,
.hm-order-card__numbers small {
    display: block;
    color: var(--hm-muted, #64748b);
    font-size: .72rem;
    font-weight: 750;
}

.hm-customer-card__numbers strong,
.hm-order-card__numbers strong {
    display: block;
    margin-top: 4px;
    color: var(--hm-text, #020617);
    font-size: .86rem;
}

.hm-customer-card__footer,
.hm-order-card__footer,
.hm-quote-card__dates {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 5px;
    color: var(--hm-muted, #64748b);
    font-size: .8rem;
    font-weight: 700;
}

.hm-customer-card__icon,
.hm-order-card__date-icon,
.hm-quote-card__date-icon {
    width: .95rem;
    height: .95rem;
    vertical-align: middle;
}

.hm-quote-card__amount {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 4px;
    padding: 14px;
    border-radius: 16px;
    background: #07111f;
    color: #fff;
}

.hm-quote-card__amount span {
    color: #b8c6d8;
    font-size: .78rem;
    font-weight: 800;
}

.hm-quote-card__amount strong {
    font-size: 1.15rem;
}

.hm-quote-card__cta {
    position: relative;
    z-index: 1;
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 12px;
    color: #fff;
    background: var(--hm-orange-500, #f97316);
    text-decoration: none;
    font-weight: 850;
    box-shadow: 0 10px 20px rgba(249, 115, 22, .20);
}

@media (max-width: 1280px) {
    .hm-customer-grid,
    .hm-quote-grid,
    .hm-order-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .hm-customer-grid,
    .hm-quote-grid,
    .hm-order-grid {
        grid-template-columns: 1fr;
    }

    .hm-customer-card__numbers,
    .hm-order-card__numbers {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   HERMES BI clean layout v2
   ===================================================== */

.hm-bi-clean-hero {
    min-height: auto;
    padding: 1.35rem 1.5rem;
}

.hm-bi-clean-section {
    padding: 1.25rem;
}

.hm-bi-clean-snapshot-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.hm-bi-clean-snapshot-card {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1.15rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.06);
}

.hm-bi-clean-snapshot-head {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.hm-bi-clean-snapshot-head strong {
    display: block;
    color: #0f172a;
    font-size: 1rem;
}

.hm-bi-clean-snapshot-head small,
.hm-bi-clean-date {
    display: block;
    color: #64748b;
    font-size: 0.82rem;
}

.hm-bi-clean-icon {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.9rem;
    background: rgba(249, 115, 22, 0.11);
    color: #f97316;
    flex: 0 0 auto;
}

.hm-bi-clean-icon__svg,
.hm-bi-clean-row-icon {
    width: 1.05rem;
    height: 1.05rem;
}

.hm-bi-clean-primary {
    padding: 0.85rem;
    border-radius: 0.95rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    margin-bottom: 0.85rem;
}

.hm-bi-clean-primary span {
    display: block;
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.hm-bi-clean-primary strong {
    display: block;
    color: #0f172a;
    font-size: 1.55rem;
    margin-top: 0.15rem;
}

.hm-bi-clean-metrics {
    display: grid;
    gap: 0.5rem;
}

.hm-bi-clean-metrics div {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    color: #475569;
    font-size: 0.84rem;
}

.hm-bi-clean-metrics strong {
    color: #0f172a;
}

.hm-bi-clean-date {
    margin-top: 0.85rem;
}

.hm-bi-clean-role-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.hm-bi-clean-role {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.32);
    padding: 0.55rem 0.9rem;
    color: #334155;
    text-decoration: none;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.84);
}

.hm-bi-clean-role.is-active {
    border-color: rgba(249, 115, 22, 0.45);
    background: rgba(249, 115, 22, 0.12);
    color: #9a3412;
}

.hm-bi-clean-two-col {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 1rem;
    align-items: start;
}

.hm-bi-clean-report-list,
.hm-bi-clean-quick-list {
    display: grid;
    gap: 0.7rem;
}

.hm-bi-clean-report-row,
.hm-bi-clean-quick-list a {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem;
    border-radius: 0.95rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.9);
    text-decoration: none;
    color: #0f172a;
}

.hm-bi-clean-report-row div {
    min-width: 0;
    flex: 1;
}

.hm-bi-clean-report-row strong,
.hm-bi-clean-quick-list span {
    display: block;
    font-weight: 900;
}

.hm-bi-clean-report-row small {
    display: block;
    color: #64748b;
    margin-top: 0.1rem;
}

.hm-bi-clean-report-row em {
    color: #64748b;
    font-style: normal;
    font-size: 0.82rem;
    white-space: nowrap;
}

.hm-bi-clean-quick-list--spaced {
    margin-top: 1rem;
}

@media (max-width: 1280px) {
    .hm-bi-clean-snapshot-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hm-bi-clean-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .hm-bi-clean-snapshot-grid {
        grid-template-columns: 1fr;
    }

    .hm-bi-clean-hero {
        padding: 1rem;
    }
}

/* BI Definitions visual refresh */
.hm-bi-definitions-hero {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1), rgba(59, 130, 246, 0.08) 50%, rgba(15, 23, 42, 0.02));
}
.hm-bi-definitions-kpis {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
    max-width: 520px;
}
.hm-bi-definitions-kpis div {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 0.85rem;
    padding: 0.65rem 0.75rem;
}
.hm-bi-definitions-kpis small { display:block; color:#64748b; font-size:.76rem; font-weight:700; text-transform:uppercase; }
.hm-bi-definitions-kpis strong { display:block; margin-top:.15rem; font-size:1.15rem; color:#0f172a; }
.hm-bi-definitions-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hm-bi-definitions-query-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hm-bi-definitions-kpi-card { border-left: 4px solid rgba(249, 115, 22, 0.45); }
.hm-bi-definitions-query-card { border-left: 4px solid rgba(59, 130, 246, 0.4); }
.hm-bi-definitions-sql { max-height: 220px; overflow: auto; font-size: .79rem; }
.hm-bi-definitions-rules-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.hm-bi-definitions-rule {
    display:flex; align-items:center; gap:.6rem; padding:.8rem; border-radius:.9rem;
    border:1px solid rgba(148,163,184,.24); background: rgba(248,250,252,.95);
}
.hm-bi-definitions-rule.is-enabled { border-color: rgba(34,197,94,.35); background: rgba(34,197,94,.08); color:#166534; }
.hm-bi-definitions-rule.is-disabled { border-color: rgba(239,68,68,.24); background: rgba(239,68,68,.08); color:#991b1b; }

@media (max-width: 1280px) {
    .hm-bi-definitions-kpi-grid,
    .hm-bi-definitions-rules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .hm-bi-definitions-kpis,
    .hm-bi-definitions-kpi-grid,
    .hm-bi-definitions-query-grid,
    .hm-bi-definitions-rules-grid { grid-template-columns: 1fr; }
}

/* HERMES soft ocean-wave motion system */
:root {
    --hm-wave-cyan: rgba(14, 165, 233, .12);
    --hm-wave-blue: rgba(37, 99, 235, .09);
    --hm-wave-speed-1: 24s;
    --hm-wave-speed-2: 34s;
}

body::before,
body::after {
    content: "";
    position: fixed;
    left: -12%;
    right: -12%;
    height: 220px;
    z-index: -1;
    pointer-events: none;
    background-repeat: repeat-x;
    filter: blur(.2px);
}

body::before {
    bottom: -78px;
    opacity: .7;
    background-image: radial-gradient(130px 42px at 50% 100%, var(--hm-wave-cyan) 40%, transparent 41%);
    background-size: 240px 100%;
    animation: hm-wave-drift var(--hm-wave-speed-1) linear infinite;
}

body::after {
    bottom: -110px;
    opacity: .52;
    background-image: radial-gradient(150px 48px at 50% 100%, var(--hm-wave-blue) 40%, transparent 41%);
    background-size: 280px 100%;
    animation: hm-wave-drift-reverse var(--hm-wave-speed-2) linear infinite;
}

.hm-card,
.module-card,
.hm-module-card,
.hm-kpi,
.hm-product-card,
.hm-flow__step,
.hm-commercial-action,
.hm-btn,
.hm-action-link,
.hm-sidebar__item,
.app-sidebar__logout button {
    transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease, background-color .24s ease, color .24s ease;
}

.hm-card:hover,
.module-card:hover,
.hm-module-card:hover,
.hm-kpi:hover,
.hm-product-card:hover,
.hm-flow__step:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 32px rgba(2, 8, 23, .08);
}

.hm-table tbody tr {
    transition: background-color .22s ease, transform .22s ease;
}

.hm-table tbody tr:hover {
    background: rgba(14, 165, 233, .06);
}

@keyframes hm-wave-drift {
    from { background-position-x: 0; }
    to { background-position-x: 240px; }
}

@keyframes hm-wave-drift-reverse {
    from { background-position-x: 0; }
    to { background-position-x: -280px; }
}

@media (prefers-reduced-motion: reduce) {
    body::before,
    body::after,
    .hm-card,
    .module-card,
    .hm-module-card,
    .hm-kpi,
    .hm-product-card,
    .hm-flow__step,
    .hm-commercial-action,
    .hm-btn,
    .hm-action-link,
    .hm-sidebar__item,
    .app-sidebar__logout button,
    .hm-table tbody tr {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Module transition animation */
[data-module-transition] {
    opacity: 0;
    transform: translateY(8px);
}

[data-module-transition].hm-module-transition--ready {
    opacity: 1;
    transform: translateY(0);
    transition: opacity .22s ease, transform .22s ease;
}

[data-module-transition].hm-module-transition--leaving {
    opacity: 0;
    transform: translateY(-6px);
}

@media (prefers-reduced-motion: reduce) {
    [data-module-transition],
    [data-module-transition].hm-module-transition--ready,
    [data-module-transition].hm-module-transition--leaving {
        transition: none;
        transform: none;
        opacity: 1;
    }
}

/* Responsive hardening pack */
img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

.hm-card,
.module-card,
.hm-module-card,
.hm-product-card,
.hm-table-wrap {
    min-width: 0;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

@media (max-width: 640px) {
    .container {
        margin: 24px 12px;
        padding: 16px;
    }

    .hm-topbar,
    .app-topbar {
        padding: 12px 14px;
        align-items: flex-start;
        flex-direction: column;
    }

    .hm-kpi-grid,
    .hm-card-grid,
    .dashboard-grid,
    .dashboard-products,
    .hm-flow,
    .hm-commercial-kpi-grid,
    .hm-commercial-action-grid {
        grid-template-columns: 1fr;
    }

    .hm-table,
    .table {
        min-width: 620px;
    }

    .hm-action-link,
    .quick-access__items a,
    .hm-btn {
        width: 100%;
        justify-content: center;
    }
}
