.dashboard-shell {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.dashboard-alert {
    padding: 18px 22px;
}

.dashboard-alert:has(.dashboard-fsrar-point) {
    display: none;
}

.dashboard-stage {
    position: relative;
    min-height: 1280px;
    border-radius: 42px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(76, 29, 149, 0.06);
}

body[data-page="app-home"] .dashboard-stage {
    border-radius: 0 0 32px 32px;
    border-top: 0;
    box-shadow: none;
}

body[data-page="app-home"] .dashboard-background {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
}

.dashboard-background {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.06));
}

.dashboard-background::after {
    content: '';
    position: absolute;
    inset: 0;
}

.stage-card,
.stage-chip,
.stage-bottom-modules {
    position: absolute;
    z-index: 2;
}

.stage-left-panel {
    position: absolute;
    z-index: 2;
    top: 54px;
    right: 54px;
    width: 490px;
    padding: 20px;
    border-radius: 34px;
    background: rgba(244, 239, 255, 0.68);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: 0 18px 34px rgba(76, 29, 149, 0.05);
}

.stage-right-panel {
    position: absolute;
    z-index: 2;
    top: 46px;
    left: 118px;
    width: 410px;
    padding: 20px;
    border-radius: 34px;
    background: rgba(244, 239, 255, 0.68);
    backdrop-filter: blur(24px);
    border: 1px solid rgba(255, 255, 255, 0.68);
    box-shadow: 0 18px 34px rgba(76, 29, 149, 0.05);
}

.stage-card {
    padding: 28px;
    background: rgba(255, 255, 255, 0.52);
    backdrop-filter: blur(26px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 24px 50px rgba(76, 29, 149, 0.08);
}

.stage-card-progress {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    padding: 12px 10px 16px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.stage-card-inventory {
    position: relative;
    top: auto;
    left: auto;
    width: 100%;
    margin-top: 12px;
    padding: 18px 10px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.stage-card-documents {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    padding: 12px 10px 16px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.stage-card-check {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 12px;
    padding: 18px 10px 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
    backdrop-filter: none;
}

.hero-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.stage-card-progress .hero-card-head {
    margin-bottom: 18px;
}

.stage-card-inventory .hero-card-head {
    margin-bottom: 18px;
}

.hero-card-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.hero-card-title h3 {
    font-size: 18px;
    color: #18212f;
}

.stage-card-progress .hero-card-title h3,
.stage-card-inventory .hero-card-title h3 {
    font-size: 19px;
    line-height: 1.2;
}

.card-process-text {
    margin-top: 6px;
    color: #6d7690;
    font-size: 13px;
    line-height: 1.45;
}

.stage-card-progress .card-process-text,
.stage-card-inventory .card-process-text {
    max-width: 260px;
}

.loading-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
    overflow: hidden;
    margin-bottom: 18px;
}

.stage-card-progress .loading-track {
    display: none;
}

.loading-track span {
    display: block;
    width: 8%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7c3aed, #a78bfa);
    transition: width 0.35s ease;
}

.hero-icon,
.integration-badge,
.bottom-module-icon {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.14), rgba(167, 139, 250, 0.3));
    color: #7c3aed;
    flex-shrink: 0;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(124, 58, 237, 0.12);
    color: #7c3aed;
    font-size: 12px;
    font-weight: 700;
}

.status-pill.success {
    background: rgba(16, 185, 129, 0.13);
    color: #0e9f6e;
}

.status-pill.warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b97800;
}

.status-pill.error {
    background: rgba(239, 68, 68, 0.14);
    color: #d63f3f;
}

.progress-card-body {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 26px;
    align-items: center;
}

.stage-card-progress .progress-card-body {
    padding: 18px 18px 16px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(124, 58, 237, 0.08);
}

.progress-ring {
    --progress: 0;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.95) 0 56%, transparent 57% 100%),
        conic-gradient(#7c3aed calc(var(--progress) * 1%), rgba(124, 58, 237, 0.12) 0);
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-ring-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.progress-ring-inner strong {
    font-size: 26px;
    color: #18212f;
}

.progress-ring-inner span {
    color: #8a93a6;
    font-size: 12px;
}

.progress-metrics {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stage-card-progress .progress-metrics {
    gap: 18px;
}

.metric-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.metric-row span {
    color: #596376;
    font-size: 15px;
}

.metric-row strong {
    color: #18212f;
    font-size: 28px;
    font-weight: 700;
}

.stage-card-progress .metric-row strong {
    min-width: 58px;
    text-align: right;
}

.inventory-list,
.check-mark-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-card-inventory .inventory-list {
    gap: 14px;
}

.inventory-item,
.integration-row,
.writeoff-preview-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(124, 58, 237, 0.08);
}

.stage-card-inventory .inventory-item {
    padding: 18px 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 14px 30px rgba(124, 58, 237, 0.05);
}

.inventory-item-left,
.integration-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-width: 0;
    flex: 1;
}

.inventory-item-name {
    color: #18212f;
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
}

.stage-card-inventory .inventory-item-name {
    font-size: 16px;
    font-weight: 700;
}

.inventory-item-meta {
    color: #7a8496;
    font-size: 12px;
}

.stage-card-inventory .inventory-item-meta {
    margin-top: 2px;
    line-height: 1.35;
}

.inventory-item-value {
    color: #18212f;
    font-size: 18px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    align-self: center;
}

.stage-card-inventory .inventory-item-value {
    min-width: 38px;
    text-align: right;
    font-size: 17px;
}

.inventory-empty {
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    color: #7a8496;
}

.loading-placeholder {
    position: relative;
    overflow: hidden;
}

.loading-placeholder::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.7), transparent);
    animation: placeholderSweep 1.8s linear infinite;
}

@keyframes placeholderSweep {
    from { transform: translateX(-100%); }
    to { transform: translateX(100%); }
}

.card-footer-link {
    margin-top: 14px;
}

.card-footer-link a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #7c3aed;
    font-weight: 700;
}

.writeoff-form-preview {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.documents-preview .writeoff-preview-box strong {
    font-size: 18px;
}

.documents-fresh-title {
    color: #6d7690;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 4px;
}

.documents-fresh-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stage-card-check .check-mark-body {
    gap: 14px;
}

.stage-right-panel .stage-card-check .check-mark-body {
    display: none;
}

.documents-fresh-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(124, 58, 237, 0.08);
}

.documents-fresh-item {
    min-height: 58px;
}

.documents-link {
    margin-top: 10px;
}

.stage-right-panel .documents-link {
    display: none;
}

.documents-fresh-name {
    color: #18212f;
    font-weight: 700;
    line-height: 1.35;
}

.documents-fresh-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
}

.documents-fresh-name {
    padding-right: 8px;
}

.documents-fresh-submeta {
    color: #7a8496;
    font-size: 13px;
    line-height: 1.3;
}

.documents-fresh-meta {
    color: #7a8496;
    font-size: 13px;
    white-space: nowrap;
    flex-shrink: 0;
}

.writeoff-preview-box {
    align-items: flex-start;
    flex-direction: column;
}

.writeoff-preview-box span,
.writeoff-preview-box label {
    color: #7a8496;
    font-size: 13px;
}

.writeoff-preview-box strong {
    color: #18212f;
    font-size: 20px;
    line-height: 1.4;
}

.writeoff-select,
.writeoff-input {
    width: 100%;
    min-height: 54px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(124, 58, 237, 0.14);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #374151;
}

.dashboard-action-btn {
    margin-top: 10px;
    width: 100%;
    justify-content: center;
    text-align: center;
}

.stage-chip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.44);
    backdrop-filter: blur(18px);
    color: #18212f;
    font-weight: 600;
}

.chip-top {
    top: 34px;
    left: 50%;
    transform: translateX(-50%);
}

.stage-bottom-modules {
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    width: min(860px, calc(100% - 180px));
    padding: 18px 24px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    background: rgba(255, 255, 255, 0.44);
    backdrop-filter: blur(22px);
    border-radius: 28px;
    z-index: 1;
}

a.bottom-module {
    text-decoration: none;
}

.bottom-module {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    color: #18212f;
}

.bottom-module strong {
    font-size: 16px;
    line-height: 1.2;
    order: 2;
}

.stage-bottom-modules .bottom-module > span:not(.bottom-module-icon):not(.module-access-note) {
    display: none;
}

.bottom-module.disabled-link {
    opacity: 1;
}

.bottom-module.disabled-link strong {
    color: #475467;
}

.bottom-module-icon i {
    font-size: 18px;
}

.module-access-note {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 10px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.16), rgba(236, 72, 153, 0.18));
    border: 1px solid rgba(124, 58, 237, 0.22);
    color: #6d28d9;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.1;
    text-align: center;
    box-shadow: 0 8px 18px rgba(124, 58, 237, 0.12);
    order: 3;
    margin-top: 2px;
}

.module-access-tariff {
    order: 4;
    color: #7a8496;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.documents-access-note {
    display: none;
    margin-bottom: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
    border: 1px solid rgba(124, 58, 237, 0.18);
    color: #6d28d9;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.documents-access-note.visible {
    display: block;
}

.dashboard-system-note {
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
}

.disabled-link {
    pointer-events: none;
    opacity: 0.58;
}

.integration-badge.blue {
    background: rgba(59, 130, 246, 0.14);
    color: #2563eb;
}

.integration-badge.gold {
    background: rgba(245, 158, 11, 0.16);
    color: #b97800;
}

.integration-badge.purple {
    background: rgba(124, 58, 237, 0.14);
    color: #7c3aed;
}

@media (max-width: 1400px) {
    .dashboard-stage {
        min-height: 1560px;
    }

    .stage-left-panel {
        top: 40px;
        right: 40px;
        width: 430px;
        padding: 18px;
    }

    .stage-right-panel {
        top: 40px;
        left: 84px;
        width: 360px;
        padding: 18px;
    }
}

@media (max-width: 1100px) {
    .dashboard-stage {
        min-height: auto;
        padding: 18px;
        display: flex;
        flex-direction: column;
        gap: 18px;
    }

    .dashboard-background,
    .dashboard-background::after {
        border-radius: 30px;
    }

    .stage-left-panel,
    .stage-right-panel,
    .stage-card,
    .stage-chip,
    .stage-bottom-modules {
        position: relative;
        inset: auto;
        left: auto;
        right: auto;
        top: auto;
        bottom: auto;
        width: 100%;
        transform: none;
    }

    .stage-left-panel {
        padding: 18px 16px;
    }

    .stage-right-panel {
        padding: 18px 16px;
    }

    .stage-chip {
        justify-content: center;
    }

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

@media (max-width: 720px) {
    .dashboard-stage {
        padding: 0;
    }

    .stage-card {
        padding: 20px;
        border-radius: 24px;
    }

    .stage-left-panel {
        padding: 0px 16px;
        border-radius: 0;
    }

    .stage-right-panel {
        border-radius: 0;
    }

    .stage-card-progress,
    .stage-card-inventory,
    .stage-card-documents,
    .stage-card-check {
        padding-left: 0;
        padding-right: 0;
    }

    .progress-card-body {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .stage-card-progress .progress-card-body {
        padding: 18px 14px;
    }

    .metric-row strong {
        font-size: 22px;
    }

    .stage-bottom-modules {
        gap: 18px;
    }

    .inventory-item,
    .integration-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .stage-card-inventory .inventory-item-value {
        align-self: flex-end;
    }
    body[data-page="app-home"] .dashboard-stage {
        border-radius: 0;
    }
}

