:root {
    --color-sidebar: #08243d;
    --color-primary: #1d6fd8;
    --color-primary-soft: #e9f2ff;
    --color-background: #f4f7fa;
    --color-border: #d8e2eb;
    --color-text: #162535;
    --color-muted: #607284;
    --color-success: #157f46;
    --color-error: #b42318;
    --shadow-soft: 0 20px 60px rgba(8, 36, 61, 0.08);
    --radius-lg: 24px;
    --radius-md: 18px;
}

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

html {
    font-size: 16px;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(29, 111, 216, 0.12), transparent 25%),
        linear-gradient(180deg, #f8fbfe 0%, var(--color-background) 100%);
    color: var(--color-text);
}

body.modal-open {
    overflow: hidden;
}

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

button,
input,
select {
    font: inherit;
}

svg {
    width: 1.1rem;
    height: 1.1rem;
    fill: currentColor;
}

.eyebrow {
    margin: 0 0 0.4rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.muted {
    color: var(--color-muted);
}

.login-page {
    min-height: 100vh;
}

.login-layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 1.15fr 0.85fr;
}

.login-showcase {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 4rem clamp(2rem, 6vw, 5rem);
    background:
        linear-gradient(160deg, rgba(11, 31, 53, 0.95), rgba(8, 36, 61, 0.9)),
        linear-gradient(135deg, rgba(29, 111, 216, 0.2), transparent 60%);
    color: #f4f9ff;
}

.login-showcase__badge {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 1.5rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-weight: 700;
}

.login-showcase h1 {
    margin: 0;
    max-width: 12ch;
    font-size: clamp(2.2rem, 4vw, 4.5rem);
    line-height: 0.95;
}

.login-showcase > p {
    max-width: 42rem;
    margin: 1.5rem 0 0;
    color: rgba(244, 249, 255, 0.76);
    font-size: 1.05rem;
    line-height: 1.7;
}

.login-showcase__highlights {
    display: grid;
    gap: 1rem;
    margin-top: 2.25rem;
}

.login-showcase__highlights article {
    padding: 1.1rem 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.05);
}

.login-showcase__highlights strong,
.login-showcase__highlights span {
    display: block;
}

.login-showcase__highlights strong {
    margin-bottom: 0.35rem;
}

.login-showcase__highlights span {
    color: rgba(244, 249, 255, 0.72);
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-card {
    width: min(100%, 28rem);
    padding: 2rem;
    border: 1px solid rgba(216, 226, 235, 0.75);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-soft);
}

.login-card h2 {
    margin: 0;
    font-size: 2rem;
}

.login-form {
    display: grid;
    gap: 1rem;
    margin-top: 1.5rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field span {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--color-text);
}

.field input {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(29, 111, 216, 0.34);
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    color: var(--color-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 3px 10px rgba(8, 36, 61, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.field input:hover,
.field-select:hover,
.search-form:hover {
    border-color: rgba(29, 111, 216, 0.44);
}

.field input:focus {
    outline: 2px solid rgba(29, 111, 216, 0.12);
    border-color: rgba(29, 111, 216, 0.65);
    box-shadow: 0 0 0 4px rgba(29, 111, 216, 0.13), 0 14px 26px rgba(29, 111, 216, 0.1);
}

.primary-button,
.ghost-button,
.topbar__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.1rem;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.primary-button {
    background: linear-gradient(135deg, var(--color-primary), #1459af);
    color: #fff;
    box-shadow: 0 12px 24px rgba(29, 111, 216, 0.24);
}

.ghost-button {
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: transparent;
    color: inherit;
}

.ghost-button--light {
    border-color: rgba(21, 37, 53, 0.14);
    background: rgba(255, 255, 255, 0.75);
    color: var(--color-text);
}

.topbar__toggle {
    display: none;
    border: 1px solid var(--color-border);
    background: #fff;
    color: var(--color-text);
}

.primary-button:hover,
.ghost-button:hover,
.topbar__toggle:hover {
    transform: translateY(-1px);
}

.login-hint {
    display: grid;
    gap: 0.2rem;
    margin-top: 1.5rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: var(--color-primary-soft);
    color: #234;
}

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

.app-shell__layout {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: stretch;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
    position: sticky;
    top: 0;
    align-self: start;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 1.35rem 1rem 0.9rem;
    overflow-y: auto;
    background: linear-gradient(180deg, #071f35 0%, var(--color-sidebar) 100%);
    color: rgba(244, 249, 255, 0.92);
}

.sidebar__brand,
.sidebar__footer {
    display: flex;
    gap: 0.95rem;
    align-items: center;
}

.sidebar__logo-link {
    display: inline-flex;
}

.sidebar__brand strong,
.sidebar__footer strong,
.sidebar__brand span,
.sidebar__footer span {
    display: block;
}

.sidebar__brand span,
.sidebar__footer span,
.sidebar__section-title {
    color: rgba(244, 249, 255, 0.58);
}

.sidebar__logo,
.sidebar__avatar {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 16px;
    background: linear-gradient(135deg, #1d6fd8, #58a7ff);
    color: #fff;
    font-weight: 700;
}

.sidebar__footer {
    margin-top: auto;
    padding: 1rem 0.35rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar__nav {
    display: grid;
    gap: 0.3rem;
    flex: 1 1 auto;
    align-content: start;
}

.sidebar__section-title {
    margin: 0 0 0.45rem;
    padding: 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar__link {
    display: flex;
    gap: 0.85rem;
    align-items: center;
    padding: 0.82rem 0.85rem;
    border-radius: 16px;
    color: rgba(244, 249, 255, 0.66);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.sidebar__link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.92);
}

.sidebar__link.is-active {
    background: rgba(29, 111, 216, 0.18);
    color: #fff;
}

.sidebar__icon {
    display: inline-flex;
}

.app-shell__content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    padding: 1.3rem 1.6rem;
    border-bottom: 1px solid rgba(216, 226, 235, 0.8);
    background: rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(14px);
}

.topbar__left,
.topbar__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar__left h1 {
    margin: 0;
    font-size: 1.8rem;
}

.company-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 700;
}

.company-switcher {
    display: inline-flex;
}

.company-select,
.field-select {
    min-width: 13rem;
    padding: 0.72rem 2.2rem 0.72rem 0.95rem;
    border: 1px solid rgba(21, 37, 53, 0.12);
    border-radius: 999px;
    background: #eef5ff;
    color: var(--color-primary);
    font-weight: 700;
}

.field-select {
    min-width: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    color: var(--color-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.94), 0 3px 10px rgba(8, 36, 61, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.content {
    display: grid;
    gap: 1.5rem;
    padding: 1.6rem;
}

.hero-card,
.panel-card,
.module-card {
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-soft);
}

.hero-card {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.9fr);
    gap: 1.5rem;
    padding: 1.6rem;
}

.hero-card h2,
.page-head h2,
.placeholder-panel h2 {
    margin: 0;
    font-size: 2rem;
}

.hero-card p,
.page-head p,
.placeholder-panel p {
    color: var(--color-muted);
    line-height: 1.7;
}

.hero-card__stats {
    display: grid;
    gap: 1rem;
}

.hero-card__stats article {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(29, 111, 216, 0.08), rgba(8, 36, 61, 0.04));
}

.hero-card__stats strong {
    font-size: 1.1rem;
}

.grid-cards,
.content-grid,
.form-grid,
.grid-cards--settings {
    display: grid;
    gap: 1.25rem;
}

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

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

.form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.25rem;
}

.module-card {
    display: grid;
    gap: 0.8rem;
    padding: 1.35rem;
}

.module-card--compact {
    gap: 0.65rem;
}

.module-card__tag {
    width: fit-content;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-size: 0.8rem;
    font-weight: 700;
}

.module-card__heading {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
}

.module-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 14px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.module-card__icon--lg {
    width: 2.9rem;
    height: 2.9rem;
    border-radius: 16px;
}

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

.module-card--link {
    position: relative;
    min-height: 12.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.module-card--link:hover {
    transform: translateY(-2px);
    border-color: rgba(29, 111, 216, 0.22);
    box-shadow: 0 24px 60px rgba(8, 36, 61, 0.12);
}

.module-card__title-group {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
}

.module-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(29, 111, 216, 0.08);
    color: var(--color-primary);
}

.module-card__arrow svg {
    width: 1rem;
    height: 1rem;
}

.module-card h3,
.panel-card h3,
.form-section__head h3 {
    margin: 0;
    font-size: 1.25rem;
}

.module-card p,
.details-list dd,
.check-list li,
.form-section__head p {
    color: var(--color-muted);
}

.module-card a,
.back-link {
    font-weight: 700;
    color: var(--color-primary);
}

.panel-card,
.placeholder-panel,
.form-panel {
    padding: 1.35rem;
}

.panel-card__header {
    margin-bottom: 1rem;
}

.page-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.back-link {
    display: inline-flex;
    margin-bottom: 0.9rem;
}

.details-list,
.check-list,
.settings-form {
    margin: 0;
    padding: 0;
}

.settings-form {
    display: grid;
    gap: 2rem;
}

.details-list {
    display: grid;
    gap: 0.9rem;
}

.details-list div {
    display: grid;
    gap: 0.25rem;
}

.details-list dt {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-muted);
}

.details-list dd {
    margin: 0;
}

.check-list {
    list-style: none;
    display: grid;
    gap: 0.85rem;
}

.check-list li {
    position: relative;
    padding-left: 1.4rem;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.45rem;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 999px;
    background: var(--color-primary);
}

.form-section {
    display: grid;
    gap: 1.25rem;
}

.form-section + .form-section {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(216, 226, 235, 0.85);
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.9rem;
}

.form-panel--narrow {
    max-width: 44rem;
}

.form-grid--single {
    grid-template-columns: 1fr;
}

.settings-form--compact {
    gap: 1.5rem;
}

.field-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.field-checkbox input {
    width: 1rem;
    height: 1rem;
}

.logo-upload {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.logo-upload__preview,
.logo-upload__action {
    border: 1px dashed rgba(21, 37, 53, 0.14);
    border-radius: 16px;
    background: #fff;
}

.logo-upload__preview {
    display: grid;
    place-items: center;
    width: 12rem;
    min-height: 6rem;
    padding: 1rem;
    color: var(--color-muted);
    gap: 0.35rem;
}

.logo-upload__preview img {
    max-width: 100%;
    max-height: 4.5rem;
    object-fit: contain;
}

.logo-upload__action {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.1rem;
    cursor: pointer;
}

.logo-upload__action input {
    display: none;
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.search-form {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: min(100%, 22rem);
    padding: 0.85rem 1rem;
    border: 1px solid rgba(29, 111, 216, 0.28);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 24px rgba(8, 36, 61, 0.07);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-form input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
}

.search-form:focus-within,
.field-select:focus {
    border-color: rgba(29, 111, 216, 0.65);
    box-shadow: 0 0 0 4px rgba(29, 111, 216, 0.13), 0 14px 26px rgba(29, 111, 216, 0.1);
}

.search-form__icon {
    display: inline-flex;
    color: var(--color-muted);
}

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

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

.data-table thead th {
    padding: 1rem 1.1rem;
    background: #07243e;
    color: #fff;
    text-align: left;
    font-size: 0.88rem;
}

.data-table thead th:first-child {
    border-top-left-radius: 14px;
}

.data-table thead th:last-child {
    border-top-right-radius: 14px;
}

.data-table tbody td {
    padding: 1rem 1.1rem;
    border-bottom: 1px solid rgba(216, 226, 235, 0.85);
    background: rgba(255, 255, 255, 0.8);
    vertical-align: middle;
}

.table-icon-cell {
    text-align: center;
}

.badge,
.status-badge,
.permission-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.badge--dark {
    background: #0b2c4c;
    color: #fff;
}

.badge--muted,
.status-badge--muted {
    background: #edf1f5;
    color: #74808c;
}

.status-badge--success {
    background: #16a34a;
    color: #fff;
}

.permission-pill {
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    background: rgba(29, 111, 216, 0.08);
    color: var(--color-primary);
    border: none;
    cursor: pointer;
}

.permission-pill--button {
    border: none;
    cursor: pointer;
}

.permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.permission-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
}

.permission-card input {
    width: 1rem;
    height: 1rem;
}

.password-rules {
    display: grid;
    gap: 0.35rem;
    color: var(--color-muted);
    font-size: 0.92rem;
}

.content-grid--wide {
    grid-template-columns: 1.2fr 1fr;
}

.flash {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
}

.flash--error {
    border-color: rgba(180, 35, 24, 0.18);
    background: rgba(180, 35, 24, 0.08);
    color: var(--color-error);
}

.flash--success {
    border-color: rgba(21, 127, 70, 0.18);
    background: rgba(21, 127, 70, 0.08);
    color: var(--color-success);
}

.security-center {
    display: flex;
    justify-content: center;
    padding-top: 0.25rem;
}

.security-card {
    width: min(100%, 44rem);
}

.app-modal {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 80;
}

.app-modal[hidden] {
    display: none;
}

.app-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(7, 31, 53, 0.44);
    backdrop-filter: blur(4px);
}

.app-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100% - 2rem, 32rem);
    max-height: calc(100vh - 2rem);
    max-height: calc(100dvh - 2rem);
    overflow: auto;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 35px 90px rgba(8, 36, 61, 0.25);
}

.app-modal__dialog--form {
    width: min(100% - 2rem, 34rem);
}

.app-modal__dialog--confirm {
    width: min(100% - 2rem, 28rem);
}

.app-modal__dialog--drawer {
    justify-self: end;
    width: min(100%, 33rem);
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border-radius: 24px 0 0 24px;
}

.app-modal__header,
.app-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.25rem;
}

.app-modal__header {
    border-bottom: 1px solid rgba(216, 226, 235, 0.8);
}

.app-modal__header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.app-modal__body {
    padding: 1.25rem;
}

.app-modal__footer {
    justify-content: flex-end;
    border-top: 1px solid rgba(216, 226, 235, 0.8);
}

.app-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: none;
    border-radius: 999px;
    background: rgba(29, 111, 216, 0.08);
    color: var(--color-primary);
    cursor: pointer;
}

.permission-groups {
    display: grid;
    gap: 0.85rem;
}

.permission-group {
    padding: 0.95rem 1rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
}

.permission-group__toggle {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.75rem;
    font-size: 0.98rem;
}

.permission-group__toggle input {
    width: 1rem;
    height: 1rem;
}

.permission-group__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.permission-group__chips li {
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f3f7fc;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.3;
}

.permissions-summary {
    margin-bottom: 1rem;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: var(--color-primary-soft);
    color: #234;
}

.loading-overlay {
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 90;
    background: rgba(7, 31, 53, 0.34);
    backdrop-filter: blur(4px);
}

.loading-overlay[hidden] {
    display: none;
}

.loading-overlay__card {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    min-width: 12rem;
    padding: 1.35rem 1.5rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 25px 60px rgba(8, 36, 61, 0.18);
}

.status-toggle-form {
    display: inline-flex;
    justify-content: center;
}

.status-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    cursor: pointer;
}

.status-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.status-toggle__track {
    position: relative;
    width: 2.85rem;
    height: 1.6rem;
    border-radius: 999px;
    background: #d7e2ee;
    box-shadow: inset 0 1px 2px rgba(8, 36, 61, 0.12);
    transition: background-color 0.2s ease;
}

.status-toggle__thumb {
    position: absolute;
    top: 0.15rem;
    left: 0.15rem;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(8, 36, 61, 0.18);
    transition: transform 0.2s ease;
}

.status-toggle.is-active .status-toggle__track,
.status-toggle input:checked + .status-toggle__track {
    background: rgba(21, 127, 70, 0.72);
}

.status-toggle.is-active .status-toggle__thumb,
.status-toggle input:checked + .status-toggle__track .status-toggle__thumb {
    transform: translateX(1.25rem);
}

.status-toggle input:disabled + .status-toggle__track {
    opacity: 0.55;
}

.spinner {
    width: 2.4rem;
    height: 2.4rem;
    border: 3px solid rgba(29, 111, 216, 0.14);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 1100px) {
    .login-layout,
    .hero-card,
    .grid-cards,
    .grid-cards--settings,
    .content-grid,
    .content-grid--wide,
    .form-grid,
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

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

    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(86vw, 300px);
        min-height: 100vh;
        min-height: 100dvh;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 20;
    }

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

    .topbar__toggle {
        display: inline-flex;
    }
}

@media (max-width: 680px) {
    .topbar,
    .content,
    .login-panel,
    .login-showcase {
        padding: 1.2rem;
    }

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

    .topbar__actions,
    .form-actions {
        width: 100%;
        justify-content: space-between;
    }

    .company-pill {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .login-card,
    .hero-card,
    .module-card,
    .panel-card {
        border-radius: 18px;
    }

    .sidebar {
        width: min(92vw, 320px);
    }

    .toolbar {
        align-items: stretch;
    }

    .search-form,
    .primary-button,
    .company-switcher,
    .company-select {
        width: 100%;
    }

    .app-modal__dialog,
    .app-modal__dialog--form,
    .app-modal__dialog--confirm {
        width: min(100% - 1rem, 100%);
        max-height: calc(100vh - 1rem);
        max-height: calc(100dvh - 1rem);
    }

    .app-modal__dialog--drawer {
        width: min(100%, 100vw);
        border-radius: 20px 20px 0 0;
        align-self: end;
        justify-self: stretch;
        height: min(85vh, 85dvh);
    }

    .app-modal {
        place-items: end center;
    }

    .app-modal__header,
    .app-modal__body,
    .app-modal__footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
