main > .container, main > .container-fluid
{
    padding: 70px 15px 20px;
}

.footer {
    background-color: #f5f5f5;
    font-size: .9em;
    height: 60px;
}

.footer > .container, .footer > .container-fluid {
    padding-right: 15px;
    padding-left: 15px;
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th,
.grid-view td:last-child {
    white-space: nowrap;
}

.grid-view .filters input,
.grid-view .filters select {
    min-width: 50px;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.navbar form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media(max-width:767px) {
    .navbar form > button.logout {
        display:block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.navbar form > button.logout:focus,
.navbar form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.navbar form > button.logout:focus {
    outline: none;
}

/* style breadcrumb widget as in previous bootstrap versions */
.breadcrumb {
    background-color: var(--bs-gray-200);
    border-radius: .25rem;
    padding: .75rem 1rem;
}

.breadcrumb-item > a
{
    text-decoration: none;
}

/* ——— /site/login ——— */
.site-login-page > .container > h1 {
    text-align: center;
}

.site-login-form {
    max-width: 28rem;
    margin: 1.5rem auto 0;
}

.site-login-form__hint a {
    color: inherit;
    text-decoration: none;
}

.site-login-form__hint a:hover {
    text-decoration: underline;
}

/* ——— /cabinet ——— */
.site-cabinet-page .cabinet-page {
    max-width: 1100px;
}

.cabinet-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 1.75rem 2rem;
    align-items: flex-start;
    padding-top: 0.5rem;
}

.cabinet-nav {
    flex: 0 0 220px;
    width: 100%;
    max-width: 280px;
}

.cabinet-nav__list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.cabinet-nav__logout {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.cabinet-nav__link {
    display: block;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    color: #1a2b4a;
    border: 1px solid transparent;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.cabinet-nav__link:hover {
    background: rgba(13, 110, 253, 0.08);
    color: #0a58ca;
}

.cabinet-nav__link--active {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.14) 0%, rgba(111, 66, 193, 0.1) 100%);
    border-color: rgba(13, 110, 253, 0.25);
    font-weight: 600;
    color: #0a58ca;
}

.cabinet-layout__main {
    flex: 1 1 400px;
    min-width: 0;
}

.cabinet-alert--activation {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.35rem 1.5rem 1.5rem;
    margin-bottom: 1.75rem;
    border-radius: 14px;
    background: linear-gradient(118deg, #fff7ed 0%, #ffedd5 38%, #fef3c7 100%);
    border: 1px solid #fdba74;
    box-shadow: 0 8px 28px rgba(251, 146, 60, 0.12);
}

.cabinet-alert__icon {
    font-size: 1.75rem;
    line-height: 1;
    flex-shrink: 0;
}

.cabinet-alert__title {
    font-size: 1.2rem;
    margin: 0 0 0.5rem;
    color: #9a3412;
}

.cabinet-alert__text {
    margin: 0 0 1rem;
    color: #7c2d12;
    line-height: 1.55;
    max-width: 36rem;
}

.cabinet-alert__contacts .cabinet-contacts__heading {
    color: #9a3412;
}

.cabinet-alert__contacts .cabinet-contacts__card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(253, 186, 116, 0.55);
}

.cabinet-alert__contacts .cabinet-contacts__label {
    color: #9a3412;
}

.cabinet-alert__contacts .cabinet-contacts__link {
    color: #c2410c;
}

.cabinet-section__title {
    font-size: 1.45rem;
    margin: 0 0 0.5rem;
}

.cabinet-section__lead {
    margin-bottom: 1.25rem;
}

.cabinet-muted-box {
    padding: 1.1rem 1.25rem;
    border-radius: 12px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    color: #495057;
    line-height: 1.55;
    max-width: 36rem;
}

.cabinet-muted-box--info {
    background: #f0f7ff;
    border-color: #cfe2ff;
    color: #084298;
}

.cabinet-balance-card {
    display: inline-block;
    min-width: 220px;
    padding: 1.25rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(145deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #6ee7b7;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.1);
}

.cabinet-balance-card__label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #047857;
    margin-bottom: 0.35rem;
}

.cabinet-balance-card__value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #065f46;
    line-height: 1.2;
}

.cabinet-balance-card__currency {
    font-size: 1.1rem;
    font-weight: 600;
    margin-left: 0.2rem;
}

.cabinet-contacts__heading {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.95rem;
}

.cabinet-contacts__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cabinet-contacts__item + .cabinet-contacts__item {
    margin-top: 0.75rem;
}

.cabinet-contacts__card {
    padding: 0.75rem 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.cabinet-contacts__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.65rem;
    align-items: baseline;
    margin-bottom: 0.35rem;
}

.cabinet-contacts__row:last-child {
    margin-bottom: 0;
}

.cabinet-contacts__label {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 600;
    min-width: 4.5rem;
}

.cabinet-contacts__link {
    text-decoration: none;
    color: #0d6efd;
    word-break: break-all;
}

.cabinet-contacts__link:hover {
    text-decoration: underline;
    color: #0a58ca;
}

.cabinet-profile-form.site-login-form {
    margin: 0;
    max-width: 28rem;
}

@media (max-width: 767px) {
    .cabinet-layout {
        flex-direction: column;
    }

    .cabinet-nav {
        flex: none;
        max-width: none;
        width: 100%;
    }

    .cabinet-nav__list {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .cabinet-nav__link {
        flex: 1 1 auto;
        min-width: 44%;
        text-align: center;
    }
}

/* ——— /contact ——— */
.site-contact-page {
    overflow-x: hidden;
}

.site-contact-header__title {
    font-size: clamp(1.75rem, 3.5vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.75rem;
    letter-spacing: -0.02em;
    color: #0f172a;
}

.site-contact-header__lead {
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
    max-width: 42rem;
}

.site-contact-body {
    position: relative;
}

.site-contact-aside__title {
    font-weight: 700;
    color: #0f172a;
}

.site-contact-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.site-contact-card {
    position: relative;
    display: flex;
    border-radius: 16px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 32px rgba(37, 99, 235, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.site-contact-card:hover {
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.06),
        0 18px 40px rgba(37, 99, 235, 0.12);
    transform: translateY(-2px);
}

.site-contact-card--fallback {
    margin-top: 0;
}

.site-contact-card__accent {
    width: 5px;
    flex-shrink: 0;
    background: linear-gradient(180deg, #2563eb 0%, #7c3aed 55%, #06b6d4 100%);
}

.site-contact-card__body {
    flex: 1;
    padding: 1.1rem 1.15rem 1.15rem 1rem;
    min-width: 0;
}

.site-contact-card__row {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    text-decoration: none;
    color: inherit;
    padding: 0.45rem 0;
    border-radius: 10px;
    margin: 0 -0.35rem;
    padding-left: 0.35rem;
    padding-right: 0.35rem;
    transition: background 0.15s ease;
}

.site-contact-card__row:hover {
    background: rgba(37, 99, 235, 0.06);
    color: inherit;
}

.site-contact-card__row + .site-contact-card__row {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.site-contact-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #fff;
    font-size: 1.05rem;
    line-height: 1;
}

.site-contact-card__icon--mail {
    background: linear-gradient(135deg, #0891b2 0%, #2563eb 100%);
}

.site-contact-card__icon--tg {
    background: linear-gradient(135deg, #0284c7 0%, #0ea5e9 100%);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.site-contact-card__icon--tg::before {
    content: 'TG';
}

.site-contact-card__icon--max {
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    font-size: 0.85rem;
    font-weight: 800;
}

.site-contact-card__icon--max::before {
    content: 'M';
    font-family: system-ui, sans-serif;
}

.site-contact-card__icon--phone::before {
    content: '☎';
}

.site-contact-card__icon--mail::before {
    content: '✉';
}

.site-contact-card__label {
    display: block;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 0.15rem;
}

.site-contact-card__value {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    word-break: break-word;
}

.site-contact-form-shell {
    background: #fff;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 16px 48px rgba(15, 23, 42, 0.1);
    padding: 1.75rem 1.5rem 2rem;
}

@media (min-width: 768px) {
    .site-contact-form-shell {
        padding: 2rem 2.25rem 2.25rem;
    }
}

.site-contact-form-shell__head {
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.site-contact-form-shell__title {
    font-weight: 700;
    color: #0f172a;
}

.site-contact-form__textarea {
    min-height: 140px;
    resize: vertical;
}

.site-contact-form__actions {
    margin-top: 0.5rem;
}

.site-contact-form__submit {
    border-radius: 12px;
    padding: 0.65rem 1.75rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.site-contact-form__submit:hover {
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.45);
}

/* Desktop floating chat widget */
.desktop-chat-widget {
    position: fixed;
    right: 22px;
    bottom: 24px;
    z-index: 1200;
    display: none;
}

@media (min-width: 992px) {
    .desktop-chat-widget {
        display: block;
    }
}

.desktop-chat-widget__toggle {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    color: #fff;
    font-weight: 700;
    font-size: 0.96rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    box-shadow: 0 10px 24px rgba(220, 53, 69, 0.34);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    animation: desktop-chat-pulse 1.7s infinite;
}

.desktop-chat-widget--open .desktop-chat-widget__toggle {
    animation: none;
}

.desktop-chat-widget__dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #fff;
}

@keyframes desktop-chat-pulse {
    0% { box-shadow: 0 10px 24px rgba(220, 53, 69, 0.34), 0 0 0 0 rgba(220, 53, 69, 0.45); }
    70% { box-shadow: 0 10px 24px rgba(220, 53, 69, 0.34), 0 0 0 14px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 10px 24px rgba(220, 53, 69, 0.34), 0 0 0 0 rgba(220, 53, 69, 0); }
}

.desktop-chat-widget__panel {
    position: absolute;
    right: 0;
    bottom: 58px;
    width: 360px;
    border: 1px solid #e9ecef;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.2);
    padding: 14px;
}

.desktop-chat-widget__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.desktop-chat-widget__btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    border-radius: 9px;
    text-decoration: none;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.1;
    min-height: 38px;
    padding: 6px;
}

.desktop-chat-widget__btn--tg { background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%); }
.desktop-chat-widget__btn--max { background: linear-gradient(135deg, #9333ea 0%, #6d28d9 100%); }

.desktop-chat-widget__line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.desktop-chat-widget__messages {
    border: 1px solid #e9ecef;
    border-radius: 10px;
    background: #f8f9fa;
    height: 220px;
    overflow: auto;
    padding: 8px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.desktop-chat-widget__msg {
    max-width: 86%;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 0.86rem;
    line-height: 1.35;
    white-space: pre-wrap;
    word-break: break-word;
}

.desktop-chat-widget__msg--client {
    align-self: flex-end;
    background: #dc3545;
    color: #fff;
}

.desktop-chat-widget__msg--operator {
    align-self: flex-start;
    background: #fff;
    border: 1px solid #dee2e6;
    color: #212529;
}

.desktop-chat-widget__msg--system {
    align-self: center;
    background: #eef2ff;
    color: #475569;
}

.desktop-chat-widget__line input {
    border: 1px solid #ced4da;
    border-radius: 9px;
    padding: 9px 11px;
    font-size: 0.9rem;
    outline: none;
}

.desktop-chat-widget__line input:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

.desktop-chat-widget__line button {
    border: none;
    border-radius: 9px;
    background: #dc3545;
    color: #fff;
    font-weight: 700;
    padding: 0 14px;
    cursor: pointer;
}
