: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,
textarea {
    font: inherit;
}

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

[hidden] {
    display: none !important;
}

.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.08fr 0.92fr;
    background: #f4f8ff;
}

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

.login-showcase__content {
    display: grid;
    gap: 0.95rem;
}

.login-showcase__badge {
    display: inline-flex;
    width: fit-content;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 0.86rem;
    font-weight: 800;
}

.login-showcase__tagline {
    margin: 0;
    color: rgba(244, 249, 255, 0.86);
    font-weight: 800;
}

.login-showcase h1 {
    margin: 0;
    max-width: 16ch;
    font-size: 2.35rem;
    line-height: 1.18;
    text-transform: uppercase;
}

.login-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(29, 111, 216, 0.12), transparent 32%),
        #f6fbff;
}

.login-panel__content {
    display: grid;
    gap: 1rem;
    width: min(100%, 31rem);
}

.login-card {
    width: 100%;
    padding: 2.15rem;
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    box-shadow: 0 25px 70px rgba(8, 36, 61, 0.12);
}

.login-card h2 {
    margin: 0 0 2rem;
    font-size: 1.08rem;
    color: #4b5563;
}

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

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

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

.field small {
    color: var(--color-muted);
    font-size: 0.82rem;
}

.field input,
.field textarea {
    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,
.field-select {
    min-height: 3.35rem;
}

.field input[readonly],
.field textarea[readonly] {
    border-color: rgba(120, 144, 166, 0.18);
    background: #e8f4ff;
    color: #0b2c4c;
    box-shadow: none;
}

.field input[readonly]:focus,
.field textarea[readonly]:focus {
    outline: none;
    border-color: rgba(120, 144, 166, 0.18);
    box-shadow: none;
}

.field textarea {
    resize: vertical;
    min-height: 5rem;
}

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

.field input:focus,
.field textarea: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);
}

.settings-form.was-validated .field input:invalid,
.settings-form.was-validated .field textarea:invalid,
.settings-form.was-validated .field-select:invalid {
    border-color: #dc2626;
    background: #fff7f7;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

.settings-form.was-validated .field:has(:invalid) span {
    color: #b91c1c;
}

.input-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.35rem;
}

.input-action input {
    border-right: 0;
    border-radius: 14px 0 0 14px;
}

.input-action__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.35rem;
    min-height: 3.35rem;
    border: 1px solid rgba(29, 111, 216, 0.34);
    border-left: 0;
    border-radius: 0 14px 14px 0;
    background: #eef5ff;
    color: var(--color-primary);
    cursor: pointer;
}

.input-action:focus-within input,
.input-action:focus-within .input-action__button {
    border-color: rgba(29, 111, 216, 0.65);
}

.input-action:focus-within {
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(29, 111, 216, 0.13), 0 14px 26px rgba(29, 111, 216, 0.1);
}

.input-action input:focus,
.input-action__button:focus {
    outline: none;
    box-shadow: none;
}

.measurement-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.75rem;
}

.measurement-input input {
    border-right: 0;
    border-radius: 14px 0 0 14px;
}

.measurement-input input:focus,
.measurement-input select:focus {
    outline: none;
    box-shadow: none;
}

.measurement-input select {
    min-width: 0;
    padding: 0 0.7rem;
    border: 1px solid rgba(29, 111, 216, 0.34);
    border-radius: 0 14px 14px 0;
    background: #eef5ff;
    color: var(--color-primary);
    font-weight: 800;
}

.measurement-input:focus-within input,
.measurement-input:focus-within select {
    border-color: rgba(29, 111, 216, 0.65);
}

.measurement-input:focus-within {
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(29, 111, 216, 0.13), 0 14px 26px rgba(29, 111, 216, 0.1);
}

.primary-button,
.secondary-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);
}

.secondary-button {
    background: #c4c4c4;
    color: #3f3f46;
    font-weight: 800;
    box-shadow: 0 10px 20px rgba(63, 63, 70, 0.12);
}

.primary-button--success {
    background: linear-gradient(135deg, #16a34a, #108437);
    box-shadow: 0 12px 24px rgba(22, 163, 74, 0.22);
}

.primary-button--danger {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    box-shadow: 0 12px 24px rgba(220, 38, 38, 0.22);
}

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

.ghost-button--danger {
    border-color: rgba(184, 91, 91, 0.24);
    background: rgba(184, 91, 91, 0.08);
    color: #a34848;
}

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

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

.login-card .primary-button {
    width: 100%;
    margin-top: 0.1rem;
    font-weight: 800;
}

.login-link,
.login-register-link {
    color: #4f62cf;
    font-weight: 800;
    text-align: center;
    text-decoration: underline;
}

.login-link {
    display: block;
    margin-top: 0.8rem;
}

.login-register-link {
    margin: 0;
    padding: 1.2rem;
    color: #666;
    cursor: default;
}

.password-input {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 3.35rem;
}

.password-input input {
    border-right: 0;
    border-radius: 14px 0 0 14px;
}

.password-input__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.35rem;
    border: 1px solid rgba(29, 111, 216, 0.34);
    border-left: 0;
    border-radius: 0 14px 14px 0;
    background: linear-gradient(180deg, #ffffff 0%, #f4f8ff 100%);
    color: #334155;
    cursor: pointer;
}

.password-input__icon {
    position: relative;
    width: 1.25rem;
    height: 0.78rem;
    border: 2px solid currentColor;
    border-radius: 999px 999px 70% 70%;
    transform: rotate(-8deg);
}

.password-input__icon::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0.34rem;
    height: 0.34rem;
    border-radius: 999px;
    background: currentColor;
    transform: translate(-50%, -50%);
}

.password-input:focus-within {
    border-radius: 14px;
    box-shadow: 0 0 0 4px rgba(29, 111, 216, 0.13), 0 14px 26px rgba(29, 111, 216, 0.1);
}

.password-input:focus-within input,
.password-input:focus-within .password-input__toggle {
    border-color: rgba(29, 111, 216, 0.65);
}

.password-input input:focus,
.password-input__toggle:focus {
    outline: none;
    box-shadow: none;
}

.reset-page {
    background:
        radial-gradient(circle at top right, rgba(29, 111, 216, 0.11), transparent 34%),
        #f6fbff;
}

.reset-layout {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 2rem;
}

.reset-card {
    display: grid;
    gap: 1.55rem;
    width: min(100%, 28rem);
    min-height: 19.5rem;
    padding: 2rem 2.15rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 25px 70px rgba(8, 36, 61, 0.12);
}

.reset-card h1 {
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
    color: #4b5563;
}

.reset-card--message {
    align-content: start;
}

.reset-card--message p {
    margin: 2rem 0 1.6rem;
    color: #1f2937;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
}

.reset-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.7rem;
}

.reset-actions .primary-button,
.reset-actions .secondary-button {
    min-width: 6.5rem;
    padding-block: 0.75rem;
    border-radius: 8px;
    font-weight: 800;
}

.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;
    max-width: 100%;
}

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

.topbar__title {
    display: grid;
    gap: 0.25rem;
}

.topbar__subtitle {
    margin: 0;
    color: var(--color-muted);
    font-weight: 700;
    line-height: 1.35;
}

.topbar__subtitle:empty {
    display: none;
}

.content > .page-head:first-child h2,
.content > .page-head:first-child p {
    display: none;
}

.content > .page-head:first-child > div:empty {
    display: none;
}

.content > .page-head:first-child:has(> div:empty):not(:has(> :not(div))) {
    display: none;
}

.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;
    width: 100%;
    padding: 0.95rem 2.2rem 0.95rem 1rem;
    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;
    min-width: 0;
    max-width: 100%;
}

.content > * {
    min-width: 0;
    max-width: 100%;
}

.hero-card,
.panel-card,
.module-card {
    min-width: 0;
    max-width: 100%;
    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);
}

.panel-card--table {
    overflow: hidden;
}

.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,
.master-grid {
    display: grid;
    gap: 1.25rem;
}

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

.master-groups {
    display: grid;
    gap: 1.35rem;
}

.master-group {
    display: grid;
    gap: 0.9rem;
}

.master-group__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(216, 226, 235, 0.85);
}

.master-group__head h3 {
    margin: 0;
    font-size: 1rem;
}

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

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

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

.dashboard-overview {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 1.25rem;
}

.dashboard-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    min-width: 0;
    padding: 1.4rem;
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 242, 255, 0.72));
    box-shadow: var(--shadow-soft);
}

.dashboard-summary h2 {
    margin: 0;
    font-size: 1.55rem;
}

.dashboard-summary p {
    margin: 0.55rem 0 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.dashboard-ring {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 8.4rem;
    height: 8.4rem;
    padding: 1.2rem;
    border-radius: 999px;
    background:
        radial-gradient(circle at center, #fff 0 58%, transparent 59%),
        conic-gradient(var(--color-primary) var(--progress), rgba(216, 226, 235, 0.9) 0);
    text-align: center;
}

.dashboard-ring strong,
.dashboard-ring span {
    display: block;
}

.dashboard-ring strong {
    color: var(--color-text);
    font-size: 1.55rem;
}

.dashboard-ring span {
    max-width: 5.4rem;
    color: var(--color-muted);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.25;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.metric-card {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    min-width: 0;
    padding: 1rem;
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
}

.metric-card__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 13px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.metric-card__icon--folder { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.metric-card__icon--users  { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.metric-card__icon--boxes  { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.metric-card__icon svg {
    width: 1.15rem;
    height: 1.15rem;
}

.metric-card strong,
.metric-card span,
.metric-card small {
    display: block;
}

.metric-card strong {
    font-size: 1.5rem;
    line-height: 1;
}

.metric-card span {
    margin-top: 0.25rem;
    font-weight: 800;
}

.metric-card small {
    margin-top: 0.25rem;
    color: var(--color-muted);
    line-height: 1.35;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(20rem, 0.65fr);
    gap: 1.25rem;
}

.dashboard-panel {
    min-height: 100%;
}

.dashboard-panel .panel-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-progress {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.dashboard-progress div {
    padding: 0.9rem;
    border-radius: 14px;
    background: rgba(29, 111, 216, 0.07);
}

.dashboard-progress strong,
.dashboard-progress span {
    display: block;
}

.dashboard-progress strong {
    font-size: 1.45rem;
}

.dashboard-progress span {
    color: var(--color-muted);
    font-weight: 700;
}

.progress-track {
    height: 0.65rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(216, 226, 235, 0.9);
}

.progress-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

.dashboard-list {
    display: grid;
    gap: 0.55rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.dashboard-list li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(216, 226, 235, 0.72);
}

.dashboard-list li:last-child {
    border-bottom: 0;
}

.dashboard-list span {
    font-weight: 800;
}

.dashboard-list strong {
    color: var(--color-muted);
    font-size: 0.9rem;
}

.dashboard-list__meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.status-dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-dot--green { background: #10b981; }
.status-dot--amber { background: #f59e0b; }

.stat-grid {
    display: grid;
    gap: 0.75rem;
}

.stat-item {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    background: rgba(29, 111, 216, 0.05);
    border: 1px solid rgba(29, 111, 216, 0.1);
}

.stat-item--purple { background: rgba(139, 92, 246, 0.05); border-color: rgba(139, 92, 246, 0.12); }
.stat-item--emerald { background: rgba(16, 185, 129, 0.05); border-color: rgba(16, 185, 129, 0.12); }

.stat-item__icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.stat-item__icon svg { width: 1.1rem; height: 1.1rem; }

.stat-item--purple .stat-item__icon { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.stat-item--emerald .stat-item__icon { background: rgba(16, 185, 129, 0.12); color: #10b981; }

.stat-item strong {
    display: block;
    font-size: 1.55rem;
    line-height: 1;
    color: var(--color-text);
}

.stat-item span {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-muted);
}

.dashboard-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 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--upload   { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.module-card__icon--layers   { background: rgba(139, 92, 246, 0.12); color: #8b5cf6; }
.module-card__icon--document { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }

.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,
.master-card h3,
.panel-card h3,
.form-section__head h3 {
    margin: 0;
    font-size: 1.25rem;
}

.module-card p,
.master-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;
}

.master-card {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
    gap: 1rem;
    min-height: 7.4rem;
    padding: 1.25rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

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

.master-card--disabled {
    cursor: default;
}

.master-card--super {
    border-color: rgba(171, 112, 0, 0.35);
    background: linear-gradient(180deg, #fffaf0 0%, #ffffff 72%);
}

.master-card--super .master-card__icon {
    background: #fff0c2;
    color: #8a5a00;
}

.master-card--super .master-card__count {
    color: #7a4c00;
}

.master-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 16px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
}

.master-card__icon svg {
    width: 1.45rem;
    height: 1.45rem;
}

.master-card__body {
    display: grid;
    gap: 0.35rem;
    grid-column: 1 / -1;
    align-self: end;
    flex: 1;
    min-width: 0;
}

.master-card__scope {
    width: fit-content;
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    background: #ffe8a3;
    color: #6d4500;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.master-card__count {
    align-self: center;
    justify-self: end;
    grid-column: 2;
    grid-row: 1;
    font-size: 1.55rem;
    font-weight: 800;
    color: #0b2c4c;
}

.master-card p {
    margin: 0.55rem 0 0;
    font-size: 0.92rem;
    line-height: 1.45;
}

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

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: fit-content;
    margin-bottom: 1rem;
    padding: 0.45rem 0.75rem 0.45rem 0.55rem;
    border: 1px solid rgba(29, 111, 216, 0.16);
    border-radius: 999px;
    background: rgba(233, 242, 255, 0.72);
    color: #155fb8;
    box-shadow: 0 8px 20px rgba(8, 36, 61, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.back-link::first-letter {
    font-size: 1.05rem;
}

.back-link:hover {
    transform: translateX(-2px);
    border-color: rgba(29, 111, 216, 0.28);
    background: #e9f2ff;
    box-shadow: 0 12px 24px rgba(29, 111, 216, 0.1);
}

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

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

.details-list--modal dd {
    overflow-wrap: anywhere;
}

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

.container-identifier-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 2.5rem;
    gap: 0.65rem;
    align-items: end;
}

.container-identifier-row__controls {
    display: block;
}

.container-identifier-row__controls input,
.container-identifier-row__controls .field-select {
    min-width: 0;
}

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

.toolbar__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #1a2640);
}

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

.search-refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(21, 37, 53, 0.12);
    border-radius: 8px;
    background: #fff;
    color: var(--color-primary);
    font-weight: 900;
    cursor: pointer;
}

.logo-upload--readonly {
    grid-template-columns: minmax(12rem, 22rem);
}

.logo-upload--readonly .logo-upload__preview {
    min-height: 7rem;
}

.product-search-field {
    width: min(100%, 34rem);
    margin-bottom: 1rem;
}

.selection-table-row {
    cursor: pointer;
}

.selection-table-row:hover td {
    background: #eef5ff;
}

.selection-table-row:focus-visible td {
    outline: 2px solid rgba(29, 111, 216, 0.45);
    outline-offset: -2px;
    background: #eef5ff;
}

.wizard-steps {
    display: flex;
    gap: 0.55rem;
    margin-bottom: 1rem;
    padding: 0.25rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 12px;
    background: #f4f8ff;
}

.wizard-step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 0;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--color-muted);
    font-weight: 800;
    user-select: none;
}

.wizard-step.is-active {
    background: #07243e;
    color: #fff;
}

.table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

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

.data-table--compact {
    min-width: 1080px;
}

.data-table--fit {
    min-width: 0;
    table-layout: fixed;
}

.data-table--fit thead th,
.data-table--fit tbody td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.data-table--finance-list {
    font-size: 0.82rem;
    min-width: 1500px;
    table-layout: auto;
}

.data-table--finance-list thead th,
.data-table--finance-list tbody td {
    padding: 0.65rem 0.5rem;
    white-space: nowrap;
    overflow-wrap: normal;
}

.data-table--finance-list thead th:nth-child(1),
.data-table--finance-list tbody td:nth-child(1) {
    min-width: 100px;
}

.data-table--finance-list thead th:nth-child(2),
.data-table--finance-list tbody td:nth-child(2),
.data-table--finance-list thead th:nth-child(3),
.data-table--finance-list tbody td:nth-child(3) {
    min-width: 120px;
}

.data-table--finance-list thead th:nth-child(4),
.data-table--finance-list tbody td:nth-child(4),
.data-table--finance-list thead th:nth-child(5),
.data-table--finance-list tbody td:nth-child(5),
.data-table--finance-list thead th:nth-child(6),
.data-table--finance-list tbody td:nth-child(6),
.data-table--finance-list thead th:nth-child(7),
.data-table--finance-list tbody td:nth-child(7) {
    min-width: 140px;
}

.data-table--finance-list thead th:nth-child(8),
.data-table--finance-list tbody td:nth-child(8),
.data-table--finance-list thead th:nth-child(9),
.data-table--finance-list tbody td:nth-child(9) {
    min-width: 120px;
}

.data-table--supplier {
    min-width: 1280px;
}

.data-table--containers {
    min-width: 1120px;
}

.shipments-overview-table {
    min-width: 1480px;
    table-layout: auto;
}

.shipments-overview-table thead th,
.shipments-overview-table tbody td {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.shipments-overview-table thead th:nth-child(1),
.shipments-overview-table tbody td:nth-child(1) {
    min-width: 9rem;
}

.shipments-overview-table thead th:nth-child(10),
.shipments-overview-table tbody td:nth-child(10) {
    min-width: 7.5rem;
    text-align: right;
}

.shipments-overview-table thead th:nth-child(11),
.shipments-overview-table tbody td:nth-child(11),
.shipments-overview-table thead th:nth-child(12),
.shipments-overview-table tbody td:nth-child(12) {
    min-width: 8rem;
}

.shipments-overview-table thead th:nth-child(13),
.shipments-overview-table tbody td:nth-child(13) {
    min-width: 7.25rem;
}

.shipments-overview-table .table-actions {
    flex-wrap: nowrap;
}

.shipment-management-form {
    display: grid;
    gap: 1.25rem;
    padding-bottom: 5rem;
}

.page-head--compact {
    margin-bottom: -0.5rem;
}

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

.field--inline {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 6.75rem;
    gap: 0.5rem;
}

.field--inline .field-select {
    min-width: 6.75rem;
    padding-inline: 0.85rem 2rem;
}

.shipment-management-form .form-section .ghost-button--light,
.shipment-management-form .container-product-picker .ghost-button--light {
    border-color: #8fb0d5;
    background: #fff;
    color: #07243e;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(8, 36, 61, 0.08);
}

.shipment-management-form .form-section .ghost-button--light:hover,
.shipment-management-form .container-product-picker .ghost-button--light:hover {
    border-color: var(--color-primary);
    background: #edf6ff;
    box-shadow: 0 12px 24px rgba(29, 111, 216, 0.16);
}

.field--inline span {
    grid-column: 1 / -1;
}

.operational-containers {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 0.8rem;
}

.operational-container-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) 2.5rem;
    gap: 0.75rem;
    align-items: end;
}

.container-products-card,
.supplier-detail-card,
.shipment-docs-note {
    border: 1px solid #d8e2eb;
    border-radius: 8px;
    padding: 1rem;
    background: #fff;
}

.container-products-card + .container-products-card {
    margin-top: 1rem;
}

.container-products-card h4,
.supplier-detail-card h4 {
    margin: 0 0 0.75rem;
}

.container-product-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.shipment-products-table {
    min-width: 1480px;
}

.shipment-products-table th,
.shipment-products-table td {
    white-space: nowrap;
}

.table-input {
    width: 7rem;
    min-height: 2rem;
    border: 1px solid #d8e2eb;
    border-radius: 6px;
    padding: 0.35rem 0.45rem;
}

.supplier-detail-card {
    position: relative;
    margin-bottom: 0.9rem;
}

.supplier-detail-card > .icon-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.radio-row {
    display: flex;
    gap: 1.25rem;
    align-items: center;
    min-height: 2.65rem;
}

.radio-row label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.amount-positive {
    color: #047857;
    font-weight: 800;
    background: #e8f8ec;
}

.sticky-form-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem;
    margin: 0 -1rem -1rem;
    border-top: 1px solid #d8e2eb;
    background: rgba(248, 251, 255, 0.96);
    backdrop-filter: blur(8px);
}

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

.data-table--compact thead th,
.data-table--compact tbody td {
    padding: 0.85rem 0.75rem;
    white-space: nowrap;
}

.empty-table {
    color: var(--color-muted);
    text-align: center;
}

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

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.inline-form {
    display: inline-flex;
    margin: 0;
}

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

.status-badge--danger {
    background: #fee2e2;
    color: #dc2626;
}

.status-badge--warning {
    background: #fef3c7;
    color: #92400e;
}

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

.icon-button--danger {
    background: rgba(180, 35, 24, 0.08);
    color: var(--color-error);
}

.icon-button:disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

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

.password-rules span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.password-rules span::before {
    content: "x";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    color: var(--color-error);
    font-size: 0.78rem;
    font-weight: 900;
}

.password-rules span.is-valid::before {
    content: "✓";
    color: var(--color-success);
}

.password-rules span.is-valid {
    color: var(--color-success);
}

.password-rules span.is-invalid {
    color: var(--color-error);
}

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

.flash {
    padding: 0.95rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.flash__close {
    width: 2rem;
    height: 2rem;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.flash__close svg {
    width: 1rem;
    height: 1rem;
}

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

.app-modal__dialog--payment {
    width: min(58rem, calc(100vw - 2rem));
}

.app-modal__dialog--payment-wide {
    width: min(76rem, calc(100vw - 2rem));
    max-height: min(90vh, 56rem);
}

.app-modal__dialog--payment-wide .app-modal__body {
    overflow: auto;
    max-height: calc(90vh - 9rem);
}

.payment-wizard {
    display: grid;
    gap: 1rem;
}

.payment-document-card {
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 8px;
    padding: 1.15rem;
    background: rgba(248, 251, 255, 0.84);
}

.payment-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid rgba(216, 226, 235, 0.95);
}

.payment-section-title h4 {
    margin: 0;
    color: var(--color-text);
}

.payment-section-title span {
    color: var(--color-success);
    font-size: 0.82rem;
    font-weight: 800;
}

.payment-document-card__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    padding-top: 1rem;
}

.payment-document-form :disabled,
.payment-installment-form :disabled {
    color: var(--color-muted);
    background: #f4f7fb;
    opacity: 1;
}

.payment-balance-field input,
.payment-balance-field input[readonly] {
    color: var(--color-error);
    background: rgba(180, 35, 24, 0.08);
    border-color: rgba(180, 35, 24, 0.28);
    font-weight: 900;
}

.primary-button--dark {
    background: var(--color-sidebar);
    box-shadow: none;
}

.payment-toolbar-button {
    margin-left: 0.75rem;
}

.payment-summary-table th {
    height: 3.1rem;
}

.payment-summary-table th:first-child,
.payment-summary-table td:first-child {
    width: 30%;
}

.payment-summary-table__money {
    background: #21e13f !important;
    color: #fff !important;
    text-align: right;
}

.payment-summary-table__money--total {
    background: #d9d9d9 !important;
    color: #001f3f !important;
}

.payment-summary-table__money--paid {
    background: #21e13f !important;
    color: #fff !important;
}

.payment-summary-table__money--pending {
    background: #ff0000 !important;
    color: #fff !important;
}

.payment-summary-table__amount {
    text-align: right;
    font-weight: 800;
}

.payment-cell--pending {
    color: #dc2626 !important;
    font-weight: 800;
}

.payment-view-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 6.75rem;
    justify-content: center;
}

.payment-view-button svg {
    width: 1rem;
    height: 1rem;
}

.payment-history-table tfoot td {
    background: #d9d9d9;
    font-weight: 900;
}

.payment-history-table {
    min-width: 980px;
    table-layout: auto;
}

.payment-history-table thead th,
.payment-history-table tbody td {
    white-space: normal;
    overflow-wrap: normal;
    word-break: normal;
}

.payment-actions-cell {
    display: flex;
    gap: 0.4rem;
}

.payment-actions-cell .icon-button {
    width: auto;
    height: 2rem;
    padding: 0 0.65rem;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 800;
}

.payment-catalog-panel {
    display: grid;
    gap: 1rem;
}

.payment-catalog-form {
    grid-template-columns: minmax(16rem, 1fr) auto auto;
    display: grid;
    align-items: end;
    gap: 1rem;
}

.payment-catalog-row-form {
    display: grid;
    grid-template-columns: minmax(12rem, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
}

.payment-catalog-row-form input[type="text"] {
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 0.7rem 0.8rem;
    font: inherit;
}

.app-modal__dialog.app-modal__dialog--payment-wide {
    width: min(1120px, calc(100vw - 5rem));
    max-width: none;
}

.app-modal__dialog.app-modal__dialog--payment-wide .app-modal__body {
    max-height: calc(90vh - 9rem);
    overflow: auto;
}

.app-modal__dialog.app-modal__dialog--payment-wide .form-grid {
    grid-template-columns: repeat(2, minmax(18rem, 1fr));
}

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

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

.document-list {
    display: grid;
    gap: 0.75rem;
}

.document-accordion {
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 34px rgba(8, 36, 61, 0.05);
    overflow: hidden;
}

.document-accordion.is-open {
    border-color: rgba(29, 111, 216, 0.28);
}

.document-accordion__summary {
    display: grid;
    grid-template-columns: auto auto minmax(9rem, 1fr) minmax(12rem, 20rem) auto;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 1rem 1.15rem;
    border: none;
    background: transparent;
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
}

.document-accordion__chevron {
    color: var(--color-muted);
    font-size: 1.35rem;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 0.2s ease;
}

.document-accordion.is-open .document-accordion__chevron {
    transform: rotate(90deg);
}

.document-accordion__folder {
    display: inline-flex;
    color: var(--color-primary);
}

.document-progress {
    display: block;
    height: 0.65rem;
    overflow: hidden;
    border-radius: 999px;
    background: #d8dfe7;
}

.document-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-primary);
}

.document-accordion.is-complete .document-progress span {
    background: #22c55e;
}

.document-progress__text {
    color: var(--color-primary);
    font-weight: 700;
}

.document-accordion.is-complete .document-progress__text {
    color: #0f9f48;
}

.document-accordion__body {
    position: relative;
    display: grid;
    gap: 0.65rem;
    padding: 0.35rem 1.15rem 1.2rem 1.15rem;
    border-top: 1px solid rgba(216, 226, 235, 0.75);
}

.document-accordion__body[hidden] {
    display: none;
}

.document-required-list,
.document-other-list {
    display: grid;
    gap: 0.45rem;
    max-width: 40rem;
}

.document-other-list {
    margin-top: 0.75rem;
}

.document-required-item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.95rem;
}

.document-required-item span {
    min-width: 1rem;
    font-weight: 800;
}

.document-required-item strong,
.document-required-item small {
    display: block;
}

.document-required-item small {
    color: var(--color-muted);
}

.document-required-item .document-summary-text {
    color: var(--color-text);
    font-size: 0.84rem;
    font-weight: 500;
}

.document-required-item.is-uploaded {
    color: #0f9f48;
}

.document-required-item.is-missing {
    color: #b85b5b;
}

.document-metadata-form {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(11rem, 1fr) auto;
    gap: 0.55rem;
    margin-top: 0.45rem;
    max-width: 42rem;
}

.document-metadata-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.document-metadata-form input {
    width: 100%;
    padding: 0.68rem 0.8rem;
    border: 1px solid rgba(29, 111, 216, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--color-text);
}

.document-metadata-form .ghost-button {
    padding: 0.68rem 0.9rem;
}

.document-metadata-actions .ghost-button--danger {
    margin-top: 0.45rem;
    padding: 0.68rem 0.9rem;
}

.document-accordion__action {
    position: absolute;
    top: 1rem;
    right: 1.15rem;
}

.document-upload-section {
    display: grid;
    gap: 0.75rem;
    padding-top: 0.35rem;
}

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

.document-upload-section h4 {
    margin: 0;
}

.current-document-list {
    display: grid;
    gap: 0.7rem;
}

.current-document-card {
    display: grid;
    grid-template-columns: minmax(12rem, 0.8fr) minmax(16rem, 1.4fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 16px;
    background: #f7f9fc;
}

.current-document-card strong,
.current-document-card small,
.current-document-card span {
    display: block;
}

.current-document-card small {
    margin-top: 0.15rem;
    color: var(--color-text);
}

.current-document-card span {
    margin-top: 0.15rem;
    color: var(--color-muted);
    font-size: 0.82rem;
}

.current-document-card__form {
    display: grid;
    grid-template-columns: minmax(9rem, 1fr) minmax(9rem, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
}

.current-document-card__form input {
    width: 100%;
    min-width: 0;
    padding: 0.68rem 0.8rem;
    border: 1px solid rgba(29, 111, 216, 0.22);
    border-radius: 12px;
    background: #fff;
}

.current-document-card__actions {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.document-upload-row {
    display: grid;
    grid-template-columns: minmax(13rem, 1fr) minmax(11rem, 0.9fr) minmax(12rem, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.85rem;
    border: 1px solid rgba(216, 226, 235, 0.85);
    border-radius: 16px;
    background: #f7f9fc;
}

.document-upload-row--other {
    grid-template-columns: minmax(13rem, 1fr) minmax(11rem, 0.9fr) minmax(12rem, 1fr) auto auto;
}

.document-upload-row__label {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.document-upload-row__label > span {
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 12px;
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 800;
}

.document-upload-row__label strong,
.document-upload-row__label small {
    display: block;
}

.document-upload-row__label small {
    color: var(--color-muted);
}

.document-upload-row input[type="text"] {
    width: 100%;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(29, 111, 216, 0.22);
    border-radius: 12px;
    background: #fff;
}

.document-file-button input {
    display: none;
}

.document-shipment-select {
    width: 100%;
}

.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--wide {
    width: min(100% - 2rem, 56rem);
}

.app-modal__dialog--payment-wide {
    width: min(1120px, calc(100vw - 5rem));
    max-width: none;
}

.app-modal__dialog--full {
    width: min(1400px, calc(100vw - 2rem));
    max-width: none;
}

.app-modal__dialog--confirm {
    width: min(100% - 2rem, 30rem);
    overflow: hidden;
    border-color: rgba(29, 111, 216, 0.18);
    background:
        radial-gradient(circle at top right, rgba(29, 111, 216, 0.12), transparent 38%),
        rgba(255, 255, 255, 0.98);
}

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

.confirm-card__header {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    padding: 1.35rem 1.4rem 1.1rem;
}

.confirm-card__header h3 {
    margin: 0;
    font-size: 1.35rem;
}

.confirm-card__icon {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--color-primary-soft), #f6fbff);
    color: var(--color-primary);
    box-shadow: inset 0 0 0 1px rgba(29, 111, 216, 0.08);
}

.confirm-card__icon svg {
    width: 1.35rem;
    height: 1.35rem;
}

.confirm-card__body {
    padding: 0.35rem 1.4rem 1.4rem;
}

.confirm-card__body p {
    margin: 0;
    color: var(--color-muted);
    text-align: center;
    line-height: 1.55;
}

.confirm-card__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.85rem;
    padding: 1rem 1.4rem 1.35rem;
}

.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--main {
    width: fit-content;
}

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

.permission-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #f3f7fc;
    color: var(--color-muted);
    font-size: 0.82rem;
    line-height: 1.3;
    cursor: pointer;
}

.permission-chip input {
    width: 0.9rem;
    height: 0.9rem;
    margin: 0;
}

.permission-chip:has(input:checked) {
    background: var(--color-primary-soft);
    color: var(--color-primary);
    font-weight: 800;
}

.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: var(--color-success);
}

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

.finance-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 16rem));
    gap: 1.25rem;
}

.page-head--center {
    justify-content: center;
    text-align: center;
}

.document-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(16rem, 1fr));
    gap: 1.25rem;
    max-width: 42rem;
    margin: 0 auto;
}

.document-type-card {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    min-height: 10rem;
    padding: 1.45rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 8px;
    background: #fff;
    text-align: center;
    color: var(--color-text);
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.document-type-card:hover {
    border-color: #1d6fd8;
    box-shadow: 0 18px 36px rgba(29, 111, 216, 0.12);
    transform: translateY(-1px);
}

.document-type-card:hover .finance-option-card__icon {
    background: #1197e8;
    color: #fff;
}

.document-type-card--disabled {
    cursor: default;
}

.document-type-card--disabled:hover {
    border-color: rgba(216, 226, 235, 0.9);
    box-shadow: none;
    transform: none;
}

.document-type-card--disabled:hover .finance-option-card__icon {
    background: #07243e;
    color: #fff;
}

.document-type-card h3,
.document-type-card p {
    margin: 0;
}

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

.document-choice-card {
    display: grid;
    gap: 0.45rem;
    padding: 1.25rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 12px;
    background: #fff;
    color: var(--color-text);
    text-align: left;
    cursor: pointer;
}

.document-choice-card:hover {
    border-color: rgba(29, 111, 216, 0.45);
    background: #f4f8ff;
}

.document-choice-card span {
    color: var(--color-muted);
    font-size: 0.88rem;
}

.document-wizard-form {
    gap: 1.15rem;
}

.document-wizard-steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.35rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 14px;
    background: #f4f8ff;
}

.document-wizard-steps button {
    padding: 0.65rem 0.75rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--color-muted);
    font-size: 0.86rem;
    font-weight: 800;
    text-align: center;
    cursor: pointer;
}

.document-wizard-steps button.is-active {
    background: #07243e;
    color: #fff;
}

.document-wizard-step {
    min-height: 24rem;
}

.document-items-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.document-items-head h3 {
    margin: 0;
}

.document-items,
.document-references {
    display: grid;
    gap: 1rem;
}

.document-item-row,
.document-reference-row {
    display: grid;
    gap: 0.5rem;
    align-items: center;
}

.document-item-row {
    padding: 1rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(8, 36, 61, 0.04);
}

.document-item-header {
    display: none;
    grid-template-columns: 1.2fr 0.75fr 1.55fr 0.55fr 0.65fr 0.72fr 0.55fr 0.72fr 2.2rem;
    gap: 0.5rem;
    margin-bottom: 0.4rem;
    color: var(--color-muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.document-item-row {
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.document-item-row > :nth-child(1) {
    grid-column: 1 / 4;
}

.document-item-row > :nth-child(2) {
    grid-column: 4 / 10;
}

.document-item-row > :nth-child(3) {
    grid-column: 10 / 12;
}

.document-item-row > :nth-child(4) {
    grid-column: 1 / 3;
}

.document-item-row > :nth-child(5) {
    grid-column: 3 / 6;
}

.document-item-row > :nth-child(6) {
    grid-column: 6 / 8;
}

.document-item-row > :nth-child(7) {
    grid-column: 8 / 12;
}

.document-item-row > :nth-child(8) {
    grid-column: 12 / 13;
    grid-row: 1;
}

.document-code-field {
    min-width: 0;
}

.document-reference-row {
    grid-template-columns: 1.25fr 1fr 1fr 1.8fr auto;
}

.document-item-row input,
.document-reference-row input,
.document-item-row select,
.document-reference-row select {
    min-width: 0;
    min-height: 2.85rem;
    padding: 0.72rem 0.8rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 10px;
    background: #fff;
}

.field--with-status {
    position: relative;
}

.field-status {
    min-height: 1.1rem;
    color: var(--color-muted);
    font-size: 0.8rem;
}

.field-status:not(:empty)::before {
    content: "";
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    margin-right: 0.45rem;
    border: 2px solid rgba(29, 111, 216, 0.28);
    border-top-color: var(--color-primary);
    border-radius: 999px;
    animation: spin 0.8s linear infinite;
}

.field-status.is-success {
    color: var(--color-success);
}

.field-status.is-idle::before,
.field-status.is-success::before {
    animation: none;
}

.field-status.is-idle::before {
    border-color: rgba(96, 114, 132, 0.35);
}

.field-status.is-success::before {
    border-color: var(--color-success);
    background: var(--color-success);
}

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

.document-totals {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(216, 226, 235, 0.95);
}

.document-totals span {
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    background: #e8f4ff;
    color: #0b2c4c;
    font-weight: 700;
}

.document-preview {
    display: grid;
    gap: 1rem;
}

.document-preview__head,
.document-preview__section,
.document-preview__totals,
.document-preview__block {
    padding: 1rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 12px;
    background: #fff;
}

.document-preview__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.document-preview__head h3,
.document-preview__head p,
.document-preview__section h4,
.document-preview__block h4,
.document-preview__block p {
    margin: 0;
}

.document-preview__section {
    display: grid;
    gap: 0.85rem;
}

.document-preview__section h4 {
    font-size: 1rem;
}

.document-preview__head span,
.document-preview__head p,
.document-preview__receiver dt {
    color: var(--color-muted);
    font-size: 0.85rem;
}

.document-preview__head strong {
    font-size: 1.4rem;
    color: var(--color-primary);
}

.document-preview__receiver {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.document-preview__receiver div,
.document-preview__receiver dd {
    margin: 0;
}

.document-preview__receiver dt {
    font-weight: 800;
}

.document-preview__table {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
    border-radius: 12px;
}

.document-preview__table th {
    background: #07243e;
    color: #fff;
}

.document-preview__table th,
.document-preview__table td {
    padding: 0.8rem;
    border-bottom: 1px solid rgba(216, 226, 235, 0.95);
    text-align: left;
}

.document-preview__totals {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    font-weight: 800;
}

.tabs-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.inventory-tabs {
    align-items: center;
    margin-bottom: 1.4rem;
}

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.inventory-summary article {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(8, 36, 61, 0.06);
}

.inventory-summary span,
.inventory-summary strong {
    display: block;
}

.inventory-summary span {
    color: var(--color-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.inventory-summary strong {
    margin-top: 0.3rem;
    font-size: 1.4rem;
    color: var(--color-text);
}

.data-table--inventory {
    min-width: 1180px;
}

.inventory-number {
    font-weight: 800;
}

.inventory-number--success {
    color: #16a34a;
}

.inventory-number--danger {
    color: #dc2626;
}

.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1rem;
    border: 1px solid rgba(216, 226, 235, 0.95);
    border-radius: 8px;
    background: #fff;
    color: var(--color-text);
    font-weight: 800;
}

.tab-button.is-active {
    background: #07243e;
    color: #fff;
}

.tab-button svg {
    width: 1rem;
    height: 1rem;
}

.toolbar--filters {
    justify-content: flex-start;
}

.link-button {
    border: 0;
    background: transparent;
    color: var(--color-primary);
    font-weight: 800;
}

.finance-option-card {
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    min-height: 11rem;
    padding: 1.45rem;
    border: 1px solid rgba(216, 226, 235, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    text-align: center;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.finance-option-card--link:hover {
    transform: translateY(-2px);
    border-color: #1d6fd8;
    box-shadow: 0 24px 60px rgba(29, 111, 216, 0.14);
}

.finance-option-card--link:hover .finance-option-card__icon {
    background: #1197e8;
    color: #fff;
}

.finance-option-card--disabled {
    opacity: 0.72;
}

.finance-option-card__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    background: #07243e;
    color: #fff;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.finance-option-card h3 {
    max-width: 13rem;
    margin: 0;
    font-size: 1rem;
}

.finance-option-card p {
    margin: 0;
    color: var(--color-muted);
    line-height: 1.35;
}

.finance-estimation-form {
    max-width: 58rem;
}

.finance-estimation-form [hidden] {
    display: none;
}

.finance-form-subtitle {
    margin: 0;
    padding-bottom: 0.65rem;
    border-bottom: 1px solid rgba(216, 226, 235, 0.85);
    font-weight: 800;
}

.real-cost-cost-group {
    padding: 1rem;
    border: 1px solid #d8e2eb;
    border-radius: 12px;
}

.real-cost-cost-group .finance-form-subtitle {
    margin-bottom: 1rem;
}

.finance-auto-cost-field {
    position: relative;
}

.finance-auto-cost-field__toggle {
    position: absolute;
    top: 0;
    right: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.exchange-rate-field {
    padding: 0.8rem 1rem;
    border-radius: 8px;
    background: #e7f4ff;
}

.exchange-rate-field span {
    display: none;
}

.exchange-rate-field small {
    color: #0b63b6;
    font-weight: 800;
}

.form-actions--left {
    justify-content: flex-start;
}

.form-grid--inline {
    grid-template-columns: minmax(12rem, 1fr) minmax(10rem, 0.7fr) minmax(10rem, 0.7fr);
}

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

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

    .dashboard-overview,
    .dashboard-grid,
    .dashboard-actions {
        grid-template-columns: 1fr;
    }

    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 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--wide,
    .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;
    }

    .container-identifier-row {
        grid-template-columns: 1fr;
    }

    .details-list--modal {
        grid-template-columns: 1fr;
    }

    .document-accordion__summary,
    .document-upload-row,
    .document-upload-row--other,
    .current-document-card,
    .current-document-card__form {
        grid-template-columns: 1fr;
    }

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

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .document-progress {
        width: 100%;
    }

    .document-accordion__action {
        position: static;
        width: 100%;
        margin-top: 0.75rem;
    }

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