@font-face {
    font-family: "Inter";
    src: url("/assets/fonts/Inter-Variable.ttf?v=1") format("truetype");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/assets/fonts/Inter-Italic-Variable.ttf?v=1") format("truetype");
    font-weight: 100 900;
    font-style: italic;
    font-display: swap;
}

:root {
    --page: #f7f8ff;
    --surface: #ffffff;
    --surface-muted: #f7f8fa;
    --line: #dde1e7;
    --line-soft: #edf0f3;
    --text: #20242c;
    --muted: #667085;
    --blue: #2f6fed;
    --blue-dark: #245bd0;
    --green-soft: #eaf7de;
    --shadow: 0 8px 20px rgba(18, 25, 38, 0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--page) url("/assets/fon123.webp?v=1") center top / cover fixed no-repeat;
    color: var(--text);
    font-family: "Inter", Arial, sans-serif;
    font-size: 14px;
    letter-spacing: 0;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    height: 88px;
    background: var(--surface);
    border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    width: min(1120px, calc(100% - 28px));
    max-width: none;
    height: 100%;
    margin: 0 auto;
    padding: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.brand__logo {
    display: block;
    width: auto;
    height: 78px;
    object-fit: contain;
}

.nav {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    margin-right: 32px;
}

.nav__item {
    display: inline-flex;
    align-items: center;
    position: relative;
    border: 0;
    background: transparent;
    color: #1f2937;
    padding: 6px 0 8px;
    font-size: 15px;
    line-height: 1.15;
    text-decoration: none;
    white-space: nowrap;
}

.nav__item::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 1px;
    height: 1px;
    background: var(--blue);
    opacity: 0;
    transform: scaleX(0.72);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav__item:hover,
.nav__item--active {
    color: var(--blue);
}

.nav__item:hover::after,
.nav__item--active::after {
    opacity: 1;
    transform: scaleX(1);
}

.authbar {
    margin-left: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 112px;
    min-width: 112px;
}

.authbar__user {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

.authbar__login,
.authbar__logout {
    min-width: 64px;
    min-height: 30px;
    padding: 0 18px;
    border-radius: 4px;
    font-size: 14px;
    background: #ffffff;
}

.authbar__icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #326eea;
    padding: 0;
}

.authbar__icon-button svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.55;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.authbar__icon-button:hover {
    background: #f4f7ff;
    color: var(--blue);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid #dfc36f;
    border-radius: 18px;
    background: #fff8df;
    color: #7a5d16;
    font-weight: 700;
    font-size: 12px;
}

.page {
    width: min(1120px, calc(100% - 28px));
    margin: 18px auto 40px;
}

.site-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px 14px;
    width: min(1120px, calc(100% - 28px));
    margin: -12px auto 32px;
    color: #6f7890;
    font-size: 13px;
    line-height: 1.45;
}

.site-footer a {
    color: #326eea;
    text-decoration: none;
}

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

.scroll-top-button {
    position: fixed;
    right: max(18px, calc((100vw - 1120px) / 2 - 62px));
    bottom: 34px;
    z-index: 9;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(47, 111, 237, 0.2);
    border-radius: 14px;
    background: linear-gradient(135deg, #ffffff 0%, #f3f7ff 100%);
    color: #2f6fed;
    box-shadow: 0 14px 34px rgba(35, 68, 122, 0.18);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.18s ease, transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.scroll-top-button[hidden] {
    display: flex !important;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px);
}

.scroll-top-button:hover {
    border-color: rgba(47, 111, 237, 0.42);
    box-shadow: 0 18px 40px rgba(35, 68, 122, 0.24);
}

.scroll-top-button svg {
    width: 23px;
    height: 23px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.legal-view[hidden] {
    display: none;
}

.legal-card {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 42px 46px;
    border: 1px solid #e3e8f3;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 48px rgba(45, 55, 92, 0.08);
}

.legal-card__eyebrow {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    margin-bottom: 18px;
    padding: 0 13px;
    border-radius: 999px;
    background: #f0edff;
    color: #326eea;
    font-size: 13px;
    font-weight: 400;
}

.legal-card h1 {
    margin: 0 0 22px;
    color: #121826;
    font-size: 32px;
    line-height: 1.18;
    font-weight: 520;
}

.legal-card__content {
    color: #53627a;
    font-size: 15px;
    line-height: 1.72;
}

.legal-card__content p {
    margin: 0 0 14px;
}

.legal-card__content h2 {
    margin: 34px 0 14px;
    padding-top: 20px;
    border-top: 1px solid #eef2f8;
    color: #182230;
    font-size: 21px;
    line-height: 1.25;
    font-weight: 520;
}

.legal-card__content h2:first-child {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.legal-card__content ul {
    margin: -4px 0 16px 0;
    padding: 0;
    list-style: none;
}

.legal-card__content li {
    position: relative;
    margin: 0 0 8px;
    padding-left: 22px;
}

.legal-card__content li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 0.78em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #d8e4ff;
}

.legal-card__content .legal-date {
    display: inline-flex;
    margin: 0 0 24px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #f2f7ff;
    color: #326eea;
    font-size: 13px;
    line-height: 1.4;
}

.legal-card__content .legal-point {
    color: #475467;
}

.legal-card__content .legal-support {
    margin-top: 30px;
    padding-top: 22px;
    border-top: 1px solid #eef2f8;
}

.legal-card__content a {
    color: #326eea;
    text-decoration: none;
}

.legal-card__content a:hover {
    text-decoration: underline;
}

.search-panel {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(45, 55, 92, 0.08);
    overflow: hidden;
}

.search-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line-soft);
}

.search-panel__title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.search-panel__title h2 {
    margin: 0;
    color: #182230;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.15;
}

.search-panel__head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
    margin-left: auto;
}

.search-panel__head-actions .action-link--reset {
    margin-left: 0;
}

.filter-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef4ff;
    color: var(--blue);
}

.filter-title-icon svg,
.search-submit svg,
.action-link svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.filter-row__icon svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.25;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 36px;
    border: 0;
    background: transparent;
    color: #244ed8;
    font-weight: 400;
}

.search-toggle::after {
    content: "↓";
    font-size: 17px;
    line-height: 1;
}

.search-toggle--expanded::after {
    content: "↑";
}

.filters {
    display: block;
    padding: 0;
}

.filters--compact .filter-row:not([data-compact-filter]) {
    display: none;
}

.filter-row {
    display: grid;
    grid-template-columns: 42px minmax(150px, 220px) minmax(0, 1fr);
    gap: 12px 14px;
    align-items: center;
    min-height: 70px;
    padding: 12px 22px;
    border-bottom: 1px solid var(--line-soft);
}

.filter-row--no-icon {
    grid-template-columns: 42px minmax(150px, 220px) minmax(0, 1fr);
}

.filter-row--no-icon .filter-row__label {
    grid-column: 1 / 3;
}

.filter-row--no-icon .filter-row__control {
    grid-column: 3;
}

.filter-row__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #52627a;
}

.filter-row__label {
    color: #24324a;
    font-weight: 400;
}

.filter-row__control {
    width: 100%;
}

.filter-row__control--wide {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 176px;
    gap: 18px;
    align-items: center;
}

.filter-input,
.modal__search,
.sort-control select {
    width: 100%;
    min-height: 46px;
    border: 1px solid #cfd9eb;
    border-radius: 9px;
    background: #ffffff;
    color: var(--text);
    padding: 10px 14px;
    outline: none;
}

.filter-input:focus,
.modal__search:focus,
.sort-control select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.filter-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #374151;
    white-space: nowrap;
}

.filter-check input {
    appearance: none;
    display: inline-grid;
    place-content: center;
    width: 17px;
    height: 17px;
    margin: 0;
    border: 1px solid #b9c3d3;
    border-radius: 4px;
    background: #ffffff;
}

.filter-check input::before {
    content: "";
    width: 9px;
    height: 9px;
    clip-path: polygon(14% 44%, 0 59%, 39% 100%, 100% 22%, 84% 8%, 37% 68%);
    transform: scale(0);
    background: #ffffff;
}

.filter-check input:checked {
    border-color: var(--blue);
    background: var(--blue);
}

.filter-check input:checked::before {
    transform: scale(1);
}

.filter-check input:disabled,
.filter-check input:disabled + span {
    cursor: not-allowed;
    opacity: 0.52;
}

.stage-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    margin-left: 5px;
    border-radius: 50%;
    background: #edf4ff;
    color: #2f6fed;
    font-size: 10px;
    font-weight: 500;
    line-height: 1;
    cursor: help;
    vertical-align: middle;
}

.filter-toggle {
    gap: 10px;
}

.filter-toggle input {
    box-sizing: border-box;
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    border-radius: 999px;
    background: #edf1f7;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.filter-toggle input::before {
    position: absolute;
    top: 50%;
    left: 2px;
    width: 16px;
    height: 16px;
    clip-path: none;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transform: translateY(-50%);
    transition: transform 0.18s ease;
}

.filter-toggle input:checked {
    border-color: #2f78ff;
    background: linear-gradient(180deg, #2f95ec 0%, #2476d4 100%);
}

.filter-toggle input:checked::before {
    transform: translate(18px, -50%);
}

.checks {
    display: flex;
    gap: 38px;
    flex-wrap: wrap;
}

.filter-row__links {
    display: flex;
    align-items: center;
    gap: 26px;
}

.filter-row__links--choices {
    align-items: flex-start;
}

.filter-choice {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-chips {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 320px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid #c9dbff;
    border-radius: 999px;
    background: #edf4ff;
    color: #1f56d6;
    font-size: 13px;
    line-height: 1.2;
}

.filter-chip span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.filter-chip button,
.filter-edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    color: currentColor;
    padding: 0;
}

.filter-chip button {
    width: 16px;
    height: 16px;
    font-size: 16px;
    line-height: 1;
}

.filter-edit {
    width: 28px;
    height: 28px;
    color: #244ed8;
}

.filter-edit svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.filter-link,
.picker {
    min-height: 32px;
    border: 0;
    background: transparent;
    color: #244ed8;
    text-align: left;
    padding: 0;
    font-weight: 400;
}

.filter-link:hover,
.picker:hover {
    color: #183fba;
    text-decoration: underline;
}

.filter-price {
    display: grid;
    grid-template-columns: minmax(90px, 138px) minmax(90px, 138px) auto auto auto;
    gap: 10px 14px;
    align-items: center;
}

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

.search-actions {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 18px 22px;
    background: #fbfcff;
}

.search-actions .search-submit {
    margin-left: auto;
}

.search-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 116px;
    min-height: 46px;
    border-radius: 11px;
    background: linear-gradient(135deg, #2f78ff 0%, #245bd0 100%);
    box-shadow: 0 12px 28px rgba(47, 111, 237, 0.24);
    font-weight: 400;
    text-align: center;
}

.primary-button.search-submit {
    background: linear-gradient(135deg, #2f78ff 0%, #245bd0 100%);
    font-weight: 400;
}

.primary-button.search-submit:hover {
    background: linear-gradient(135deg, #266fed 0%, #1f4fb8 100%);
}

.search-submit svg {
    width: 18px;
    height: 18px;
}

.filters:not(.filters--compact) .filter-row:not([data-compact-filter]) {
    animation: filter-row-in 0.18s ease both;
}

@keyframes filter-row-in {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.action-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-weight: 400;
}

.action-link svg {
    color: #64748b;
}

.action-link--reset {
    margin-left: auto;
}

.account-view {
    display: grid;
    gap: 18px;
}

.account-view[hidden] {
    display: none;
}

.account-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.account-head h1 {
    margin: 0 0 6px;
    font-size: 28px;
    line-height: 1.2;
}

.account-head p,
.account-block p {
    margin: 0;
    color: var(--muted);
}

.payment-entry {
    display: grid;
    justify-items: end;
    gap: 8px;
    min-width: 260px;
}

.payment-entry[hidden] {
    display: none;
}

.payment-widget {
    width: min(360px, 100%);
}

.payment-widget__message {
    max-width: 360px;
    color: var(--muted);
    font-size: 12px;
    text-align: right;
}

.payment-widget__message[hidden] {
    display: none;
}

.payment-modal__panel {
    width: min(460px, calc(100% - 24px));
    padding: 18px;
}

.payment-frame {
    position: relative;
    width: 100%;
    min-height: min(560px, calc(100vh - 180px));
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
}

.payment-frame iframe {
    width: 100% !important;
    min-height: min(560px, calc(100vh - 180px)) !important;
    border: 0;
}

.payment-frame__message {
    margin-top: 12px;
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
}

.payment-frame__message[hidden] {
    display: none;
}

.choice-modal__panel,
.email-modal__panel {
    width: min(430px, calc(100% - 28px));
}

.invoice-modal__panel {
    display: flex;
    flex-direction: column;
    width: min(760px, calc(100% - 32px));
    max-height: calc(100vh - 40px);
    overflow: hidden;
}

.invoice-form {
    display: grid;
    grid-template-rows: auto;
    gap: 9px;
    min-height: 0;
    padding: 0 22px 0;
    overflow: visible;
}

.invoice-form__intro {
    margin: -3px 0 2px;
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.invoice-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
}

.invoice-field {
    display: grid;
    gap: 5px;
    min-width: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.25;
}

.invoice-field input,
.invoice-field textarea {
    width: 100%;
    min-width: 0;
    border: 1px solid #d9e2f2;
    border-radius: 10px;
    background: #ffffff;
    color: #182230;
    font: inherit;
    font-size: 14px;
    outline: 0;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.invoice-field input {
    height: 40px;
    padding: 0 13px;
}

.invoice-field textarea {
    min-height: 76px;
    padding: 11px 13px;
    resize: vertical;
}

.invoice-field input:focus,
.invoice-field textarea:focus {
    border-color: #6d35ff;
    box-shadow: 0 0 0 3px rgba(109, 53, 255, 0.12);
}

.invoice-field input::placeholder,
.invoice-field textarea::placeholder {
    color: #98a2b3;
}

.invoice-form__actions {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin: 4px -22px 0;
    padding: 12px 22px 16px;
    border-top: 1px solid #edf1f8;
    background: #ffffff;
}

.invoice-form__actions .secondary-button,
.invoice-form__actions .primary-button {
    min-height: 40px;
    padding: 0 20px;
    font-weight: 400;
}

.invoice-result {
    display: grid;
    gap: 8px;
    margin-top: 1px;
    padding: 12px 14px;
    border: 1px solid #d8e7ff;
    border-radius: 12px;
    background: #f3f8ff;
    color: #24324a;
    font-size: 13px;
    line-height: 1.4;
}

.invoice-result[hidden] {
    display: none;
}

.invoice-result strong {
    color: #1769e0;
    font-size: 15px;
}

.invoice-result .primary-button {
    min-height: 40px;
    padding: 0 18px;
    text-decoration: none;
}

.invoice-result__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding-top: 2px;
}

.invoice-result__actions .secondary-button,
.invoice-result__actions .primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 124px;
    min-height: 40px;
    padding: 0 12px;
    font-weight: 400;
    text-align: center;
}

.invoice-result__actions .secondary-button {
    width: 96px;
}

#invoicePaymentMessage:empty {
    display: none;
}

.modal__panel.schedule-modal__panel {
    width: min(960px, calc(100vw - 36px));
    height: min(720px, calc(100vh - 36px));
    max-height: min(720px, calc(100vh - 36px));
    border-radius: 18px;
    background: #ffffff;
}

.schedule-modal__head {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 22px;
    min-height: 138px;
    padding: 28px 40px 26px;
    border-bottom: 1px solid #e7eaf3;
}

.schedule-modal__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    color: #5f2cff;
    background: linear-gradient(135deg, #f4efff 0%, #f9f7ff 100%);
}

.schedule-modal__icon svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.schedule-modal__head h2 {
    margin: 0 0 8px;
    color: #182230;
    font-size: 24px;
    font-weight: 400;
    line-height: 1.15;
}

.schedule-modal__head p {
    max-width: 460px;
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.45;
}

.schedule-modal__close {
    width: 42px;
    height: 42px;
    border: 0;
    background: transparent;
    color: #8583a8;
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
}

.schedule-form {
    display: grid;
    grid-template-rows: 1fr auto auto;
    min-height: 0;
    flex: 1;
}

.schedule-form__main {
    display: grid;
    grid-template-columns: minmax(400px, 1fr) 1px 360px;
    gap: 28px;
    min-height: 0;
    padding: 32px 40px 24px;
}

.schedule-form__main::before {
    content: "";
    grid-column: 2;
    grid-row: 1;
    width: 1px;
    min-height: 100%;
    background: #e7eaf3;
}

.schedule-form__side {
    display: grid;
    align-content: start;
    gap: 24px;
}

.schedule-form__times {
    grid-column: 3;
    align-self: start;
    padding: 22px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbfaff 0%, #f7f4ff 100%);
}

.schedule-form__times-title,
.schedule-field > span {
    display: block;
    margin-bottom: 10px;
    color: #24324a;
    font-size: 14px;
    line-height: 1.2;
}

.schedule-field select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    height: 46px;
    padding: 10px 48px 10px 14px;
    border: 1px solid #d8dced;
    border-radius: 9px;
    background-color: #ffffff;
    background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%232f6fed' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 14px 14px;
    color: var(--text);
    font-size: 14px;
    outline: none;
}

.schedule-field select::-ms-expand {
    display: none;
}

.schedule-field select:focus {
    border-color: #6d35ff;
    box-shadow: 0 0 0 3px rgba(109, 53, 255, 0.12);
}

.schedule-time-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.schedule-field--time > span {
    display: none;
}

.schedule-error {
    min-height: 20px;
    margin: 0;
    padding: 0 40px 8px;
    color: #dc2626;
    font-size: 13px;
}

.schedule-error[hidden] {
    display: block !important;
    visibility: hidden;
}

.schedule-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 20px;
    padding: 22px 40px 26px;
    border-top: 1px solid #e7eaf3;
}

.schedule-modal__actions .secondary-button,
.schedule-save-button {
    min-width: 150px;
    min-height: 46px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 480;
}

.primary-button.schedule-save-button {
    background: linear-gradient(135deg, #6d35ff 0%, #4c22e8 100%);
    box-shadow: 0 12px 26px rgba(94, 44, 255, 0.22);
}

.choice-text {
    margin: 0;
    padding: 0 24px 18px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.55;
}

.choice-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 24px 24px;
}

.danger-button {
    background: #ef4444;
}

.danger-button:hover {
    background: #dc2626;
}

.email-edit-form {
    display: grid;
    gap: 14px;
    padding: 0 24px 24px;
}

.email-edit-note {
    margin: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.45;
}

.account-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 0;
    overflow: hidden;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    box-shadow: var(--shadow);
}

.account-main {
    min-height: 300px;
    padding: 28px;
}

.account-side {
    display: grid;
    align-content: start;
    gap: 18px;
    padding: 28px;
    background: #eef3ff;
    border-left: 1px solid #e2e8f0;
}

.account-block {
    display: grid;
    gap: 22px;
}

.account-block__head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.account-block h2,
.account-side h2 {
    margin: 0 0 8px;
    font-size: 18px;
}

.saved-search-list {
    display: grid;
    gap: 10px;
}

.saved-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 0;
    border-top: 1px solid var(--line-soft);
}

.saved-search-row:first-child {
    border-top: 0;
}

.saved-search-row h3 {
    margin: 0 0 7px;
    font-size: 16px;
}

.saved-search-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    color: var(--muted);
    font-size: 13px;
}

.saved-search-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #374151;
    white-space: nowrap;
}

.switch input {
    appearance: none;
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    width: 38px;
    height: 20px;
    margin: 0;
    border: 1px solid #b9c3d3;
    border-radius: 999px;
    background: #edf1f7;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.switch input::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transform: translateY(-50%);
    transition: transform 0.18s ease;
}

.switch input:checked {
    border-color: #2f78ff;
    background: linear-gradient(180deg, #2f95ec 0%, #2476d4 100%);
}

.switch input:checked::before {
    transform: translate(18px, -50%);
}

.field-simple {
    display: grid;
    gap: 6px;
    color: #374151;
}

.field-simple input {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cfd5dd;
    border-radius: 4px;
    padding: 8px 10px;
    background: #ffffff;
    color: var(--text);
}

.field-simple input[readonly] {
    background: #f8fafc;
}

.schedule-row {
    display: grid;
    gap: 9px;
    color: #374151;
}

.email-row {
    padding-top: 12px;
    border-top: 1px solid #d9e2f2;
    color: #374151;
}

.templates-panel {
    display: grid;
    gap: 18px;
    padding: 26px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid #edf0f6;
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(45, 55, 92, 0.08);
}

.templates-panel__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.templates-multi {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #334155;
    font-size: 13px;
    font-weight: 400;
}

.templates-multi input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.templates-multi span {
    position: relative;
    box-sizing: border-box;
    width: 38px;
    height: 20px;
    flex: 0 0 38px;
    border-radius: 999px;
    background: #edf1f7;
    border: 1px solid #d1d8e5;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.templates-multi span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transform: translateY(-50%);
    transition: transform 0.18s ease;
}

.templates-multi input:checked + span {
    border-color: #2f78ff;
    background: linear-gradient(180deg, #2f95ec 0%, #2476d4 100%);
}

.templates-multi input:checked + span::after {
    transform: translate(18px, -50%);
}

.templates-multi strong {
    font-weight: 400;
}

.templates-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.templates-create,
.templates-notify {
    min-height: 36px;
    border-radius: 8px;
}

.templates-notify svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.templates-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.template-chip {
    display: inline-grid;
    grid-template-columns: minmax(0, auto) 28px;
    align-items: stretch;
    width: fit-content;
    max-width: 360px;
    min-height: 34px;
    border-radius: 9px;
    background: #f2f4f8;
    border: 1px solid #edf0f5;
    overflow: hidden;
}

.template-chip--active {
    background: #2f6fed;
    border-color: #2f6fed;
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.18);
}

.template-chip__main,
.template-chip__edit {
    border: 0;
    background: transparent;
    color: #394252;
}

.template-chip__main {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    padding: 7px 10px 7px 14px;
    text-align: left;
}

.template-chip__name {
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 13px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-chip__stage,
.template-chip__meta {
    min-width: 0;
    overflow: hidden;
    color: #667085;
    font-size: 10px;
    font-weight: 400;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-chip--active .template-chip__main,
.template-chip--active .template-chip__edit,
.template-chip--active .template-chip__stage,
.template-chip--active .template-chip__meta {
    color: #ffffff;
}

.template-chip__edit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    border-left: 1px solid rgba(100, 116, 139, 0.15);
}

.template-chip--active .template-chip__edit {
    border-left-color: rgba(255, 255, 255, 0.25);
}

.template-chip__edit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.templates-filterbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 22px;
    padding: 2px 0 0;
}

.templates-filter-toggle {
    color: #334155;
    font-size: 14px;
}

.templates-stage-select {
    position: relative;
}

.templates-stage-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    border: 1px solid #dbe4f2;
    border-radius: 8px;
    background: #ffffff;
    color: #24324a;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 400;
}

.templates-stage-button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.templates-stage-dropdown {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    left: 0;
    display: grid;
    gap: 10px;
    width: 240px;
    padding: 14px;
    border: 1px solid #dbe4f2;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.templates-status {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    padding-top: 4px;
    color: #667085;
    font-size: 12px;
}

.subscription-status--active {
    color: #55a36a;
}

.subscription-status--inactive {
    color: #dc3f3f;
}

.subscription-status--notice {
    color: #667085;
}

.subscription-status--inactive a {
    color: #244ed8;
    text-decoration: none;
}

.subscription-status--inactive a:hover {
    color: #183fba;
    text-decoration: underline;
}

.templates-results-toolbar {
    margin-top: 0;
}

.templates-results[hidden] {
    display: none;
}

.templates-empty {
    width: 100%;
}

.notifications-view {
    display: grid;
    gap: 18px;
    padding-bottom: 38px;
}

.notifications-view[hidden] {
    display: none;
}

.notifications-head {
    padding: 44px 0 24px;
}

.notifications-head h1 {
    margin: 0 0 12px;
    color: #050c1b;
    font-size: 34px;
    font-weight: 760;
    line-height: 1.1;
}

.notifications-head p {
    margin: 0;
    color: #5f6b7d;
    font-size: 14px;
    line-height: 1.45;
}

.notifications-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 20px;
    align-items: stretch;
}

.notification-card {
    display: flex;
    align-items: center;
    gap: 20px;
    min-height: 96px;
    padding: 20px;
    border: 1px solid rgba(237, 240, 246, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 20px 50px rgba(45, 55, 92, 0.08);
}

.notification-card--status {
    grid-column: 1;
    grid-row: 1 / span 2;
    min-height: 206px;
}

.notification-card--schedule,
.notification-card--recipient {
    grid-column: 2;
}

.notification-card--hero {
    position: relative;
    align-items: flex-start;
    overflow: hidden;
    padding: 28px 198px 26px 34px;
    border-color: rgba(188, 170, 255, 0.58);
}

.notification-card--paid {
    background:
        radial-gradient(circle at 86% 42%, rgba(184, 155, 255, 0.2) 0, rgba(184, 155, 255, 0) 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 245, 255, 0.96) 52%, rgba(255, 255, 255, 0.98) 100%);
}

.notification-card--unpaid {
    border-color: rgba(255, 178, 186, 0.68);
    background:
        radial-gradient(circle at 84% 48%, rgba(255, 144, 158, 0.18) 0, rgba(255, 144, 158, 0) 43%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 246, 248, 0.98) 56%, rgba(255, 255, 255, 0.98) 100%);
}

.notification-card__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 12px;
}

.notification-card--hero .notification-card__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    z-index: 1;
}

.notification-card__icon svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-card__icon--purple {
    color: #5c2eea;
    background: #f4efff;
}

.notification-card__icon--green {
    color: #159447;
    background: #e7f8ec;
}

.notification-card__icon--red {
    color: #ef3340;
    background: #fdecec;
}

.notification-card__body {
    min-width: 0;
    flex: 1;
}

.notification-card__body--hero {
    position: relative;
    z-index: 1;
    max-width: 335px;
}

.notification-card__body h2 {
    margin: 0 0 8px;
    color: #101828;
    font-size: 16px;
    font-weight: 760;
    line-height: 1.22;
}

.notification-card__body p {
    margin: 3px 0;
    color: #5f6b7d;
    font-size: 13px;
    line-height: 1.45;
}

.notification-card__body strong {
    color: #101828;
    font-weight: 600;
}

.notification-card__title--green {
    color: #159447 !important;
}

.notification-card__danger {
    color: #dc2626 !important;
    font-weight: 560;
    margin-bottom: 12px !important;
}

.notification-pending {
    color: #7c3aed !important;
}

.secondary-button.notification-pay-button {
    margin-top: 22px;
    margin-left: 0;
    min-height: 44px;
    padding: 0 26px;
    color: #ffffff;
    border-color: transparent;
    background: linear-gradient(135deg, #2f78ff 0%, #245bd0 100%);
    border-radius: 11px;
    font-weight: 400;
    box-shadow: 0 12px 28px rgba(47, 111, 237, 0.24);
    white-space: nowrap;
}

.secondary-button.notification-pay-button:hover {
    color: #ffffff;
    background: linear-gradient(135deg, #266fed 0%, #1f4fb8 100%);
}

.notification-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    margin-top: 14px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 540;
}

.notification-status-badge svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-status-badge--active {
    color: #159447;
    background: #e9f8ef;
}

.notification-bell-art {
    position: absolute;
    right: -8px;
    top: 8px;
    width: 200px;
    height: 200px;
    object-fit: contain;
    pointer-events: none;
    user-select: none;
    opacity: 0.82;
    mix-blend-mode: multiply;
}

.notification-card--schedule .notification-card__body,
.notification-card--recipient .notification-card__body {
    align-self: center;
}

.notification-card--schedule .notification-card__body h2,
.notification-card--schedule .notification-card__body p {
    white-space: nowrap;
}

.notification-card-edit {
    align-self: center;
    color: #6d35ff;
}

.notification-schedule-button {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    white-space: nowrap;
}

.notification-schedule-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-edit-button {
    align-self: flex-start;
    margin-left: auto;
    border: 0;
    background: transparent;
    color: #111827;
    padding: 8px;
}

.notification-edit-button svg,
.notification-template-actions svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notifications-templates-panel {
    display: grid;
    gap: 16px;
    padding: 24px 24px 18px;
    border: 1px solid rgba(237, 240, 246, 0.92);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 20px 50px rgba(45, 55, 92, 0.08);
}

.notifications-templates-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    align-items: center;
    gap: 16px 28px;
}

.notifications-templates-title {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.notifications-templates-head h2 {
    margin: 0;
    color: #101828;
    font-size: 22px;
    font-weight: 760;
}

.notifications-templates-head h2 span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-left: 8px;
    border-radius: 12px;
    background: #f3efff;
    color: #6d3ee6;
    font-size: 13px;
    font-weight: 640;
}

.notifications-template-controls {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 34px;
}

.notification-templates-note {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    justify-self: end;
    max-width: 420px;
    color: #24324a;
    font-size: 12px;
    line-height: 1.35;
}

.notification-templates-note__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border-radius: 50%;
    border: 1px solid #dbe7ff;
    background: #eef6ff;
    color: #2f6fed;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
}

.notification-templates-note p {
    margin: 0;
}

.notification-template-table {
    display: grid;
    border: 1px solid #edf0f6;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
}

.notification-template-table__head,
.notification-template-row {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(160px, 1.2fr) minmax(220px, 1.55fr) minmax(130px, 0.9fr) 104px;
    align-items: center;
    gap: 16px;
    padding: 14px 22px;
}

.notification-template-table__head {
    background: #fbfcff;
    color: #8a94a6;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.notification-template-table__head > span {
    text-align: center;
}

.notification-template-table__head > span:nth-child(-n + 3) {
    text-align: left;
}

.notification-template-row {
    min-height: 82px;
    border-top: 1px solid #edf0f6;
    color: #263446;
    font-size: 13px;
}

.notification-template-row > div:nth-child(4),
.notification-template-row > div:nth-child(5) {
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-template-clamp {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    word-break: break-word;
}

.notification-template-name {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.notification-template-name strong {
    display: block;
    color: #101828;
    font-size: 14px;
    font-weight: 730;
    line-height: 1.25;
}

.notification-template-name span:not(.notification-template-icon) {
    display: block;
    color: #8a94a6;
    font-size: 11px;
    margin-top: 4px;
}

.notification-template-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #f4efff;
    color: #6d3ee6;
}

.notification-template-icon svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.notification-row-toggle {
    gap: 8px;
}

.notification-template-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.notification-template-actions button {
    border: 0;
    background: transparent;
    color: #111827;
    padding: 4px;
    line-height: 0;
}

.notification-template-actions button:last-child {
    color: #e11d48;
}

.notifications-more {
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.link-action {
    border: 0;
    background: transparent;
    color: #5c2eea;
    font-size: 14px;
    font-weight: 500;
}

.template-modal__panel {
    width: min(980px, calc(100% - 28px));
    max-height: min(820px, calc(100vh - 28px));
}

.template-modal__head {
    padding: 22px 28px 12px;
}

.template-form {
    min-height: 0;
    overflow: auto;
}

.template-form__intro {
    display: grid;
    gap: 12px;
    padding: 0 28px 22px;
}

.template-name-row {
    display: grid;
    grid-template-columns: 170px minmax(0, 360px);
    align-items: center;
    gap: 16px;
    color: #334155;
    font-size: 12px;
}

.template-name-row input {
    min-height: 34px;
}

.template-notify-row {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    margin-left: 186px;
    color: #334155;
    font-size: 12px;
}

.template-notify-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.template-notify-row > span {
    position: relative;
    box-sizing: border-box;
    width: 38px;
    height: 20px;
    flex: 0 0 38px;
    border: 1px solid #d1d8e5;
    border-radius: 999px;
    background: #edf1f7;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.template-notify-row > span::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transform: translateY(-50%);
    transition: transform 0.18s ease;
}

.template-notify-row input:checked + span {
    border-color: #2f78ff;
    background: linear-gradient(180deg, #2f95ec 0%, #2476d4 100%);
}

.template-notify-row input:checked + span::after {
    transform: translate(18px, -50%);
}

.template-notify-row strong {
    font-weight: 400;
}

.template-form__filters {
    border-top: 1px solid var(--line-soft);
}

.template-filter-row {
    display: grid;
    grid-template-columns: 42px minmax(130px, 180px) minmax(0, 1fr);
    gap: 16px;
    align-items: center;
    min-height: 58px;
    padding: 12px 28px;
    border-bottom: 1px solid var(--line-soft);
}

.template-filter-row--no-icon .filter-row__label {
    grid-column: 2;
}

.template-filter-row--no-icon .filter-row__control {
    grid-column: 3;
}

.template-filter-row .filter-row__icon svg {
    width: 26px;
    height: 26px;
    stroke-width: 1.25;
}

.template-filter-row .filter-row__control--wide {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 14px;
    align-items: center;
}

.template-choice {
    width: 100%;
}

.template-price {
    grid-template-columns: minmax(84px, 124px) minmax(84px, 124px) auto auto auto;
}

.template-form__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px 24px;
}

.template-delete-button {
    margin-left: auto;
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 8px;
    background: #f05252;
    color: #ffffff;
}

.admin-view {
    display: grid;
    gap: 16px;
}

.admin-head,
.admin-panel {
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
}

.admin-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 24px;
}

.admin-head h1 {
    margin: 0 0 6px;
    font-size: 24px;
}

.admin-head p {
    margin: 0;
    color: var(--muted);
}

.admin-tabs {
    display: inline-flex;
    width: fit-content;
    gap: 6px;
    padding: 5px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow);
}

.admin-tab {
    min-height: 36px;
    padding: 0 18px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #53627a;
    font: inherit;
    font-size: 14px;
    cursor: pointer;
}

.admin-tab--active {
    background: linear-gradient(135deg, #2f6fed, #6d35ff);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(47, 111, 237, 0.2);
}

.admin-panel {
    overflow: hidden;
}

.admin-panel__title {
    padding: 18px 20px 6px;
}

.admin-panel__title h2 {
    margin: 0 0 4px;
    color: #182230;
    font-size: 20px;
}

.admin-panel__title p {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

.admin-table__head,
.admin-user {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) minmax(180px, 0.9fr) 150px minmax(260px, auto);
    gap: 18px;
    align-items: center;
}

.admin-table__head {
    padding: 14px 20px;
    border-bottom: 1px solid var(--line-soft);
    color: var(--muted);
    font-size: 13px;
}

.admin-table__head span:last-child,
.admin-user > :last-child {
    justify-self: center;
    text-align: center;
}

.admin-user {
    min-height: 78px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line-soft);
}

.admin-user:last-child {
    border-bottom: 0;
}

.admin-user__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475467;
    font-size: 13px;
}

.admin-badge--active {
    background: #e7f7ef;
    color: #047857;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.admin-actions .secondary-button {
    min-height: 32px;
    padding: 0 12px;
}

.admin-icon-button {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #f04438;
    cursor: pointer;
}

.admin-icon-button:hover {
    background: #fef3f2;
}

.admin-icon-button svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.admin-delete {
    color: #b42318;
}

.admin-invoice-table .admin-table__head,
.admin-invoice {
    display: grid;
    grid-template-columns: minmax(130px, 0.9fr) minmax(170px, 1.1fr) minmax(210px, 1.4fr) minmax(120px, 0.75fr) 130px 150px;
    gap: 14px;
    align-items: center;
    padding: 14px 20px;
}

.admin-invoice {
    border-bottom: 1px solid var(--line-soft);
    color: #344054;
    font-size: 13px;
}

.admin-invoice:last-child {
    border-bottom: 0;
}

.admin-invoice strong {
    display: block;
    color: #182230;
    font-size: 14px;
}

.admin-invoice-table .admin-table__head span:nth-child(5),
.admin-invoice-table .admin-table__head span:nth-child(6),
.admin-invoice > :nth-child(5),
.admin-invoice > :nth-child(6) {
    justify-self: center;
    text-align: center;
}

.admin-invoice .admin-actions {
    flex-wrap: nowrap;
    gap: 14px;
}

.admin-invoice__meta {
    margin-top: 4px;
    color: #667085;
    font-size: 12px;
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-top: 1px solid var(--line-soft);
    background: #ffffff;
}

.admin-page-size {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #667085;
    font-size: 13px;
}

.admin-page-size select {
    min-height: 34px;
    min-width: 82px;
    border: 1px solid #d7dff0;
    border-radius: 8px;
    padding: 0 28px 0 10px;
    background: #ffffff;
    color: #182230;
    font: inherit;
    outline: none;
}

.admin-status-select {
    width: 100%;
    min-height: 34px;
    border: 1px solid #d7dff0;
    border-radius: 8px;
    padding: 0 28px 0 10px;
    background: #ffffff;
    color: #182230;
    font-family: inherit;
    font-size: 13px;
    outline: none;
}

.admin-status-select:focus {
    border-color: #2f6fed;
    box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.12);
}

.primary-button,
.secondary-button {
    min-height: 38px;
    border-radius: 6px;
    padding: 0 22px;
    border: 1px solid transparent;
}

.primary-button {
    background: var(--blue);
    color: #ffffff;
    font-weight: 700;
}

.primary-button:hover {
    background: var(--blue-dark);
}

.secondary-button {
    background: #ffffff;
    color: #334155;
    border-color: var(--line);
}

.link-button {
    border: 0;
    background: transparent;
    color: #1f2937;
    padding: 0;
}

.results-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 18px 0 12px;
    color: #4b5563;
}

.sort-control select {
    min-width: 210px;
    min-height: 34px;
    border-radius: 7px;
    padding-right: 30px;
}

.sort-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.sort-order-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #53647e;
    padding: 0;
}

.sort-order-button svg {
    width: 26px;
    height: 26px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.sort-order-button--asc svg {
    transform: rotate(180deg);
}

.results-list {
    display: grid;
    gap: 14px;
}

.tender-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px 250px;
    gap: 0;
    min-height: 148px;
    padding: 0;
    border: 1px solid #eef1f5;
    border-radius: 12px;
    background: var(--surface);
    box-shadow: 0 10px 28px rgba(18, 25, 38, 0.07);
    overflow: hidden;
}

.tender-card:hover {
    border-color: #c8d7f5;
}

.tender-card__main,
.tender-card__procedure,
.tender-card__finance {
    padding: 18px 22px;
}

.tender-card__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.tender-card__procedure,
.tender-card__finance {
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    text-align: right;
    border-left: 1px solid #e5eaf1;
}

.tender-card__title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
    margin: 0 0 9px;
    border: 0;
    background: transparent;
    color: #1f2937;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.28;
    text-align: left;
    text-decoration: none;
    padding: 0;
}

.tender-card__title:hover {
    color: var(--blue);
}

.tender-card__title--viewed {
    color: #8a94a6;
}

.tender-card__customer {
    margin: 16px 0 0;
    color: #273244;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.45;
}

.tender-card__summary {
    color: #667085;
    font-size: 13px;
    line-height: 1.45;
}

.tender-card__quick {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 26px;
    margin-top: auto;
    padding-top: 16px;
}

.tender-card__quick-item {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 28px;
    border: 0;
    background: transparent;
    color: #111827;
    font-size: 14px;
    padding: 0;
    text-decoration: none;
    line-height: 1.2;
}

.tender-card__quick-item svg,
.tender-card__date svg,
.tender-card__deadline-block svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    color: #25324a;
}

.tender-card__items-toggle:hover span {
    color: var(--blue);
}

.tender-card__law {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 10px;
    border-radius: 6px;
    color: #075eff;
    background: #edf4ff;
    font-size: 12px;
}

.tender-law--44 {
    color: #167446;
    background: #dff7ea;
}

.tender-law--615 {
    color: #7053c8;
    background: #efeaff;
}

.tender-law--small {
    color: #1f75d6;
    background: #e8f2ff;
}

.tender-law--commercial {
    color: #2457ff;
    background: #edf4ff;
}

.detail-deadline--planned {
    --status-color: #16A34A;
    --status-bg: #DDF8E7;
}

.tender-card__method {
    margin-top: 12px;
    color: #1f2937;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.tender-card__deadline-block {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin-top: 16px;
    color: #667085;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.45;
    text-align: center;
}

.tender-card__date {
    width: 100%;
    margin-top: 14px;
    color: #1f2937;
    font-size: 10px;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

.tender-card__date span,
.tender-card__deadline-block span {
    color: #667085;
    font-weight: 400;
}

.tender-card__platform,
.tender-card__platform-text {
    display: inline-block;
    margin-top: 16px;
    color: #075eff;
    font-size: 11px;
    line-height: 1.25;
    text-decoration: none;
    text-align: right;
}

.tender-card__platform:hover {
    text-decoration: underline;
}

.tender-card__price-label {
    margin-bottom: 10px;
    color: #64748b;
    font-size: 14px;
}

.tender-card__price {
    color: #111827;
    font-size: 25px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.1;
    white-space: nowrap;
}

.tender-card__price--long {
    font-size: 20px;
}

.tender-card__price--very-long {
    font-size: 18px;
}

.tender-card__deadline-block {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px dashed #d9dee8;
}

.tender-card__items {
    grid-column: 1 / -1;
    padding: 0 24px 24px;
    background: #ffffff;
}

.tender-card__items-loading {
    padding: 16px 0 2px;
    color: #64748b;
}

.tender-items-table {
    width: 100%;
    margin-top: 4px;
    border-collapse: collapse;
    font-size: 14px;
}

.tender-items-table th,
.tender-items-table td {
    padding: 12px 14px;
    border-top: 1px solid #edf0f5;
    text-align: left;
    vertical-align: top;
}

.tender-items-table th {
    color: #64748b;
    font-weight: 400;
    background: #f8fafc;
}

.tender-items-table__code {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
}

.empty-state,
.loading-state {
    padding: 38px;
    text-align: center;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 8px;
}

.empty-state p {
    margin: 0;
}

.empty-state p + p {
    margin-top: 12px;
}

.load-more {
    display: flex;
    justify-content: center;
    padding: 18px 0;
}

.detail-view {
    position: relative;
    width: 100%;
}

#detailContent {
    width: 100%;
}

.back-button {
    position: absolute;
    top: 0;
    left: -58px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid #0876bd;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(180deg, #54c4f0 0%, #0879c2 100%);
    box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.22), 0 10px 24px rgba(28, 111, 185, 0.24);
    font-size: 0;
}

.back-button::before {
    content: "";
    width: 15px;
    height: 15px;
    border-left: 4px solid currentColor;
    border-bottom: 4px solid currentColor;
    border-radius: 2px;
    transform: translateX(3px) rotate(45deg);
}

.detail-stack {
    display: grid;
    gap: 22px;
}

.detail-hero,
.detail-section {
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    box-shadow: 0 18px 48px rgba(45, 55, 92, 0.08);
}

.detail-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 22px;
    padding: 28px 24px 24px;
}

.detail-hero__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 14px;
    min-height: 100%;
}

.detail-title-row {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.detail-title-icon,
.detail-section__icon,
.detail-deadline__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--blue);
}

.detail-title-icon {
    width: 58px;
    height: 58px;
    border-radius: 8px;
    background: #eaf4ff;
}

.detail-title-icon svg {
    width: 32px;
    height: 32px;
}

.detail-hero h1 {
    margin: 0;
    color: #101828;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
}

.detail-meta {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    color: #334155;
    font-size: 15px;
    line-height: 1.5;
}

.detail-meta a,
.detail-fields a,
.detail-document {
    color: #1267e8;
    text-decoration: none;
}

.detail-meta a:hover,
.detail-fields a:hover,
.detail-document:hover {
    text-decoration: underline;
}

.detail-ikz {
    display: inline-block;
    margin-left: 14px;
    color: #667085;
    font-size: 14px;
}

.detail-price-list {
    display: grid;
    gap: 18px;
    margin-top: 42px;
    padding-top: 26px;
    border-top: 1px solid var(--line-soft);
}

.detail-price-row {
    display: grid;
    grid-template-columns: 28px auto minmax(60px, 1fr) auto;
    align-items: center;
    gap: 16px;
    color: #667085;
    font-size: 15px;
}

.detail-price-row__icon {
    color: #667b98;
}

.detail-title-icon svg,
.detail-price-row__icon svg,
.detail-section__icon svg,
.detail-deadline__icon svg,
.detail-deadline__date-icon svg,
.detail-deadline__badge svg,
.detail-document__icon svg,
.detail-subblock h3 svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.detail-title-icon svg {
    width: 32px;
    height: 32px;
}

.detail-price-row__line {
    height: 1px;
    border-bottom: 1px dashed #cbd5e1;
}

.detail-price-row__value {
    color: #101828;
    font-size: 20px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

.detail-law-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    margin-top: auto;
    padding: 0 13px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    box-shadow: 0 10px 22px rgba(45, 55, 92, 0.08);
}

.date-tz {
    color: #98a2b3;
    font-weight: 400;
}

.date-tz {
    font-size: 0.92em;
}

.detail-deadline {
    --status-color: #16A34A;
    --status-bg: #DDF8E7;
    --stage-accent: var(--status-color);
    --stage-icon-bg: var(--status-bg);
    --stage-badge-bg: var(--status-bg);
    --stage-badge-color: var(--status-color);
    display: flex;
    flex-direction: column;
    align-self: start;
    width: 100%;
    min-height: 0;
    gap: 18px;
    padding: 18px 18px 20px;
    border: 1px solid #dce6f3;
    border-radius: 14px;
    background: #ffffff;
}

.detail-deadline__top {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
}

.detail-deadline__summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
}

.detail-deadline__icon {
    width: 62px;
    height: 62px;
    border-radius: 50%;
    color: var(--stage-accent);
    background: var(--stage-icon-bg);
}

.detail-deadline__icon svg {
    width: 32px;
    height: 32px;
}

.detail-deadline--commission .detail-deadline__icon svg,
.detail-deadline--finished .detail-deadline__icon svg,
.detail-deadline--canceled .detail-deadline__icon svg {
    width: 38px;
    height: 38px;
}

.detail-deadline__title {
    margin: 0 0 10px;
    color: #101828;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
}

.detail-deadline__date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px dashed #cbd5e1;
    color: #1f2a44;
    font-size: 17px;
    line-height: 1.35;
    text-align: center;
}

.detail-deadline__date-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    color: var(--stage-accent);
}

.detail-deadline__date-icon svg {
    width: 24px;
    height: 24px;
}

.detail-deadline__badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
    margin-top: 0;
    padding: 7px 15px;
    min-width: 0;
    justify-content: center;
    border-radius: 999px;
    background: var(--stage-badge-bg);
    color: var(--stage-badge-color);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
}

.detail-deadline__badge svg {
    width: 13px;
    height: 13px;
}

.detail-ai-check {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    padding: 0 16px;
    border-radius: 7px;
    background: linear-gradient(135deg, #7b61ff 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.24);
}

.detail-ai-check:hover {
    color: #ffffff;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 16px 28px rgba(37, 99, 235, 0.3);
}

.detail-ai-check:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.24);
    outline-offset: 3px;
}

.detail-ai-check__icon {
    display: inline-flex;
    width: 21px;
    height: 21px;
    flex: 0 0 auto;
}

.detail-ai-check__icon img {
    display: block;
    width: 21px;
    height: 21px;
}

.detail-deadline--commission {
    --status-color: #1F75D6;
    --status-bg: #FFF1BF;
}

.detail-deadline--finished {
    --status-color: #5A27D8;
    --status-bg: #EFE3FF;
}

.detail-deadline--canceled {
    --status-color: #DC2626;
    --status-bg: #FFE1E1;
}

.detail-two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
}

.detail-two-columns > .detail-section--wide {
    grid-column: 1 / -1;
}

.detail-section {
    padding: 24px;
}

.detail-section h2 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 24px;
    color: #101828;
    font-size: 20px;
    font-weight: 700;
}

.detail-section__icon {
    width: 28px;
    height: 28px;
}

.detail-fields,
.detail-grid {
    display: grid;
    gap: 18px 28px;
}

.detail-field {
    display: grid;
    grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.detail-field__label,
.detail-label {
    color: var(--muted);
    line-height: 1.35;
}

.detail-field__value {
    color: #1f2a44;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.detail-customer-name {
    max-width: 780px;
    margin: 0 0 24px;
    color: #1f2a44;
    font-size: 15px;
    line-height: 1.5;
}

.detail-subblock {
    max-width: 820px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid var(--line-soft);
}

.detail-subblock h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    color: #101828;
    font-size: 16px;
}

.detail-documents {
    display: grid;
    gap: 15px;
}

.detail-document {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    color: #1f2a44;
    line-height: 1.35;
    min-width: 0;
}

.detail-document__title {
    min-width: 0;
    overflow-wrap: anywhere;
}

.detail-document__icon {
    color: #667b98;
}

.detail-document em {
    color: var(--muted);
    font-style: normal;
    font-size: 13px;
}

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

.items-table th,
.items-table td {
    padding: 14px 10px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: top;
}

.items-table th {
    color: var(--muted);
    font-weight: 400;
}

.items-table th:first-child,
.items-table td:first-child {
    width: 36px;
    color: #1f2a44;
}

.items-table th:nth-child(3),
.items-table td:nth-child(3),
.items-table th:nth-child(4),
.items-table td:nth-child(4),
.items-table th:nth-child(5),
.items-table td:nth-child(5) {
    text-align: right;
    white-space: nowrap;
}

.items-table__sub {
    margin-top: 8px;
    color: #64748b;
}

.items-show-more {
    margin-top: 16px;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #1267e8;
    background: #ffffff;
    font-size: 14px;
}

.items-show-more:hover {
    border-color: #1267e8;
    background: #f8fbff;
}

.detail-requirements {
    display: grid;
    gap: 12px;
    max-width: 940px;
    color: #1f2a44;
    font-size: 15px;
    line-height: 1.5;
}

.detail-requirements p {
    margin: 0;
}

.detail-requirements span {
    color: #667085;
}

[hidden],
.modal[hidden],
.detail-view[hidden] {
    display: none !important;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    place-items: center;
    padding: 12px;
}

#optionModal {
    z-index: 40;
}

#subscriptionRequiredModal,
#paymentChoiceModal,
#paymentModal,
#invoicePaymentModal,
#authNoticeModal {
    z-index: 80;
}

.modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.25);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(620px, calc(100% - 24px));
    max-height: min(760px, calc(100vh - 24px));
    margin: 0;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.24);
    overflow: hidden;
}

#templateModal .template-modal__panel {
    width: min(960px, calc(100vw - 48px));
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    margin: 0;
    border-radius: 10px;
}

#templateModal .template-form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#templateModal #templateFormBody {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#templateModal .template-modal__head {
    padding: 22px 28px 12px;
}

#templateModal .template-form__intro {
    flex: 0 0 auto;
    padding: 0 24px 18px;
}

#templateModal .template-notify-row,
#templateModal .template-notify-note {
    margin-left: 154px;
}

#templateModal .template-notify-row {
    align-items: center;
    font-size: 14px;
}

#templateModal .template-form__filters {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
}

#templateModal .template-name-row {
    grid-template-columns: 142px minmax(320px, 420px);
}

#templateModal .template-filter-row {
    grid-template-columns: 36px minmax(120px, 136px) minmax(0, 1fr);
    gap: 12px;
    min-height: 54px;
    padding: 10px 24px;
}

#templateModal .template-filter-row .filter-row__control {
    min-width: 0;
}

#templateModal .template-filter-row .filter-row__control--wide {
    grid-template-columns: minmax(280px, 460px) max-content;
    justify-content: start;
}

#templateModal .checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}

#templateModal .template-filter-row--no-icon .filter-row__control > .filter-input {
    width: 460px;
    max-width: 100%;
}

#templateModal .filter-row__links--choices {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

#templateModal .template-price {
    grid-template-columns: minmax(96px, 120px) minmax(96px, 120px) auto minmax(230px, 1fr);
    gap: 10px 12px;
}

#templateModal .template-price .filter-check:nth-of-type(1) {
    grid-column: 4;
    grid-row: 1;
}

#templateModal .template-price .filter-check:nth-of-type(2) {
    grid-column: 4;
    grid-row: 2;
}

#templateModal .filter-link,
#templateModal .filter-check,
#templateModal .filter-row__label {
    font-size: 14px;
}

#templateModal .filter-input {
    min-height: 42px;
    padding: 8px 12px;
    font-size: 14px;
}

#templateModal .filter-chip {
    max-width: 240px;
}

#templateModal .template-price > .filter-input,
#templateModal .template-price > span {
    grid-row: 1 / span 2;
    align-self: center;
}

#templateModal .template-form__actions {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-top: auto;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, #ffffff 34%);
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.06);
}

#templateModal .template-form__actions .primary-button,
#templateModal .template-delete-button {
    font-weight: 400;
}

.modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px 10px;
}

.modal__head h2 {
    margin: 0;
    font-size: 22px;
}

.icon-button {
    width: 34px;
    height: 34px;
    border: 0;
    background: transparent;
    color: #667085;
    font-size: 24px;
}

.modal__search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin: 0 22px 10px;
}

.modal__search-row .modal__search {
    width: 100%;
    margin: 0;
}

.modal__find {
    min-height: 46px;
}

.modal-select-all {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: calc(100% - 44px);
    min-height: 34px;
    margin: 0 22px 8px;
    color: #1f2937;
    font-size: 14px;
}

.modal-select-all input {
    accent-color: var(--blue);
}

.modal__meta {
    display: flex;
    gap: 28px;
    padding: 0 22px 8px;
    color: var(--muted);
    font-size: 13px;
}

.modal__list {
    overflow: auto;
    min-height: 160px;
    padding: 0 22px 14px;
}

.modal__list .empty-state {
    padding: 24px;
    font-size: 12px;
    font-weight: 300;
    line-height: 1.45;
}

.option-row {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr) auto;
    align-items: center;
    min-height: 38px;
    gap: 8px;
    border-radius: 6px;
    color: #1f2937;
}

.option-row:hover {
    background: #f3f6fb;
}

.option-row--manual {
    margin-top: 10px;
    padding: 0 10px;
    border: 1px dashed #c9dbff;
    background: #f8fbff;
}

.option-row input {
    accent-color: var(--blue);
}

.option-row__count {
    color: var(--muted);
    font-size: 12px;
}

.modal__actions {
    display: flex;
    gap: 10px;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--line-soft);
}

#authModal .modal__backdrop {
    background: rgba(17, 24, 39, 0.18);
    backdrop-filter: blur(2px);
}

#authModal {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.auth-modal {
    z-index: 1;
    width: min(430px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    margin: 0;
    padding: 34px 28px 28px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 13px;
    box-shadow: 0 26px 80px rgba(39, 29, 85, 0.2);
    overflow: auto;
}

#authModal[data-mode="register"] .auth-modal {
    width: min(430px, calc(100vw - 48px));
}

.auth-close {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 30px;
    height: 30px;
    border: 0;
    background: transparent;
    color: #9a98a8;
}

.auth-close span::before,
.auth-close span::after {
    content: "";
    position: absolute;
    top: 14px;
    left: 5px;
    width: 20px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
}

.auth-close span::before {
    transform: rotate(45deg);
}

.auth-close span::after {
    transform: rotate(-45deg);
}

#authModal[data-mode="register"] .auth-close {
    top: 18px;
    right: 18px;
    transform: scale(0.82);
}

.auth-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 14px;
    padding-right: 22px;
}

.auth-mode-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 11px;
    background: #f3efff;
    color: #6a36cf;
}

.auth-mode-icon svg {
    width: 25px;
    height: 25px;
}

.auth-mode-icon svg,
.auth-field__icon svg,
.auth-eye svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-head h2 {
    margin: 0 0 4px;
    color: #252333;
    font-size: 22px;
    line-height: 1.08;
}

.auth-head p {
    margin: 0;
    color: #777588;
    font-size: 12px;
    line-height: 1.3;
}

#authModal[data-mode="register"] .auth-head {
    gap: 14px;
    padding-right: 22px;
}

#authModal[data-mode="register"] .auth-mode-icon {
    width: 48px;
    height: 48px;
    border-radius: 11px;
}

#authModal[data-mode="register"] .auth-mode-icon svg {
    width: 25px;
    height: 25px;
}

#authModal[data-mode="register"] .auth-head h2 {
    margin-bottom: 4px;
    font-size: 22px;
}

#authModal[data-mode="register"] .auth-head p {
    font-size: 12px;
}

.auth-form {
    display: grid;
    gap: 13px;
    margin-top: 26px;
}

#authModal[data-mode="register"] .auth-form {
    gap: 13px;
    margin-top: 26px;
}

.auth-field {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    border: 1px solid #dedee9;
    border-radius: 8px;
    background: #ffffff;
    overflow: hidden;
}

.auth-field:focus-within {
    border-color: #7041d4;
    box-shadow: 0 0 0 3px rgba(112, 65, 212, 0.12);
}

.auth-field__icon {
    position: absolute;
    left: 15px;
    width: 18px;
    height: 18px;
    color: #6a36cf;
}

.auth-field input {
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 0 42px 0 44px;
    border: 0;
    border-radius: inherit;
    background: transparent;
    box-shadow: none;
    color: #252333;
    font-size: 13px;
    outline: 0 !important;
    appearance: none;
}

.auth-field input:focus {
    outline: 0 !important;
    box-shadow: none;
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus {
    -webkit-text-fill-color: #252333;
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s ease-out;
}

.auth-field input::placeholder {
    color: #858496;
}

.auth-eye {
    position: absolute;
    right: 14px;
    width: 18px;
    height: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #858496;
}

.auth-row {
    display: flex;
    align-items: center;
    margin-top: -7px;
}

.auth-row--right {
    justify-content: flex-end;
}

.auth-link {
    border: 0;
    background: transparent;
    color: #5630c2;
    font-size: 12px;
    text-decoration: underline;
}

#authModal[data-mode="register"] .auth-field {
    min-height: 48px;
    border-radius: 8px;
}

#authModal[data-mode="register"] .auth-field__icon {
    left: 15px;
    width: 18px;
    height: 18px;
}

#authModal[data-mode="register"] .auth-field input {
    padding: 0 42px 0 44px;
    font-size: 13px;
}

#authModal[data-mode="register"] .auth-eye {
    right: 14px;
    width: 18px;
    height: 18px;
}

.auth-consent {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #6b6879;
    font-size: 11px;
    line-height: 1.35;
}

.auth-consent input {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 1px 0 0;
    accent-color: #6a36cf;
}

.auth-consent a {
    color: #5630c2;
}

.auth-form .primary-button {
    min-height: 48px;
    border: 0;
    border-radius: 8px;
    background: linear-gradient(100deg, #266fd7 0%, #8f32cf 100%);
    box-shadow: 0 16px 30px rgba(76, 68, 196, 0.28);
    font-size: 14px;
}

.auth-form .primary-button:hover {
    background: linear-gradient(100deg, #225fc1 0%, #7829b6 100%);
}

#authModal[data-mode="register"] .auth-form .primary-button {
    min-height: 48px;
    border-radius: 8px;
    font-size: 14px;
}

.auth-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #302d3c;
    font-size: 12px;
}

.auth-switch__button {
    min-height: 34px;
    padding: 0 16px;
    border: 1px solid #6a36cf;
    border-radius: 7px;
    background: #ffffff;
    color: #542bc2;
    font-size: 12px;
    font-weight: 400;
}

#authModal[data-mode="register"] .auth-switch {
    gap: 9px;
    font-size: 12px;
}

#authModal[data-mode="register"] .auth-switch__button {
    min-height: 34px;
    padding: 0 16px;
    border-width: 1px;
    border-radius: 7px;
    font-size: 12px;
}

.auth-form .form-message {
    margin-top: -8px;
}

.auth-notice-modal .modal__backdrop {
    background: rgba(17, 24, 39, 0.2);
    backdrop-filter: blur(2px);
}

.auth-notice {
    width: min(430px, calc(100vw - 48px));
    max-height: calc(100vh - 48px);
    align-items: center;
    padding: 32px 30px 28px;
    border: 1px solid rgba(215, 226, 246, 0.95);
    border-radius: 14px;
    background:
        radial-gradient(circle at 85% 0%, rgba(108, 83, 255, 0.1), transparent 32%),
        linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
    box-shadow: 0 26px 80px rgba(39, 29, 85, 0.2);
    text-align: center;
}

.auth-notice__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 16px;
    background: #f0ecff;
    color: #5b42ff;
}

.auth-notice__icon svg {
    width: 27px;
    height: 27px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-notice h2 {
    margin: 0 0 12px;
    color: #202638;
    font-size: 24px;
    line-height: 1.12;
    letter-spacing: 0;
}

.auth-notice p {
    margin: 0;
    color: #53627a;
    font-size: 14px;
    line-height: 1.55;
}

.auth-notice__note {
    margin-top: 12px !important;
    color: #7b8497 !important;
    font-size: 12px !important;
    line-height: 1.45 !important;
}

.auth-notice__button {
    min-width: 132px;
    min-height: 42px;
    margin-top: 22px;
    border-radius: 10px;
    font-weight: 400;
}

.form-message {
    min-height: 18px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.35;
}

.form-message--error {
    color: #b42318;
}

.toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 50;
    max-width: min(420px, calc(100vw - 36px));
    padding: 14px 16px;
    border-radius: 8px;
    background: #111827;
    color: #ffffff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.24);
}

.toast[hidden] {
    display: none;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 840px) {
    .topbar {
        height: auto;
    }

    .topbar__inner {
        flex-wrap: wrap;
        gap: 12px 18px;
        min-height: 88px;
        padding: 10px 0 12px;
    }

    .brand__logo {
        height: 74px;
    }

    .nav {
        order: 3;
        width: 100%;
        gap: 20px;
        margin-left: 0;
        margin-right: 0;
        overflow-x: auto;
    }

    .nav__item {
        padding: 10px 0;
        font-size: 15px;
    }

    .authbar {
        margin-left: auto;
        flex-basis: 88px;
        min-width: 88px;
    }

    .authbar__login,
    .authbar__logout {
        min-width: 86px;
        min-height: 38px;
        padding: 0 16px;
        font-size: 14px;
    }

    .payment-entry {
        justify-items: stretch;
        min-width: 0;
    }

    .payment-widget,
    .payment-widget__message {
        width: 100%;
        max-width: none;
        text-align: left;
    }

    .invoice-form__grid {
        grid-template-columns: 1fr;
    }

    .invoice-form__actions {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .auth-modal {
        padding: 28px 22px 24px;
    }

    .auth-head {
        gap: 14px;
        padding-right: 20px;
    }

    .auth-mode-icon {
        width: 48px;
        height: 48px;
        border-radius: 11px;
    }

    .auth-head h2 {
        font-size: 22px;
    }

    .auth-head p {
        font-size: 12px;
    }

    .auth-form {
        gap: 14px;
        margin-top: 28px;
    }

    .auth-field {
        min-height: 48px;
    }

    .auth-field__icon {
        left: 15px;
        width: 18px;
        height: 18px;
    }

    .auth-field input {
        padding: 0 42px 0 44px;
        font-size: 13px;
    }

    .auth-eye {
        right: 14px;
        width: 18px;
        height: 18px;
    }

    .auth-form .primary-button {
        min-height: 48px;
        font-size: 14px;
    }

    .auth-switch {
        flex-direction: column;
        gap: 10px;
        font-size: 15px;
    }

    .auth-switch__button {
        min-height: 34px;
        padding: 0 16px;
        font-size: 12px;
    }

    .filter-row,
    .filter-row--no-icon,
    .filter-row__control--wide,
    .filter-price {
        grid-template-columns: 1fr;
    }

    .filter-row {
        gap: 10px;
        min-height: 0;
        padding: 16px;
    }

    .filter-row--no-icon .filter-row__label,
    .filter-row--no-icon .filter-row__control {
        grid-column: auto;
    }

    .filter-row__icon {
        display: none;
    }

    .filter-row__links,
    .checks {
        gap: 14px 18px;
    }

    .search-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .search-actions .search-submit {
        margin-left: 0;
    }

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

    .search-panel__head-actions {
        justify-content: flex-start;
        flex-wrap: wrap;
        margin-left: 0;
    }

    .action-link--reset {
        margin-left: 0;
    }

    .results-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .site-footer {
        align-items: center;
        flex-direction: column;
        gap: 8px;
        margin-top: -18px;
        text-align: center;
    }

    .site-footer span {
        display: none;
    }

    .legal-card {
        padding: 28px 22px;
        border-radius: 14px;
    }

    .legal-card h1 {
        font-size: 24px;
    }

    .tender-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .tender-card__quick {
        flex-wrap: wrap;
    }

    .tender-card__procedure,
    .tender-card__finance {
        border-left: 0;
        border-top: 1px solid #e5eaf1;
    }

    .tender-card__items {
        padding: 0 18px 20px;
    }

    .tender-items-table {
        display: block;
        overflow-x: auto;
    }

    .detail-hero,
    .detail-two-columns,
    .detail-grid,
    .account-layout {
        grid-template-columns: 1fr;
    }

    .back-button {
        position: relative;
        left: 0;
        top: 0;
        margin-bottom: 14px;
    }

    .detail-hero {
        gap: 22px;
        padding: 20px;
    }

    .detail-hero__side {
        align-items: flex-start;
        gap: 16px;
    }

    .detail-law-badge {
        margin-top: 0;
        min-height: 24px;
        padding: 0 10px;
        font-size: 12px;
    }

    .detail-title-row {
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 12px;
    }

    .detail-title-icon {
        width: 44px;
        height: 44px;
    }

    .detail-title-icon svg {
        width: 25px;
        height: 25px;
    }

    .detail-hero h1 {
        font-size: 20px;
    }

    .detail-price-row {
        grid-template-columns: 24px minmax(0, 1fr);
        gap: 8px 12px;
    }

    .detail-price-row__line {
        display: none;
    }

    .detail-price-row__value {
        grid-column: 2;
        font-size: 18px;
        white-space: normal;
    }

    .detail-deadline {
        min-height: 0;
        padding: 18px;
    }

    .detail-deadline__top {
        grid-template-columns: 54px minmax(0, 1fr);
        gap: 14px;
    }

    .detail-deadline__icon {
        width: 54px;
        height: 54px;
    }

    .detail-section {
        padding: 20px;
    }

    .detail-field {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .items-table {
        display: block;
        overflow-x: auto;
    }

    .account-side {
        border-left: 0;
        border-top: 1px solid #e2e8f0;
    }

    .templates-panel {
        padding: 18px;
    }

    .notifications-head h1 {
        font-size: 28px;
    }

    .notifications-grid,
    .notification-card--status,
    .notification-card--schedule,
    .notification-card--recipient {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

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

    .notification-card {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 18px;
    }

    .notification-card--status {
        grid-row: auto;
    }

    .notification-card--hero {
        min-height: 0;
        padding: 24px 20px;
    }

    .notification-card__body--hero {
        max-width: none;
    }

    .notification-bell-art {
        position: static;
        width: 140px;
        height: 140px;
        margin: -18px 0 -18px auto;
        opacity: 0.72;
    }

    .notification-pay-button,
    .notification-schedule-button,
    .notification-edit-button {
        margin-left: 0;
    }

    .notifications-templates-panel {
        padding: 18px;
    }

    .notifications-templates-head {
        grid-template-columns: 1fr;
    }

    .notification-templates-note {
        justify-self: start;
        max-width: none;
    }

    .notification-template-table__head {
        display: none;
    }

    .notification-template-row {
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 16px;
    }

    .notification-template-actions {
        justify-content: flex-start;
    }

    .templates-panel__top,
    .templates-actions,
    .template-form__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .template-chip {
        width: 100%;
        max-width: none;
    }

    .template-name-row,
    .template-filter-row,
    .template-filter-row .filter-row__control--wide,
    .template-price {
        grid-template-columns: 1fr;
    }

    .template-filter-row {
        gap: 10px;
        padding: 16px 18px;
    }

    .template-filter-row--no-icon .filter-row__label,
    .template-filter-row--no-icon .filter-row__control {
        grid-column: auto;
    }

    .template-filter-row .filter-row__icon {
        display: none;
    }

    .template-notify-row,
    .template-notify-note {
        margin-left: 0;
    }

    .template-delete-button {
        margin-left: 0;
    }

    #templateModal .template-modal__panel {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        margin: 10px auto;
    }

    #templateModal .template-name-row,
    #templateModal .template-filter-row,
    #templateModal .template-filter-row .filter-row__control--wide,
    #templateModal .template-price {
        grid-template-columns: 1fr;
    }

    #templateModal .template-filter-row {
        gap: 10px;
        padding: 16px 18px;
    }

    #templateModal .template-filter-row--no-icon .filter-row__label,
    #templateModal .template-filter-row--no-icon .filter-row__control {
        grid-column: auto;
    }

    #templateModal .template-filter-row .filter-row__icon {
        display: none;
    }

    .account-head,
    .saved-search-row,
    .saved-search-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .saved-search-row {
        grid-template-columns: 1fr;
    }

    .admin-head {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-table__head {
        display: none;
    }

    .admin-user {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .admin-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 920px) {
    .modal__panel.schedule-modal__panel {
        width: calc(100vw - 24px);
        height: min(820px, calc(100vh - 24px));
        max-height: min(820px, calc(100vh - 24px));
    }

    .schedule-modal__head {
        grid-template-columns: 56px minmax(0, 1fr) 36px;
        gap: 14px;
        min-height: 118px;
        padding: 24px 26px 22px;
    }

    .schedule-modal__icon {
        width: 56px;
        height: 56px;
    }

    .schedule-modal__icon svg {
        width: 32px;
        height: 32px;
    }

    .schedule-modal__head h2 {
        margin-bottom: 6px;
        font-size: 24px;
    }

    .schedule-modal__head p {
        max-width: none;
        font-size: 14px;
    }

    .schedule-modal__close {
        width: 36px;
        height: 36px;
        font-size: 34px;
    }

    .schedule-form__main {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 26px 28px 18px;
    }

    .schedule-form__main::before {
        display: none;
    }

    .schedule-form__side {
        gap: 20px;
    }

    .schedule-form__times {
        grid-column: 1;
        padding: 20px;
    }

    .schedule-form__times-title,
    .schedule-field > span {
        margin-bottom: 10px;
        font-size: 14px;
    }

    .schedule-field select {
        height: 46px;
        padding: 0 38px 0 14px;
        font-size: 14px;
    }

    .schedule-time-list {
        gap: 12px;
    }

    .schedule-error {
        padding: 0 28px 6px;
    }

    .schedule-modal__actions {
        gap: 14px;
        padding: 20px 28px 24px;
    }

.schedule-modal__actions .secondary-button,
    .schedule-save-button {
        min-width: 140px;
        min-height: 48px;
        font-size: 14px;
    }
}

.templates-panel {
    gap: 30px;
    padding: 36px 34px;
    border-color: #e5eaf5;
    border-radius: 16px;
}

.templates-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
}

.templates-panel__head h1 {
    margin: 0;
    color: #121826;
    font-size: 30px;
    line-height: 1.15;
    font-weight: 700;
}

.templates-panel__body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 34px;
    align-items: start;
}

.templates-actions {
    gap: 14px;
}

.templates-create,
.templates-notify {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.35;
    font-weight: 400;
}

.templates-create {
    border-color: transparent;
    background: linear-gradient(180deg, #4438ff 0%, #2f6fed 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(47, 111, 237, 0.22);
}

.templates-create:hover {
    background: linear-gradient(180deg, #342be7 0%, #245fd7 100%);
    color: #ffffff;
}

.templates-create svg,
.templates-notify svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.templates-notify {
    border-color: #5060ff;
    background: #ffffff;
    color: #121826;
}

.templates-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px 24px;
}

.template-card {
    position: relative;
    min-height: 66px;
    border: 1px solid #dfe6f2;
    border-radius: 9px;
    background: #ffffff;
    color: #121826;
    box-shadow: 0 10px 24px rgba(45, 55, 92, 0.04);
    overflow: hidden;
}

.template-card--active {
    border-color: #5060ff;
    box-shadow: 0 10px 26px rgba(47, 111, 237, 0.1);
}

.template-card__main {
    display: grid;
    grid-template-rows: auto 1fr;
    align-content: center;
    gap: 8px;
    width: 100%;
    min-height: 66px;
    padding: 11px 34px 11px 16px;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: left;
}

.template-card__name {
    min-width: 0;
    overflow: hidden;
    color: #121826;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-card__meta {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
    color: #667085;
    font-size: 11px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-card__meta-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.template-card__meta-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.6;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.template-card__edit,
.template-card__check {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.template-card__edit {
    right: 8px;
    top: 8px;
    width: 24px;
    height: 24px;
    border: 0;
    background: transparent;
    color: #667085;
}

.template-card__edit:hover {
    color: var(--blue);
}

.template-card__edit svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.template-card__check {
    right: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #5060ff;
    color: #ffffff;
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.template-card--active .template-card__check {
    opacity: 1;
    transform: scale(1);
}

.template-card--active .template-card__edit {
    top: auto;
    right: 8px;
    bottom: 8px;
}

.template-card__check svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.template-card--create {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 66px;
    padding: 11px 16px;
    border: 1px dashed #b9c2ff;
    background: #ffffff;
    color: #3d49ff;
    font-size: 13px;
    line-height: 1.25;
    font-weight: 400;
    text-align: center;
}

.template-card--create span {
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

.template-card--create strong {
    font-weight: 400;
}

.templates-sidebar {
    display: grid;
    gap: 22px;
    padding-left: 26px;
    border-left: 1px solid #dfe5f1;
}

.templates-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: center;
    gap: 16px;
    color: #24324a;
    font-size: 14px;
    line-height: 1.35;
}

.templates-control strong {
    font-weight: 400;
}

.templates-multi input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.templates-multi span,
.templates-filter-toggle input {
    position: relative;
    box-sizing: border-box;
    width: 38px;
    height: 20px;
    flex: 0 0 38px;
    border: 1px solid #d1d8e5;
    border-radius: 999px;
    background: #edf1f7;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.14);
    transition: background 0.18s ease, border-color 0.18s ease;
}

.templates-multi span::after,
.templates-filter-toggle input::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffffff 0%, #eef2f7 100%);
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
    transform: translateY(-50%);
    transition: transform 0.18s ease;
}

.templates-multi input:checked + span,
.templates-filter-toggle input:checked {
    border-color: #2f78ff;
    background: linear-gradient(180deg, #2f95ec 0%, #2476d4 100%);
}

.templates-multi input:checked + span::after,
.templates-filter-toggle input:checked::before {
    transform: translate(18px, -50%);
}

.templates-filter-toggle {
    white-space: normal;
}

.templates-filter-toggle input {
    appearance: none;
    display: block;
    margin: 0;
    grid-column: 2;
    grid-row: 1;
}

.templates-filter-toggle span {
    display: none;
}

.templates-stage-select {
    display: grid;
    gap: 10px;
    position: relative;
}

.templates-stage-select > label {
    color: #24324a;
    font-size: 14px;
    font-weight: 400;
}

.templates-stage-button {
    justify-content: space-between;
    width: 100%;
    min-height: 44px;
    padding: 0 16px;
    border-color: #dbe4f2;
    border-radius: 8px;
    font-size: 14px;
}

.templates-stage-button svg {
    color: #53627a;
}

.templates-status {
    display: block;
    margin-top: 18px;
    padding: 15px 17px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.45;
}

.template-card__dot {
    flex: 0 0 auto;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #8a94ab;
}

.template-card__new {
    color: #2f46f2;
    font-weight: 400;
}

.template-card__new--muted {
    color: #98a2b3;
}

.templates-status .subscription-status--active,
.templates-status .subscription-status--inactive,
.templates-status .subscription-status--notice {
    display: block;
}

.templates-status:has(.subscription-status--active) {
    background: linear-gradient(135deg, #eef9ec 0%, #e6f6e8 100%);
    color: #3d9b49;
}

.templates-status:has(.subscription-status--inactive) {
    background: linear-gradient(135deg, #fff0f0 0%, #fff6f6 100%);
}

@media (max-width: 980px) {
    .templates-panel__head,
    .templates-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .templates-panel__body {
        grid-template-columns: 1fr;
    }

    .templates-sidebar {
        padding-left: 0;
        padding-top: 24px;
        border-left: 0;
        border-top: 1px solid #dfe5f1;
    }

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

@media (max-width: 640px) {
    .templates-panel {
        padding: 20px;
    }

    .templates-panel__head h1 {
        font-size: 26px;
    }

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