:root {
    --eos-navy-950: #04101f;
    --eos-navy-900: #071a32;
    --eos-navy-800: #0b2545;
    --eos-navy-700: #123d68;
    --eos-navy-600: #155e93;
    --eos-blue: #2563eb;
    --eos-text: #142033;
    --eos-muted: #68788f;
    --eos-subtle: #f5f8fc;
    --eos-line: #e4eaf2;
    --eos-line-strong: #d4deea;
    --eos-white: #fff;
    --eos-success: #07865f;
    --eos-warning: #c27512;
    --eos-danger: #c73552;
    --eos-header-height: 68px;
    --eos-radius: 14px;
    --eos-shadow: 0 8px 28px rgba(7, 26, 50, .07);
    --eos-shadow-hover: 0 16px 38px rgba(7, 26, 50, .11);
}

html, body {
    min-height: 100%;
    margin: 0;
    color: var(--eos-text);
    background: #fff !important;
    font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
a { text-decoration: none; }

/* App shell */
.eos-crm-shell { min-height: 100dvh; color: var(--eos-text); background: #fff; }
.crm-premium-header.mud-appbar {
    height: var(--eos-header-height) !important;
    min-height: var(--eos-header-height) !important;
    padding: 0 22px !important;
    color: var(--eos-text) !important;
    background: rgba(255, 255, 255, .98) !important;
    border-bottom: 1px solid var(--eos-line) !important;
    box-shadow: none !important;
    backdrop-filter: blur(14px);
    z-index: 1301 !important;
}

.mobile-menu-button { display: none !important; }
.eos-icon-button {
    position: relative;
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 auto;
    padding: 0;
    color: #52647b;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: .18s ease;
}
.eos-icon-button:hover { color: var(--eos-navy-800); background: var(--eos-subtle); border-color: var(--eos-line); }
.topbar-context { display: flex; flex-direction: column; min-width: 0; }
.topbar-eyebrow { color: var(--eos-navy-600); font-size: .6rem; font-weight: 800; letter-spacing: .14em; }
.topbar-title-row { display: flex; align-items: center; gap: 11px; }
.topbar-title-row h1 { margin: 2px 0 0; color: var(--eos-navy-900); font-size: 1rem; font-weight: 800; letter-spacing: -.02em; }
.system-live { display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px; color: #087655; background: #effbf7; border: 1px solid #d9f4e9; border-radius: 999px; font-size: .6rem; font-weight: 750; }
.system-live i { width: 6px; height: 6px; background: #10a778; border-radius: 50%; }
.topbar-actions { display: flex; align-items: center; gap: 4px; }
.topbar-divider { width: 1px; height: 30px; margin: 0 8px; background: var(--eos-line); }
.notification-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: #e63b5d; border: 2px solid #fff; border-radius: 50%; }
.user-profile-wrapper { display: flex; align-items: center; gap: 10px; margin: 0 8px 0 3px; }
.avatar-custom { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--eos-navy-800); border-radius: 11px; font-size: .7rem; font-weight: 850; }
.user-text-info { display: flex; flex-direction: column; max-width: 160px; }
.user-name { overflow: hidden; color: var(--eos-navy-900); font-size: .73rem; font-weight: 750; text-overflow: ellipsis; white-space: nowrap; }
.user-role { color: var(--eos-muted); font-size: .59rem; }
.logout-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; padding: 0 13px; color: var(--eos-navy-800); background: #fff; border: 1px solid var(--eos-line-strong); border-radius: 10px; font-size: .68rem; font-weight: 750; transition: .18s ease; }
.logout-button:hover { color: #fff; background: var(--eos-navy-800); border-color: var(--eos-navy-800); }

/* White sidebar */
.crm-premium-sidebar.mud-drawer { color: var(--eos-text) !important; background: #fff !important; border-right: 1px solid var(--eos-line) !important; box-shadow: none !important; }
.sidebar-content { display: flex; flex-direction: column; height: 100%; min-height: 100dvh; padding: 16px 13px 14px; overflow-y: auto; }
.brand-block { display: flex; align-items: center; gap: 11px; padding: 3px 9px 17px; }
.brand-mark { display: grid; place-items: center; width: 44px; height: 44px; color: #fff; background: var(--eos-navy-900); border-radius: 12px; box-shadow: 0 8px 20px rgba(7, 26, 50, .17); }
.brand-mark strong { font-size: .8rem; font-weight: 900; letter-spacing: .06em; }
.brand-copy { display: flex; flex-direction: column; line-height: 1.2; }
.brand-copy strong { color: var(--eos-navy-900); font-size: .95rem; font-weight: 850; }
.brand-copy small { margin-top: 4px; color: var(--eos-muted); font-size: .57rem; letter-spacing: .04em; }
.workspace-card { display: flex; align-items: center; gap: 10px; margin: 0 4px 19px; padding: 11px; background: var(--eos-subtle); border: 1px solid var(--eos-line); border-radius: 12px; }
.workspace-icon { display: grid; place-items: center; width: 34px; height: 34px; color: var(--eos-navy-700); background: #fff; border: 1px solid var(--eos-line); border-radius: 9px; }
.workspace-card > div { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.workspace-card small { color: var(--eos-muted); font-size: .57rem; }
.workspace-card strong { overflow: hidden; color: var(--eos-navy-900); font-size: .68rem; text-overflow: ellipsis; white-space: nowrap; }
.workspace-arrow { color: #8a9aaf; font-size: .68rem; }
.sidebar-section-label { padding: 0 13px 7px; color: #8a98aa; font-size: .57rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; }
.premium-nav-menu { padding: 0 !important; }
.crm-premium-sidebar .mud-nav-link, .crm-premium-sidebar .mud-nav-group-header { min-height: 43px !important; margin: 3px 3px !important; padding: 0 11px !important; color: #506176 !important; border: 1px solid transparent !important; border-radius: 10px !important; font-size: .75rem !important; font-weight: 650 !important; transition: .18s ease !important; }
.crm-premium-sidebar .mud-nav-link-icon-default, .crm-premium-sidebar .mud-nav-group-toggle-icon { color: #718298 !important; transition: .18s ease !important; }
.crm-premium-sidebar .mud-nav-link:hover, .crm-premium-sidebar .mud-nav-group-header:hover { color: var(--eos-navy-900) !important; background: var(--eos-subtle) !important; border-color: var(--eos-line) !important; }
.crm-premium-sidebar .mud-nav-link:hover .mud-nav-link-icon-default { color: var(--eos-navy-700) !important; }
.crm-premium-sidebar .mud-nav-link.active { color: #fff !important; background: var(--eos-navy-800) !important; border-color: var(--eos-navy-800) !important; box-shadow: 0 8px 18px rgba(11, 37, 69, .14); }
.crm-premium-sidebar .mud-nav-link.active .mud-nav-link-icon-default { color: #fff !important; }
.crm-premium-sidebar .mud-nav-group-children { margin-left: 8px; padding-left: 5px; border-left: 1px solid var(--eos-line); }
.sidebar-loading, .sidebar-empty, .sidebar-error { display: flex; align-items: center; gap: 9px; margin: 8px 4px; padding: 11px; color: var(--eos-muted); background: var(--eos-subtle); border: 1px solid var(--eos-line); border-radius: 10px; font-size: .67rem; }
.sidebar-error { flex-wrap: wrap; color: #a52c45; background: #fff6f7; border-color: #f6d8df; }
.sidebar-error button { margin-left: auto; color: var(--eos-navy-800); background: #fff; border: 1px solid var(--eos-line); border-radius: 7px; font-size: .62rem; }
.sidebar-spacer { flex: 1; min-height: 20px; }
.sidebar-help-card { display: flex; align-items: center; gap: 10px; margin: 8px 4px 11px; padding: 11px; color: var(--eos-navy-800); background: #f7f9fc; border: 1px solid var(--eos-line); border-radius: 12px; }
.help-icon { display: grid; place-items: center; width: 34px; height: 34px; color: #fff; background: var(--eos-navy-800); border-radius: 9px; }
.sidebar-help-card > div:last-child { display: flex; flex-direction: column; }
.sidebar-help-card strong { font-size: .67rem; }
.sidebar-help-card span { color: var(--eos-muted); font-size: .57rem; }
.sidebar-footer { display: flex; justify-content: space-between; padding: 0 8px; color: #8896a7; font-size: .57rem; }
.sidebar-footer i { color: #10a778; font-size: .4rem; }

.crm-premium-main-content.mud-main-content { min-width: 0; min-height: 100dvh; padding-top: var(--eos-header-height) !important; background: #fff !important; overflow-x: hidden; }
.crm-page-shell { min-height: calc(100dvh - var(--eos-header-height)); padding: 16px 22px 30px; background: #fff; }
.crm-page-shell > * { animation: eos-enter .28s ease both; }

/* Search and notifications */
.eos-panel-backdrop { position: fixed; inset: 0; z-index: 1600; display: grid; place-items: start center; padding: 9vh 18px 18px; background: rgba(7, 26, 50, .38); backdrop-filter: blur(4px); }
.eos-command-panel { width: min(680px, 100%); overflow: hidden; color: var(--eos-text); background: #fff; border: 1px solid var(--eos-line); border-radius: 18px; box-shadow: 0 30px 80px rgba(7, 26, 50, .2); outline: none; }
.command-panel-header, .popover-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 19px 21px 12px; }
.eos-eyebrow { color: var(--eos-navy-600); font-size: .59rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.command-panel-header h2, .popover-heading h3 { margin: 4px 0 0; color: var(--eos-navy-900); font-size: 1.08rem; font-weight: 800; }
.command-search-shell { position: relative; display: flex; align-items: center; margin: 8px 21px 14px; }
.command-search-shell > i { position: absolute; left: 14px; color: var(--eos-muted); }
.command-search-shell input { width: 100%; height: 49px; padding: 0 66px 0 42px; color: var(--eos-text); background: #fff; border: 1px solid var(--eos-line-strong); border-radius: 11px; outline: none; }
.command-search-shell input:focus { border-color: var(--eos-navy-600); box-shadow: 0 0 0 3px rgba(21, 94, 147, .09); }
.command-search-shell kbd { position: absolute; right: 12px; padding: 4px 7px; color: var(--eos-muted); background: var(--eos-subtle); border: 1px solid var(--eos-line); border-radius: 6px; font-size: .57rem; }
.command-results { max-height: 380px; padding: 0 12px 12px; overflow-y: auto; }
.command-result-item { display: grid; grid-template-columns: 40px minmax(0, 1fr) 20px; align-items: center; gap: 11px; width: 100%; padding: 10px; color: var(--eos-text); background: #fff; border: 1px solid transparent; border-radius: 11px; text-align: left; transition: .18s ease; }
.command-result-item:hover { background: var(--eos-subtle); border-color: var(--eos-line); }
.command-result-icon { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: var(--eos-navy-800); border-radius: 10px; }
.command-result-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.command-result-item strong { font-size: .72rem; }
.command-result-item small { margin-top: 3px; overflow: hidden; color: var(--eos-muted); font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.command-result-item > i { color: #94a1b2; }
.command-empty { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 110px; color: var(--eos-muted); font-size: .7rem; }
.command-panel-footer { display: flex; justify-content: space-between; gap: 16px; padding: 12px 21px; color: var(--eos-muted); background: var(--eos-subtle); border-top: 1px solid var(--eos-line); font-size: .6rem; }
.notifications-popover { position: fixed; top: 61px; right: 108px; z-index: 1500; width: min(390px, calc(100vw - 24px)); overflow: hidden; color: var(--eos-text); background: #fff; border: 1px solid var(--eos-line); border-radius: 15px; box-shadow: var(--eos-shadow-hover); }
.notification-list { padding: 4px 12px 10px; }
.notification-item { display: grid; grid-template-columns: 37px 1fr; gap: 10px; padding: 12px 8px; border-bottom: 1px solid var(--eos-line); }
.notification-icon { display: grid; place-items: center; width: 37px; height: 37px; border-radius: 10px; }
.notification-icon.success { color: var(--eos-success); background: #effbf7; }.notification-icon.info { color: var(--eos-navy-700); background: #eef4fa; }
.notification-item strong, .notification-item p, .notification-item small { display: block; }
.notification-item strong { font-size: .69rem; }.notification-item p { margin: 3px 0; color: var(--eos-muted); font-size: .62rem; line-height: 1.5; }.notification-item small { color: #96a2b2; font-size: .56rem; }
.popover-action { width: 100%; padding: 12px; color: var(--eos-navy-800); background: var(--eos-subtle); border: 0; font-size: .64rem; font-weight: 750; }

/* Dashboard v2 */
.crm-dashboard-v2 { width: 100%; max-width: 1700px; margin: 0 auto; }
.dashboard-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 7px 0 20px; border-bottom: 1px solid var(--eos-line); }
.page-overline, .surface-overline { color: var(--eos-navy-600); font-size: .59rem; font-weight: 850; letter-spacing: .13em; }
.dashboard-page-header h1 { margin: 5px 0 4px; color: var(--eos-navy-900); font-size: clamp(1.45rem, 2.2vw, 2rem); font-weight: 850; letter-spacing: -.04em; }
.dashboard-page-header p { margin: 0; color: var(--eos-muted); font-size: .76rem; }
.dashboard-header-actions { display: flex; align-items: center; gap: 11px; }
.last-sync { display: inline-flex; align-items: center; gap: 6px; color: var(--eos-success); font-size: .62rem; font-weight: 700; white-space: nowrap; }
.navy-action-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 14px; color: #fff; background: var(--eos-navy-800); border: 1px solid var(--eos-navy-800); border-radius: 10px; font-size: .68rem; font-weight: 750; box-shadow: 0 7px 17px rgba(11, 37, 69, .15); transition: .18s ease; }
.navy-action-button:hover:not(:disabled) { background: var(--eos-navy-900); transform: translateY(-1px); }.navy-action-button:disabled { opacity: .65; cursor: wait; }
.dashboard-warning { display: flex; align-items: flex-start; gap: 11px; margin-top: 14px; padding: 12px 14px; color: #82520b; background: #fffaf1; border: 1px solid #f3e2bf; border-radius: 11px; }
.dashboard-warning > i { margin-top: 1px; }.dashboard-warning > div { display: flex; flex-direction: column; }.dashboard-warning strong { font-size: .68rem; }.dashboard-warning span { margin-top: 2px; font-size: .61rem; line-height: 1.45; }
.dashboard-metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 18px 0; }
.dashboard-metric-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 17px; background: #fff; border: 1px solid var(--eos-line); border-radius: var(--eos-radius); box-shadow: var(--eos-shadow); transition: .2s ease; }
.dashboard-metric-card:hover { border-color: #cbd7e5; box-shadow: var(--eos-shadow-hover); transform: translateY(-2px); }
.metric-card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-card-icon { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: var(--eos-navy-800); border-radius: 10px; font-size: .92rem; }
.metric-api-state { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: .54rem; font-weight: 750; white-space: nowrap; }
.metric-api-state i { width: 5px; height: 5px; border-radius: 50%; }.metric-api-state.is-ready { color: #087655; background: #effbf7; }.metric-api-state.is-ready i { background: #10a778; }.metric-api-state.is-error { color: #a52c45; background: #fff3f5; }.metric-api-state.is-error i { background: #dc4161; }.metric-api-state.is-waiting { color: #7a5c21; background: #fff8e8; }.metric-api-state.is-waiting i { background: #d89b24; }
.metric-card-label { margin-top: 15px; color: var(--eos-muted); font-size: .64rem; font-weight: 700; }
.metric-card-value { margin-top: 4px; color: var(--eos-navy-900); font-size: clamp(1.6rem, 2.5vw, 2.05rem); font-weight: 850; letter-spacing: -.04em; }
.metric-card-note { margin-top: 9px; color: #8b98a9; font-size: .56rem; }
.dashboard-loading-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 390px; margin-top: 2px; background: #fff; border: 1px solid var(--eos-line); border-radius: var(--eos-radius); }
.dashboard-loader { width: 34px; height: 34px; border: 3px solid #e2e9f1; border-top-color: var(--eos-navy-800); border-radius: 50%; animation: eos-spin .8s linear infinite; }
.dashboard-loading-panel strong { margin-top: 14px; color: var(--eos-navy-900); font-size: .76rem; }.dashboard-loading-panel p { margin: 4px 0 0; color: var(--eos-muted); font-size: .63rem; }
.dashboard-chart-layout { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(330px, .75fr); gap: 14px; margin-bottom: 14px; }
.dashboard-bottom-layout { display: grid; grid-template-columns: minmax(0, 1.62fr) minmax(320px, .68fr); gap: 14px; }
.dashboard-side-stack { display: grid; gap: 14px; }
.dashboard-surface { min-width: 0; padding: 18px; background: #fff; border: 1px solid var(--eos-line); border-radius: var(--eos-radius); box-shadow: var(--eos-shadow); }
.surface-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.surface-heading-row { align-items: center; }
.surface-heading h2 { margin: 4px 0 3px; color: var(--eos-navy-900); font-size: .93rem; font-weight: 820; letter-spacing: -.02em; }
.surface-heading p { margin: 0; color: var(--eos-muted); font-size: .62rem; line-height: 1.45; }
.surface-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; color: var(--eos-navy-700); background: var(--eos-subtle); border: 1px solid var(--eos-line); border-radius: 999px; font-size: .56rem; font-weight: 700; white-space: nowrap; }
.surface-link { display: inline-flex; align-items: center; gap: 6px; color: var(--eos-navy-700); font-size: .62rem; font-weight: 750; white-space: nowrap; }.surface-link:hover { color: var(--eos-navy-900); }
.dashboard-chart-host { width: 100%; min-height: 315px; overflow: hidden; }.dashboard-pie-host { display: grid; place-items: center; }
.dashboard-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; padding: 25px; color: var(--eos-muted); text-align: center; }
.dashboard-empty-state > span { display: grid; place-items: center; width: 48px; height: 48px; color: var(--eos-navy-700); background: var(--eos-subtle); border: 1px solid var(--eos-line); border-radius: 13px; font-size: 1.1rem; }.dashboard-empty-state p { max-width: 320px; margin: 11px 0 0; font-size: .65rem; line-height: 1.5; }
.dashboard-data-table { --bs-table-bg: transparent; color: var(--eos-text); }
.dashboard-data-table > :not(caption) > * > * { padding: .78rem .65rem; border-bottom-color: var(--eos-line); }
.dashboard-data-table thead th { color: var(--eos-muted); background: var(--eos-subtle); font-size: .57rem; font-weight: 800; letter-spacing: .045em; text-transform: uppercase; white-space: nowrap; }
.dashboard-data-table tbody td { color: var(--eos-muted); font-size: .65rem; }.dashboard-data-table tbody tr:hover td { background: #fafbfd; }.dashboard-data-table tbody strong { color: var(--eos-text); font-weight: 700; }
.data-code { color: var(--eos-navy-700); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .62rem; font-weight: 750; }
.area-chip { display: inline-flex; padding: 4px 7px; color: var(--eos-navy-700); background: #f1f5f9; border-radius: 999px; font-size: .57rem; font-weight: 650; }
.dashboard-quick-links { display: grid; gap: 8px; }
.dashboard-quick-links > a { display: grid; grid-template-columns: 39px minmax(0, 1fr) 16px; align-items: center; gap: 10px; padding: 9px; color: var(--eos-text); background: #fff; border: 1px solid var(--eos-line); border-radius: 11px; transition: .18s ease; }
.dashboard-quick-links > a:hover { color: var(--eos-text); background: var(--eos-subtle); border-color: var(--eos-line-strong); transform: translateX(2px); }
.dashboard-quick-links > a > span { display: grid; place-items: center; width: 39px; height: 39px; color: #fff; background: var(--eos-navy-800); border-radius: 9px; }.dashboard-quick-links > a > div { display: flex; flex-direction: column; min-width: 0; }.dashboard-quick-links strong { font-size: .65rem; }.dashboard-quick-links small { margin-top: 3px; overflow: hidden; color: var(--eos-muted); font-size: .56rem; text-overflow: ellipsis; white-space: nowrap; }.dashboard-quick-links > a > i { color: #95a1b0; font-size: .65rem; }
.api-health-list { display: grid; gap: 9px; }.api-health-list > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--eos-line); }.api-health-list > div:last-child { padding-bottom: 0; border-bottom: 0; }.api-health-list span { display: inline-flex; align-items: center; gap: 8px; color: var(--eos-text); font-size: .62rem; }.api-health-list span i { color: var(--eos-navy-700); }.api-health-list strong { font-size: .55rem; }.api-health-list .is-online { color: var(--eos-success); }.api-health-list .is-offline { color: var(--eos-danger); }
.apexcharts-text, .apexcharts-legend-text { font-family: Inter, "Segoe UI", sans-serif !important; }.apexcharts-gridline { stroke: #edf1f6 !important; }.apexcharts-tooltip { border: 1px solid var(--eos-line) !important; box-shadow: var(--eos-shadow) !important; }

/* Shared controls and existing business screens */
.card, .mud-paper { color: var(--eos-text); background: #fff !important; border-color: var(--eos-line) !important; border-radius: var(--eos-radius) !important; }
.card { box-shadow: var(--eos-shadow) !important; }.card-header { background: #fff !important; border-bottom-color: var(--eos-line) !important; }
.mud-table, .mud-table-root, .mud-table-toolbar, .mud-table-pagination { color: var(--eos-text) !important; background: #fff !important; }
.mud-table-head .mud-table-cell { color: var(--eos-muted) !important; background: var(--eos-subtle) !important; font-size: .66rem; font-weight: 800; letter-spacing: .03em; }
.mud-table-body .mud-table-row:hover .mud-table-cell { background: #fafbfd !important; }.mud-table-cell { border-bottom-color: var(--eos-line) !important; }
.mud-input-control .mud-input, .mud-input-control .mud-input-slot, .mud-input-label { color: var(--eos-text) !important; }.mud-input-outlined-border { border-color: var(--eos-line-strong) !important; border-radius: 10px !important; }.mud-input-control:hover .mud-input-outlined-border { border-color: #8fa2b8 !important; }
.mud-button-root { border-radius: 10px !important; font-weight: 700 !important; text-transform: none !important; letter-spacing: 0 !important; }
.mud-button-filled-primary, .btn-custom-primary, .btn-form-submit, .btn-save, .btn-primary { color: #fff !important; background: var(--eos-navy-800) !important; border-color: var(--eos-navy-800) !important; box-shadow: 0 7px 17px rgba(11, 37, 69, .14) !important; }
.mud-button-filled-primary:hover, .btn-custom-primary:hover, .btn-form-submit:hover, .btn-save:hover, .btn-primary:hover { background: var(--eos-navy-900) !important; transform: translateY(-1px); }
.mud-dialog { color: var(--eos-text); background: #fff !important; border: 1px solid var(--eos-line); border-radius: 16px !important; box-shadow: 0 28px 70px rgba(7, 26, 50, .2) !important; }.mud-dialog-title { border-bottom: 1px solid var(--eos-line); }.mud-dialog-actions { border-top: 1px solid var(--eos-line); }
.mud-popover { color: var(--eos-text); background: #fff !important; border: 1px solid var(--eos-line); border-radius: 11px !important; box-shadow: var(--eos-shadow-hover) !important; }.mud-chip { border-radius: 999px !important; }
.form-control, .form-select, .form-control-custom, .filter-input, .input-group-text { min-height: 42px; color: var(--eos-text) !important; background-color: #fff !important; border-color: var(--eos-line-strong) !important; border-radius: 10px !important; }
.form-control:focus, .form-select:focus, .form-control-custom:focus, .filter-input:focus { border-color: var(--eos-navy-600) !important; box-shadow: 0 0 0 3px rgba(21, 94, 147, .09) !important; outline: 0; }
.form-group-custom label, .filter-label { color: #344258 !important; font-weight: 700 !important; }
.table { --bs-table-bg: transparent; color: var(--eos-text); }.table > :not(caption) > * > * { border-bottom-color: var(--eos-line); }.table thead th { color: var(--eos-muted); font-weight: 800; }
.text-navy { color: var(--eos-navy-800) !important; }.bg-navy { background-color: var(--eos-navy-800) !important; }
.modern-page-container, .modern-form-container, .customer-lookup-container, .permission-container, .report-page-container, .map-page { max-width: 1700px !important; margin-inline: auto !important; background: #fff !important; }
.modern-page-container, .modern-form-container, .customer-lookup-container, .permission-container { color: var(--eos-text) !important; }
.page-main-title, .map-page-header h1, .permission-container h1, .main-content h1, .main-content h2 { color: var(--eos-navy-900) !important; font-weight: 820 !important; letter-spacing: -.025em; }
.form-card-custom, .filter-card, .filter-card-modern, .table-card-modern, .form-section-card, .groups-panel, .permissions-panel, .billing-invoice-box { background: #fff !important; border: 1px solid var(--eos-line) !important; border-radius: var(--eos-radius) !important; box-shadow: var(--eos-shadow) !important; }
.card-title-custom, .panel-header, .permissions-header, .section-title { color: var(--eos-navy-900) !important; background: var(--eos-subtle) !important; border-color: var(--eos-line) !important; }
.stat-card-modern { background: #fff !important; border: 1px solid var(--eos-line) !important; border-radius: 13px !important; box-shadow: var(--eos-shadow) !important; }.stat-card-modern .stat-icon { color: #fff !important; background: var(--eos-navy-800) !important; border-radius: 10px !important; }.stat-card-modern .stat-value { color: var(--eos-navy-900) !important; }
.side-drawer { background: #fff !important; border-color: var(--eos-line) !important; box-shadow: -18px 0 50px rgba(7, 26, 50, .14) !important; }.drawer-header { color: #fff !important; background: var(--eos-navy-800) !important; }.drawer-tabs .tab-item.active { color: var(--eos-navy-700) !important; border-bottom-color: var(--eos-navy-700) !important; }
.permission-container .panel-header, .permission-container .permissions-header { color: #fff !important; background: var(--eos-navy-800) !important; }.group-item.selected, .group-item:hover { background: var(--eos-subtle) !important; border-color: var(--eos-line-strong) !important; }.selected-group-badge, .panel-badge { color: #fff !important; background: var(--eos-navy-700) !important; }
.network-map { overflow: hidden; border: 1px solid var(--eos-line) !important; border-radius: var(--eos-radius) !important; box-shadow: var(--eos-shadow); }.report-toolbar { color: #fff !important; background: var(--eos-navy-800) !important; border-color: var(--eos-navy-800) !important; }.report-viewer-wrapper, .report-iframe-wrapper { overflow: hidden; background: #fff !important; border: 1px solid var(--eos-line) !important; border-radius: var(--eos-radius) !important; box-shadow: var(--eos-shadow) !important; }

/* Login - white-first */
.auth-page { display: grid; grid-template-columns: minmax(420px, .92fr) minmax(480px, 1.08fr); width: 100%; min-height: 100dvh; background: #fff; }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 5vw, 76px); overflow: hidden; background: #fff; border-right: 1px solid var(--eos-line); }
.auth-brand-panel::after { content: ""; position: absolute; right: -180px; bottom: -190px; width: 460px; height: 460px; border: 72px solid #f2f6fa; border-radius: 50%; pointer-events: none; }
.auth-brand-content, .auth-copyright { position: relative; z-index: 1; }
.auth-brand-lockup { display: flex; align-items: center; gap: 12px; }.auth-brand-lockup > span, .auth-mobile-brand > span { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; background: var(--eos-navy-900); border-radius: 12px; box-shadow: 0 9px 22px rgba(7, 26, 50, .17); font-size: .78rem; font-weight: 900; letter-spacing: .05em; }.auth-brand-lockup > div { display: flex; flex-direction: column; }.auth-brand-lockup strong { color: var(--eos-navy-900); font-size: .92rem; font-weight: 850; }.auth-brand-lockup small { margin-top: 3px; color: var(--eos-muted); font-size: .57rem; }
.auth-brand-copy { max-width: 600px; margin-top: clamp(60px, 12vh, 125px); }.auth-overline { color: var(--eos-navy-600); font-size: .61rem; font-weight: 850; letter-spacing: .14em; }.auth-brand-copy h1 { margin: 12px 0 14px; color: var(--eos-navy-900); font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 860; letter-spacing: -.055em; line-height: 1.05; }.auth-brand-copy p { max-width: 540px; margin: 0; color: var(--eos-muted); font-size: .82rem; line-height: 1.7; }
.auth-feature-list { display: grid; gap: 13px; margin-top: 34px; }.auth-feature-list > div { display: grid; grid-template-columns: 40px 1fr; align-items: center; gap: 11px; }.auth-feature-list > div > span { display: grid; place-items: center; width: 40px; height: 40px; color: #fff; background: var(--eos-navy-800); border-radius: 10px; }.auth-feature-list > div > div { display: flex; flex-direction: column; }.auth-feature-list strong { color: var(--eos-text); font-size: .68rem; }.auth-feature-list small { margin-top: 2px; color: var(--eos-muted); font-size: .59rem; }
.auth-copyright { color: #8996a6; font-size: .58rem; }
.auth-form-panel { display: grid; place-items: center; padding: clamp(24px, 5vw, 70px); background: #fff; }
.auth-form-card { width: min(100%, 440px); }.auth-mobile-brand { display: none; }.auth-form-heading { margin-bottom: 27px; }.auth-form-heading h2 { margin: 8px 0 5px; color: var(--eos-navy-900); font-size: 1.6rem; font-weight: 850; letter-spacing: -.04em; }.auth-form-heading p { margin: 0; color: var(--eos-muted); font-size: .72rem; }
.auth-alert { display: flex; align-items: flex-start; gap: 9px; margin-bottom: 18px; padding: 11px 12px; color: #a52c45; background: #fff4f6; border: 1px solid #f4d8de; border-radius: 10px; font-size: .66rem; font-weight: 650; }
.auth-field { margin-bottom: 17px; }.auth-field label { display: block; margin-bottom: 7px; color: #344258; font-size: .68rem; font-weight: 750; }.auth-input { position: relative; display: flex; align-items: center; }.auth-input > i { position: absolute; left: 14px; color: #8493a6; }.auth-input input { width: 100%; min-height: 49px; padding: 0 14px 0 42px; color: var(--eos-text); background: #fff; border: 1px solid var(--eos-line-strong); border-radius: 10px; outline: none; font-size: .76rem; transition: .18s ease; }.auth-input input:focus { border-color: var(--eos-navy-600); box-shadow: 0 0 0 3px rgba(21, 94, 147, .09); }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 3px 0 22px; }.auth-options label { display: inline-flex; align-items: center; gap: 8px; color: var(--eos-muted); font-size: .66rem; cursor: pointer; }.auth-options input { width: 16px; height: 16px; accent-color: var(--eos-navy-800); }.auth-options button { padding: 0; color: var(--eos-navy-700); background: transparent; border: 0; font-size: .66rem; font-weight: 750; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 50px; color: #fff; background: var(--eos-navy-800); border: 1px solid var(--eos-navy-800); border-radius: 10px; box-shadow: 0 9px 22px rgba(11, 37, 69, .16); font-size: .72rem; font-weight: 800; transition: .18s ease; }.auth-submit:hover:not(:disabled) { background: var(--eos-navy-900); transform: translateY(-1px); }.auth-submit:disabled { opacity: .68; cursor: wait; }.auth-spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: eos-spin .7s linear infinite; }.auth-security { display: flex; justify-content: center; gap: 7px; margin-top: 19px; color: #8d99a9; font-size: .59rem; }.auth-security i { color: var(--eos-success); }

@keyframes eos-spin { to { transform: rotate(360deg); } }
@keyframes eos-enter { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
.is-spinning { animation: eos-spin .8s linear infinite; }

@media (max-width: 1199.98px) {
    .user-text-info { display: none; }
    .dashboard-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dashboard-chart-layout, .dashboard-bottom-layout { grid-template-columns: 1fr; }
    .dashboard-side-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 959.98px) {
    .mobile-menu-button { display: inline-grid !important; }
    .crm-premium-header.mud-appbar { padding: 0 12px !important; }
    .crm-page-shell { padding: 13px 12px 24px; }
    .topbar-eyebrow, .system-live { display: none; }
    .topbar-title-row h1 { font-size: .88rem; }
    .logout-button span { display: none; }.logout-button { width: 40px; padding: 0; }
    .crm-premium-sidebar.mud-drawer { box-shadow: 20px 0 50px rgba(7, 26, 50, .14) !important; }
    .modern-page-container, .modern-form-container, .customer-lookup-container, .permission-container { padding-inline: 0 !important; }
    .auth-page { grid-template-columns: 1fr; }.auth-brand-panel { display: none; }.auth-form-panel { min-height: 100dvh; }
    .auth-mobile-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }.auth-mobile-brand > span { width: 42px; height: 42px; }.auth-mobile-brand strong { color: var(--eos-navy-900); font-size: .86rem; }
}

@media (max-width: 767.98px) {
    .crm-premium-header.mud-appbar { height: 64px !important; min-height: 64px !important; }
    .crm-premium-main-content.mud-main-content { padding-top: 64px !important; }.crm-page-shell { min-height: calc(100dvh - 64px); }
    .topbar-actions .notification-button, .topbar-divider, .user-profile-wrapper { display: none; }
    .dashboard-page-header { align-items: flex-start; flex-direction: column; padding-bottom: 15px; }.dashboard-header-actions { width: 100%; justify-content: space-between; }.last-sync { white-space: normal; }
    .dashboard-metric-grid { gap: 10px; padding: 13px 0; }.dashboard-metric-card { padding: 14px; }
    .dashboard-surface { padding: 14px; }.surface-heading { flex-direction: column; }.surface-heading-row { align-items: flex-start; }.dashboard-chart-host { min-height: 280px; overflow-x: auto; }
    .dashboard-side-stack { grid-template-columns: 1fr; }
    .notifications-popover { top: 57px; right: 10px; }
    .permission-content { grid-template-columns: 1fr !important; }.groups-panel, .permissions-panel { width: 100% !important; }
    .form-grid-2, .form-grid-3, .main-form-layout-grid-2x2, .form-row-2cols, .form-row-two { grid-template-columns: 1fr !important; }.stat-grid-layout { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 519.98px) {
    .topbar-title-row h1 { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.topbar-actions > .eos-icon-button:first-child { display: none; }
    .dashboard-header-actions { align-items: stretch; flex-direction: column; }.navy-action-button { width: 100%; }
    .dashboard-metric-grid { grid-template-columns: 1fr; }.metric-card-value { font-size: 1.8rem; }
    .dashboard-surface { padding: 12px; border-radius: 12px; }.surface-badge { display: none; }
    .eos-panel-backdrop { padding: 12px; place-items: center; }.eos-command-panel { border-radius: 15px; }.command-panel-header { padding: 16px 16px 9px; }.command-search-shell { margin-inline: 16px; }.command-panel-footer { display: none; }
    .stat-grid-layout { grid-template-columns: 1fr !important; }
    .auth-form-panel { padding: 20px; }.auth-mobile-brand { margin-bottom: 34px; }.auth-form-heading h2 { font-size: 1.45rem; }.auth-options { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }
@media print { .crm-premium-header, .crm-premium-sidebar, .navy-action-button { display: none !important; }.crm-premium-main-content.mud-main-content { margin: 0 !important; padding: 0 !important; }.crm-page-shell { padding: 0 !important; } }
/* ===== Dashboard trung tâm giám sát ===== */
.ops-dashboard{min-height:100%;padding:clamp(18px,2.2vw,34px);background:#f6f8fb;color:#10233d}
.ops-hero{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:22px}
.ops-eyebrow,.ops-panel>header span:first-child{display:block;color:#44708f;font-size:.72rem;font-weight:800;letter-spacing:.12em}
.ops-hero h1{margin:5px 0 6px;color:#071a32;font-size:clamp(1.65rem,3vw,2.35rem);font-weight:800;letter-spacing:-.035em}
.ops-hero p,.ops-panel>header p{margin:0;color:#60738b}
.ops-sync{min-width:210px;padding:13px 16px;border:1px solid #dae4ec;border-radius:14px;background:#fff;box-shadow:0 5px 18px rgba(7,26,50,.05);display:grid;grid-template-columns:28px 1fr;column-gap:8px}
.ops-sync i{grid-row:1/3;color:#15803d;font-size:1.15rem}.ops-sync span{font-size:.72rem;color:#74869b}.ops-sync strong{font-size:.85rem;color:#173858}
.ops-filter-card{display:grid;grid-template-columns:minmax(190px,260px) minmax(220px,1fr) auto;gap:14px;align-items:end;padding:16px;margin-bottom:18px;border:1px solid #dde6ee;border-radius:16px;background:#fff;box-shadow:0 7px 24px rgba(7,26,50,.05)}
.ops-filter-card label{display:grid;gap:7px}.ops-filter-card label>span{font-size:.76rem;font-weight:700;color:#405773}.ops-filter-card input,.ops-filter-card select{height:43px;padding:0 12px;border:1px solid #cfdae5;border-radius:10px;background:#fff;color:#102d4d;outline:none}.ops-filter-card input:focus,.ops-filter-card select:focus{border-color:#1d5d89;box-shadow:0 0 0 3px rgba(29,93,137,.12)}
.ops-primary{height:43px;padding:0 18px;border:0;border-radius:10px;background:#0b2545;color:#fff;font-weight:700;box-shadow:0 7px 14px rgba(11,37,69,.18)}.ops-primary:disabled{opacity:.62}
.ops-tabs{display:flex;gap:5px;padding:5px;margin-bottom:22px;overflow-x:auto;border:1px solid #dde6ee;border-radius:14px;background:#fff}.ops-tabs button{white-space:nowrap;padding:10px 15px;border:0;border-radius:10px;background:transparent;color:#587089;font-weight:700}.ops-tabs button i{margin-right:8px}.ops-tabs button.active{background:#0b2545;color:#fff;box-shadow:0 5px 12px rgba(11,37,69,.2)}
.ops-tab-content{display:grid;gap:18px}.ops-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:14px}.ops-kpi-grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}
.ops-kpi{min-height:126px;padding:18px;border:1px solid #dee7ef;border-radius:16px;background:#fff;box-shadow:0 7px 22px rgba(7,26,50,.045);display:flex;gap:13px}.ops-kpi-icon{flex:0 0 42px;height:42px;display:grid;place-items:center;border-radius:12px;background:#eaf1f7;color:#0b3a67;font-size:1.1rem}.ops-kpi>div{min-width:0;display:grid;align-content:start}.ops-kpi>div>span{font-size:.78rem;font-weight:700;color:#667b91}.ops-kpi strong{margin:5px 0 2px;color:#071a32;font-size:clamp(1.25rem,2vw,1.75rem);line-height:1.1;overflow-wrap:anywhere}.ops-kpi small{color:#7a8b9d;font-size:.72rem}.ops-kpi.green .ops-kpi-icon{background:#e9f8ef;color:#15803d}.ops-kpi.orange .ops-kpi-icon{background:#fff5df;color:#c56a08}.ops-kpi.red .ops-kpi-icon{background:#fff0f0;color:#c92a2a}
.ops-two-column{display:grid;grid-template-columns:minmax(0,2fr) minmax(280px,.8fr);gap:18px}.ops-chart-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.ops-panel{min-width:0;padding:20px;border:1px solid #dde6ee;border-radius:17px;background:#fff;box-shadow:0 8px 26px rgba(7,26,50,.05)}.ops-panel>header{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:16px}.ops-panel>header h2{margin:3px 0 4px;color:#0b2545;font-size:1.08rem;font-weight:800}.ops-panel>header p{font-size:.8rem}.ops-live{white-space:nowrap;padding:5px 8px!important;border-radius:99px;background:#eff8f2;color:#257447!important;font-size:.68rem!important;letter-spacing:0!important}.ops-live i{display:inline-block;width:6px;height:6px;margin-right:5px;border-radius:50%;background:#22a05a}
.ops-chart{width:100%;min-height:335px;overflow:hidden}.ops-chart .apexcharts-canvas{max-width:100%!important;margin:auto}
.ops-alerts{align-self:start;display:flex;flex-direction:column;height:max-content;min-height:0}
.ops-alert-row{display:grid;grid-template-columns:38px minmax(0,1fr);align-items:center;column-gap:12px;padding:12px 0;border-bottom:1px solid #edf1f5}
.ops-alert-row:last-child{border-bottom:0;padding-bottom:0}
.ops-alert-row>i{display:grid;width:38px;height:38px;place-items:center;border-radius:9px;font-size:16px;line-height:1}
.ops-alert-row .ops-alert-copy{display:flex;min-width:0;flex-direction:column;gap:3px}
.ops-alert-row .ops-alert-copy strong{display:block;color:#203a55;font-size:14px;font-weight:700;line-height:1.35;overflow-wrap:anywhere}
.ops-alert-row .ops-alert-copy span{display:block;color:#61768b;font-size:12px;line-height:1.45;overflow-wrap:anywhere}
.ops-alert-row.ops-alert-red>i{color:#c92a2a;background:#fff0f0}
.ops-alert-row.ops-alert-orange>i{color:#bd6508;background:#fff5df}
.ops-alert-row.ops-alert-navy>i{color:#0b3a67;background:#eaf1f7}
.ops-map{height:370px;border-radius:13px;background:#eaf0f4;overflow:hidden}.ops-map-note{margin:10px 0 0;color:#6b7e91;font-size:.8rem}.ops-state{min-height:360px;display:grid;place-items:center;align-content:center;gap:7px;border:1px solid #dde6ee;border-radius:17px;background:#fff;text-align:center}.ops-state strong{color:#0b2545}.ops-state p{color:#6d8094}.ops-error>i{font-size:2rem;color:#c92a2a}
html,body{min-height:100%!important;height:auto!important;overflow-y:auto!important}.crm-premium-main-content,.crm-page-shell,.ops-dashboard{height:auto!important;overflow:visible!important}
@media(max-width:1100px){.ops-kpi-grid,.ops-kpi-grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.ops-two-column,.ops-chart-grid{grid-template-columns:1fr}}
@media(max-width:720px){.ops-dashboard{padding:14px}.ops-hero{display:grid}.ops-sync{width:100%}.ops-filter-card{grid-template-columns:1fr}.ops-filter-card .ops-primary{width:100%}.ops-tabs{margin-left:-2px;margin-right:-2px}.ops-kpi-grid,.ops-kpi-grid.four{grid-template-columns:1fr 1fr;gap:10px}.ops-kpi{min-height:112px;padding:13px;display:grid}.ops-kpi-icon{width:38px;height:38px}.ops-panel{padding:15px}.ops-chart{min-height:300px}.ops-map{height:330px}}
@media(max-width:720px){.ops-alert-row{grid-template-columns:36px minmax(0,1fr);column-gap:10px}.ops-alert-row>i{width:36px;height:36px}}
@media(max-width:430px){.ops-kpi-grid,.ops-kpi-grid.four{grid-template-columns:1fr}.ops-panel>header{display:grid}}
