:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #5d6a7c;
    --line: #d9e2ef;
    --panel: #ffffff;
    --surface: #f4f7fb;
    --sidebar: #142033;
    --brand: #071a35;
    --blue: #2563eb;
    --selection: #2563eb;
    --selection-strong: #1d4ed8;
    --selection-soft: #eff6ff;
    --selection-border: #93c5fd;
    --green: #16a34a;
    --orange: #f59e0b;
    --red: #dc2626;
    --teal: #0f766e;
    --accent: #0f766e;
    --accent-strong: #115e59;
    --danger: #b42318;
    --warning: #a15c07;
    --success: #166534;
    --shadow: 0 18px 45px rgba(23, 32, 51, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family: "Segoe UI", Arial, sans-serif;
    background:
        linear-gradient(180deg, #f8fbff 0%, var(--surface) 46%, #eef3f9 100%);
    color: var(--ink);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.62;
}

.hidden {
    display: none !important;
}

.app-shell {
    min-height: 100vh;
}

.login-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 460px);
    gap: 32px;
    width: min(1360px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    align-items: center;
    padding: 56px 0;
}

.brand-panel,
.login-card,
.panel,
.metric-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.brand-panel {
    position: relative;
    min-height: 540px;
    padding: 54px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 4px solid var(--blue);
    pointer-events: none;
}

.brand-panel::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 42%;
    height: 62%;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 118, 110, 0.06));
    clip-path: polygon(28% 0, 100% 0, 100% 100%, 0 100%);
    pointer-events: none;
}

.login-brand-top,
.login-brand-copy,
.login-system-strip {
    position: relative;
    z-index: 1;
}

.login-brand-top {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 14px 18px;
}

.login-brand-logo {
    width: min(360px, 100%);
    height: auto;
    display: block;
}

.login-brand-company {
    margin-bottom: 9px;
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-brand-copy {
    margin: 48px 0;
}

.login-system-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    max-width: 680px;
    padding: 10px;
    border: 1px solid rgba(201, 213, 227, 0.92);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.84);
    backdrop-filter: blur(10px);
}

.login-system-strip div {
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid rgba(217, 226, 239, 0.86);
    border-radius: 9px;
    background: #ffffff;
}

.login-system-strip span {
    display: block;
    margin-bottom: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.login-system-strip strong {
    display: block;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 8px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    letter-spacing: 0;
}

.brand-mark.small {
    width: 40px;
    height: 40px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

h1,
h2,
h3 {
    margin: 0;
    line-height: 1.18;
    letter-spacing: 0;
    font-weight: 620;
}

strong {
    font-weight: 620;
}

h1 {
    font-size: clamp(30px, 4vw, 46px);
}

h2 {
    font-size: 21px;
}

h3 {
    font-size: 17px;
}

.lead {
    max-width: 620px;
    margin: 16px 0 22px;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.6;
}

.status-line {
    width: fit-content;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #b7e4d7;
    border-radius: 8px;
    background: #effaf6;
    color: var(--success);
    font-weight: 700;
}

.login-card {
    min-height: 458px;
    padding: 36px;
    display: grid;
    align-content: center;
    gap: 20px;
}

.login-card-logo {
    display: none;
}

.login-card-heading {
    display: grid;
    gap: 7px;
    margin-bottom: 2px;
}

.login-card-heading h2 {
    font-size: 28px;
}

.login-card-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.45;
}

.login-card input {
    min-height: 48px;
    padding: 11px 13px;
    border-radius: 8px;
    font-size: 16px;
}

.login-card .primary-button {
    min-height: 50px;
    margin-top: 6px;
    font-size: 17px;
}

label {
    display: grid;
    gap: 7px;
    color: #344256;
    font-size: 14px;
    font-weight: 600;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #c9d5e3;
    border-radius: 7px;
    background: #ffffff;
    color: var(--ink);
}

input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(37, 99, 235, 0.16);
    border-color: var(--selection);
}

textarea {
    min-height: 84px;
    resize: vertical;
}

.primary-button,
.secondary-button {
    min-height: 40px;
    border-radius: 7px;
    padding: 9px 14px;
    font-weight: 620;
}

.primary-button {
    border: 1px solid #1d4ed8;
    background: var(--blue);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.primary-button:hover {
    background: #1d4ed8;
}

.secondary-button {
    border: 1px solid #c7d2e2;
    background: #ffffff;
    color: var(--ink);
}

.secondary-button:hover {
    border-color: var(--selection);
    color: var(--selection-strong);
}

.secondary-button.full {
    width: 100%;
}

.button-with-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.button-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-button {
    width: 40px;
    height: 40px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-size: 24px;
    line-height: 1;
}

.icon-button:hover {
    border-color: var(--accent);
    color: var(--accent-strong);
}

.form-message {
    min-height: 22px;
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.form-message.error {
    color: var(--danger);
}

.form-message.success {
    color: var(--success);
}

.dashboard-layout {
    display: grid;
    grid-template-rows: auto 1fr;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(217, 226, 239, 0.92);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(16px);
    overflow-x: clip;
}

.app-header-inner {
    width: min(1500px, calc(100% - 40px));
    min-height: 86px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(0, auto);
    gap: 22px;
    align-items: center;
}

.brand-row {
    display: flex;
    align-items: center;
    min-width: 0;
    color: var(--ink);
    text-decoration: none;
}

.brand-logo {
    width: 250px;
    max-width: 100%;
    height: auto;
    display: block;
}

.portal-label {
    display: none;
}

.header-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 0;
}

.app-nav {
    --nav-indicator-x: 5px;
    --nav-indicator-y: 5px;
    --nav-indicator-width: 0px;
    --nav-indicator-height: 38px;
    --nav-indicator-opacity: 0;
    position: relative;
    display: inline-flex;
    gap: 6px;
    max-width: min(760px, 52vw);
    padding: 5px;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #f8fafc;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.app-nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: var(--nav-indicator-width);
    height: var(--nav-indicator-height);
    border-radius: 9px;
    background: var(--brand);
    box-shadow: 0 8px 18px rgba(7, 26, 53, 0.16);
    opacity: var(--nav-indicator-opacity);
    pointer-events: none;
    transform: translate3d(var(--nav-indicator-x), var(--nav-indicator-y), 0);
    transition:
        transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        width 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        height 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
        opacity 140ms ease;
    z-index: 0;
}

.nav-link {
    position: relative;
    z-index: 1;
    min-height: 38px;
    padding: 9px 13px;
    display: inline-flex;
    align-items: center;
    border-radius: 9px;
    color: #344054;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    transition: color 160ms ease, background-color 160ms ease;
}

.nav-link:hover {
    background: rgba(37, 99, 235, 0.08);
    color: var(--selection-strong);
}

.nav-link.active {
    background: transparent;
    color: #ffffff;
    box-shadow: none;
}

.nav-link.active:hover {
    background: transparent;
    color: #ffffff;
}

.user-menu {
    position: relative;
    flex: 0 0 auto;
}

.user-card {
    min-height: 48px;
    padding: 6px 8px 6px 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink);
    box-shadow: 0 10px 26px rgba(23, 32, 51, 0.06);
    text-align: left;
}

.user-card:hover,
.user-menu.open .user-card {
    border-color: var(--blue);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), var(--blue));
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
}

.user-text {
    display: grid;
    gap: 1px;
    min-width: 0;
    padding-right: 4px;
    line-height: 1.15;
}

.user-text strong {
    font-size: 13px;
    font-weight: 620;
}

.user-text span {
    max-width: 210px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 50;
    width: 190px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(23, 32, 51, 0.15);
}

.user-menu-item {
    width: 100%;
    min-height: 40px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.user-menu-item:hover {
    background: #f1f5f9;
    color: var(--brand);
}

.user-menu-item.danger:hover {
    background: #fff1f0;
    color: var(--danger);
}

.menu-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.logout-button {
    min-width: 64px;
}

.workspace {
    width: min(1500px, calc(100% - 40px));
    max-width: 100%;
    min-width: 0;
    margin: 26px auto 36px;
    padding: 0;
    display: grid;
    gap: 22px;
    align-content: start;
}

.topbar,
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.user-chip {
    max-width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 650;
    overflow-wrap: anywhere;
}

.page-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.compact-action-panel {
    display: grid;
    gap: 14px;
}

.compact-action-header {
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
}

.compact-action-panel .checks-summary-grid,
.compact-action-panel .declaration-summary-grid,
.compact-action-panel .payment-summary-grid {
    margin-top: 0;
}

.view {
    display: none !important;
}

.view.active-view {
    display: block !important;
    min-width: 0;
    max-width: 100%;
}

.dashboard-view.active-view {
    display: grid !important;
    gap: 18px;
}

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

.metric-card {
    min-width: 0;
    padding: 18px;
    display: grid;
    gap: 10px;
}

.metric-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.metric-card strong {
    font-size: 30px;
    line-height: 1;
    font-weight: 620;
    overflow-wrap: anywhere;
}

.panel {
    min-width: 0;
    max-width: 100%;
    padding: 20px;
    box-shadow: none;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
    gap: 18px;
}

.tenant-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.tenant-actions-only {
    justify-content: flex-end;
    margin-top: -4px;
}

.tenant-hero-title {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 18px;
}

.dashboard-mark {
    width: 66px;
    height: 66px;
    border-radius: 8px;
    background: #0b2447;
    font-size: 24px;
}

.tenant-hero-title h2 {
    font-size: clamp(28px, 3vw, 42px);
}

.tenant-hero-title p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.tenant-hero-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(180px, 220px));
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.tenant-actions-only .tenant-hero-actions {
    height: 100%;
    grid-template-columns: minmax(220px, 260px);
}

.tenant-hero-actions > * {
    min-width: 0;
}

.check-chip {
    min-height: 54px;
    min-width: 0;
    display: grid;
    align-content: center;
    gap: 3px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.check-chip span,
.check-chip strong {
    display: block;
}

.check-chip span {
    color: var(--muted);
    font-size: 13px;
}

.check-chip strong {
    margin-top: 0;
    font-weight: 620;
    line-height: 1.2;
    white-space: nowrap;
}

.tenant-hero-actions .primary-button,
.tenant-hero-actions .secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 54px;
    border-radius: 8px;
}

.tenant-metric-grid {
    grid-template-columns: repeat(5, minmax(150px, 1fr));
}

.tenant-metric-grid .metric-card {
    position: relative;
    min-width: 0;
    min-height: 104px;
    padding: 18px 18px 18px 32px;
    box-shadow: 0 12px 30px rgba(23, 32, 51, 0.07);
}

.tenant-metric-grid .metric-card::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 999px;
    background: var(--accent);
}

.tenant-metric-grid .metric-card strong {
    font-size: 28px;
}

@media (min-width: 1041px) {
    .workspace:has(#tenantHome.active-view) {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
        align-items: start;
    }

    .workspace:has(#tenantHome.active-view) > .topbar {
        grid-column: 1;
        grid-row: 1;
        align-self: stretch;
    }

    #tenantHome.active-view {
        display: contents !important;
    }

    #tenantHome.active-view > .tenant-actions-only {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        margin-top: 0;
        align-self: stretch;
        justify-self: end;
    }

    #tenantHome.active-view > .tenant-actions-only .check-chip {
        width: 100%;
        height: 100%;
        min-height: 96px;
        display: grid;
        align-content: center;
        padding: 14px 18px;
    }

    #tenantHome.active-view > .tenant-metric-grid {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #tenantHome.active-view > .panel {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}

.stat-blue::before {
    background: #2563eb !important;
}

.stat-green::before {
    background: #16a34a !important;
}

.stat-orange::before {
    background: #f59e0b !important;
}

.stat-red::before {
    background: #dc2626 !important;
}

.stat-gray::before {
    background: #6b7280 !important;
}

.stat-teal::before {
    background: #0f766e !important;
}

.shortcut-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.shortcut-card {
    min-height: 96px;
    padding: 14px;
    display: grid;
    align-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
}

.shortcut-card:hover {
    border-color: var(--selection);
    box-shadow: 0 10px 26px rgba(37, 99, 235, 0.11);
}

.shortcut-card span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
}

.shortcut-card strong {
    font-size: 15px;
}

.report-action-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.report-card {
    min-height: 128px;
    padding: 16px;
    display: grid;
    align-content: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    text-align: left;
    cursor: pointer;
}

.report-card:hover {
    border-color: var(--blue);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

.report-card span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 650;
    text-transform: uppercase;
}

.report-card strong {
    font-size: 17px;
}

.report-card small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.import-panel {
    margin-top: 16px;
    display: grid;
    gap: 14px;
}

.import-file {
    max-width: 520px;
}

.import-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.import-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.import-summary span {
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
}

.import-preview {
    margin-top: 0;
}

.import-preview table {
    min-width: 980px;
}

.import-row-error {
    background: #fffafa;
}

.import-error {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 12px;
    line-height: 1.35;
}

.status-board {
    margin-top: 12px;
    display: grid;
    gap: 4px;
}

.subscription-view,
.security-view {
    align-content: start;
}

.subscription-overview-panel,
.subscription-section-panel,
.security-account-panel,
.security-panel {
    border-color: #d4dfec;
}

.subscription-header,
.security-header {
    align-items: center;
}

.subscription-summary-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(230px, 1.25fr) repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.subscription-plan-card,
.subscription-stat-card,
.limit-mini-card {
    position: relative;
    min-width: 0;
    min-height: 94px;
    padding: 16px 18px 16px 36px;
    border: 1px solid #d7e2ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.06);
}

.subscription-plan-card {
    display: grid;
    align-content: center;
    gap: 9px;
    overflow: hidden;
    background: linear-gradient(135deg, #ffffff 0%, #f5fbf9 100%);
}

.subscription-plan-card::before,
.subscription-stat-card::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 16px;
    bottom: 16px;
    width: 4px;
    border-radius: 999px;
    background: var(--accent);
}

.subscription-plan-card span,
.subscription-stat-card span,
.limit-mini-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.subscription-plan-card strong,
.subscription-stat-card strong,
.limit-mini-card strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.28;
    overflow-wrap: anywhere;
}

.subscription-plan-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.25;
}

.subscription-stat-card {
    display: grid;
    align-content: center;
    gap: 10px;
}

.subscription-module-toolbar {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.subscription-module-toolbar label {
    min-width: 0;
}

.subscription-module-summary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 32px;
    padding: 6px 10px;
    border: 1px solid #dbe5f0;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.module-card-grid,
.limit-card-grid {
    margin-top: 14px;
    display: grid;
    gap: 10px;
}

.module-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
}

.limit-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.module-mini-card {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d7e2ee;
    border-left: 5px solid #cbd5e1;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.045);
}

.module-mini-card.active {
    border-left-color: var(--accent);
    background: #fbfffd;
}

.module-mini-card.disabled,
.module-mini-card.blocked,
.module-mini-card.cancelled {
    border-left-color: var(--danger);
    background: #fffafa;
}

.module-mini-card.expired,
.module-mini-card.suspended,
.module-mini-card.trial {
    border-left-color: var(--orange);
    background: #fffdf5;
}

.module-mini-card > div {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.module-mini-card strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
}

.module-mini-card span:not(.badge) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.module-mini-card .badge {
    flex: 0 0 auto;
    justify-self: end;
}

.limit-mini-card {
    padding: 16px;
    min-height: 78px;
    display: grid;
    align-content: space-between;
    gap: 10px;
    box-shadow: none;
    background: #f8fbfd;
}

.security-layout {
    display: grid;
    grid-template-columns: minmax(280px, 0.88fr) minmax(0, 1.45fr);
    gap: 16px;
    align-items: start;
}

.security-account-panel,
.security-panel {
    width: 100%;
}

.security-account-panel {
    display: grid;
    gap: 16px;
}

.security-mark {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border: 1px solid #b7e4d7;
    border-radius: 8px;
    background: #effaf6;
    color: var(--accent-strong);
    flex: 0 0 auto;
}

.security-account-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid #d7e2ee;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.055);
}

.security-avatar {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font-size: 18px;
    font-weight: 800;
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.18);
}

.security-account-card > div:last-child {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.security-account-card strong {
    color: var(--ink);
    font-size: 20px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.security-account-card small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.security-status-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.security-mini-card {
    position: relative;
    min-height: 78px;
    display: grid;
    align-content: center;
    gap: 6px;
    padding: 12px 14px 12px 30px;
    border: 1px solid #d7e2ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(23, 32, 51, 0.045);
    overflow: hidden;
}

.security-mini-card::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: var(--selection);
}

.security-mini-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 780;
}

.security-mini-card strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.15;
}

.security-mark svg,
.security-actions svg,
.subscription-header svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.security-form-modern {
    margin-top: 18px;
    display: grid;
    gap: 14px;
}

.security-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.password-hint-card {
    display: grid;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #b7e4d7;
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: #f4fbf8;
}

.password-hint-card strong {
    color: var(--accent-strong);
}

.password-hint-card span {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.security-actions {
    justify-content: flex-end;
}

.table-wrap {
    margin-top: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: collapse;
    background: #ffffff;
}

th,
td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

th {
    color: #41516a;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0;
    background: #f7f9fc;
}

tr:last-child td {
    border-bottom: 0;
}

tbody tr {
    cursor: pointer;
}

tbody tr:hover {
    background: #f8fbfd;
}

.tenant-name {
    display: grid;
    gap: 3px;
}

.tenant-name span {
    color: var(--muted);
    font-size: 12px;
    overflow-wrap: anywhere;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    background: #eef3f8;
    color: #344256;
}

.badge.active,
.badge.trial,
.badge.completed,
.badge.declared,
.badge.ne_afat {
    background: #e9f8f3;
    color: var(--success);
}

.badge.blocked,
.badge.cancelled,
.badge.disabled,
.badge.failed,
.badge.login_error,
.badge.problem {
    background: #fff1f0;
    color: var(--danger);
}

.badge.expired,
.badge.suspended,
.badge.skipped,
.badge.queued,
.badge.running,
.badge.warning {
    background: #fff8e5;
    color: var(--warning);
}

.badge.neutral {
    background: #eef3f8;
    color: #475569;
}

.badge.manual {
    background: #eef4ff;
    color: var(--primary);
}

.badge.automatic {
    background: #e9f8f3;
    color: var(--success);
}

.table-subtext {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.check-run-history-message {
    min-width: 220px;
    max-width: 360px;
    color: #475569;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
    white-space: normal;
}

.check-run-history-message.problem {
    color: #991b1b;
}

.form-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.form-actions,
.span-all {
    grid-column: 1 / -1;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.detail-empty {
    margin-top: 14px;
    color: var(--muted);
}

.declaration-workspace {
    display: grid;
    gap: 14px;
}

.declaration-tabs {
    margin: 14px 0 12px;
    display: flex;
    gap: 8px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.declaration-tab-button {
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    padding: 9px 14px;
    background: transparent;
    color: #41516a;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.declaration-tab-button.active {
    background: var(--selection);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.declaration-section {
    display: grid;
    gap: 12px;
}

.declaration-panel {
    display: none;
}

.declaration-panel.active {
    display: grid;
}

.declaration-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.declaration-section-head h3 {
    margin: 2px 0 0;
    font-size: 20px;
    line-height: 1.2;
}

.declaration-head-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.declaration-head-metrics strong {
    padding: 7px 10px;
    border-radius: 8px;
    background: #fff1f0;
    color: var(--danger);
    font-size: 14px;
    line-height: 1;
}

.declaration-workflow-panel {
    display: grid;
    gap: 14px;
}

.declaration-overview-panel {
    display: grid;
    gap: 14px;
}

.declaration-overview-header {
    align-items: center;
}

.declaration-overview-toggle {
    justify-self: end;
    min-width: 150px;
}

.declaration-overview-body {
    display: grid;
    gap: 14px;
}

.declaration-overview-body.hidden {
    display: none;
}

.workflow-lock {
    padding: 8px 10px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fffbeb;
    color: #9a3412;
    font-size: 12px;
    font-weight: 800;
}

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

.declaration-action-card {
    position: relative;
    min-width: 0;
    min-height: 104px;
    padding: 13px;
    display: grid;
    gap: 6px;
    align-content: start;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.04);
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease, transform 140ms ease;
}

.declaration-action-card.active,
.declaration-action-card:hover {
    border-color: var(--selection);
    background: var(--selection-soft);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.16);
}

.declaration-action-card.active {
    border-width: 2px;
    padding: 12px;
}

.declaration-action-card.active::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 12px;
    bottom: 12px;
    width: 5px;
    border-radius: 0 999px 999px 0;
    background: var(--selection);
}

.declaration-action-card.active::after {
    content: "Zgjedhur";
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 5px 8px;
    border-radius: 999px;
    background: var(--selection);
    color: #ffffff;
    font-size: 10px;
    font-weight: 850;
    line-height: 1;
}

.declaration-action-card span {
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.declaration-action-card strong {
    font-size: 16px;
    line-height: 1.2;
}

.declaration-action-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

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

.declaration-type-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.declaration-type-option {
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-align: left;
}

.declaration-type-option.active {
    border-color: var(--accent);
    background: #effaf8;
    color: var(--accent-strong);
    box-shadow: inset 4px 0 0 var(--accent);
}

.declaration-candidate-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px;
}

.declaration-candidate-header h3 {
    margin: 2px 0 0;
    font-size: 20px;
    line-height: 1.2;
}

.declaration-candidate-header > strong {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.declaration-selection-bar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.selection-metrics,
.selection-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.selection-metrics span {
    padding: 7px 9px;
    border: 1px solid #dbe7f7;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.selection-metrics strong {
    color: var(--ink);
}

.selection-actions {
    justify-content: flex-end;
}

.selection-actions button {
    min-height: 38px;
    padding: 8px 12px;
    font-size: 13px;
}

.selection-actions #tenantDeclarationDemoButton.active {
    border-color: #fed7aa;
    background: #fffbeb;
    color: #9a3412;
}

.declaration-review {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #8bd3c7;
    border-radius: 8px;
    background: #f0fbf8;
}

.declaration-session {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #c7d6eb;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(23, 32, 51, 0.08);
}

.declaration-review-header,
.declaration-review-footer,
.declaration-session-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.declaration-review-header h3 {
    margin: 2px 0 4px;
    font-size: 18px;
}

.declaration-review-header p,
.declaration-review-footer p,
.declaration-session-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.declaration-review-footer p {
    max-width: 620px;
}

.declaration-review-footer > div {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px;
}

.declaration-review-status {
    flex: 0 0 auto;
    padding: 7px 10px;
    border: 1px solid #fed7aa;
    border-radius: 999px;
    background: #fffbeb;
    color: #9a3412;
    font-size: 12px;
    font-weight: 750;
}

.declaration-session-list {
    display: grid;
    gap: 8px;
}

.declaration-session-list article {
    display: grid;
    grid-template-columns: minmax(150px, 0.9fr) minmax(160px, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.declaration-session-list article > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.declaration-session-list strong {
    font-size: 13px;
}

.declaration-session-list span:not(.badge) {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(7, 26, 53, 0.48);
}

.modal-card {
    width: min(560px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(7, 26, 53, 0.22);
}

.modal-header,
.modal-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.modal-actions {
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.declaration-submit-summary {
    display: grid;
    gap: 12px;
}

.declaration-submit-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.declaration-submit-metrics span {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.declaration-submit-metrics strong {
    color: var(--ink);
    font-size: 22px;
}

.declaration-submit-details {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.declaration-submit-details p {
    margin: 0;
}

.declaration-submit-warning {
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    background: #fffbeb;
    color: #9a3412;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.4;
}

.declaration-review-body {
    display: grid;
    gap: 8px;
}

.declaration-review-subject {
    display: grid;
    grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
    border: 1px solid #d7eee9;
    border-radius: 8px;
    background: #ffffff;
}

.declaration-review-subject > div:first-child {
    min-width: 0;
    display: grid;
    gap: 3px;
    align-content: start;
}

.declaration-review-subject strong {
    font-size: 14px;
}

.declaration-review-subject span {
    min-width: 0;
}

.declaration-review-subject > div:first-child span,
.declaration-review-items small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.declaration-review-items {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.declaration-review-items > span {
    display: grid;
    gap: 2px;
    padding: 7px 9px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    background: #f8fbfd;
    font-size: 12px;
    font-weight: 750;
}

.declaration-candidate-list {
    display: grid;
    gap: 8px;
}

.declaration-candidate-card {
    min-width: 0;
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.candidate-topline {
    min-width: 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.candidate-check {
    min-width: 0;
    width: 24px;
    height: 24px;
    display: inline-grid;
    place-items: center;
    cursor: pointer;
}

.candidate-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.candidate-check span {
    width: 22px;
    height: 22px;
    display: inline-grid;
    place-items: center;
    border: 2px solid #b8c5d7;
    border-radius: 6px;
    background: #ffffff;
}

.candidate-check input:checked + span {
    border-color: var(--selection);
    background: var(--selection);
}

.candidate-check input:checked + span::before {
    content: "";
    width: 9px;
    height: 5px;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(-45deg) translateY(-1px);
}

.declaration-candidate-card:has(.candidate-check input:checked) {
    border-color: var(--selection-border);
    background: var(--selection-soft);
}

.candidate-subject {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.candidate-subject span,
.candidate-detail-item span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.candidate-subject strong,
.candidate-detail-item strong {
    min-width: 0;
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.candidate-detail-grid {
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.candidate-detail-item {
    min-width: 0;
    display: grid;
    gap: 5px;
    align-content: start;
    padding: 9px 10px;
    border: 1px solid #e4ebf5;
    border-radius: 8px;
    background: #f8fbfd;
}

.candidate-detail-type {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.candidate-detail-type span {
    grid-column: 1 / -1;
}

.candidate-detail-item em {
    display: inline-block;
    padding: 3px 6px;
    border-radius: 999px;
    background: #fffbeb;
    color: #9a3412;
    font-style: normal;
    font-size: 10px;
    font-weight: 850;
    vertical-align: middle;
}

.candidate-status {
    min-width: 0;
    justify-items: end;
}

.tax-matrix-table {
    min-width: 1180px;
}

.tax-subject-row.expanded {
    background: #f8fbfd;
}

.tax-row-index {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 750;
}

.tax-expand-indicator {
    width: 22px;
    height: 22px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #cbd6e4;
    border-radius: 999px;
    background: #ffffff;
    color: var(--accent);
    font-size: 15px;
    font-weight: 800;
    line-height: 1;
}

.tax-expand-indicator::before {
    content: "+";
}

.tax-subject-row.expanded .tax-expand-indicator::before,
.tax-mobile-card.expanded .tax-expand-indicator::before {
    content: "-";
}

.tax-matrix-status {
    min-width: 118px;
    display: grid;
    gap: 5px;
    align-items: start;
}

.tax-status-action {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 8px;
    padding: 4px;
    background: transparent;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tax-status-action:hover,
.tax-status-action.active {
    border-color: #bfdbfe;
    background: #f8fbff;
}

.tax-matrix-status .badge {
    width: fit-content;
}

.tax-subject-detail-row {
    display: none;
}

.tax-subject-detail-row.expanded {
    display: table-row;
}

.tax-subject-detail-cell {
    padding: 0;
    background: #f8fbfd;
}

.tax-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

.tax-detail-wrapper {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: start;
}

.tax-detail-wrapper.active {
    align-content: stretch;
}

.tax-detail-item {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.tax-detail-action {
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tax-detail-action:hover,
.tax-detail-action.active {
    border-color: #bfdbfe;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.09);
}

.tax-detail-item > div {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.tax-detail-copy {
    flex: 1 1 auto;
}

.tax-detail-title-row {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tax-detail-item strong {
    min-width: 0;
    overflow-wrap: normal;
    word-break: normal;
}

.tax-detail-item .badge {
    flex: 0 0 auto;
}

.tax-detail-info {
    width: 18px;
    height: 18px;
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #b7d9d2;
    border-radius: 999px;
    background: #f0fbf8;
    color: var(--accent);
    font-size: 11px;
    font-weight: 850;
    line-height: 1;
}

.tax-info-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    padding: 11px;
    border: 1px solid #dbe7f7;
    border-radius: 8px;
    background: #f8fbff;
}

.tax-info-row {
    min-width: 0;
    display: grid;
    gap: 3px;
    padding: 8px;
    border: 1px solid #e3ebf6;
    border-radius: 7px;
    background: #ffffff;
}

.tax-info-row.wide {
    grid-column: 1 / -1;
}

.tax-info-row span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.tax-info-row strong {
    min-width: 0;
    color: var(--ink);
    font-size: 12px;
    line-height: 1.3;
    text-align: left;
    overflow-wrap: anywhere;
}

.tax-mobile-list {
    display: none;
}

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

.payment-toolbar {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
    gap: 12px;
}

.payment-search {
    margin: 0;
}

.live-debt-card {
    min-width: 0;
    padding: 14px;
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.live-debt-card.has-debt {
    border-color: #fecaca;
}

.live-debt-card.no-debt {
    border-color: #bbf7d0;
}

.live-debt-card-head,
.live-debt-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.live-debt-amount {
    padding: 11px 12px;
    display: grid;
    gap: 4px;
    border-radius: 8px;
    background: #f8fafc;
}

.live-debt-amount span,
.live-debt-meta {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.live-debt-amount strong {
    color: var(--ink);
    font-size: 24px;
    line-height: 1.1;
}

.live-debt-actions {
    display: flex;
    justify-content: flex-end;
}

.live-debt-details {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid #e4edf8;
    border-radius: 8px;
    background: #fbfdff;
}

.payment-order-card-list {
    display: none;
}

.payment-order-card {
    min-width: 0;
    padding: 12px;
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.payment-order-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.payment-order-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.payment-order-meta-grid > div {
    min-width: 0;
    padding: 9px 10px;
    display: grid;
    gap: 3px;
    border: 1px solid #e4edf8;
    border-radius: 8px;
    background: #f8fbfd;
}

.payment-order-meta-grid span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.payment-order-meta-grid strong {
    color: var(--ink);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.detail-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 16px;
}

.detail-tabbar {
    display: none;
}

.detail-tab-button {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 8px 12px;
    background: #ffffff;
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

.detail-tab-button.active {
    border-color: var(--selection-strong);
    background: var(--selection);
    color: #ffffff;
}

.detail-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 16px;
}

.detail-section h3 {
    margin-bottom: 12px;
}

.section-heading-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.section-heading-row h3 {
    margin-bottom: 4px;
}

.section-heading-row p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

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

.module-list,
.limit-list,
.user-list {
    display: grid;
    gap: 8px;
}

.line-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid #edf2f8;
}

.line-item:last-child {
    border-bottom: 0;
}

.line-item span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
}

.inline-actions {
    display: flex;
    gap: 10px;
    align-items: end;
    flex-wrap: wrap;
}

.inline-actions label {
    min-width: 170px;
}

.users-section,
.subjects-section {
    grid-column: 1 / -1;
}

.user-create-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    align-items: end;
}

.user-create-grid > .role-grid {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.user-admin-list {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.user-admin-card {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.user-admin-header,
.user-admin-controls {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 12px 16px;
    align-items: end;
}

.user-admin-header strong,
.user-admin-header span {
    display: block;
    overflow-wrap: anywhere;
}

.user-admin-header span {
    margin-top: 3px;
    color: var(--muted);
    font-size: 13px;
}

.user-admin-controls {
    margin-top: 12px;
}

.user-admin-controls > .role-grid {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
}

.user-admin-card .inline-actions {
    margin-top: 12px;
}

.user-admin-card .inline-actions button {
    white-space: nowrap;
}

.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.role-grid .checkbox-line {
    min-width: 0;
    padding: 4px 2px;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
}

.compact-table {
    margin-top: 0;
}

.compact-table table {
    min-width: 820px;
}

.home-report-table {
    width: max-content;
    min-width: 2180px;
    table-layout: auto;
}

.home-report-table th:nth-child(1),
.home-report-table td:nth-child(1) {
    width: 56px;
}

.home-report-table th:nth-child(2),
.home-report-table td:nth-child(2) {
    min-width: 160px;
}

.home-report-table th:nth-child(3),
.home-report-table td:nth-child(3) {
    min-width: 132px;
}

.home-report-table th:nth-child(4),
.home-report-table td:nth-child(4) {
    min-width: 150px;
}

.home-report-table th:nth-child(5),
.home-report-table td:nth-child(5) {
    min-width: 130px;
}

.home-report-table th:nth-child(6),
.home-report-table td:nth-child(6) {
    width: 72px;
}

.home-report-table th:nth-child(n+7),
.home-report-table tr.tenant-home-subject-row td:nth-child(n+7) {
    min-width: 170px;
}

.home-report-table th:nth-child(8),
.home-report-table tr.tenant-home-subject-row td:nth-child(8) {
    min-width: 190px;
}

.home-report-table th:nth-child(12),
.home-report-table tr.tenant-home-subject-row td:nth-child(12),
.home-report-table th:nth-child(13),
.home-report-table tr.tenant-home-subject-row td:nth-child(13) {
    min-width: 190px;
}

.home-report-table th:nth-child(15),
.home-report-table tr.tenant-home-subject-row td:nth-child(15) {
    min-width: 110px;
}

.subject-scan-button {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 13px;
    font-weight: 650;
    box-shadow: none;
}

.subject-scan-button .button-icon {
    width: 16px;
    height: 16px;
}

.tenant-home-subject-row.expanded {
    background: #f8fbfd;
}

.tenant-home-mobile-detail {
    display: none;
}

.mobile-detail-cell {
    padding: 0;
    background: #f8fbfd;
}

.mobile-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
}

.mobile-status-chip {
    min-width: 0;
    padding: 9px;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.module-status-action {
    width: 100%;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.module-status-action:hover,
.module-status-action.active {
    border-color: var(--blue);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.11);
}

.mobile-status-chip > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
}

.module-status-cell {
    min-width: 0;
    display: grid;
    gap: 5px;
    align-items: start;
}

.home-report-table .module-status-cell {
    width: max-content;
    min-width: 155px;
}

.home-report-table td:nth-child(8) .module-status-cell {
    min-width: 180px;
}

.home-report-table .badge {
    width: fit-content;
    max-width: none;
    flex: 0 0 auto;
    white-space: nowrap !important;
}

.home-report-table td {
    vertical-align: top;
}

.home-report-table .status-meta {
    display: grid;
    gap: 2px;
    overflow-wrap: normal;
    word-break: normal;
}

.status-meta {
    display: block;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.status-meta span {
    display: block;
}

.home-report-table .status-meta span {
    white-space: nowrap;
}

.debt-detail-card {
    margin: 10px;
    padding: 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.08);
}

.debt-detail-head,
.debt-detail-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.debt-detail-head {
    padding-bottom: 9px;
    border-bottom: 1px solid #dbe7f7;
}

.debt-detail-head span,
.debt-detail-row small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.debt-detail-head strong {
    color: var(--danger);
    font-size: 18px;
}

.debt-detail-row {
    padding: 9px 0;
    border-bottom: 1px solid #e7edf5;
}

.debt-detail-row:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.debt-detail-row span {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.debt-detail-row strong {
    overflow-wrap: anywhere;
}

.debt-detail-row b {
    white-space: nowrap;
}

.debt-detail-empty {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.4;
}

.mobile-subject-list {
    display: none;
}

.credential-summary {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.subject-form {
    margin-top: 0;
}

.tenant-subjects-content {
    min-width: 0;
}

.portal-subject-form {
    margin-top: 16px;
}

.subject-editor-header {
    align-items: center;
}

.subject-editor-header .eyebrow {
    margin-bottom: 4px;
}

.subject-editor-panel {
    padding: 12px;
    background: #ffffff;
}

.subject-form-modern {
    display: grid;
    gap: 12px;
}

.subject-form-section {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.subject-form-section[open] {
    border-color: var(--selection-border);
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.05);
}

.subject-form-section summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    list-style: none;
    cursor: pointer;
}

.subject-form-section summary::-webkit-details-marker {
    display: none;
}

.subject-form-section summary::after {
    content: "+";
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    border: 1px solid #c7d2e2;
    border-radius: 999px;
    color: var(--selection-strong);
    font-weight: 800;
    flex: 0 0 auto;
}

.subject-form-section[open] summary::after {
    content: "-";
    border-color: var(--selection-border);
    background: var(--selection-soft);
}

.subject-form-section summary > span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.subject-form-section summary strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.2;
}

.subject-form-section summary small,
.subject-toggle-row small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.35;
}

.subject-form-section-body {
    display: grid;
    gap: 12px;
    padding: 0 14px 14px;
}

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

.subject-toggle-row {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #cfe3db;
    border-radius: 8px;
    background: #f4fbf8;
}

.subject-toggle-row input {
    position: absolute;
    width: 1px;
    min-height: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.subject-toggle-row > span:last-child {
    display: grid;
    gap: 2px;
}

.toggle-switch {
    position: relative;
    width: 44px;
    height: 26px;
    border-radius: 999px;
    background: #cbd5e1;
    box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.08);
    transition: background 0.18s ease;
}

.toggle-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(23, 32, 51, 0.2);
    transition: transform 0.18s ease;
}

.subject-toggle-row input:checked + .toggle-switch {
    background: var(--selection);
}

.subject-toggle-row input:checked + .toggle-switch::after {
    transform: translateX(18px);
}

.responsibility-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
    padding: 0;
    border: 0;
    background: transparent;
}

.responsibility-chip {
    position: relative;
    display: block;
    min-width: 0;
}

.responsibility-chip input {
    position: absolute;
    inset: 0;
    width: 100%;
    min-height: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.responsibility-chip span {
    display: flex;
    align-items: center;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #d7e2ee;
    border-radius: 8px;
    background: #f8fbfd;
    color: #344256;
    font-weight: 700;
    line-height: 1.2;
    transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.responsibility-chip input:checked + span {
    border-color: var(--selection);
    background: var(--selection-soft);
    color: var(--selection-strong);
    box-shadow: inset 4px 0 0 var(--selection);
}

.responsibility-chip input:focus-visible + span {
    outline: 3px solid rgba(37, 99, 235, 0.16);
}

.subject-form-actions {
    margin-top: 2px;
}

.subject-list-toolbar {
    margin-top: 14px;
    display: grid;
    grid-template-columns: minmax(220px, 420px) auto;
    gap: 12px;
    align-items: end;
}

.subject-search {
    min-width: 0;
}

.home-subject-search {
    width: min(320px, 100%);
}

.search-field {
    position: relative;
}

.search-field input {
    padding-left: 38px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
    fill: none;
    stroke: #64748b;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    pointer-events: none;
}

.home-subject-toolbar {
    min-width: min(100%, 760px);
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.home-status-filter {
    width: min(220px, 100%);
}

.home-subject-action-buttons {
    display: flex;
    align-items: end;
    gap: 10px;
}

.home-subject-action-buttons .primary-button,
.home-subject-action-buttons .secondary-button {
    min-height: 44px;
    border-radius: 8px;
    padding-inline: 16px;
    white-space: nowrap;
}

.home-subject-action-buttons .primary-button {
    min-width: 170px;
}

.subject-list-header {
    align-items: center;
}

.subject-list-header .eyebrow {
    margin-bottom: 4px;
}

.subject-summary-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.subject-summary-card {
    position: relative;
    min-height: 104px;
    display: grid;
    align-content: center;
    gap: 8px;
    padding: 16px 18px 16px 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(23, 32, 51, 0.055);
    overflow: hidden;
}

.subject-summary-card::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 18px;
    bottom: 18px;
    width: 5px;
    border-radius: 999px;
    background: var(--selection);
}

.subject-summary-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 760;
    line-height: 1.2;
}

.subject-summary-card strong {
    color: var(--ink);
    font-size: 32px;
    line-height: 1;
}

.subject-summary-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.subject-summary-card.stat-green::before {
    background: #16a34a;
}

.subject-summary-card.stat-red::before {
    background: #dc2626;
}

.subject-summary-card.stat-teal::before {
    background: #0f766e;
}

.subject-summary-card.stat-gray::before {
    background: #64748b;
}

.subject-list-toolbar-modern {
    grid-template-columns: minmax(240px, 1fr) minmax(180px, 240px) auto;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
    align-items: center;
}

.subject-list-toolbar-modern .subject-search,
.subject-list-toolbar-modern .subject-status-filter {
    min-width: 0;
}

.subject-directory-stats {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    align-self: center;
}

.subject-directory-stats span,
.mini-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
    line-height: 1.15;
    border: 1px solid #dbe5f0;
}

.table-chip-row,
.subject-last-check {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.subject-last-check {
    display: grid;
    gap: 3px;
}

.subject-last-check strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.15;
}

.subject-last-check small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
}

.subject-table-action {
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
}

.subject-table-wrap tbody tr {
    cursor: pointer;
}

.tenant-subject-card-list {
    display: none;
}

.tenant-subject-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.055);
    overflow: hidden;
}

.tenant-subject-card.is-inactive {
    background: #fbfcfe;
}

.tenant-subject-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border-bottom: 1px solid #edf2f8;
    background: #fbfdff;
}

.tenant-subject-card-head > div {
    min-width: 0;
    display: grid;
    gap: 2px;
}

.tenant-subject-card-head span:first-child,
.tenant-subject-card-grid > div > span,
.tenant-subject-responsibilities > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.tenant-subject-card-head strong {
    color: var(--ink);
    font-size: 18px;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.tenant-subject-card-head small,
.tenant-subject-card-grid small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.tenant-subject-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}

.tenant-subject-card-grid > div {
    min-width: 0;
    display: grid;
    gap: 7px;
    padding: 10px;
    border: 1px solid #e4ebf4;
    border-radius: 8px;
    background: #f8fbfd;
}

.tenant-subject-card-grid strong {
    color: var(--ink);
    font-size: 14px;
    line-height: 1.2;
}

.tenant-subject-pill-row,
.tenant-subject-responsibilities > div {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.mini-pill.ok {
    background: #e9f8f3;
    border-color: #c8eadf;
    color: var(--success);
}

.mini-pill.missing {
    background: #fff1f0;
    border-color: #ffd1ce;
    color: var(--danger);
}

.mini-pill.neutral {
    background: #eef3f8;
    border-color: #d8e3ee;
    color: #475569;
}

.tenant-subject-responsibilities {
    display: grid;
    gap: 8px;
    padding: 0 12px 12px;
}

.tenant-subject-edit-button {
    width: calc(100% - 24px);
    margin: 0 12px 12px;
}

.checks-header {
    align-items: center;
}

.checks-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.checks-summary-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.checks-summary-grid .metric-card {
    position: relative;
    min-height: 92px;
    padding-left: 32px;
}

.checks-summary-grid .metric-card::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 999px;
    background: var(--accent);
}

.check-progress-row {
    margin-top: 14px;
    display: grid;
    grid-template-columns: auto minmax(160px, 1fr) auto;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}

.check-progress-row progress {
    width: 100%;
    height: 12px;
    accent-color: var(--blue);
}

.auto-check-card {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) minmax(0, 2fr);
    gap: 12px;
    align-items: center;
    padding: 14px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.05);
}

.auto-check-summary {
    margin-top: 14px;
}

.notification-summary {
    margin-top: 12px;
}

.notification-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--border);
    border-left: 5px solid var(--blue);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(23, 32, 51, 0.05);
}

.notification-card.active {
    border-left-color: var(--success);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), #ffffff 34%);
}

.notification-card.preview {
    border-left-color: var(--warning);
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.09), #ffffff 34%);
}

.notification-card.disabled {
    border-left-color: #94a3b8;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.1), #ffffff 34%);
}

.notification-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}

.notification-card-head strong {
    display: block;
    margin-top: 4px;
    color: var(--ink);
    font-size: 18px;
}

.notification-card-head p {
    margin: 6px 0 0;
    color: var(--muted);
    line-height: 1.45;
}

.notification-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.notification-facts span {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid #e3eaf2;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    background: rgba(248, 250, 252, 0.82);
}

.notification-facts strong {
    color: var(--ink);
    font-size: 14px;
}

.notification-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.notification-pill-row span {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    max-width: 220px;
    padding: 7px 10px;
    border: 1px solid #d9e4f1;
    border-radius: 999px;
    background: #fff;
    color: var(--ink);
    font-weight: 700;
}

.notification-pill-row small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    overflow-wrap: anywhere;
}

.notification-readiness {
    display: grid;
    gap: 9px;
    padding: 10px;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.9);
}

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

.notification-readiness-head strong {
    color: var(--ink);
}

.notification-readiness-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.notification-readiness-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.notification-readiness-grid span {
    display: grid;
    gap: 2px;
    padding: 8px 9px;
    border: 1px solid #e3eaf2;
    border-radius: 8px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.notification-readiness-grid span.ok {
    border-color: rgba(16, 185, 129, 0.26);
    background: rgba(16, 185, 129, 0.07);
}

.notification-readiness-grid span.warn {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.07);
}

.notification-readiness-grid strong {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.notification-missing {
    display: grid;
    gap: 6px;
}

.notification-missing > strong {
    color: var(--ink);
    font-size: 12px;
}

.notification-missing span {
    padding: 8px 10px;
    border: 1px solid #fde6b6;
    border-radius: 8px;
    background: #fff8e5;
    color: #8a5a00;
    font-size: 12px;
    font-weight: 700;
}

.notification-preference-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.notification-preference {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
    padding: 8px 10px;
    border: 1px solid #e3eaf2;
    border-radius: 8px;
    background: #fff;
}

.notification-preference.active {
    border-color: rgba(13, 148, 136, 0.35);
    background: #f0fdfa;
}

.notification-preference input {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
}

.notification-preference span {
    display: grid;
    gap: 3px;
}

.notification-preference strong {
    color: var(--ink);
}

.notification-preference small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.notification-preference-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.notification-preference-actions .primary-button,
.notification-preference-actions .secondary-button {
    width: auto;
    min-height: 44px;
    padding: 10px 18px;
}

.notification-preference-actions .form-message {
    margin: 0;
}

.notification-preference input:disabled + span {
    opacity: 0.72;
}

.notification-preview {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.92);
}

.notification-preview.empty p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
}

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

.notification-preview-head strong {
    color: var(--ink);
}

.notification-preview-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.notification-preview-list {
    display: grid;
    gap: 7px;
}

.notification-preview-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.notification-preview-summary span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 5px 9px;
    border: 1px solid #dce7f2;
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.notification-preview-summary strong {
    color: var(--ink);
}

.notification-preview-summary .customs {
    border-color: rgba(13, 148, 136, 0.28);
    background: rgba(13, 148, 136, 0.08);
}

.notification-preview-summary .urgent_declaration {
    border-color: rgba(245, 158, 11, 0.28);
    background: rgba(245, 158, 11, 0.08);
}

.notification-preview-summary .live_debt,
.notification-preview-summary .login_error {
    border-color: rgba(220, 38, 38, 0.22);
    background: rgba(220, 38, 38, 0.06);
}

.notification-preview-groups {
    display: grid;
    gap: 10px;
}

.notification-preview-group {
    display: grid;
    gap: 7px;
}

.notification-preview-group-title {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 850;
}

.notification-preview-group-title strong {
    color: var(--ink);
}

.notification-preview-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid #e1eaf3;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #fff;
}

.notification-preview-item.live_debt,
.notification-preview-item.login_error {
    border-left-color: var(--danger);
}

.notification-preview-item.urgent_declaration {
    border-left-color: var(--warning);
}

.notification-preview-item.customs {
    border-left-color: var(--accent);
}

.notification-preview-item span,
.notification-preview-item small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.notification-preview-item strong {
    display: block;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.notification-preview-item > div:last-child {
    text-align: right;
}

.notification-preview-more {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.notification-outbox {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid #dce7f2;
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.92);
}

.notification-outbox.empty p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
}

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

.notification-outbox-head strong {
    color: var(--ink);
}

.notification-outbox-head span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 750;
}

.notification-outbox-list {
    display: grid;
    gap: 7px;
}

.notification-outbox-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 9px 10px;
    border: 1px solid #e1eaf3;
    border-left: 4px solid var(--blue);
    border-radius: 8px;
    background: #fff;
}

.notification-outbox-item.sent {
    border-left-color: var(--success);
}

.notification-outbox-item.failed,
.notification-outbox-item.blocked {
    border-left-color: var(--danger);
    background: rgba(220, 38, 38, 0.035);
}

.notification-outbox-item.running {
    border-left-color: var(--accent);
}

.notification-outbox-item span,
.notification-outbox-item small {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
}

.notification-outbox-item strong {
    display: block;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.notification-outbox-item > div:last-child {
    text-align: right;
}

.notification-outbox-item .outbox-status {
    display: inline-flex;
    justify-content: center;
    margin-bottom: 3px;
    padding: 5px 9px;
    border-radius: 999px;
    background: #eef5ff;
    color: #1d4ed8;
    font-size: 12px;
}

.notification-outbox-item.sent .outbox-status {
    background: #e8fbf2;
    color: #166534;
}

.notification-outbox-item.failed .outbox-status,
.notification-outbox-item.blocked .outbox-status {
    background: #fff0f0;
    color: #b91c1c;
}

.notification-outbox-item.running .outbox-status {
    background: #e7fffb;
    color: var(--accent);
}

.notification-outbox-item .outbox-error {
    max-width: 320px;
    color: #b91c1c;
    overflow-wrap: anywhere;
}

.auto-check-card.active {
    border-left-color: var(--success);
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), #ffffff 34%);
}

.auto-check-card.disabled {
    border-left-color: #94a3b8;
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.1), #ffffff 34%);
}

.auto-check-card strong {
    display: block;
    margin-top: 4px;
    font-size: 18px;
    color: var(--ink);
}

.auto-check-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.auto-check-facts span {
    display: grid;
    gap: 2px;
    padding: 8px 10px;
    border: 1px solid #e3eaf2;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    background: rgba(248, 250, 252, 0.82);
}

.auto-check-facts strong {
    margin: 0;
    font-size: 14px;
}

.checks-summary-grid .metric-card small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.35;
}

.system-health-strip {
    margin: 12px 0 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.system-health-item {
    min-width: 0;
    padding: 9px 10px;
    display: grid;
    gap: 3px;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #64748b;
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    line-height: 1.25;
}

.system-health-item strong {
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.system-health-item small {
    color: inherit;
    font-size: 10.5px;
    font-weight: 650;
}

.system-health-item.ok {
    border-left-color: #16a34a;
    background: #f0fdf8;
}

.system-health-item.warning,
.system-health-item.running {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.system-health-item.problem {
    border-left-color: var(--danger);
    background: #fff7f7;
}

.system-health-item.ok strong {
    color: #166534;
}

.system-health-item.warning strong,
.system-health-item.running strong {
    color: #92400e;
}

.system-health-item.problem strong {
    color: var(--danger);
}

.check-flow {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.check-step {
    min-width: 0;
    padding: 10px 10px;
    display: grid;
    gap: 3px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
    color: #334155;
    text-align: center;
}

.check-step strong {
    min-width: 0;
    color: var(--ink);
    font-size: 12px;
    font-weight: 780;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.check-step small {
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.25;
}

.check-step.done {
    border-color: #bbf7d0;
    background: #f0fdf8;
}

.check-step.done strong,
.check-step.done small {
    color: #166534;
}

.check-step.running {
    border-color: var(--selection-border);
    background: var(--selection-soft);
}

.check-step.running strong,
.check-step.running small {
    color: var(--selection-strong);
}

.check-step.problem {
    border-color: #fecaca;
    background: #fff7f7;
}

.check-step.problem strong,
.check-step.problem small {
    color: var(--danger);
}

.check-step.pending {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.check-result-card-list {
    margin-top: 14px;
    display: grid;
    gap: 12px;
}

.check-run-problem-card {
    min-width: 0;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    border: 1px solid #fecaca;
    border-left: 5px solid var(--danger);
    border-radius: 8px;
    background: #fff7f7;
    color: var(--danger);
}

.check-run-problem-card strong {
    display: block;
    margin-top: 3px;
    color: var(--danger);
    font-size: 16px;
    line-height: 1.25;
}

.check-run-problem-card p {
    margin: 7px 0 0;
    color: #991b1b;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.check-run-problem-card small {
    flex: 0 0 auto;
    color: #991b1b;
    font-size: 12px;
    font-weight: 750;
    white-space: nowrap;
}

.check-subject-card {
    min-width: 0;
    padding: 14px;
    display: grid;
    gap: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.check-subject-card.has-issues {
    border-color: #fecaca;
}

.check-subject-head,
.check-module-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.check-subject-status {
    display: grid;
    justify-items: end;
    gap: 6px;
}

.check-subject-status small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
}

.check-checkpoint-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.check-checkpoint {
    min-width: 0;
    padding: 10px 12px;
    display: grid;
    gap: 5px;
    border: 1px solid var(--line);
    border-left: 4px solid #64748b;
    border-radius: 8px;
    background: #f8fbfd;
}

.check-checkpoint.declared,
.check-checkpoint.ne_afat {
    border-left-color: #16a34a;
    background: #f0fdf8;
}

.check-checkpoint.warning {
    border-left-color: #f59e0b;
    background: #fffbeb;
}

.check-checkpoint.problem {
    border-left-color: var(--danger);
    background: #fff1f0;
}

.check-checkpoint.disabled,
.check-checkpoint.neutral {
    border-left-color: #94a3b8;
    background: #f8fafc;
}

.check-checkpoint span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 750;
    text-transform: uppercase;
}

.check-checkpoint strong {
    color: var(--ink);
    font-size: 15px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.check-module-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
}

.check-module-chip {
    min-width: 0;
    padding: 10px;
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.check-module-title strong {
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: normal;
}

.check-module-title .badge {
    flex: 0 0 auto;
    font-size: 11px;
    white-space: normal;
}

.check-result-note {
    margin: 0;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.check-result-note.error {
    border: 1px solid #fecaca;
    background: #fff7f7;
    color: var(--danger);
}

.check-result-note.success {
    border: 1px solid #bbf7d0;
    background: #f0fdf8;
    color: #166534;
}

.check-result-note.info {
    border: 1px solid #dbe7f7;
    background: #f8fbfd;
    color: var(--muted);
}

.check-card-hint {
    margin: 0;
    padding: 9px 10px;
    border: 1px solid #dbe7f7;
    border-radius: 8px;
    background: #f8fbfd;
    color: var(--muted);
    font-size: 12px;
    font-weight: 650;
    line-height: 1.4;
}

.check-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compact-button {
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: none;
}

.check-declaration-card-list {
    display: none;
}

.check-declaration-subject-card {
    min-width: 0;
    padding: 12px;
    display: grid;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.check-declaration-subject-head,
.check-declaration-chip-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.check-declaration-subject-head > span {
    flex: 0 0 auto;
    padding: 6px 8px;
    border-radius: 999px;
    background: #eef3f8;
    color: #475569;
    font-size: 11px;
    font-weight: 750;
}

.check-declaration-chip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.check-declaration-chip {
    min-width: 0;
    padding: 10px;
    display: grid;
    gap: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.check-declaration-chip strong {
    min-width: 0;
    color: var(--ink);
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: normal;
}

.check-declaration-chip .badge {
    flex: 0 0 auto;
    font-size: 11px;
    line-height: 1.1;
    white-space: normal;
}

.check-declaration-chip small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.list-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    justify-self: end;
    padding-bottom: 10px;
}

.responsibility-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbfd;
}

.checkbox-line {
    display: flex;
    grid-template-columns: none;
    gap: 8px;
    align-items: center;
    min-height: 36px;
}

.checkbox-line input {
    width: 18px;
    min-height: 18px;
    height: 18px;
    padding: 0;
    flex: 0 0 auto;
}

@media (max-width: 1040px) {
    .app-header-inner {
        width: min(1500px, calc(100% - 24px));
        grid-template-columns: minmax(0, 1fr) auto auto;
        padding: 10px 0 8px;
        gap: 10px 12px;
    }

    .brand-logo {
        width: 224px;
    }

    .header-right {
        display: contents;
    }

    .app-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
    }

    .user-menu {
        grid-column: 2;
        grid-row: 1;
        justify-self: end;
    }

    .logout-button {
        grid-column: 3;
        grid-row: 1;
    }

    .summary-grid,
    .checks-summary-grid,
    .form-grid,
    .detail-grid,
    .user-create-grid,
    .responsibility-grid,
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shortcut-grid {
        grid-template-columns: 1fr;
    }

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

    .tenant-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .tenant-hero-actions {
        justify-content: start;
        grid-template-columns: minmax(0, 1fr);
    }

    .tenant-actions-only .tenant-hero-actions,
    .tenant-actions-only .check-chip {
        width: 100%;
    }

    .tenant-metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

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

    .subscription-header {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        align-items: start;
    }

    .subscription-header .secondary-button {
        justify-self: start;
        width: auto;
    }

    .security-layout {
        grid-template-columns: 1fr;
    }

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

@media (min-width: 761px) and (max-width: 1040px) {
    .workspace:has(#tenantHome.active-view) {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
        align-items: start;
    }

    .workspace:has(#tenantHome.active-view) > .topbar {
        grid-column: 1;
        grid-row: 1;
        align-self: stretch;
    }

    #tenantHome.active-view {
        display: contents !important;
    }

    #tenantHome.active-view > .tenant-actions-only {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        margin-top: 0;
        align-self: stretch;
        justify-self: end;
    }

    #tenantHome.active-view > .tenant-actions-only .tenant-hero-actions {
        height: 100%;
        grid-template-columns: 1fr;
    }

    #tenantHome.active-view > .tenant-actions-only .check-chip {
        width: 100%;
        height: 100%;
        min-height: 96px;
        padding: 14px 16px;
    }

    #tenantHome.active-view > .tenant-metric-grid {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    #tenantHome.active-view > .panel {
        grid-column: 1 / -1;
        grid-row: 3;
    }
}

@media (max-width: 760px) {
    .login-layout {
        grid-template-columns: 1fr;
        width: min(100% - 24px, 520px);
        gap: 14px;
    }

    .dashboard-layout {
        display: grid;
        grid-template-rows: auto 1fr;
    }

    .login-layout {
        align-items: stretch;
        padding: 14px 0 22px;
    }

    .brand-panel {
        order: 2;
        min-height: 0;
        padding: 22px;
    }

    .login-brand-logo {
        width: min(250px, 100%);
    }

    .login-brand-copy {
        margin: 22px 0 18px;
    }

    .login-brand-copy h1 {
        font-size: clamp(28px, 9vw, 38px);
    }

    .login-brand-copy .lead {
        margin: 12px 0 0;
        font-size: 15px;
        line-height: 1.5;
    }

    .login-brand-company {
        margin-bottom: 3px;
        font-size: 11px;
    }

    .login-system-strip {
        grid-template-columns: 1fr;
        padding: 8px;
    }

    .login-system-strip div {
        padding: 10px 12px;
    }

    .login-card {
        order: 1;
        min-height: 0;
        padding: 24px;
        gap: 17px;
    }

    .login-card-logo {
        display: block;
        width: min(270px, 100%);
        height: auto;
        margin-bottom: 8px;
    }

    .login-card-heading h2 {
        font-size: 25px;
    }

    .login-card input {
        min-height: 46px;
    }

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

    .brand-logo {
        width: 188px;
    }

    .app-nav {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        padding: 4px;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 4px;
        overflow-x: hidden;
        scrollbar-width: none;
    }

    .app-nav::-webkit-scrollbar {
        display: none;
    }

    .nav-link {
        min-width: 0;
        width: 100%;
        min-height: 34px;
        justify-content: center;
        padding: 7px 5px;
        overflow: hidden;
        text-align: center;
        text-overflow: ellipsis;
        font-size: clamp(10.5px, 2.85vw, 13px);
    }

    .user-card {
        min-height: 40px;
        gap: 7px;
        padding: 4px 8px 4px 4px;
    }

    .user-menu-dropdown {
        width: min(190px, calc(100vw - 32px));
    }

    .avatar {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }

    .user-text strong {
        font-size: 12px;
    }

    .user-text span {
        max-width: 130px;
        font-size: 11px;
    }

    .logout-button {
        min-width: 54px;
        min-height: 40px;
        padding-inline: 12px;
    }

    .workspace {
        width: min(100% - 16px, 1500px);
        margin: 16px auto 28px;
        padding: 0;
        gap: 14px;
    }

    .topbar,
    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .compact-action-panel {
        gap: 10px;
        padding-top: 12px;
    }

    .compact-action-header {
        flex-direction: row;
        align-items: stretch;
        justify-content: stretch;
    }

    .compact-action-header > button {
        width: 100%;
    }

    .summary-grid,
    .tenant-metric-grid,
    .checks-summary-grid,
    .form-grid,
    .detail-grid,
    .compact-grid,
    .user-create-grid,
    .user-admin-controls,
    .role-grid,
    .responsibility-grid,
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .tenant-hero-title {
        align-items: flex-start;
    }

    .dashboard-mark {
        width: 54px;
        height: 54px;
        font-size: 20px;
    }

    .tenant-hero-actions {
        grid-template-columns: repeat(auto-fit, minmax(clamp(108px, 30vw, 150px), 1fr));
        gap: 8px;
    }

    .home-subject-toolbar {
        width: 100%;
        min-width: 0;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .home-subject-search {
        width: 100%;
    }

    .home-status-filter {
        width: 100%;
    }

    .home-subject-action-buttons {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .home-subject-action-buttons .primary-button,
    .home-subject-action-buttons .secondary-button {
        width: 100%;
        min-height: 44px;
        padding-inline: 10px;
    }

    .home-subject-action-buttons .primary-button {
        min-width: 0;
    }

    .subject-list-toolbar {
        grid-template-columns: 1fr;
    }

    .subject-list-header {
        display: grid;
        align-items: stretch;
    }

    .subject-list-header .primary-button {
        width: 100%;
    }

    .subject-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        margin-top: 12px;
    }

    .subject-summary-card {
        min-height: 86px;
        padding: 13px 12px 13px 28px;
        gap: 6px;
    }

    .subject-summary-card::before {
        left: 12px;
        top: 14px;
        bottom: 14px;
        width: 4px;
    }

    .subject-summary-card span {
        font-size: 12px;
    }

    .subject-summary-card strong {
        font-size: 25px;
    }

    .subject-summary-card.subject-summary-compact {
        display: none;
    }

    .subject-list-toolbar-modern {
        grid-template-columns: 1fr;
        padding: 10px;
        gap: 10px;
    }

    .subject-directory-stats {
        justify-content: flex-start;
    }

    .subject-table-wrap {
        display: none;
    }

    .tenant-subject-card-list {
        display: grid;
        gap: 10px;
        margin-top: 12px;
    }

    .import-file {
        max-width: none;
    }

    .import-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .import-summary {
        gap: 6px;
    }

    .import-summary span {
        flex: 1 1 calc(50% - 6px);
        border-radius: 8px;
    }

    .import-preview table {
        min-width: 760px;
    }

    .checks-header {
        align-items: stretch;
    }

    .checks-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        width: 100%;
    }

    .checks-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .auto-check-card {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 12px;
    }

    .auto-check-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .notification-card-head {
        display: grid;
    }

    .notification-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .notification-readiness-head {
        display: grid;
    }

    .notification-readiness-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .notification-preference-grid {
        grid-template-columns: 1fr;
    }

    .notification-preference-actions,
    .notification-preference-actions .primary-button,
    .notification-preference-actions .secondary-button {
        width: 100%;
    }

    .notification-preview-head,
    .notification-preview-item,
    .notification-outbox-head,
    .notification-outbox-item {
        grid-template-columns: 1fr;
    }

    .notification-preview-head,
    .notification-outbox-head {
        display: grid;
    }

    .notification-preview-item > div:last-child,
    .notification-outbox-item > div:last-child {
        text-align: left;
    }

    .checks-summary-grid .metric-card {
        min-height: 76px;
        padding: 11px 10px 10px 26px;
        border-radius: 8px;
        gap: 6px;
        align-content: center;
        box-shadow: 0 8px 20px rgba(23, 32, 51, 0.06);
    }

    .checks-summary-grid .metric-card::before {
        left: 12px;
        top: 14px;
        bottom: 14px;
        width: 3px;
    }

    .checks-summary-grid .metric-card span {
        font-size: 11px;
        line-height: 1.18;
    }

    .checks-summary-grid .metric-card strong {
        margin-top: 0;
        font-size: 22px;
    }

    .checks-summary-grid #tenantCheckLastStatus {
        font-size: 20px;
    }

    .check-progress-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .check-flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .system-health-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .system-health-item {
        padding: 8px;
    }

    .system-health-item strong {
        font-size: 12px;
    }

    .check-step {
        padding: 8px;
    }

    .check-step strong {
        font-size: 11px;
    }

    .check-step small {
        font-size: 10px;
    }

    .check-result-table {
        display: none;
    }

    .check-run-problem-card {
        padding: 11px;
        display: grid;
        gap: 8px;
    }

    .check-run-problem-card strong {
        font-size: 14px;
    }

    .check-run-problem-card p {
        font-size: 12px;
    }

    .check-run-problem-card small {
        white-space: normal;
    }

    .check-declaration-table {
        display: none;
    }

    .check-declaration-card-list {
        display: grid;
        gap: 10px;
    }

    .check-declaration-subject-card {
        padding: 10px;
    }

    .check-declaration-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .check-declaration-chip {
        padding: 8px;
        gap: 6px;
    }

    .check-declaration-chip-head {
        gap: 6px;
    }

    .check-declaration-chip strong {
        font-size: 12px;
        line-height: 1.2;
    }

    .check-declaration-chip .badge {
        padding: 5px 7px;
        font-size: 10px;
    }

    .check-declaration-chip small {
        font-size: 10.5px;
    }

    .check-subject-card {
        padding: 10px;
        gap: 10px;
    }

    .check-subject-head {
        align-items: center;
    }

    .check-subject-status small {
        font-size: 10px;
    }

    .check-checkpoint-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
    }

    .check-checkpoint {
        padding: 8px 7px;
        border-left-width: 3px;
    }

    .check-checkpoint span {
        font-size: 9.5px;
        line-height: 1.15;
    }

    .check-checkpoint strong {
        font-size: 12px;
        line-height: 1.2;
    }

    .check-module-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .check-module-chip {
        padding: 8px;
    }

    .check-module-title {
        gap: 6px;
    }

    .check-module-title strong {
        font-size: 12px;
    }

    .check-module-title .badge {
        padding: 5px 7px;
        font-size: 10px;
        line-height: 1.1;
    }

    .list-count {
        justify-self: start;
        padding-bottom: 0;
    }

    .tenant-hero-actions > *,
    .tenant-hero-actions .primary-button,
    .tenant-hero-actions .secondary-button,
    .check-chip {
        width: auto;
        min-width: 0;
        min-height: 50px;
        padding-left: 10px;
        padding-right: 10px;
    }

    #tenantHome.active-view > .tenant-actions-only {
        margin-top: -2px;
    }

    #tenantHome.active-view .check-chip {
        width: min(100%, 380px);
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 8px 12px;
    }

    .check-chip span {
        font-size: 11px;
    }

    .check-chip strong {
        font-size: 13px;
        text-align: right;
        white-space: normal;
    }

    .tenant-hero-actions .primary-button,
    .tenant-hero-actions .secondary-button {
        font-size: 13px;
    }

    .tenant-metric-grid {
        grid-template-columns: repeat(auto-fit, minmax(clamp(108px, 30vw, 150px), 1fr));
        gap: 8px;
    }

    .tenant-metric-grid .metric-card {
        min-height: 74px;
        padding: 11px 10px 10px 26px;
        border-radius: 8px;
        gap: 6px;
        align-content: center;
        box-shadow: 0 8px 20px rgba(23, 32, 51, 0.06);
    }

    .tenant-metric-grid .metric-card::before {
        left: 12px;
        top: 14px;
        bottom: 14px;
        width: 3px;
    }

    .tenant-metric-grid .metric-card span {
        font-size: 11px;
        line-height: 1.18;
        overflow-wrap: anywhere;
    }

    .tenant-metric-grid .metric-card strong {
        margin-top: 0;
        font-size: 22px;
    }

    .detail-tabbar {
        position: static;
        display: flex;
        gap: 8px;
        margin: 0 -2px 10px;
        padding: 8px 2px 10px;
        overflow-x: auto;
        background: var(--surface);
        scrollbar-width: thin;
    }

    .detail-grid {
        margin-top: 8px;
        gap: 12px;
    }

    .panel {
        padding: 16px;
    }

    table {
        min-width: 620px;
    }

    .compact-table table {
        min-width: 680px;
    }

    .compact-table .home-report-table {
        width: 100%;
        min-width: 100%;
    }

    .home-report-wrap {
        display: none;
        overflow-x: visible;
    }

    .home-report-table {
        min-width: 100%;
        table-layout: fixed;
    }

    .home-report-table th,
    .home-report-table td {
        padding: 10px 6px;
        font-size: 12px;
    }

    .home-report-table th:nth-child(1),
    .home-report-table td:nth-child(1) {
        width: 9%;
    }

    .home-report-table th:nth-child(2),
    .home-report-table td:nth-child(2) {
        width: 35%;
    }

    .home-report-table th:nth-child(3),
    .home-report-table td:nth-child(3) {
        width: 30%;
        overflow-wrap: anywhere;
    }

    .home-report-table th:nth-child(4),
    .home-report-table td:nth-child(4) {
        width: 26%;
    }

    .home-report-table th:nth-child(n+5),
    .home-report-table tr.tenant-home-subject-row td:nth-child(n+5) {
        display: none;
    }

    .home-report-table .tenant-name strong {
        display: block;
        line-height: 1.25;
        overflow-wrap: anywhere;
    }

    .home-report-table .badge {
        min-height: 24px;
        padding: 3px 6px;
        font-size: 10px;
        line-height: 1.15;
        white-space: normal;
    }

    .tenant-home-mobile-detail.expanded {
        display: table-row;
    }

    .home-report-table tr.tenant-home-mobile-detail > .mobile-detail-cell {
        display: table-cell;
        width: 100% !important;
        padding: 0 !important;
        background: #f8fbfd;
    }

    .mobile-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 10px 8px 12px;
    }

    .mobile-status-chip {
        padding: 8px;
        gap: 5px;
    }

    .mobile-status-chip .badge {
        justify-self: start;
        max-width: 100%;
    }

    .mobile-subject-list {
        display: grid;
        gap: 8px;
        margin-top: 12px;
    }

    .mobile-subject-card {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
    }

    .mobile-subject-summary {
        width: 100%;
        min-height: 70px;
        display: grid;
        grid-template-columns: 24px minmax(68px, 1fr) minmax(86px, 0.9fr) minmax(96px, auto);
        gap: 6px;
        align-items: center;
        padding: 11px 10px;
        border: 0;
        background: #ffffff;
        color: var(--ink);
        text-align: left;
    }

    .mobile-subject-card.expanded .mobile-subject-summary {
        background: #f8fbfd;
        border-bottom: 1px solid var(--line);
    }

    .mobile-subject-summary > span {
        min-width: 0;
    }

    .mobile-subject-summary small {
        display: block;
        margin-bottom: 5px;
        color: #56647a;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
    }

    .mobile-subject-summary strong {
        display: block;
        min-width: 0;
        font-size: 13px;
        line-height: 1.22;
        overflow-wrap: anywhere;
    }

    .mobile-subject-status .badge {
        max-width: 100%;
        padding: 5px 8px;
        font-size: 11px;
        line-height: 1.1;
        white-space: nowrap;
    }

    .mobile-subject-detail {
        display: none;
        background: #f8fbfd;
    }

    .mobile-subject-card.expanded .mobile-subject-detail {
        display: block;
    }

    .mobile-subject-actions {
        display: flex;
        justify-content: stretch;
        padding: 0 10px 12px;
        background: #f8fbfd;
    }

    .mobile-subject-actions .subject-scan-button {
        width: 100%;
        min-height: 42px;
    }

    .mobile-subject-detail .mobile-status-grid {
        padding: 9px 10px 12px;
    }

    .mobile-subject-detail .mobile-status-chip {
        min-height: 74px;
        align-content: center;
    }

    .mobile-subject-detail .badge {
        width: fit-content;
        max-width: 100%;
        padding: 5px 9px;
        font-size: 11px;
        line-height: 1.1;
    }

    .detail-grid > .detail-section {
        display: none;
    }

    .detail-grid > .detail-section.active-mobile-section {
        display: block;
    }

    .users-section,
    .subjects-section {
        grid-column: auto;
    }

    .section-heading-row {
        flex-direction: column;
    }

    .declaration-overview-header {
        align-items: stretch;
    }

    .declaration-overview-toggle {
        width: 100%;
        justify-self: stretch;
    }

    .declaration-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
        padding: 4px;
        overflow: hidden;
    }

    .declaration-tab-button {
        min-width: 0;
        min-height: 36px;
        padding: 7px 5px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: clamp(11px, 2.9vw, 13px);
    }

    .declaration-section-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .workflow-lock {
        align-self: flex-start;
    }

    .declaration-action-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .declaration-action-card {
        min-height: 0;
        padding: 11px 12px 11px 16px;
    }

    .declaration-action-card.active {
        padding: 10px 11px 10px 15px;
    }

    .declaration-action-card.active::before {
        top: 10px;
        bottom: 10px;
        width: 4px;
    }

    .declaration-action-card.active::after {
        right: 9px;
        top: 9px;
        font-size: 9px;
    }

    .declaration-picker-grid {
        grid-template-columns: 1fr;
    }

    .declaration-type-options {
        grid-template-columns: 1fr 1fr;
    }

    .declaration-type-option {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 12px;
    }

    .declaration-candidate-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .declaration-selection-bar {
        grid-template-columns: 1fr;
    }

    .selection-actions {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .selection-actions #tenantDeclarationPrepareButton {
        grid-column: 1 / -1;
    }

    .declaration-review,
    .declaration-session {
        padding: 11px;
    }

    .declaration-review-header,
    .declaration-review-footer,
    .declaration-session-header {
        display: grid;
        gap: 9px;
    }

    .declaration-review-status {
        width: fit-content;
        max-width: 100%;
    }

    .declaration-review-subject {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .declaration-review-items {
        display: grid;
        grid-template-columns: 1fr;
    }

    .declaration-review-footer > div {
        display: grid;
        grid-template-columns: 1fr;
    }

    .declaration-session-list article {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .declaration-session-list .badge {
        width: fit-content;
    }

    .modal-card {
        padding: 14px;
    }

    .modal-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .declaration-submit-metrics {
        grid-template-columns: 1fr;
    }

    .declaration-candidate-card {
        gap: 9px;
        padding: 10px;
    }

    .candidate-topline {
        grid-template-columns: 28px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .candidate-check {
        align-self: start;
    }

    .candidate-detail-grid {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .candidate-detail-item {
        min-height: 54px;
        grid-template-columns: 76px minmax(0, 1fr);
        align-items: center;
        gap: 8px;
        padding: 8px 10px;
    }

    .candidate-detail-item span {
        font-size: 10px;
    }

    .candidate-detail-item strong {
        font-size: 12px;
    }

    .candidate-detail-type {
        grid-template-columns: 76px minmax(0, 1fr) auto;
    }

    .candidate-detail-type span {
        grid-column: auto;
    }

    .candidate-detail-item em {
        justify-self: end;
        margin-left: 6px;
    }

    .candidate-status {
        justify-items: end;
    }

    .candidate-status .badge {
        max-width: 116px;
        white-space: normal;
        text-align: center;
        line-height: 1.2;
    }

    .declaration-head-metrics {
        width: 100%;
        justify-content: space-between;
    }

    .tax-matrix-wrap {
        display: none;
    }

    .tax-mobile-list {
        display: grid;
        gap: 8px;
    }

    .tax-mobile-card {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
    }

    .tax-mobile-summary {
        width: 100%;
        min-height: 70px;
        display: grid;
        grid-template-columns: 24px minmax(72px, 1fr) minmax(92px, 0.95fr) minmax(88px, auto) 24px;
        gap: 6px;
        align-items: center;
        padding: 11px 10px;
        border: 0;
        background: #ffffff;
        color: var(--ink);
        text-align: left;
    }

    .tax-mobile-card.expanded .tax-mobile-summary {
        background: #f8fbfd;
        border-bottom: 1px solid var(--line);
    }

    .tax-mobile-summary > span {
        min-width: 0;
    }

    .tax-mobile-summary small,
    .tax-mobile-last-check span {
        display: block;
        margin-bottom: 5px;
        color: #56647a;
        font-size: 10px;
        font-weight: 700;
        line-height: 1;
        text-transform: uppercase;
    }

    .tax-mobile-summary strong,
    .tax-mobile-last-check strong {
        display: block;
        min-width: 0;
        font-size: 13px;
        line-height: 1.22;
        overflow-wrap: anywhere;
    }

    .tax-mobile-summary .badge {
        max-width: 100%;
        padding: 5px 8px;
        font-size: 11px;
        line-height: 1.1;
        white-space: normal;
    }

    .tax-mobile-summary .tax-expand-indicator {
        justify-self: end;
    }

    .tax-mobile-detail {
        display: none;
        background: #f8fbfd;
    }

    .tax-mobile-card.expanded .tax-mobile-detail {
        display: block;
    }

    .tax-mobile-detail .tax-detail-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding: 9px 10px 12px;
    }

    .tax-mobile-detail .tax-detail-wrapper.active {
        grid-column: 1 / -1;
    }

    .tax-mobile-detail .tax-detail-item {
        min-height: 74px;
        padding: 8px;
        gap: 6px;
    }

    .tax-mobile-detail .tax-detail-wrapper.active .tax-detail-item {
        min-height: 0;
        align-items: center;
    }

    .tax-mobile-detail .tax-detail-item > div {
        gap: 5px;
    }

    .tax-mobile-detail .tax-detail-title-row {
        gap: 5px;
    }

    .tax-mobile-detail .tax-detail-item strong {
        font-size: 12px;
        line-height: 1.2;
        overflow-wrap: normal;
    }

    .tax-mobile-detail .tax-detail-item .badge {
        max-width: 100%;
        padding: 5px 8px;
        font-size: 11px;
        line-height: 1.1;
        white-space: normal;
    }

    .tax-mobile-detail .tax-info-card {
        padding: 8px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
    }

    .tax-mobile-detail .tax-info-row {
        padding: 7px;
    }

    .tax-mobile-detail .tax-info-row span {
        font-size: 10px;
    }

    .tax-mobile-detail .tax-info-row strong {
        font-size: 12px;
    }

    .tax-mobile-last-check {
        margin: 0 10px 12px;
        padding: 10px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
    }

    .live-debt-grid {
        grid-template-columns: 1fr;
    }

    .payment-toolbar {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .payment-search {
        width: 100%;
    }

    .live-debt-card-head,
    .live-debt-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .live-debt-actions {
        justify-content: stretch;
    }

    .live-debt-actions .compact-button {
        width: 100%;
    }

    .payment-order-table-wrap {
        display: none;
    }

    .payment-order-card-list {
        display: grid;
        gap: 10px;
    }

    .payment-order-card-head {
        align-items: center;
    }

    .user-create-grid .form-actions,
    .subject-form .form-actions {
        justify-content: stretch;
    }

    .user-create-grid .form-actions button,
    .subject-form .form-actions button {
        flex: 1 1 100%;
    }

    .subject-editor-header {
        display: grid;
        align-items: stretch;
    }

    .subject-editor-header .secondary-button {
        width: 100%;
    }

    .subject-editor-panel {
        padding: 10px;
    }

    .subject-form-modern {
        gap: 10px;
    }

    .subject-form-section summary {
        align-items: flex-start;
        padding: 12px;
    }

    .subject-form-section summary strong {
        font-size: 16px;
    }

    .subject-form-section summary small,
    .subject-toggle-row small {
        font-size: 12px;
    }

    .subject-form-section-body {
        padding: 0 12px 12px;
    }

    .subject-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .responsibility-chip-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .responsibility-chip span {
        min-height: 42px;
        padding: 9px 10px;
        font-size: 13px;
    }

    .subject-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 5;
        display: grid;
        grid-template-columns: 1fr;
        margin: 2px -10px -10px;
        padding: 10px;
        border-top: 1px solid var(--line);
        background: rgba(244, 247, 251, 0.96);
        backdrop-filter: blur(10px);
    }

    .subscription-header,
    .security-header {
        display: grid;
        align-items: start;
    }

    .subscription-header .secondary-button {
        width: 100%;
    }

    .subscription-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .subscription-module-toolbar {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 10px;
    }

    .subscription-module-summary {
        justify-content: flex-start;
        width: 100%;
        border-radius: 8px;
        white-space: normal;
    }

    .subscription-plan-card,
    .subscription-stat-card {
        min-height: 92px;
        padding: 13px 12px 13px 32px;
        box-shadow: 0 8px 18px rgba(23, 32, 51, 0.055);
    }

    .subscription-plan-card::before,
    .subscription-stat-card::before {
        left: 10px;
        top: 14px;
        bottom: 14px;
        width: 3px;
    }

    .subscription-plan-card span,
    .subscription-stat-card span,
    .limit-mini-card span {
        font-size: 12px;
    }

    .subscription-plan-card strong,
    .subscription-stat-card strong {
        font-size: 18px;
        line-height: 1.2;
    }

    .subscription-plan-card small {
        font-size: 11px;
    }

    .module-card-grid,
    .limit-card-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .module-mini-card {
        padding: 10px;
    }

    .security-mark {
        display: none;
    }

    .security-status-grid {
        grid-template-columns: 1fr;
    }

    .security-account-card {
        padding: 12px;
    }

    .security-avatar {
        width: 48px;
        height: 48px;
        font-size: 16px;
    }

    .security-form-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .security-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 30px;
    }
}

@media (max-width: 430px) {
    .tenant-subject-card-grid {
        grid-template-columns: 1fr;
    }

    .user-text span {
        display: none;
    }

    .brand-logo {
        width: 158px;
    }
}
