:root {
    --ink: #171427;
    --ink-soft: #5e5a73;
    --line: rgba(23, 20, 39, 0.09);
    --line-strong: rgba(23, 20, 39, 0.16);
    --surface: rgba(255, 255, 255, 0.88);
    --surface-strong: #ffffff;
    --surface-soft: rgba(244, 246, 250, 0.78);
    --surface-accent: rgba(255, 0, 0, 0.06);
    --accent: #ff0000;
    --accent-dark: #c10000;
    --accent-soft: rgba(255, 0, 0, 0.12);
    --success: #14805d;
    --warning: #a76a00;
    --danger: #cf3d18;
    --shadow-soft: 0 24px 60px rgba(13, 12, 25, 0.08);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: "Space Grotesk", "Inter", system-ui, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 0, 0, 0.12), transparent 24%),
        linear-gradient(180deg, #f9faf8 0%, #edf1eb 100%);
}

body {
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.shell {
    min-height: 100vh;
}

.auth-screen {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 32px 0 48px;
}

.auth-card,
.app-sidebar,
.app-topbar,
.panel,
.stat-card,
.overview-card {
    border: 1px solid var(--line);
    background: var(--surface);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

.auth-card {
    padding: 32px;
    border-radius: 32px;
    display: grid;
    gap: 32px;
}

.auth-brand {
    display: flex;
    gap: 18px;
    align-items: center;
}

.auth-logo,
.app-sidebar__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
}

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

h1,
h2,
h3,
h4,
p {
    margin: 0;
}

.lede,
.panel-copy p,
.app-topbar__summary,
.panel__header p,
.overview-card p,
.empty-state p,
.user-card span,
.user-card small {
    color: var(--ink-soft);
    line-height: 1.6;
}

.grid-panel {
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: 24px;
}

.panel-copy,
.form-card {
    padding: 24px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(23, 20, 39, 0.08);
}

.bullet-list,
.flash-list {
    margin: 16px 0 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
}

.form-card,
.stack-form {
    display: grid;
    gap: 20px;
}

.field {
    display: grid;
    gap: 8px;
}

.field span,
.panel h3,
.form-section__header h4 {
    font-weight: 700;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid rgba(23, 20, 39, 0.12);
    border-radius: 16px;
    padding: 14px 16px;
    background: rgba(244, 246, 250, 0.88);
    color: var(--ink);
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.field textarea {
    resize: vertical;
    min-height: 120px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: none;
    border-color: rgba(255, 0, 0, 0.32);
    box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.08);
    background: var(--surface-strong);
}

.field input[disabled] {
    opacity: 0.72;
    cursor: not-allowed;
}

.field--full {
    grid-column: 1 / -1;
}

.remember-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 14px;
}

.primary-button,
.secondary-button,
.locale-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 14px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.primary-button {
    background: var(--accent);
    color: #fff;
}

.primary-button:hover,
.secondary-button:hover,
.locale-pill:hover {
    transform: translateY(-1px);
}

.secondary-button {
    background: transparent;
    color: var(--ink);
    border-color: var(--line-strong);
}

.secondary-button--small {
    padding: 10px 14px;
    font-size: 14px;
}

.flash-stack {
    margin-top: 16px;
}

.flash {
    border-radius: 18px;
    padding: 16px 18px;
    font-weight: 600;
}

.flash-warning {
    background: rgba(251, 188, 11, 0.15);
    color: var(--warning);
}

.flash-success {
    background: rgba(20, 128, 93, 0.14);
    color: var(--success);
}

.flash-info {
    background: rgba(23, 20, 39, 0.08);
    color: var(--ink);
}

.flash-error {
    background: rgba(207, 61, 24, 0.12);
    color: var(--danger);
}

.error {
    color: var(--danger);
    font-size: 12px;
}

.app-screen {
    min-height: 100vh;
    padding: 24px;
}

.app-shell {
    width: min(1480px, 100%);
    margin: 0 auto;
    min-height: calc(100vh - 48px);
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 24px;
}

.app-sidebar {
    border-radius: 28px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.app-sidebar__brand {
    display: grid;
    gap: 16px;
}

.app-sidebar__company {
    font-size: 1.5rem;
    line-height: 1.2;
}

.app-sidebar__legal {
    margin-top: 6px;
    color: var(--ink-soft);
}

.app-sidebar__nav {
    display: grid;
    gap: 18px;
}

.sidebar-link,
.sidebar-sublink {
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid transparent;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.sidebar-link {
    background: rgba(255, 255, 255, 0.66);
    font-weight: 700;
}

.sidebar-link:hover,
.sidebar-sublink:hover {
    transform: translateX(2px);
}

.sidebar-link.is-active,
.sidebar-sublink.is-active {
    background: var(--surface-accent);
    border-color: rgba(255, 0, 0, 0.14);
    color: var(--accent-dark);
}

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

.sidebar-group__title {
    margin: 0 0 2px;
    color: var(--ink-soft);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.sidebar-sublink {
    background: rgba(255, 255, 255, 0.48);
    padding-inline-start: 18px;
}

.app-sidebar__footer {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.locale-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.locale-pill {
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.64);
    border-color: rgba(23, 20, 39, 0.08);
    font-size: 13px;
}

.locale-pill.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.app-main {
    min-width: 0;
    display: grid;
    gap: 16px;
    align-content: start;
}

.app-topbar {
    border-radius: 28px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
}

.app-topbar__copy {
    display: grid;
    gap: 4px;
}

.app-topbar__title {
    font-size: clamp(1.6rem, 2vw, 2.4rem);
    line-height: 1.1;
}

.app-topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-card {
    display: grid;
    gap: 2px;
    justify-items: end;
    text-align: right;
    min-width: 220px;
}

.content-stack {
    display: grid;
    gap: 20px;
    padding-bottom: 24px;
}

.stats-grid,
.detail-grid,
.overview-grid {
    display: grid;
    gap: 20px;
}

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

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

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

.stat-card,
.overview-card {
    border-radius: 24px;
    padding: 24px;
    display: grid;
    gap: 10px;
}

.stat-card span {
    color: var(--ink-soft);
    font-weight: 600;
}

.stat-card strong {
    font-size: clamp(1.6rem, 3vw, 2.5rem);
    line-height: 1;
}

.panel {
    border-radius: 28px;
    padding: 24px;
    display: grid;
    gap: 20px;
}

.panel--flush {
    padding: 0;
    overflow: hidden;
}

.panel__header,
.panel__actions,
.filters-actions,
.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.panel__header {
    align-items: flex-start;
    justify-content: space-between;
}

.filters-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(0, 1fr)) auto;
    align-items: end;
}

.empty-state {
    padding: 40px 24px;
    text-align: center;
}

.table-shell {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.data-table thead th {
    background: rgba(244, 246, 250, 0.9);
    color: var(--ink-soft);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.data-table th,
.data-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.54);
}

.table-action {
    text-align: right;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.status-active {
    background: rgba(20, 128, 93, 0.12);
    color: var(--success);
}

.status-draft {
    background: rgba(251, 188, 11, 0.18);
    color: var(--warning);
}

.status-inactive {
    background: rgba(207, 61, 24, 0.12);
    color: var(--danger);
}

.form-section {
    display: grid;
    gap: 18px;
    padding: 24px;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.58);
}

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

.definition-list {
    display: grid;
    gap: 16px;
    margin: 0;
}

.definition-list div {
    display: grid;
    gap: 4px;
}

.definition-list dt {
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
}

.definition-list dd {
    margin: 0;
    font-weight: 700;
}

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

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

@media (max-width: 980px) {
    .auth-screen {
        width: min(100% - 24px, 1180px);
        padding: 20px 0 32px;
    }

    .grid-panel,
    .app-shell,
    .form-grid,
    .stats-grid,
    .overview-grid,
    .detail-grid,
    .filters-grid {
        grid-template-columns: 1fr;
    }

    .app-screen {
        padding: 16px;
    }

    .app-shell {
        min-height: auto;
    }

    .app-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .app-topbar__actions {
        width: 100%;
        justify-content: space-between;
    }

    .user-card {
        justify-items: start;
        text-align: left;
        min-width: 0;
    }

    .panel__header {
        flex-direction: column;
    }
}

:root {
    --meritron-ink: #030018;
    --meritron-muted: #5b5870;
    --meritron-line: rgba(3, 0, 24, 0.1);
    --meritron-surface: rgba(241, 244, 239, 0.84);
    --meritron-surface-strong: rgba(255, 255, 255, 0.96);
    --meritron-accent: #ff0000;
    --meritron-accent-dark: #c10000;
    --meritron-accent-soft: rgba(255, 0, 0, 0.1);
    --meritron-cream: #f1f4ef;
}

.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;
}

.meritron-shell {
    border: 1px solid var(--meritron-line);
    background: var(--meritron-surface);
    box-shadow:
        0 24px 60px rgba(3, 0, 24, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(18px);
}

.brand-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    width: fit-content;
    border-radius: 9999px;
    border: 1px solid rgba(3, 0, 24, 0.12);
    background: rgba(241, 244, 239, 0.86);
    padding: 0.4rem 0.8rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--meritron-ink);
}

.brand-chip::before {
    display: inline-block;
    width: 0.5rem;
    height: 0.95rem;
    border-radius: 0.2rem;
    background: linear-gradient(180deg, #ff4d4d, var(--meritron-accent-dark));
    content: '';
}

.brand-lockup {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.brand-logo-dark {
    width: min(100%, 220px);
    height: auto;
}

.meritron-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    border: 0;
    border-radius: 1rem;
    padding: 0.95rem 1.2rem;
    font-weight: 700;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        opacity 160ms ease;
}

.meritron-button:hover {
    transform: translateY(-1px);
}

.meritron-button-primary {
    background: linear-gradient(135deg, #ff1d1d, #c10000);
    color: var(--meritron-cream);
    box-shadow: 0 18px 30px rgba(193, 0, 0, 0.24);
}

.meritron-button-secondary {
    border: 1px solid rgba(3, 0, 24, 0.12);
    background: rgba(255, 255, 255, 0.68);
    color: var(--meritron-ink);
}

.meritron-button-secondary:hover {
    border-color: rgba(255, 0, 0, 0.2);
    box-shadow: 0 10px 24px rgba(3, 0, 24, 0.08);
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    border-radius: 1rem;
    padding: 0.8rem 0.95rem;
    color: var(--meritron-ink);
    transition:
        background-color 160ms ease,
        transform 160ms ease;
}

.sidebar-link:hover,
.sidebar-link.is-active {
    background: var(--meritron-accent-soft);
    box-shadow: inset 0 0 0 1px rgba(255, 0, 0, 0.12);
    transform: translateX(2px);
}

.tenant-panel-page {
    min-height: 100vh;
    padding: 1rem;
}

.tenant-panel-grid {
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
    gap: 1rem;
    min-height: calc(100vh - 2rem);
}

.tenant-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
    border-radius: 2rem;
    padding: 1.4rem;
}

.tenant-sidebar-company {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.03em;
    color: var(--meritron-ink);
}

.tenant-sidebar-copy {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--meritron-muted);
}

.tenant-sidebar-nav {
    display: grid;
    gap: 0.9rem;
}

.tenant-sidebar-section,
.tenant-sidebar-card {
    display: grid;
    gap: 0.45rem;
}

.tenant-sidebar-section-title {
    margin: 0;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(3, 0, 24, 0.5);
}

.tenant-sidebar-meta {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(3, 0, 24, 0.45);
}

.tenant-sidebar-card {
    border-radius: 1rem;
    border: 1px solid rgba(3, 0, 24, 0.08);
    background: rgba(255, 255, 255, 0.7);
    padding: 0.95rem 1rem;
}

.tenant-sidebar-card-value {
    margin: 0;
    color: var(--meritron-ink);
    font-size: 0.92rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.tenant-sidebar-footer {
    margin-top: auto;
}

.tenant-main {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 1rem;
}

.tenant-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    border-radius: 2rem;
    padding: 1.5rem;
}

.tenant-header-copy {
    display: grid;
    gap: 0.45rem;
}

.tenant-header-title {
    font-size: clamp(2rem, 2vw + 1.2rem, 2.8rem);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.04em;
    color: var(--meritron-ink);
}

.tenant-header-summary {
    max-width: 42rem;
    color: var(--meritron-muted);
    line-height: 1.65;
}

.tenant-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.tenant-user-card {
    display: grid;
    gap: 0.18rem;
    min-width: 14rem;
    border-radius: 1.2rem;
    border: 1px solid rgba(3, 0, 24, 0.08);
    background: rgba(255, 255, 255, 0.74);
    padding: 0.95rem 1rem;
    text-align: left;
}

.tenant-user-card strong {
    font-size: 0.95rem;
    color: var(--meritron-ink);
}

.tenant-user-card span,
.tenant-user-card small {
    color: var(--meritron-muted);
    line-height: 1.5;
}

.tenant-page-subfooter {
    border-radius: 2rem;
    padding: 1rem 1.5rem;
}

.app-alert {
    --app-alert-bg: #4ac783;
    --app-alert-icon: #4ac783;
    --app-alert-progress-track: rgba(255, 255, 255, 0.22);
    --app-alert-progress-fill: rgba(255, 245, 208, 0.92);
    position: relative;
    z-index: 20;
    overflow: hidden;
    border: none;
    border-radius: 0.3rem;
    background: var(--app-alert-bg);
    color: #fff;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.14);
}

.app-alert__frame {
    display: grid;
    grid-template-columns: 1.8rem minmax(0, 1fr) auto;
    gap: 0.7rem;
    align-items: flex-start;
}

.app-alert__badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-top: 0.05rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.96);
    color: var(--app-alert-icon);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1;
}

.app-alert__body {
    min-width: 0;
}

.app-alert__title {
    margin: 0;
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.15;
}

.app-alert__message {
    margin: 0.16rem 0 0;
    color: rgba(255, 255, 255, 0.95);
    font-size: 0.71rem;
    line-height: 1.35;
}

.app-alert__message--standalone {
    margin-top: 0;
}

.app-alert__list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.18rem;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.72rem;
    line-height: 1.3;
}

.app-alert__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.34rem;
}

.app-alert__list li::before {
    content: '-';
    flex: 0 0 auto;
}

.app-alert__close {
    appearance: none;
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.96);
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.app-alert__progress {
    position: absolute;
    right: 0.8rem;
    bottom: 0.48rem;
    left: 0.8rem;
    height: 0.24rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--app-alert-progress-track);
}

.app-alert__progress::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--app-alert-progress-fill);
    transform-origin: left center;
}

.app-alert--success {
    --app-alert-bg: #4ac783;
    --app-alert-icon: #4ac783;
    --app-alert-progress-track: rgba(255, 255, 255, 0.24);
    --app-alert-progress-fill: rgba(219, 255, 230, 0.98);
}

.app-alert--warning {
    --app-alert-bg: #febb02;
    --app-alert-icon: #febb02;
    --app-alert-progress-track: rgba(255, 255, 255, 0.24);
    --app-alert-progress-fill: rgba(255, 244, 185, 0.98);
}

.app-alert--error {
    --app-alert-bg: #f9461b;
    --app-alert-icon: #f9461b;
    --app-alert-progress-track: rgba(255, 255, 255, 0.24);
    --app-alert-progress-fill: rgba(255, 216, 204, 0.98);
}

.app-alert--info {
    --app-alert-bg: #0783ca;
    --app-alert-icon: #0783ca;
    --app-alert-progress-track: rgba(255, 255, 255, 0.24);
    --app-alert-progress-fill: rgba(216, 241, 255, 0.98);
}

.app-alert--floating {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 80;
    width: min(24.5rem, calc(100vw - 20px));
    margin: 0;
    transform: translate3d(0, 0, 0);
    will-change: transform, opacity;
    padding: 0.72rem 0.9rem 1rem;
    animation:
        app-alert-enter 340ms cubic-bezier(0.16, 1, 0.3, 1),
        app-alert-exit 300ms cubic-bezier(0.4, 0, 1, 1) 10s forwards;
}

.app-alert--floating .app-alert__progress::before {
    animation: app-alert-progress 10s linear forwards;
}

.app-alert--floating.is-dismissed {
    animation: app-alert-exit 180ms cubic-bezier(0.4, 0, 1, 1) forwards;
}

.app-alert--floating.is-dismissed .app-alert__progress::before {
    animation: none;
    transform: scaleX(0);
}

@keyframes app-alert-enter {
    from {
        opacity: 0;
        transform: translate3d(calc(100% + 24px), 0, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes app-alert-exit {
    to {
        opacity: 0;
        transform: translate3d(calc(100% + 24px), 0, 0);
        visibility: hidden;
        pointer-events: none;
    }
}

@keyframes app-alert-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.app-subfooter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: clamp(0.6rem, 1.4vw, 1rem);
}

.app-subfooter-copy {
    font-size: clamp(0.72rem, 0.28vw + 0.68rem, 0.84rem);
    line-height: 1.45;
    color: var(--meritron-muted);
}

.locale-switcher {
    margin-inline-start: auto;
}

.locale-switcher-select {
    min-width: clamp(8.75rem, 18vw, 10.5rem);
    border-radius: 9999px;
    border: 1px solid rgba(3, 0, 24, 0.1);
    background: rgba(255, 255, 255, 0.86);
    cursor: pointer;
    padding: 0.52rem 2.25rem 0.52rem 0.95rem;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--meritron-ink);
    outline: none;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(3, 0, 24, 0.45) 50%),
        linear-gradient(135deg, rgba(3, 0, 24, 0.45) 50%, transparent 50%);
    background-position:
        calc(100% - 1rem) calc(50% - 0.12rem),
        calc(100% - 0.72rem) calc(50% - 0.12rem);
    background-size: 0.36rem 0.36rem, 0.36rem 0.36rem;
    background-repeat: no-repeat;
}

.locale-switcher-select:focus {
    border-color: rgba(255, 0, 0, 0.28);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.12);
}

.locale-switcher-select-compact {
    min-width: 6.4rem;
    padding: 0.38rem 1.7rem 0.38rem 0.7rem;
    font-size: 0.68rem;
    font-weight: 600;
    background-position:
        calc(100% - 0.78rem) calc(50% - 0.1rem),
        calc(100% - 0.56rem) calc(50% - 0.1rem);
    background-size: 0.28rem 0.28rem, 0.28rem 0.28rem;
}

.company-auth-page {
    --company-auth-page-space: clamp(0.95rem, 1.8vw, 1.4rem);
    box-sizing: border-box;
    position: relative;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    gap: var(--company-auth-page-space);
    min-height: calc(100dvh - (var(--company-auth-page-space) * 2));
    overflow-x: hidden;
    padding: var(--company-auth-page-space);
    background-color: #f1f4ef;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 0, 0, 0.16), transparent 24%),
        radial-gradient(circle at 88% 16%, rgba(241, 244, 239, 0.92), transparent 20%),
        radial-gradient(circle at 20% 90%, rgba(255, 0, 0, 0.08), transparent 26%),
        linear-gradient(135deg, #faf6f1 0%, #f4f1ea 48%, #f1f4ef 100%);
}

.company-auth-page::before,
.company-auth-page::after {
    position: absolute;
    border-radius: 9999px;
    filter: blur(80px);
    content: '';
    pointer-events: none;
}

.company-auth-page::before {
    top: 3rem;
    left: -3rem;
    width: 16rem;
    height: 16rem;
    background: rgba(255, 0, 0, 0.1);
}

.company-auth-page::after {
    right: -2rem;
    bottom: 2rem;
    width: 18rem;
    height: 18rem;
    background: rgba(241, 244, 239, 0.88);
}

.company-auth-shell,
.company-auth-footer-wrap {
    width: 100%;
    position: relative;
    z-index: 1;
}

.company-auth-stage-shell {
    display: flex;
    min-height: calc(100dvh - 8rem);
    border-radius: 2.2rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(241, 244, 239, 0.28);
    backdrop-filter: blur(24px);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    padding: 1rem;
}

.company-auth-panels {
    display: grid;
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    gap: 1rem;
    flex: 1 1 auto;
}

.company-auth-display {
    font-family: 'Iowan Old Style', 'Palatino Linotype', 'Book Antiqua', Georgia, serif;
    letter-spacing: -0.04em;
}

.company-auth-visual-media {
    position: relative;
    display: flex;
    min-height: 100%;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    border-radius: 1.85rem;
    background-color: #0f1016;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    padding: 2.1rem 2rem;
    color: #fff;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.34),
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        inset 0 18px 30px rgba(255, 255, 255, 0.04);
}

.company-auth-visual-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(3, 0, 24, 0.18) 0%, rgba(3, 0, 24, 0.08) 30%, rgba(3, 0, 24, 0.56) 100%),
        linear-gradient(90deg, rgba(3, 0, 24, 0.18) 0%, transparent 48%);
}

.company-auth-visual-top,
.company-auth-visual-bottom {
    position: relative;
    z-index: 1;
}

.company-auth-visual-logo {
    display: block;
    width: auto;
    max-width: 11rem;
    height: 2.1rem;
    object-fit: contain;
}

.company-auth-visual-bottom {
    max-width: min(31rem, 82%);
}

.company-auth-visual-title {
    font-family: 'Space Grotesk', ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(2.45rem, 4.2vw, 3.7rem);
    font-weight: 700;
    line-height: 0.92;
}

.company-auth-visual-title-line {
    display: block;
    white-space: nowrap;
}

.company-auth-visual-copy {
    margin-top: 1rem;
    font-size: 0.94rem;
    font-weight: 400;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.86);
}

.company-auth-panel-inner {
    display: flex;
    min-height: 100%;
    flex-direction: column;
    border-radius: 1.75rem;
    background: #fcfcfc;
    backdrop-filter: blur(18px);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.68);
    padding: clamp(2rem, 4vw, 4.2rem);
}

.company-auth-panel-header {
    margin-bottom: 1.875rem;
}

.company-auth-form-wrap {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.company-auth-content {
    display: grid;
    gap: 1.35rem;
    min-height: 100%;
}

.company-auth-intro {
    display: grid;
    gap: 0.8rem;
}

.company-auth-panel-brandbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.company-auth-panel-pill {
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--meritron-accent);
    white-space: nowrap;
}

.company-auth-panel-locale {
    margin-inline-start: auto;
}

.company-auth-content-login .company-auth-intro {
    gap: 0.45rem;
    justify-items: start;
    margin-top: 2vh;
    text-align: left;
}

.company-auth-form-title {
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 700;
    line-height: 1.14;
    color: #12111a;
}

.company-auth-form-subtitle {
    margin-bottom: 2vh;
    max-width: 34rem;
    font-size: 0.94rem;
    line-height: 1.6;
    color: rgba(3, 0, 24, 0.56);
}

.company-auth-support-stack {
    display: grid;
    gap: 0.75rem;
}

.company-auth-inline-note {
    border-radius: 0.9rem;
    border: 1px solid rgba(3, 0, 24, 0.08);
    background: rgba(255, 255, 255, 0.82);
    padding: 0.95rem 1rem;
}

.company-auth-inline-note-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(3, 0, 24, 0.48);
}

.company-auth-inline-note-value {
    margin-top: 0.35rem;
    font-size: 0.96rem;
    font-weight: 600;
    color: var(--meritron-ink);
    overflow-wrap: anywhere;
}

.company-auth-password-requirements {
    margin: 0;
    padding-left: 3px;
    font-size: 0.74rem;
    line-height: 1.55;
    color: rgba(3, 0, 24, 0.5);
}

.company-auth-caption {
    margin-top: 1.5rem;
    font-size: 0.82rem;
    line-height: 1.6;
    text-align: center;
    color: rgba(3, 0, 24, 0.48);
}

.company-auth-page-subfooter {
    padding: 0 0.2rem;
}

.company-auth-page-subfooter .app-subfooter-copy {
    width: 100%;
    text-align: center;
}

.company-auth-field-stack {
    display: grid;
    gap: 0.5rem;
}

.company-auth-label {
    padding-left: 3px;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(3, 0, 24, 0.72);
}

.company-auth-input {
    width: 100%;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.92rem 1rem;
    background: rgba(241, 244, 239, 0.63);
    color: var(--meritron-ink);
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background-color 160ms ease;
}

.company-auth-input::placeholder {
    color: rgba(3, 0, 24, 0.35);
}

.company-auth-input:focus {
    outline: none;
    border-color: rgba(3, 0, 24, 0.22);
    box-shadow: 0 0 0 3px rgba(3, 0, 24, 0.06);
    background: rgba(255, 255, 255, 0.96);
}

.company-auth-input:invalid,
.company-auth-input[aria-invalid='true'] {
    border-color: rgba(249, 70, 27, 0.58);
    box-shadow: none;
}

.company-auth-input:focus:invalid,
.company-auth-input[aria-invalid='true']:focus {
    border-color: rgba(3, 0, 24, 0.22);
    box-shadow: 0 0 0 3px rgba(3, 0, 24, 0.06);
}

.company-auth-password-field {
    position: relative;
}

.company-auth-input-password {
    padding-right: 3rem;
}

.company-auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.company-auth-password-toggle-icon {
    width: 1rem;
    height: 1rem;
    object-fit: contain;
}

.company-auth-field-error {
    padding-left: 3px;
    color: #f9461b;
    font-size: 0.66rem;
    font-style: italic;
    line-height: 1.45;
}

.company-auth-meta-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    margin-bottom: 2vh;
}

.company-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding-left: 3px;
    color: rgba(3, 0, 24, 0.58);
    font-size: 0.82rem;
}

.company-auth-remember-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.4rem;
    accent-color: var(--meritron-accent);
    cursor: pointer;
}

.company-auth-submit {
    width: 100%;
    justify-content: center;
}

.company-auth-submit.meritron-button-primary {
    background: #ff0000;
    box-shadow: none;
}

.company-auth-submit.is-loading {
    position: relative;
    color: transparent;
}

.company-auth-submit.is-loading::after {
    content: '';
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #fff;
    border-radius: 9999px;
    animation: company-auth-spinner 0.72s linear infinite;
}

.company-auth-submit:disabled,
.company-auth-submit[aria-disabled='true'] {
    cursor: not-allowed;
    opacity: 0.62;
    transform: none;
}

@keyframes company-auth-spinner {
    to {
        transform: rotate(360deg);
    }
}

.company-auth-recovery-note {
    margin: 0;
    text-align: left;
    padding-left: 3px;
    font-size: 0.76rem;
    line-height: 1.55;
    color: rgba(3, 0, 24, 0.46);
}

.company-auth-recovery-link {
    color: rgba(3, 0, 24, 0.6);
}

[dir='rtl'] .sidebar-link:hover,
[dir='rtl'] .sidebar-link.is-active {
    transform: translateX(-2px);
}

[dir='rtl'] .company-auth-input-password {
    padding-right: 1rem;
    padding-left: 3rem;
}

[dir='rtl'] .company-auth-password-toggle {
    right: auto;
    left: 0.9rem;
}

@media (max-width: 1180px) {
    .tenant-panel-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .tenant-panel-page {
        padding: 0.8rem;
    }

    .tenant-panel-grid {
        min-height: auto;
    }

    .tenant-header {
        flex-direction: column;
    }

    .tenant-header-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .tenant-user-card {
        min-width: 0;
    }

    .company-auth-stage-shell {
        min-height: auto;
    }

    .company-auth-panels {
        grid-template-columns: 1fr;
    }

    .company-auth-visual {
        min-height: 22rem;
    }

    .company-auth-panel-inner {
        padding: 1.5rem;
    }
}
