:root {
    --brand-navy: #223455;
    --brand-navy-deep: #182743;
    --brand-orange: #ff6633;
    --brand-orange-deep: #e25626;
    --brand-bg: #f3f6fb;
    --brand-bg-soft: #e8eef8;
    --brand-surface: #ffffff;
    --brand-border: #d7e1ee;
    --brand-text: #223455;
    --brand-muted: #66748a;
    --brand-shadow: 0 16px 40px rgba(34, 52, 85, 0.1);
}

body {
    background:
        radial-gradient(circle at top left, rgba(255, 102, 51, 0.1), transparent 32%),
        radial-gradient(circle at top right, rgba(34, 52, 85, 0.08), transparent 26%),
        linear-gradient(180deg, #f8fafd 0%, var(--brand-bg) 100%);
    color: var(--brand-text);
}

a {
    color: var(--brand-navy);
}

a:hover {
    color: var(--brand-orange-deep);
}

.container {
    position: relative;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34, 52, 85, 0.08);
    color: var(--brand-navy);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.brand-mark::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: var(--brand-orange);
    box-shadow: 0 0 0 6px rgba(255, 102, 51, 0.12);
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.hero-brand .brand-mark {
    margin-bottom: 0 !important;
}

.brand-logo,
.hero-logo {
    display: block;
    width: auto;
}

.brand-logo {
    height: 56px;
    padding: 12px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(215, 225, 238, 0.95);
    box-shadow: 0 14px 26px rgba(24, 39, 67, 0.12);
}

.hero-logo {
    height: 42px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: 0 14px 26px rgba(14, 24, 43, 0.16);
}

.auth-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-bottom: 18px;
    text-align: center;
}

.auth-brand .brand-logo {
    height: 56px;
}

.auth-brand-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--brand-navy);
}

.header-title,
h2,
h3,
h4,
h5 {
    color: var(--brand-navy);
    letter-spacing: -0.02em;
}

.text-muted,
.meta-line,
.scope-text,
.preview-note,
.field-label {
    color: var(--brand-muted) !important;
}

.login-box,
.form-card,
.filter-card,
.table-wrap,
.card-box,
.card-custom,
.page-card,
.instruction-card,
.news-card,
.section-card,
.service-card,
.viewer-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,253,0.98) 100%);
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
}

.card-box,
.card-custom,
.instruction-card,
.news-card,
.service-card,
.section-card,
.page-card,
.login-box,
.form-card,
.filter-card,
.table-wrap,
.viewer-box {
    position: relative;
    overflow: hidden;
}

.card-box::before,
.card-custom::before,
.instruction-card::before,
.news-card::before,
.service-card::before,
.section-card::before,
.page-card::before,
.login-box::before,
.form-card::before,
.filter-card::before,
.table-wrap::before,
.viewer-box::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--brand-navy) 0%, var(--brand-orange) 100%);
}

.card-box:hover,
.card-custom:hover,
.instruction-card:hover,
.news-card:hover,
.service-card:hover {
    box-shadow: 0 20px 45px rgba(34, 52, 85, 0.14);
}

.btn {
    border-radius: 10px;
    font-weight: 600;
}

.btn-primary {
    background-color: var(--brand-orange);
    border-color: var(--brand-orange);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--brand-orange-deep) !important;
    border-color: var(--brand-orange-deep) !important;
}

.btn-outline-primary {
    color: var(--brand-navy);
    border-color: rgba(34, 52, 85, 0.35);
    background: rgba(255,255,255,0.75);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--brand-navy) !important;
    border-color: var(--brand-navy) !important;
    color: #fff !important;
}

.btn-outline-secondary {
    color: var(--brand-navy);
    border-color: rgba(34, 52, 85, 0.2);
    background: rgba(232, 238, 248, 0.7);
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: var(--brand-navy) !important;
    border-color: var(--brand-navy) !important;
    color: #fff !important;
}

.btn-outline-danger {
    border-color: rgba(255, 102, 51, 0.4);
    color: var(--brand-orange-deep);
}

.btn-outline-danger:hover,
.btn-outline-danger:focus,
.btn-outline-danger:active {
    background-color: var(--brand-orange) !important;
    border-color: var(--brand-orange) !important;
    color: #fff !important;
}

.btn-warning {
    background-color: #f0b14f;
    border-color: #f0b14f;
    color: #2d2412;
}

.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
    background-color: #db9f43 !important;
    border-color: #db9f43 !important;
}

.btn-success {
    background-color: #2b7a60;
    border-color: #2b7a60;
}

.btn-success:hover,
.btn-success:focus,
.btn-success:active {
    background-color: #256b54 !important;
    border-color: #256b54 !important;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: var(--brand-border);
    color: var(--brand-text);
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(255, 102, 51, 0.55);
    box-shadow: 0 0 0 0.25rem rgba(255, 102, 51, 0.18);
}

.table thead th {
    background: rgba(34, 52, 85, 0.06);
    color: var(--brand-navy);
    border-bottom-color: var(--brand-border);
}

.table td,
.table th {
    border-color: rgba(215, 225, 238, 0.85);
}

.table-hover > tbody > tr:hover > * {
    background-color: rgba(34, 52, 85, 0.03);
}

.alert-success {
    background: rgba(43, 122, 96, 0.1);
    border-color: rgba(43, 122, 96, 0.18);
    color: #245948;
}

.alert-warning {
    background: rgba(255, 102, 51, 0.08);
    border-color: rgba(255, 102, 51, 0.18);
    color: #8d452a;
}

.alert-danger {
    background: rgba(179, 52, 33, 0.08);
    border-color: rgba(179, 52, 33, 0.18);
    color: #8c3322;
}

.big {
    color: var(--brand-navy);
}

.pin-badge {
    background: rgba(255, 102, 51, 0.12) !important;
    color: var(--brand-orange-deep) !important;
}

.modal-content {
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
}

.modal-header,
.modal-footer {
    border-color: rgba(215, 225, 238, 0.85);
}

.page-shell {
    padding-top: 8px;
}

.app-nav-shell {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 12px 16px 4px;
    backdrop-filter: blur(18px);
}

.app-nav-inner {
    max-width: 1140px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px;
    border: 1px solid rgba(215, 225, 238, 0.88);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 38px rgba(34, 52, 85, 0.08);
}

@media (min-width: 1400px) {
    .app-nav-inner {
        max-width: 1320px;
    }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
    .app-nav-inner {
        max-width: 1140px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .app-nav-inner {
        max-width: 960px;
    }
}

.app-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
    padding: 8px 12px;
    border-radius: 16px;
    color: var(--brand-navy);
    font-weight: 800;
    text-decoration: none;
}

.app-nav-brand:hover {
    color: var(--brand-navy);
    background: rgba(34, 52, 85, 0.06);
}

.app-nav-logo {
    height: 26px;
    width: auto;
}

.app-nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.app-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 9px 12px;
    border-radius: 14px;
    color: var(--brand-muted);
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.app-nav-link small {
    color: rgba(102, 116, 138, 0.74);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.app-nav-link:hover,
.app-nav-link:focus {
    color: var(--brand-navy);
    background: rgba(34, 52, 85, 0.07);
    transform: translateY(-1px);
}

.app-nav-link.active {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-deep) 100%);
    box-shadow: 0 12px 22px rgba(34, 52, 85, 0.2);
}

.app-nav-link.active small {
    color: rgba(255, 255, 255, 0.72);
}

.mobile-tabbar {
    display: none;
}

.page-hero {
    position: relative;
    overflow: hidden;
    border-radius: 28px;
    padding: 28px;
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 102, 51, 0.22), transparent 20%),
        radial-gradient(circle at 5% 10%, rgba(255, 255, 255, 0.08), transparent 22%),
        linear-gradient(135deg, var(--brand-navy-deep) 0%, var(--brand-navy) 55%, #304b78 100%);
    color: #fff;
    box-shadow: 0 24px 50px rgba(24, 39, 67, 0.24);
}

.page-hero::after {
    content: "";
    position: absolute;
    right: -40px;
    top: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 102, 51, 0.14);
}

.page-hero > * {
    position: relative;
    z-index: 1;
}

.hero-title,
.page-hero .header-title,
.page-hero h1,
.page-hero h2,
.page-hero h3,
.page-hero h4,
.page-hero h5 {
    color: #fff;
    margin-bottom: 8px;
}

.hero-subtitle,
.page-hero .text-muted {
    color: rgba(255, 255, 255, 0.78) !important;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.88);
    font-size: 14px;
}

.page-hero .brand-mark {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.page-hero .brand-mark::before {
    box-shadow: 0 0 0 6px rgba(255, 102, 51, 0.18);
}

.section-card,
.page-card,
.filter-card,
.table-wrap {
    border-radius: 24px;
    padding: 24px;
}

.card-box:hover,
.card-custom:hover,
.instruction-card:hover,
.news-card:hover,
.service-card:hover {
    transform: translateY(-2px);
}

.placeholder-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    padding: 30px;
    border-radius: 26px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 253, 0.98) 100%);
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
}

.placeholder-kicker {
    color: var(--brand-orange-deep);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.placeholder-title {
    color: var(--brand-navy);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
}

.placeholder-text {
    color: var(--brand-muted);
    max-width: 640px;
    margin-bottom: 0;
}

.placeholder-status {
    min-width: 150px;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 102, 51, 0.1);
    color: var(--brand-orange-deep);
    font-weight: 800;
    text-align: center;
}

.page-hero .btn-outline-secondary,
.page-hero .btn-outline-danger,
.page-hero .btn-outline-primary {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.22);
    color: #fff;
}

.page-hero .btn-outline-secondary:hover,
.page-hero .btn-outline-danger:hover,
.page-hero .btn-outline-primary:hover,
.page-hero .btn-outline-secondary:focus,
.page-hero .btn-outline-danger:focus,
.page-hero .btn-outline-primary:focus {
    background: #fff !important;
    color: var(--brand-navy) !important;
    border-color: #fff !important;
}

.form-control,
.form-select {
    min-height: 46px;
}

.table thead th {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat-card {
    padding: 22px;
    border-radius: 22px;
}

.stat-label {
    color: var(--brand-muted);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.stat-note {
    color: var(--brand-muted);
    font-size: 14px;
    margin-top: 8px;
}

.big {
    font-size: 38px;
    line-height: 1;
    letter-spacing: -0.04em;
}

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

.section-heading h3,
.section-heading h4,
.section-heading h5 {
    margin-bottom: 0;
}

.section-heading .text-muted {
    font-size: 14px;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

.action-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    min-height: 132px;
    padding: 20px;
    border-radius: 22px;
    text-decoration: none;
    text-align: center;
    color: var(--brand-text);
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(244,247,252,0.98) 100%);
    border: 1px solid var(--brand-border);
    box-shadow: var(--brand-shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

@media (max-width: 991.98px) {
    body {
        padding-bottom: 78px;
    }

    .app-nav-shell {
        position: static;
        padding: 10px 12px 0;
    }

    .app-nav-inner {
        justify-content: center;
    }

    .app-nav-brand {
        width: 100%;
        justify-content: center;
    }

    .app-nav-links {
        display: none;
    }

    .mobile-tabbar {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: 10px;
        z-index: 60;
        display: flex;
        gap: 4px;
        overflow-x: auto;
        padding: 8px;
        border: 1px solid rgba(215, 225, 238, 0.9);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: 0 18px 44px rgba(34, 52, 85, 0.2);
        backdrop-filter: blur(18px);
        scrollbar-width: none;
    }

    .mobile-tabbar::-webkit-scrollbar {
        display: none;
    }

    .mobile-tabbar-link {
        flex: 0 0 auto;
        min-width: 92px;
        padding: 10px 12px;
        border-radius: 16px;
        color: var(--brand-muted);
        font-size: 12px;
        font-weight: 800;
        text-align: center;
        text-decoration: none;
        white-space: nowrap;
    }

    .mobile-tabbar-link.active {
        color: #fff;
        background: var(--brand-navy);
    }

    .page-shell {
        padding-top: 4px;
    }

    .page-hero {
        border-radius: 22px;
        padding: 22px;
    }

    .placeholder-panel {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .placeholder-status {
        width: 100%;
    }
}

.action-tile:hover {
    transform: translateY(-3px);
    color: var(--brand-text);
    box-shadow: 0 20px 45px rgba(34, 52, 85, 0.14);
}

.action-tile strong {
    display: block;
    color: var(--brand-navy);
    font-size: 18px;
    margin-bottom: 8px;
}

.action-tile span {
    color: var(--brand-muted);
    font-size: 14px;
    line-height: 1.5;
}

.list-title {
    color: var(--brand-navy);
    font-weight: 700;
}

.field-grid .card-custom,
.stage-grid .card-box {
    border-radius: 22px;
}

.field-value {
    line-height: 1.55;
}

.price-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 102, 51, 0.12);
    color: var(--brand-orange-deep);
}

.service-price {
    font-size: clamp(1.26rem, 2.1vw, 1.75rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--brand-orange-deep);
    letter-spacing: -0.02em;
}

.service-catalog-card {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.service-catalog-card .service-price {
    font-size: clamp(1.02rem, 1.45vw, 1.24rem);
    font-weight: 750;
    line-height: 1.25;
    color: var(--brand-navy);
    letter-spacing: -0.01em;
}

.service-folder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.service-folder-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    min-height: 150px;
    padding: 20px;
    border: 1px solid rgba(34, 52, 85, 0.12);
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(245, 249, 253, 0.92));
    color: var(--brand-text);
    text-align: left;
    box-shadow: 0 16px 38px rgba(34, 52, 85, 0.08);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.service-folder-card:hover,
.service-folder-card[aria-expanded="true"] {
    transform: translateY(-3px);
    border-color: rgba(255, 102, 51, 0.3);
    box-shadow: 0 22px 48px rgba(34, 52, 85, 0.14);
}

.service-folder-content {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.service-folder-label {
    margin-bottom: 6px;
    color: var(--brand-muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.service-folder-title {
    color: var(--brand-navy);
    font-size: clamp(1.08rem, 1.8vw, 1.34rem);
    font-weight: 900;
    line-height: 1.15;
}

.service-folder-meta {
    margin-top: 10px;
    color: var(--brand-muted);
    font-size: 0.9rem;
    font-weight: 750;
}

.service-folder-arrow {
    grid-column: 1 / -1;
    align-self: end;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 52, 85, 0.07);
    color: var(--brand-navy);
    font-size: 0.84rem;
    font-weight: 850;
}

.service-folder-card[aria-expanded="true"] .service-folder-arrow {
    background: rgba(255, 102, 51, 0.14);
    color: var(--brand-orange-deep);
}

.service-section-group {
    padding-top: 10px;
}

.service-section-group + .service-section-group {
    margin-top: 34px;
    padding-top: 28px;
    border-top: 1px solid rgba(34, 52, 85, 0.1);
}

.service-section-heading {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 18px;
}

.service-section-heading h5 {
    margin: 0;
    color: var(--brand-navy);
    font-size: clamp(1.28rem, 2.2vw, 1.8rem);
    font-weight: 850;
    letter-spacing: -0.02em;
}

.service-section-count {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(34, 52, 85, 0.08);
    color: var(--brand-muted);
    font-size: 0.84rem;
    font-weight: 800;
}

.service-card-description {
    display: -webkit-box;
    line-height: 1.55;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.service-variant-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(34, 52, 85, 0.08);
    color: var(--brand-navy);
    font-size: 0.82rem;
    font-weight: 700;
}

.service-variants {
    display: grid;
    gap: 10px;
}

.service-variant-option {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 14px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid rgba(34, 52, 85, 0.12);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.78);
    cursor: pointer;
}

.service-variant-option:hover {
    border-color: rgba(255, 102, 51, 0.35);
    background: rgba(255, 102, 51, 0.06);
}

.service-variant-title {
    color: var(--brand-navy);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
}

.service-variant-price {
    grid-column: 2;
    color: var(--brand-orange-deep);
    font-size: 1.18rem;
    font-weight: 900;
    line-height: 1.2;
    white-space: nowrap;
}

.service-catalog-card .service-actions {
    margin-top: auto !important;
    padding-top: 1.5rem;
}

.coming-soon-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 102, 51, 0.12);
    color: var(--brand-orange-deep);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}

.empty-state {
    padding: 24px;
    border-radius: 18px;
    background: rgba(34, 52, 85, 0.04);
    color: var(--brand-muted);
}

.tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid rgba(34, 52, 85, 0.14);
    background: rgba(255, 255, 255, 0.76);
    color: var(--brand-navy);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.18s ease;
}

.tab-link:hover {
    color: var(--brand-navy);
    background: rgba(232, 238, 248, 0.9);
}

.tab-link.active {
    background: var(--brand-navy);
    border-color: var(--brand-navy);
    color: #fff;
    box-shadow: 0 14px 28px rgba(34, 52, 85, 0.18);
}

.tab-pane-shell {
    padding: 4px 0 0;
}

img,
svg,
iframe {
    max-width: 100%;
}

.hero-title,
.header-title,
.hero-subtitle,
.hero-meta,
.section-heading h3,
.section-heading h4,
.section-heading h5,
.field-value,
.empty-state,
.stat-note {
    overflow-wrap: anywhere;
}

.hero-meta {
    flex-wrap: wrap;
    max-width: 100%;
    line-height: 1.45;
}

.section-heading > * {
    min-width: 0;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 991px) {
    .page-hero {
        padding: 22px;
        border-radius: 22px;
    }
}

@media (max-width: 767px) {
    .page-shell {
        padding-top: 0;
    }

    .container.page-shell {
        padding-left: 12px;
        padding-right: 12px;
    }

    .page-hero {
        padding: 18px;
        border-radius: 20px;
    }

    .hero-actions,
    .section-heading {
        flex-direction: column;
        align-items: stretch;
    }

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

    .hero-brand {
        gap: 10px;
        align-items: flex-start;
    }

    .hero-logo {
        height: 34px;
    }

    .auth-brand .brand-logo {
        height: 48px;
    }

    .big {
        font-size: 32px;
    }

    .section-card,
    .page-card,
    .filter-card,
    .table-wrap {
        padding: 18px;
    }

    .hero-meta {
        display: flex;
        width: 100%;
        padding: 10px 12px;
        border-radius: 16px;
    }

    .hero-actions,
    .success-actions {
        width: 100%;
    }

    .hero-actions .btn,
    .success-actions .btn,
    .company-switcher-card .btn {
        width: 100%;
        justify-content: center;
    }

    .company-switcher-card form .col-md-auto,
    .company-switcher-card form .col-md-8,
    .company-switcher-card form .col-lg-6 {
        width: 100%;
    }

    .stat-card {
        padding: 18px;
    }

    .tab-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 2px;
        scrollbar-width: none;
    }

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

    .tab-link {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .doc-block-title {
        flex-direction: column;
        align-items: stretch;
    }

    .doc-block-title .btn,
    .doc-block-title a {
        width: 100%;
    }

    .preview-frame {
        min-height: 50vh;
    }

    .field-list {
        columns: 1;
    }

    .bitrix-app-menu a {
        flex-wrap: wrap;
        gap: 8px;
    }

    .bitrix-app-frame {
        min-height: 620px;
    }

    .wizard-grid,
    .success-summary {
        grid-template-columns: 1fr;
    }

    .wizard-form-card,
    .success-card {
        padding: 18px;
    }

    .table-responsive .table {
        min-width: 560px;
    }
}

@media (max-width: 479.98px) {
    .app-nav-shell {
        padding: 8px 8px 0;
    }

    .mobile-tabbar {
        left: 8px;
        right: 8px;
        bottom: 8px;
        padding: 6px;
    }

    .mobile-tabbar-link {
        min-width: 80px;
        padding: 9px 10px;
        font-size: 11px;
    }

    .page-hero {
        padding: 16px;
        border-radius: 18px;
    }

    .brand-logo {
        height: 48px;
        padding: 10px 14px;
    }

    .hero-logo {
        height: 30px;
        padding: 8px 12px;
    }

    .big {
        font-size: 28px;
    }

    .section-card,
    .page-card,
    .filter-card,
    .table-wrap,
    .wizard-form-card,
    .success-card {
        padding: 16px;
    }
}

.quick-contact-widget {
    position: fixed;
    right: 24px;
    bottom: 92px;
    z-index: 1080;
    width: min(280px, calc(100vw - 32px));
}

.quick-contact-widget[open] .quick-contact-toggle {
    background: #223455;
    color: #fff;
}

.quick-contact-toggle {
    list-style: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 124px;
    padding: 14px 18px;
    border-radius: 999px;
    background: #ff6633;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 18px 36px rgba(34, 52, 85, 0.22);
    margin-left: auto;
}

.quick-contact-toggle::-webkit-details-marker {
    display: none;
}

.quick-contact-panel {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
    padding: 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 42px rgba(34, 52, 85, 0.18);
    border: 1px solid rgba(34, 52, 85, 0.08);
}

.quick-contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px;
    border: 0;
    border-radius: 14px;
    background: #f5f6f8;
    color: #223455;
    text-decoration: none;
    font-weight: 600;
    font: inherit;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.quick-contact-link:hover,
.quick-contact-link:focus {
    background: #e9eef5;
    color: #223455;
    transform: translateY(-1px);
}

.quick-contact-link.is-primary {
    background: #223455;
    color: #fff;
}

.quick-contact-link.is-primary:hover,
.quick-contact-link.is-primary:focus {
    background: #18283f;
    color: #fff;
}

.quick-contact-link.is-disabled {
    background: #f0f2f5;
    color: #8a94a6;
    cursor: default;
    pointer-events: none;
}

@media (max-width: 767.98px) {
    .quick-contact-widget {
        right: 16px;
        left: 16px;
        bottom: 88px;
        width: auto;
    }

    .quick-contact-toggle {
        width: 100%;
    }
}
