:root {
    --mq-sidebar: #081c24;
    --mq-sidebar-2: #0d2f3a;
    --mq-primary: #0f766e;
    --mq-primary-700: #0f4c5c;
    --mq-primary-50: #e8f7f5;
    --mq-purple: #6f3fd6;
    --mq-bg: #f3f7fa;
    --mq-surface: #ffffff;
    --mq-surface-soft: #f8fbfd;
    --mq-border: #d7e3eb;
    --mq-border-strong: #bed0dc;
    --mq-text: #12202f;
    --mq-muted: #64748b;
    --mq-success: #15803d;
    --mq-warning: #b45309;
    --mq-danger: #b91c1c;
    --mq-info: #2563eb;
    --mq-radius: 8px;
    --mq-shadow: 0 12px 30px rgba(15, 76, 92, .08);
    --mq-shadow-sm: 0 4px 14px rgba(15, 76, 92, .06);
}

html,
body {
    background: var(--mq-bg);
    color: var(--mq-text);
    font-family: "Segoe UI", "Inter", Arial, sans-serif;
    min-width: 0;
}

body {
    overflow-y: scroll;
}

.app-shell {
    display: grid;
    grid-template-columns: 272px minmax(0, 1fr);
    min-height: 100vh;
}

.app-sidebar {
    background:
        linear-gradient(180deg, rgba(8, 28, 36, .98), rgba(10, 37, 47, .98)),
        radial-gradient(circle at top left, rgba(111, 63, 214, .22), transparent 34%);
    border-right: 1px solid rgba(255, 255, 255, .08);
    height: 100vh;
    overflow-y: auto;
    padding: 18px 12px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.sidebar-mobile-head {
    display: none;
}

.sidebar-desktop-brand {
    display: block;
}

.sidebar-close,
.mobile-menu-button,
.sidebar-backdrop {
    display: none;
}

.brand {
    gap: 12px;
    padding: 8px 8px 18px;
}

.brand-logo {
    width: 46px;
    height: 46px;
    border-radius: 10px;
    object-fit: cover;
    background: #fff;
    box-shadow: 0 10px 24px rgba(111, 63, 214, .26);
}

.brand-copy {
    min-width: 0;
}

.brand-title {
    color: #fff;
    font-size: 19px;
    letter-spacing: 0;
    line-height: 1.1;
}

.brand-subtitle {
    color: #c7d6df;
    font-size: 12px;
    margin-top: 3px;
}

.nav-section {
    color: #8fb2c0;
    margin-top: 17px;
}

.nav-link {
    border-radius: var(--mq-radius);
    color: #e7f3f7;
    min-height: 40px;
}

.nav-link.active {
    background: rgba(45, 212, 191, .18);
    border-left-color: #7dd3fc;
    box-shadow: inset 0 0 0 1px rgba(125, 211, 252, .12);
}

.nav-icon {
    background: rgba(255, 255, 255, .11);
    color: #ccfbf1;
}

.topbar {
    align-items: center;
    display: flex;
    gap: 18px;
    justify-content: space-between;
    min-height: 72px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, .94);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 20;
}

.topbar-context {
    min-width: 0;
}

.breadcrumb {
    color: var(--mq-primary-700);
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 2px;
}

.topbar-title {
    color: var(--mq-text);
    font-size: 17px;
}

.topbar-subtitle {
    color: var(--mq-muted);
}

.topbar-user {
    align-items: center;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.global-search {
    align-items: center;
    background: var(--mq-surface-soft);
    border: 1px solid var(--mq-border);
    border-radius: 999px;
    display: flex;
    gap: 8px;
    min-height: 38px;
    padding: 0 12px;
}

.global-search span {
    color: var(--mq-primary-700);
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.global-search input {
    background: transparent;
    border: 0;
    min-width: 230px;
    outline: 0;
}

.user-chip {
    border-radius: 999px;
    box-shadow: var(--mq-shadow-sm);
}

.content {
    padding: 22px;
    min-width: 0;
}

.page-header,
.dashboard-header {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.page-header {
    align-items: flex-start;
    margin-bottom: 16px;
}

.page-header-copy {
    min-width: 0;
}

.page-header-actions {
    display: flex;
    justify-content: flex-end;
}

.eyebrow {
    color: var(--mq-primary);
    letter-spacing: .01em;
    text-transform: none;
}

h1 {
    color: var(--mq-text);
    font-size: 28px;
    line-height: 1.18;
}

.lead {
    color: var(--mq-muted);
    max-width: 840px;
}

.hero-panel,
.empty-state,
.login-card,
.login-hero,
.status-panel,
.filter-panel,
.table-panel,
.kpi-card,
.menu-group {
    border-color: var(--mq-border);
    border-radius: var(--mq-radius);
    box-shadow: var(--mq-shadow-sm);
}

.hero-panel,
.login-page {
    min-height: calc(100vh - 118px);
}

.login-page {
    grid-template-columns: minmax(360px, .92fr) minmax(380px, .72fr);
}

.login-hero {
    background:
        linear-gradient(90deg, rgba(5, 13, 32, .86), rgba(10, 29, 42, .78)),
        url("brand/logoMQ_new.png") center / cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 560px;
}

.login-hero h1,
.login-hero .eyebrow,
.login-hero .lead {
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.login-hero .lead {
    color: #e8f7ff;
}

.login-card {
    align-self: center;
    padding: 28px;
}

.login-brand .brand-logo {
    width: 58px;
    height: 58px;
}

.login-brand {
    margin-bottom: 12px;
}

.login-brand-inline {
    align-items: center;
    border: 0;
    display: flex;
    gap: 12px;
    padding: 0;
}

.login-brand-inline .brand-title {
    color: var(--mq-text);
}

.login-brand-inline .brand-subtitle {
    color: var(--mq-muted);
}

.login-intro {
    border-bottom: 1px solid var(--mq-border);
    margin-bottom: 18px;
    padding-bottom: 16px;
}

.login-intro h1 {
    font-size: 24px;
    margin-bottom: 4px;
}

.login-intro p {
    color: var(--mq-muted);
    margin: 0;
}

.filter-panel {
    background: var(--mq-surface);
    border-top: 3px solid var(--mq-primary);
    gap: 12px;
}

.field label,
.check-field {
    color: #263a4d;
}

.phis-input,
.form-control,
.form-select {
    border-color: var(--mq-border-strong);
}

.phis-input:focus,
.form-control:focus,
.form-select:focus {
    border-color: var(--mq-primary);
    box-shadow: 0 0 0 .18rem rgba(15, 118, 110, .14);
}

.primary-action,
.secondary-action,
.icon-button,
.mini-action,
.mode-switch button {
    border-radius: var(--mq-radius);
    transition: background .14s ease, border-color .14s ease, transform .14s ease;
}

.primary-action {
    background: var(--mq-primary);
}

.primary-action:hover {
    background: var(--mq-primary-700);
}

.secondary-action,
.icon-button {
    background: #e8eef4;
    color: #1d2d3a;
}

.mode-switch {
    border-radius: 10px;
    box-shadow: var(--mq-shadow-sm);
}

.mode-switch button,
.mode-button {
    min-height: 34px;
    border: 0;
    border-radius: 7px;
    padding: 0 13px;
    background: transparent;
    color: var(--mq-muted);
    font-weight: 900;
}

.mode-switch button.active,
.mode-button.active {
    background: var(--mq-primary);
    color: #fff;
}

.kpi-grid {
    gap: 12px;
}

.kpi-card {
    border-top: 0;
    box-shadow: var(--mq-shadow-sm);
    padding: 16px 18px;
    position: relative;
}

.kpi-card::before {
    background: linear-gradient(180deg, var(--mq-primary), #7dd3fc);
    border-radius: 99px;
    content: "";
    height: calc(100% - 24px);
    left: 0;
    position: absolute;
    top: 12px;
    width: 4px;
}

.kpi-card strong {
    color: #0d2f3a;
    font-size: 24px;
}

.kpi-card small {
    color: var(--mq-muted);
    display: block;
    font-size: 12px;
    margin-top: 5px;
}

.table-panel {
    background: var(--mq-surface);
}

.table-title {
    background: linear-gradient(180deg, #fff, #f8fbfd);
}

.table-title h2 {
    color: var(--mq-text);
}

.data-table-wrap {
    scrollbar-color: #94a3b8 #edf2f7;
}

.data-table {
    color: #142536;
}

.data-table th {
    background: #edf5f8;
    color: #203647;
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.data-table td {
    line-height: 1.35;
}

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

.data-table tbody tr:hover {
    background: #e8f7f5;
}

.data-table td:first-child,
.data-table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
}

.data-table th:first-child {
    z-index: 3;
}

.data-table td:first-child {
    background: inherit;
}

.data-table .num {
    font-variant-numeric: tabular-nums;
}

.data-table .strong {
    color: var(--mq-primary-700);
}

.status-badge,
.badge {
    align-items: center;
    border-radius: 999px;
    display: inline-flex !important;
    font-size: 12px;
    font-weight: 900;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
}

.status-badge.neutral,
.badge.neutral {
    background: #e5e7eb;
    color: #334155;
}

.status-badge.success,
.status-badge.yes,
.badge.success {
    background: #dcfce7;
    color: #166534;
}

.status-badge.warning,
.status-badge.warn,
.badge.warning {
    background: #fffbeb;
    color: var(--mq-warning);
}

.status-badge.danger,
.badge.danger {
    background: #fee2e2;
    color: var(--mq-danger);
}

.empty-state {
    text-align: left;
}

.empty-state-icon {
    background: var(--mq-primary-50);
    border-radius: 10px;
    color: var(--mq-primary-700);
    display: grid;
    font-weight: 900;
    height: 44px;
    margin-bottom: 14px;
    place-items: center;
    width: 44px;
}

.loading-skeleton {
    display: grid;
    gap: 10px;
    padding: 14px;
}

.loading-skeleton span {
    animation: mq-pulse 1.2s ease-in-out infinite;
    background: linear-gradient(90deg, #eef4f7, #f8fbfd, #eef4f7);
    border-radius: 8px;
    height: 38px;
}

.qr-label {
    background: #fff;
    border-color: #cbd5e1;
    grid-template-columns: 272px minmax(0, 1fr);
    min-height: 292px;
}

.qr-code {
    background: #fff;
    border: 0;
    padding: 16px;
}

.qr-code img {
    background: #fff;
    display: block;
    height: 240px;
    image-rendering: pixelated;
    width: 240px;
}

.qr-text strong {
    color: #0f172a;
    font-size: 18px;
}

.qr-text span {
    color: #1e293b;
    font-size: 13px;
}

@media print {
    .qr-label {
        border: 0;
        grid-template-columns: 286px minmax(0, 1fr);
        min-height: 310px;
        padding: 18px;
    }

    .qr-code {
        padding: 18px;
    }

    .qr-code img {
        height: 250px;
        width: 250px;
    }
}

.mq-login-page {
    align-items: stretch;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(620px, 1.25fr) minmax(430px, .78fr);
    min-height: calc(100vh - 148px);
}

.mq-login-showcase,
.mq-login-card {
    background: #fff;
    border: 1px solid var(--mq-border);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(15, 76, 92, .08);
}

.mq-login-showcase {
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    padding: 44px 0 0;
    position: relative;
}

.mq-login-showcase::before {
    background:
        radial-gradient(circle at 20% 20%, rgba(45, 212, 191, .18), transparent 34%),
        radial-gradient(circle at 85% 30%, rgba(37, 99, 235, .10), transparent 28%);
    content: "";
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.mq-login-showcase::after {
    background-image: radial-gradient(rgba(15, 118, 110, .14) 1px, transparent 1px);
    background-size: 14px 14px;
    content: "";
    height: 180px;
    left: 40px;
    opacity: .55;
    position: absolute;
    top: 32px;
    width: 260px;
}

.mq-login-copy,
.mq-showcase-body,
.mq-login-stats {
    position: relative;
    z-index: 1;
}

.mq-login-copy {
    padding: 0 54px;
}

.mq-login-copy h1 {
    color: #123b7a;
    font-size: 54px;
    font-weight: 900;
    line-height: 1;
    margin: 0 0 12px;
}

.mq-login-copy h2 {
    color: var(--mq-primary);
    font-size: 36px;
    font-weight: 900;
    line-height: 1.16;
    margin: 0 0 20px;
}

.mq-login-copy .lead {
    color: #64748b;
    font-size: 17px;
    line-height: 1.75;
    max-width: 500px;
}

.mq-showcase-body {
    align-items: center;
    display: grid;
    gap: 28px;
    grid-template-columns: minmax(250px, .72fr) minmax(320px, 1fr);
    padding: 8px 48px 28px 54px;
}

.mq-feature-list {
    display: grid;
    gap: 20px;
}

.mq-feature-item {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: 68px minmax(0, 1fr);
}

.mq-feature-item strong {
    color: #17243a;
    display: block;
    font-size: 16px;
    margin-bottom: 6px;
}

.mq-feature-item p {
    color: #64748b;
    line-height: 1.55;
    margin: 0;
}

.feature-icon,
.stat-icon,
.login-lock-icon,
.input-icon,
.button-shield {
    display: inline-grid;
    place-items: center;
}

.feature-icon {
    background: linear-gradient(145deg, #ecfffb, #ffffff);
    border: 1px solid #d5f3ef;
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(15, 118, 110, .10);
    height: 62px;
    position: relative;
    width: 62px;
}

.feature-icon::before,
.feature-icon::after,
.stat-icon::before,
.login-lock-icon::before,
.input-icon::before,
.button-shield::before {
    content: "";
    display: block;
}

.feature-grid::before {
    border: 3px solid var(--mq-primary);
    box-shadow: 16px 0 0 -3px #fff, 16px 0 0 0 var(--mq-primary), 0 16px 0 -3px #fff, 0 16px 0 0 var(--mq-primary), 16px 16px 0 -3px #fff, 16px 16px 0 0 var(--mq-primary);
    height: 10px;
    width: 10px;
}

.feature-shield::before,
.stat-safe::before,
.button-shield::before {
    border: 3px solid var(--mq-primary);
    border-radius: 12px 12px 16px 16px;
    height: 24px;
    width: 22px;
}

.feature-shield::after,
.stat-safe::after {
    border-bottom: 3px solid var(--mq-primary);
    border-left: 3px solid var(--mq-primary);
    height: 8px;
    position: absolute;
    transform: rotate(-45deg);
    width: 15px;
}

.feature-chart::before {
    border-bottom: 3px solid var(--mq-primary);
    border-left: 3px solid var(--mq-primary);
    height: 24px;
    width: 28px;
}

.feature-chart::after {
    background: var(--mq-primary);
    box-shadow: 9px -8px 0 var(--mq-primary), 18px -16px 0 var(--mq-primary);
    height: 8px;
    position: absolute;
    top: 34px;
    width: 5px;
}

.mq-medical-visual {
    min-height: 390px;
    position: relative;
}

.mq-medical-visual::before {
    border: 1px solid rgba(15, 118, 110, .18);
    border-radius: 50%;
    bottom: 16px;
    content: "";
    height: 260px;
    left: 20px;
    position: absolute;
    width: 420px;
}

.monitor {
    background: linear-gradient(145deg, #0f766e, #0d3d4a);
    border-radius: 28px;
    box-shadow: 0 28px 48px rgba(15, 76, 92, .25);
    height: 250px;
    left: 74px;
    padding: 18px;
    position: absolute;
    top: 16px;
    transform: rotate(3deg);
    width: 330px;
}

.monitor::before {
    background: linear-gradient(145deg, #f8ffff, #e9f4fb);
    border-radius: 18px;
    content: "";
    inset: 17px;
    position: absolute;
}

.monitor-top,
.monitor-card,
.monitor-bars {
    position: absolute;
    z-index: 1;
}

.monitor-top {
    background: #e2eef5;
    border-radius: 10px;
    height: 42px;
    left: 40px;
    top: 44px;
    width: 190px;
}

.monitor-card {
    background: linear-gradient(145deg, #2dd4bf, #0f766e);
    border-radius: 14px;
    height: 78px;
    left: 46px;
    top: 108px;
    width: 96px;
}

.monitor-card::before,
.monitor-card::after {
    background: #fff;
    border-radius: 2px;
    content: "";
    left: 43px;
    position: absolute;
    top: 21px;
}

.monitor-card::before {
    height: 36px;
    width: 10px;
}

.monitor-card::after {
    height: 10px;
    left: 30px;
    top: 34px;
    width: 36px;
}

.monitor-bars {
    align-items: end;
    display: flex;
    gap: 8px;
    height: 80px;
    right: 48px;
    top: 108px;
}

.monitor-bars i {
    background: #0f766e;
    border-radius: 6px 6px 0 0;
    display: block;
    width: 14px;
}

.monitor-bars i:nth-child(1) { height: 36px; }
.monitor-bars i:nth-child(2) { height: 58px; }
.monitor-bars i:nth-child(3) { height: 76px; }

.monitor-base {
    background: #0d3d4a;
    border-radius: 0 0 20px 20px;
    bottom: -48px;
    height: 64px;
    left: 124px;
    position: absolute;
    width: 90px;
}

.medicine-box,
.medicine-bottle,
.pill-card {
    position: absolute;
    z-index: 2;
}

.medicine-box {
    background: linear-gradient(145deg, #d8e4f4, #eef5ff);
    border-radius: 16px;
    box-shadow: 0 20px 36px rgba(30, 64, 175, .14);
    height: 108px;
    left: 78px;
    top: 228px;
    width: 116px;
}

.medicine-bottle {
    background: linear-gradient(180deg, #ffffff, #dff7f3);
    border: 1px solid #d3eef0;
    border-radius: 22px;
    box-shadow: 0 20px 34px rgba(15, 118, 110, .16);
    height: 138px;
    left: 8px;
    top: 220px;
    width: 82px;
}

.medicine-bottle::before {
    background: #e5edf4;
    border-radius: 12px 12px 4px 4px;
    content: "";
    height: 24px;
    left: 20px;
    position: absolute;
    top: -20px;
    width: 42px;
}

.medicine-bottle::after {
    background: var(--mq-primary);
    border-radius: 14px;
    color: #fff;
    content: "+";
    display: grid;
    font-size: 42px;
    font-weight: 900;
    height: 58px;
    left: 12px;
    place-items: center;
    position: absolute;
    top: 52px;
    width: 58px;
}

.pill-card {
    background: #f8fbfd;
    border: 1px solid #d8e4ee;
    border-radius: 16px;
    bottom: 16px;
    box-shadow: 0 16px 28px rgba(15, 76, 92, .12);
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(2, 34px);
    left: 162px;
    padding: 14px;
    transform: rotate(9deg);
}

.pill-card i {
    background: linear-gradient(145deg, #fff, #dbe8f3);
    border-radius: 999px;
    display: block;
    height: 18px;
}

.mq-login-stats {
    background: rgba(255, 255, 255, .92);
    border-top: 1px solid #e2edf4;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 22px 56px;
}

.mq-login-stats div {
    align-items: center;
    display: grid;
    gap: 0 14px;
    grid-template-columns: 48px 1fr;
}

.mq-login-stats div + div {
    border-left: 1px solid #dce8f0;
    padding-left: 34px;
}

.stat-icon {
    background: #e8f7f5;
    border-radius: 999px;
    grid-row: span 2;
    height: 48px;
    position: relative;
    width: 48px;
}

.stat-icon::before {
    border-color: var(--mq-primary);
}

.stat-box::before {
    border: 3px solid var(--mq-primary);
    border-radius: 5px;
    height: 20px;
    transform: rotate(45deg);
    width: 20px;
}

.stat-users::before {
    border: 3px solid var(--mq-primary);
    border-radius: 999px;
    height: 16px;
    width: 16px;
}

.stat-users::after {
    border: 3px solid var(--mq-primary);
    border-radius: 999px 999px 0 0;
    border-bottom: 0;
    content: "";
    height: 13px;
    position: absolute;
    top: 27px;
    width: 28px;
}

.mq-login-stats strong {
    color: var(--mq-primary);
    font-size: 24px;
    font-weight: 900;
}

.mq-login-stats p {
    color: #64748b;
    margin: 0;
}

.mq-login-card {
    align-self: center;
    padding: 42px 44px;
}

.login-card-heading {
    align-items: center;
    display: grid;
    gap: 24px;
    grid-template-columns: 82px minmax(0, 1fr);
    margin-bottom: 32px;
}

.login-card-heading h1 {
    font-size: 30px;
    font-weight: 900;
    margin: 0 0 8px;
}

.login-card-heading p {
    color: #64748b;
    font-size: 16px;
    line-height: 1.55;
    margin: 0;
}

.login-lock-icon {
    background: #e8f7f5;
    border: 1px solid #c8efea;
    border-radius: 999px;
    height: 82px;
    position: relative;
    width: 82px;
}

.login-lock-icon::before,
.lock-icon::before {
    border: 3px solid var(--mq-primary);
    border-radius: 4px;
    height: 18px;
    width: 22px;
}

.login-lock-icon::after,
.lock-icon::after {
    border: 3px solid var(--mq-primary);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    content: "";
    height: 16px;
    position: absolute;
    top: 24px;
    width: 18px;
}

.input-with-icon {
    align-items: center;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    position: relative;
}

.input-with-icon .phis-input {
    grid-column: 1 / -1;
    min-height: 50px;
    padding-left: 44px;
    padding-right: 74px;
}

.input-with-icon .form-select {
    padding-right: 40px;
}

.input-icon {
    height: 50px;
    left: 0;
    pointer-events: none;
    position: absolute;
    top: 0;
    width: 44px;
    z-index: 2;
}

.user-icon::before {
    border: 2px solid #64748b;
    border-radius: 999px;
    height: 10px;
    margin-top: -9px;
    width: 10px;
}

.user-icon::after {
    border: 2px solid #64748b;
    border-radius: 999px 999px 0 0;
    border-bottom: 0;
    content: "";
    height: 10px;
    position: absolute;
    top: 28px;
    width: 20px;
}

.building-icon::before {
    border: 2px solid #64748b;
    height: 22px;
    width: 18px;
}

.building-icon::after {
    background: #64748b;
    box-shadow: 0 6px 0 #64748b, 7px 0 0 #64748b, 7px 6px 0 #64748b;
    content: "";
    height: 3px;
    position: absolute;
    width: 3px;
}

.input-ghost-button {
    background: transparent;
    border: 0;
    color: var(--mq-primary-700);
    font-weight: 800;
    min-height: 50px;
    padding: 0 16px;
    position: absolute;
    right: 0;
}

.login-options {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin: 18px 0 4px;
}

.remember-check {
    align-items: center;
    color: #334155;
    display: flex;
    gap: 8px;
}

.login-options a {
    color: #2563eb;
    font-weight: 800;
    text-decoration: none;
}

.login-button {
    align-items: center;
    display: inline-flex;
    gap: 9px;
    justify-content: center;
    min-height: 52px;
}

.button-shield {
    height: 18px;
    width: 18px;
}

.button-shield::before {
    border-color: #fff;
    height: 16px;
    width: 14px;
}

.login-divider {
    align-items: center;
    color: #94a3b8;
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr auto 1fr;
    margin: 28px 0 22px;
}

.login-divider::before,
.login-divider::after {
    background: #dbe6ee;
    content: "";
    height: 1px;
}

.login-provider-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, 1fr);
}

.login-provider-grid .secondary-action {
    background: #fff;
    border: 1px solid var(--mq-border);
    color: #0f1f39;
    min-height: 52px;
}

.login-footer {
    color: #64748b;
    display: flex;
    justify-content: space-between;
    padding: 18px 0 0;
}

@media (max-width: 1400px) {
    .mq-login-page {
        grid-template-columns: minmax(520px, 1fr) minmax(400px, .82fr);
    }

    .mq-login-copy {
        padding: 0 42px;
    }

    .mq-showcase-body {
        padding-left: 42px;
        padding-right: 34px;
    }
}

@media (max-width: 1180px) {
    .mq-login-page {
        grid-template-columns: 1fr;
    }

    .mq-login-card {
        align-self: stretch;
    }
}

@media (max-width: 720px) {
    .brand-logo {
        height: 48px;
        width: 48px;
    }

    .brand-title {
        font-size: 20px;
    }

    .nav-link {
        font-size: 16px;
        min-height: 48px;
    }

    .nav-icon {
        min-width: 34px;
    }

    .mq-login-page {
        gap: 14px;
        min-height: auto;
    }

    .mq-login-showcase {
        padding-top: 24px;
    }

    .mq-login-copy {
        padding: 0 22px;
    }

    .mq-login-copy h1 {
        font-size: 38px;
    }

    .mq-login-copy h2 {
        font-size: 26px;
    }

    .mq-feature-item {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .feature-icon {
        height: 52px;
        width: 52px;
    }

    .mq-login-card {
        padding: 24px 20px;
    }

    .login-card-heading {
        gap: 14px;
        grid-template-columns: 62px minmax(0, 1fr);
        margin-bottom: 22px;
    }

    .login-lock-icon {
        height: 62px;
        width: 62px;
    }

    .login-card-heading h1 {
        font-size: 24px;
    }

    .mq-showcase-body,
    .mq-login-stats {
        grid-template-columns: 1fr;
    }

    .mq-medical-visual {
        display: none;
    }

    .mq-login-stats div + div {
        border-left: 0;
        border-top: 1px solid #dce8f0;
        padding-left: 0;
        padding-top: 14px;
    }

    .login-provider-grid {
        grid-template-columns: 1fr;
    }

    .login-footer {
        display: grid;
        gap: 8px;
    }
}

@keyframes mq-pulse {
    0%, 100% { opacity: .58; }
    50% { opacity: 1; }
}

@media (max-width: 1280px) {
    .global-search input {
        min-width: 160px;
    }
}

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

    .app-sidebar {
        bottom: 0;
        box-shadow: 18px 0 40px rgba(2, 6, 23, .28);
        height: 100dvh;
        left: 0;
        max-width: min(86vw, 340px);
        overflow-y: auto;
        padding: 14px 12px 24px;
        position: fixed;
        top: 0;
        transform: translateX(-104%);
        transition: transform .2s ease;
        width: min(86vw, 340px);
        z-index: 80;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }

    .sidebar-mobile-head {
        align-items: center;
        display: flex;
        justify-content: space-between;
        gap: 10px;
    }

    .sidebar-desktop-brand {
        display: none;
    }

    .sidebar-close {
        align-items: center;
        background: rgba(255, 255, 255, .10);
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 10px;
        color: #fff;
        display: inline-flex;
        font-size: 28px;
        height: 42px;
        justify-content: center;
        line-height: 1;
        width: 42px;
    }

    .sidebar-backdrop {
        background: rgba(15, 23, 42, .42);
        border: 0;
        display: block;
        inset: 0;
        position: fixed;
        z-index: 70;
    }

    .topbar {
        align-items: center;
        min-height: 64px;
        padding: 10px 14px;
        position: sticky;
    }

    .mobile-menu-button {
        align-items: center;
        background: #fff;
        border: 1px solid var(--mq-border);
        border-radius: 12px;
        box-shadow: var(--mq-shadow-sm);
        display: inline-flex;
        flex-direction: column;
        gap: 4px;
        height: 42px;
        justify-content: center;
        min-width: 42px;
    }

    .mobile-menu-button span {
        background: var(--mq-primary-700);
        border-radius: 99px;
        display: block;
        height: 2px;
        width: 18px;
    }

    .topbar-title {
        font-size: 14px;
    }

    .topbar-subtitle,
    .breadcrumb {
        display: none;
    }

    .topbar-user {
        margin-left: auto;
    }

    .topbar-link {
        white-space: nowrap;
    }

    .user-chip {
        max-width: 150px;
    }

    .user-chip div {
        min-width: 0;
    }

    .user-chip strong,
    .user-chip span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .global-search {
        display: none;
    }

    .login-page,
    .hero-panel {
        min-height: auto;
    }

    .content {
        padding: 14px;
    }

    h1 {
        font-size: 24px;
    }

    .page-header {
        display: grid;
        gap: 12px;
    }

    .page-header-actions,
    .mode-switch {
        justify-content: flex-start;
        max-width: 100%;
        overflow-x: auto;
    }

    .filter-panel {
        grid-template-columns: 1fr !important;
    }

    .kpi-grid {
        grid-template-columns: 1fr !important;
    }

    .table-panel {
        overflow: hidden;
    }

    .data-table {
        min-width: 860px;
    }
}

.exec-dashboard {
    display: grid;
    gap: 18px;
}

.exec-page-heading {
    align-items: start;
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.exec-page-heading h1 {
    font-size: 28px;
    font-weight: 900;
    margin: 0 0 5px;
}

.exec-page-heading .lead {
    margin: 0;
}

.exec-heading-actions {
    align-items: center;
    display: flex;
    gap: 14px;
}

.notification-bell {
    background: #fff;
    border: 1px solid var(--mq-border);
    border-radius: 999px;
    box-shadow: var(--mq-shadow-sm);
    color: #ef4444;
    display: grid;
    font-weight: 900;
    height: 38px;
    place-items: center;
    position: relative;
    width: 38px;
}

.notification-bell::before {
    content: "!";
}

.notification-bell::after {
    background: #ef4444;
    border-radius: 999px;
    color: #fff;
    content: attr(class);
    display: none;
}

.exec-user-mini {
    background: #fff;
    border: 1px solid var(--mq-border);
    border-radius: 999px;
    box-shadow: var(--mq-shadow-sm);
    padding: 8px 16px;
}

.exec-user-mini strong,
.exec-user-mini span {
    display: block;
    white-space: nowrap;
}

.exec-user-mini span {
    color: var(--mq-muted);
    font-size: 12px;
}

.exec-filter-bar {
    align-items: end;
    background: #fff;
    border: 1px solid var(--mq-border);
    border-radius: 14px;
    box-shadow: var(--mq-shadow-sm);
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr 1fr 1.25fr auto;
    padding: 16px;
}

.date-range-box {
    align-items: center;
    border: 1px solid var(--mq-border-strong);
    border-radius: 8px;
    color: #334155;
    display: flex;
    min-height: 40px;
    padding: 0 12px;
}

.exec-filter-actions {
    display: flex;
    gap: 10px;
}

.exec-kpi-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.exec-kpi-card {
    align-items: center;
    background: #fff;
    border: 1px solid var(--mq-border);
    border-radius: 14px;
    box-shadow: var(--mq-shadow-sm);
    display: grid;
    gap: 14px;
    grid-template-columns: 58px minmax(0, 1fr);
    min-height: 126px;
    padding: 18px;
}

.exec-kpi-card span {
    color: #334155;
    display: block;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.exec-kpi-card strong {
    color: #0f1f39;
    display: inline-block;
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    font-weight: 900;
    line-height: 1.1;
    margin-top: 8px;
}

.exec-kpi-card small {
    color: #1e3a8a;
    font-size: 12px;
    margin-left: 4px;
}

.exec-kpi-card p {
    font-size: 12px;
    font-weight: 800;
    margin: 12px 0 0;
}

.exec-kpi-card.success p,
.exec-kpi-card.info p,
.exec-kpi-card.purple p,
.exec-kpi-card.warning p {
    color: #16a34a;
}

.exec-kpi-card.danger p {
    color: #ef4444;
}

.exec-kpi-icon {
    border-radius: 12px;
    display: grid;
    height: 52px;
    place-items: center;
    position: relative;
    width: 52px;
}

.exec-kpi-card.success .exec-kpi-icon { background: linear-gradient(145deg, #34d399, #0f766e); }
.exec-kpi-card.info .exec-kpi-icon { background: linear-gradient(145deg, #60a5fa, #2563eb); }
.exec-kpi-card.purple .exec-kpi-icon { background: linear-gradient(145deg, #a78bfa, #7c3aed); }
.exec-kpi-card.warning .exec-kpi-icon { background: linear-gradient(145deg, #fbbf24, #f59e0b); }
.exec-kpi-card.danger .exec-kpi-icon { background: linear-gradient(145deg, #fb7185, #ef4444); }

.exec-kpi-icon::before {
    color: #fff;
    content: "•";
    font-size: 34px;
    font-weight: 900;
}

.exec-grid-main {
    display: grid;
    gap: 14px;
    grid-template-columns: 1.28fr 1.42fr .65fr .92fr;
}

.exec-grid-secondary {
    display: grid;
    gap: 14px;
    grid-template-columns: 1fr 1fr 1fr 1.25fr;
}

.exec-grid-bottom {
    display: grid;
    gap: 14px;
    grid-template-columns: 1.15fr .8fr 1.1fr;
}

.exec-card {
    background: #fff;
    border: 1px solid var(--mq-border);
    border-radius: 14px;
    box-shadow: var(--mq-shadow-sm);
    min-width: 0;
    padding: 18px;
}

.exec-card-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.exec-card-title h2 {
    color: #0f1f39;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .01em;
    margin: 0;
    text-transform: uppercase;
}

.exec-card-title a,
.exec-card-link {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.dashboard-empty {
    align-items: center;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    display: flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 96px;
    padding: 18px;
    text-align: center;
}

.donut-layout {
    align-items: center;
    display: grid;
    gap: 20px;
    grid-template-columns: 190px minmax(0, 1fr);
}

.donut-chart {
    border-radius: 999px;
    display: grid;
    height: 180px;
    place-items: center;
    position: relative;
    width: 180px;
}

.donut-chart::after {
    background: #fff;
    border-radius: 999px;
    content: "";
    height: 112px;
    position: absolute;
    width: 112px;
}

.donut-chart div {
    position: relative;
    text-align: center;
    z-index: 1;
}

.donut-chart strong {
    color: #0f1f39;
    display: block;
    font-size: 25px;
    font-weight: 900;
}

.donut-chart span {
    color: var(--mq-muted);
    font-size: 12px;
}

.chart-legend {
    display: grid;
    gap: 12px;
}

.chart-legend div {
    align-items: center;
    display: grid;
    gap: 8px;
    grid-template-columns: 10px minmax(0, 1fr) auto;
}

.chart-legend i {
    border-radius: 3px;
    height: 10px;
    width: 10px;
}

.chart-legend span {
    color: #334155;
}

.chart-legend strong {
    color: #0f1f39;
    font-size: 12px;
    font-weight: 900;
}

.line-chart-card {
    overflow: hidden;
}

.line-legend {
    display: flex;
    gap: 12px;
}

.line-legend span {
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.line-legend span::before {
    border-radius: 999px;
    content: "";
    display: inline-block;
    height: 8px;
    margin-right: 5px;
    width: 8px;
}

.line-legend .import::before { background: #10b981; }
.line-legend .export::before { background: #3b82f6; }
.line-legend .stock::before { background: #8b5cf6; }

.line-chart {
    height: 250px;
    width: 100%;
}

.line-chart line {
    stroke: #e2e8f0;
    stroke-width: 1;
}

.line-chart .line {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 4;
}

.line-chart .line.import { stroke: #10b981; }
.line-chart .line.export { stroke: #3b82f6; }
.line-chart .line.stock { stroke: #8b5cf6; }

.line-axis {
    color: #64748b;
    display: flex;
    font-size: 12px;
    justify-content: space-between;
    padding: 0 14px 2px 48px;
}

.usage-card {
    text-align: center;
}

.usage-gauge {
    background: conic-gradient(#10b981 calc(var(--value) * 1%), #d9efe9 0);
    border-radius: 999px;
    display: grid;
    height: 170px;
    margin: 20px auto 12px;
    place-items: center;
    position: relative;
    width: 170px;
}

.usage-gauge::after {
    background: #fff;
    border-radius: 999px;
    content: "";
    height: 118px;
    position: absolute;
    width: 118px;
}

.usage-gauge div {
    position: relative;
    z-index: 1;
}

.usage-gauge strong {
    color: #0f1f39;
    display: block;
    font-size: 32px;
    font-weight: 900;
}

.usage-gauge span,
.usage-card p {
    color: #64748b;
    font-size: 12px;
}

.alert-list {
    display: grid;
}

.alert-row {
    align-items: center;
    border-top: 1px solid #edf2f7;
    display: grid;
    gap: 12px;
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding: 11px 0;
}

.alert-row:first-child {
    border-top: 0;
}

.alert-icon {
    border-radius: 999px;
    display: grid;
    height: 34px;
    place-items: center;
    width: 34px;
}

.alert-row.danger .alert-icon { background: #fee2e2; }
.alert-row.warning .alert-icon { background: #fffbeb; }
.alert-row.info .alert-icon { background: #dbeafe; }

.alert-icon::before {
    content: "!";
    font-weight: 900;
}

.alert-row.danger .alert-icon::before { color: #ef4444; }
.alert-row.warning .alert-icon::before { color: #f59e0b; }
.alert-row.info .alert-icon::before { color: #2563eb; }

.alert-row strong {
    color: #0f1f39;
    display: block;
}

.alert-row p {
    color: #64748b;
    font-size: 12px;
    margin: 2px 0 0;
}

.alert-count {
    text-align: right;
}

.alert-count strong {
    font-size: 18px;
}

.exec-table-wrap {
    overflow: auto;
}

.exec-table {
    border-collapse: collapse;
    width: 100%;
}

.exec-table th,
.exec-table td {
    border-bottom: 1px solid #edf2f7;
    color: #17243a;
    padding: 10px 8px;
    text-align: left;
    vertical-align: middle;
}

.exec-table th {
    background: #f8fbfd;
    color: #334155;
    font-size: 12px;
    font-weight: 900;
}

.exec-table .num {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.exec-table tbody tr:hover {
    background: #f8fbfd;
}

.mini-bar {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    min-width: 92px;
}

.mini-bar span {
    background: #10b981;
    display: block;
    height: 100%;
}

.activity-list {
    display: grid;
    gap: 0;
}

.activity-item {
    align-items: start;
    border-bottom: 1px solid #edf2f7;
    display: grid;
    gap: 12px;
    grid-template-columns: 52px 12px minmax(0, 1fr) auto;
    padding: 12px 0;
}

.activity-item time {
    color: #0f1f39;
    font-weight: 900;
}

.activity-item > span {
    border-radius: 999px;
    height: 10px;
    margin-top: 5px;
    width: 10px;
}

.activity-item.success > span { background: #10b981; }
.activity-item.info > span { background: #3b82f6; }
.activity-item.danger > span { background: #ef4444; }

.activity-item strong {
    color: #0f1f39;
    display: block;
}

.activity-item p,
.activity-item small {
    color: #64748b;
    margin: 2px 0 0;
}

.support-box {
    margin-top: 28px;
}

@media (max-width: 1500px) {
    .exec-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .exec-grid-main {
        grid-template-columns: 1fr 1fr;
    }

    .exec-grid-secondary {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1100px) {
    .exec-filter-bar,
    .exec-grid-bottom {
        grid-template-columns: 1fr 1fr;
    }

    .exec-kpi-grid,
    .exec-grid-main,
    .exec-grid-secondary {
        grid-template-columns: 1fr;
    }

    .exec-page-heading {
        display: grid;
    }
}

@media (max-width: 760px) {
    .exec-filter-bar,
    .exec-grid-bottom,
    .donut-layout {
        grid-template-columns: 1fr;
    }

    .exec-filter-actions,
    .exec-heading-actions {
        flex-wrap: wrap;
    }
}
