.menu-order-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
}

.menu-order-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, .55);
    border: 1px solid var(--line, rgba(154, 112, 64, .26));
    border-radius: 6px;
    cursor: grab;
}

.menu-order-item.is-dragging {
    opacity: .4;
}

.menu-order-handle {
    color: var(--muted, #6d5d4e);
}

.menu-order-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-accent, #c4a275);
    cursor: pointer;
}

.menu-order-title {
    font-weight: 600;
    flex: 1;
}

.menu-order-type {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--muted, #6d5d4e);
}

.menu-order-empty {
    list-style: none;
    padding: 16px;
    color: var(--muted, #6d5d4e);
    font-size: 13px;
}

.menu-pick-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 22px;
}

.menu-pick-group {
    border: 1px solid var(--line, rgba(154, 112, 64, .26));
    border-radius: 6px;
    padding: 14px 16px;
}

.menu-pick-row {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
}

.menu-pick-row input {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-accent, #c4a275);
}

.menu-pick-hint {
    font-size: 11px;
    color: var(--muted, #6d5d4e);
    margin-left: auto;
}

.menu-pick-pages {
    margin-top: 10px;
    padding-left: 28px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.menu-pick-row--page {
    font-size: 13px;
}

.direction-edit-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    align-items: center;
    justify-content: center;
    z-index: 1100;
}

.direction-edit-modal-overlay.is-open {
    display: flex;
}

.direction-edit-modal {
    background: #fdf6eb;
    border: 1px solid var(--line-strong, rgba(142, 96, 47, .42));
    border-radius: 8px;
    width: 420px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .22);
    text-align: left;
}

.direction-edit-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line, rgba(154, 112, 64, .26));
    font-size: 14px;
    font-weight: 700;
    color: var(--ink, #2f251d);
}

.direction-edit-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    color: var(--muted, #6d5d4e);
    padding: 0;
    line-height: 1;
}

.direction-edit-modal-close:hover {
    color: var(--ink, #2f251d);
}

.direction-edit-modal-body {
    padding: 20px;
}

.direction-edit-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--line, rgba(154, 112, 64, .26));
}

.card-lang-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.card-lang-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid rgba(115, 101, 56, .5);
    margin: 16px 0 0;
}

.card-lang-tab {
    padding: 9px 20px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    border: 1px solid rgba(115, 101, 56, .5);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: rgba(255, 255, 255, .38);
    color: #8b1f14;
    transition: background-color .15s ease, color .15s ease;
}

.card-lang-tab + .card-lang-tab {
    margin-left: -1px;
}

.card-lang-tab:hover {
    background: rgba(255, 244, 221, .68);
}

.card-lang-panel {
    display: none;
    border: 1px solid var(--line, rgba(154, 112, 64, .26));
    border-top: 0;
    border-radius: 0 0 6px 6px;
    padding: 18px 16px;
}

#card-lang-ru:checked ~ .card-lang-tabs .card-lang-tab-ru,
#card-lang-uk:checked ~ .card-lang-tabs .card-lang-tab-uk,
#card-lang-en:checked ~ .card-lang-tabs .card-lang-tab-en,
#card-lang-zh:checked ~ .card-lang-tabs .card-lang-tab-zh {
    position: relative;
    z-index: 1;
    background: rgba(216, 176, 110, .2);
    color: #6d2118;
    box-shadow: inset 0 3px 0 rgba(139, 31, 20, .75);
}

#card-lang-ru:checked ~ .card-lang-panel-ru,
#card-lang-uk:checked ~ .card-lang-panel-uk,
#card-lang-en:checked ~ .card-lang-panel-en,
#card-lang-zh:checked ~ .card-lang-panel-zh {
    display: block;
}

.settings-block-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--ink, #2f251d);
    margin-bottom: 4px;
}

.settings-block-hint {
    font-size: 13px;
    color: var(--muted, #6d5d4e);
    margin-bottom: 18px;
}

.applications-page {
    --line: rgba(154, 112, 64, .26);
    --line-strong: rgba(142, 96, 47, .42);
    --ink: #2f251d;
    --muted: #6d5d4e;
    --panel: rgba(249, 235, 209, .58);
    padding: 2px 0 0;
}

.applications-hero {
    min-height: 96px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 6px 8px 20px;
}

.applications-hero h1 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 12px;
    color: #2d2119;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 26px;
    line-height: 1.1;
    letter-spacing: .02em;
    text-align: left;
    text-transform: uppercase;
}

.applications-hero .red-seal-box {
    width: 22px;
    height: 27px;
    font-size: 9px;
}

.applications-hero p {
    color: #4b4037;
    font-size: 13px;
}
.applications-panel {
    border: 1px solid var(--line-strong);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 248, 233, .56), rgba(245, 225, 190, .34)),
        var(--panel);
    box-shadow: 0 16px 34px rgba(75, 48, 22, .08);
    backdrop-filter: blur(1px);
    padding: 10px;
}

.applications-panel > * {
    min-width: 900px;
}

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

.table-toolbar {
    justify-content: flex-end;
}

.table-toolbar .applications-filters {
    width: 100%;
    justify-content: flex-end;
}

.applications-tabs {
    display: flex;
    align-items: center;
    gap: 24px;
    min-width: 0;
}

.applications-tabs a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    color: #2f251d;
    font-size: 13px;
    white-space: nowrap;
}

.applications-tabs a.active,
.applications-tabs a:hover {
    color: #8b1f14;
    text-shadow: none;
}

.applications-tabs a.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -9px;
    height: 2px;
    background: #8b1f14;
}

.applications-tabs span {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(139, 31, 20, .1);
    color: #7b1c12;
    font-size: 12px;
    font-weight: 700;
}

.applications-filters {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

.applications-page input:not([type="checkbox"]):not([type="radio"]),
.applications-page select,
.applications-page textarea {
    font: inherit;
}

.applications-page input:not([type="checkbox"]):not([type="radio"]):focus,
.applications-page select:focus,
.applications-page textarea:focus,
.applications-page button:focus,
.applications-page a:focus {
    outline: 0;
}

.applications-page input:not([type="checkbox"]):not([type="radio"]):focus-visible,
.applications-page select:focus-visible,
.applications-page textarea:focus-visible {
    border-color: rgba(139, 31, 20, .42) !important;
    box-shadow: none !important;
}

.applications-page button:focus-visible,
.applications-page a:focus-visible {
    outline: 0;
    box-shadow: none;
}

.filter-control,
.filter-button {
    min-width: 154px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(148, 105, 58, .36);
    border-radius: 6px;
    background: rgba(255, 244, 221, .62);
    color: #31251d;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32);
}

.filter-control {
    padding: 0 12px;
}

.filter-control select,
.filter-control input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-size: 13px;
}

.filter-control:focus-within {
    border-color: rgba(139, 31, 20, .42);
    box-shadow:
        0 0 0 3px rgba(139, 31, 20, .12),
        inset 0 1px 0 rgba(255, 255, 255, .32);
}

.filter-control select:focus,
.filter-control input:focus {
    outline: 0;
    box-shadow: none;
}

.filter-date {
    min-width: 176px;
}

.filter-search {
    min-width: 260px;
}

.filter-permission {
    min-width: 190px;
}

.admin-edit-form {
    padding: 0 28px 30px;
}

.admin-form-notice {
    margin: 22px 28px 0;
    border: 1px solid rgba(119, 90, 40, .38);
    border-radius: 6px;
    background: rgba(255, 244, 221, .58);
    padding: 12px 14px;
    color: #5a4a21;
    font-size: 13px;
    font-weight: 700;
}

.admin-form-notice-warning {
    border-color: rgba(178, 58, 46, .45);
    background: rgba(255, 230, 224, .65);
    color: #8a2f22;
}

.admin-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 18px 20px;
}

.admin-form-field {
    display: grid;
    gap: 8px;
    color: #31251d;
    font-size: 13px;
}

.admin-form-field-full {
    grid-column: 1 / -1;
}

.admin-form-datetime {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.admin-form-field > span {
    color: #6b5848;
    font-weight: 700;
}

.applications-page input[type="checkbox"],
.sidebar input[type="checkbox"],
.impersonation-bar input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    position: relative;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    border: 1px solid rgba(148, 105, 58, .62);
    border-radius: 5px;
    background: rgba(255, 248, 235, .72);
    cursor: pointer;
    transition:
        background-color .15s ease,
        border-color .15s ease,
        box-shadow .15s ease;
}

.applications-page input[type="checkbox"]:checked,
.sidebar input[type="checkbox"]:checked,
.impersonation-bar input[type="checkbox"]:checked {
    border-color: #8b1f14;
    background: #8b1f14;
    box-shadow: inset 0 0 0 2px rgba(255, 244, 221, .24);
}

.applications-page input[type="checkbox"]:checked::after,
.sidebar input[type="checkbox"]:checked::after,
.impersonation-bar input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid #fff4dd;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.applications-page input[type="checkbox"]:focus,
.sidebar input[type="checkbox"]:focus,
.impersonation-bar input[type="checkbox"]:focus {
    outline: 0;
    box-shadow: none;
}

.applications-page input[type="checkbox"]:checked:focus,
.sidebar input[type="checkbox"]:checked:focus,
.impersonation-bar input[type="checkbox"]:checked:focus {
    box-shadow: inset 0 0 0 2px rgba(255, 244, 221, .24);
}

.applications-page input[type="checkbox"]:focus-visible,
.sidebar input[type="checkbox"]:focus-visible,
.impersonation-bar input[type="checkbox"]:focus-visible {
    box-shadow: none;
}

.applications-page input[type="checkbox"]:checked:focus-visible,
.sidebar input[type="checkbox"]:checked:focus-visible,
.impersonation-bar input[type="checkbox"]:checked:focus-visible {
    box-shadow: none;
}

/* Payment access selector */
.payment-access-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 6px;
}

.payment-access-radio {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    color: var(--color-text, #2b1a0e);
}

.payment-access-lessons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 16px;
    margin-top: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,.4);
    border: 1px solid var(--color-border, rgba(115,101,56,.2));
    border-radius: 6px;
}

.payment-access-lesson-item {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    cursor: pointer;
    color: var(--color-text, #2b1a0e);
    padding: 3px 0;
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--color-muted, #9a8070);
}

.form-control-static {
    display: block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #6e707e;
    background-color: rgba(255,255,255,.3);
    border: 1px solid rgba(115,101,56,.3);
    border-radius: .35rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #6e707e;
    background-color: #ffffff96;
    background-clip: padding-box;
    border: 1px solid #736538;
    border-radius: .35rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.form-control:focus {
    border-color: rgba(148, 105, 58, .58);
    outline: 0;
    box-shadow: 0 0 0 .16rem rgba(148, 105, 58, .14);
}

.form-control:disabled {
    color: #665844;
    background-color: rgba(231, 214, 180, .44);
    cursor: not-allowed;
}

textarea.form-control {
    height: auto;
    resize: vertical;
}

.admin-form-field small {
    color: #8b1f14;
    font-size: 12px;
}

.admin-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
}

.admin-tab-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.admin-tabs {
    display: flex;
    align-items: flex-end;
    gap: 0;
    border-bottom: 1px solid rgba(115, 101, 56, .7);
    margin-bottom: 24px;
    overflow-x: auto;
}

.admin-tab {
    min-width: 136px;
    min-height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(115, 101, 56, .7);
    border-bottom: 0;
    border-radius: 7px 7px 0 0;
    background: rgba(255, 255, 255, .38);
    padding: 0 22px;
    color: #8b1f14;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.admin-tab + .admin-tab {
    margin-left: -1px;
}

.admin-tab:hover {
    background: rgba(255, 244, 221, .68);
}

.admin-tab-panel {
    display: none;
    border-left: 1px solid rgba(115, 101, 56, .34);
    padding: 24px 0 0 18px;
}

#course-tab-main:checked ~ .admin-tabs .admin-tab-main,
#course-tab-settings:checked ~ .admin-tabs .admin-tab-settings,
#course-tab-preview:checked ~ .admin-tabs .admin-tab-preview {
    position: relative;
    z-index: 1;
    background: rgba(216, 176, 110, .2);
    color: #6d2118;
    box-shadow: inset 0 3px 0 rgba(139, 31, 20, .75);
}

#course-tab-main:checked ~ .admin-tab-panel-main,
#course-tab-settings:checked ~ .admin-tab-panel-settings,
#course-tab-preview:checked ~ .admin-tab-panel-preview {
    display: block;
}

/* Вложенные подтабы внутри панели занятий */
.admin-sub-tab-input {
    display: none;
}

.admin-sub-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(115, 101, 56, .34);
}

.admin-sub-tab {
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #8b7355;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    background: none;
    border-left: 0;
    border-right: 0;
    border-top: 0;
    font-family: inherit;
}

#session-tab-list:checked ~ .admin-sub-tabs .admin-sub-tab-list,
#session-tab-add:checked ~ .admin-sub-tabs .admin-sub-tab-add,
.admin-sub-tab.is-active {
    color: #6d2118;
    border-bottom-color: rgba(139, 31, 20, .75);
}

.admin-sub-panel {
    display: none;
}

/* Внутри редактора записей (Livewire) панели переключаются через @if,
   а не через radio + :checked, поэтому показываем их напрямую. */
.entry-editor .admin-sub-panel {
    display: block;
}

#session-tab-list:checked ~ .admin-sub-panel-list,
#session-tab-add:checked ~ .admin-sub-panel-add {
    display: block;
}

/* Записи занятия — редактор страницы */
.entry-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(220px, 1fr);
    gap: 24px;
    align-items: start;
}

.entry-editor-side {
    display: grid;
    gap: 14px;
    padding: 16px;
    background: rgba(255, 248, 235, .55);
    border: 1px solid rgba(148, 105, 58, .24);
    border-radius: 10px;
}

.entry-editor-side h3 {
    margin: 0;
    font-size: 15px;
    color: #6d2118;
}

.entry-editor-side-locked {
    font-size: 13px;
    color: #8b7355;
}

.entry-resources-empty {
    font-size: 13px;
    color: #8b7355;
    margin: 0;
}

.entry-resources {
    display: grid;
    gap: 10px;
}

.entry-resource-item {
    position: relative;
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, .6);
    border: 1px solid rgba(148, 105, 58, .18);
    border-radius: 8px;
}

.entry-resource-preview {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    overflow: hidden;
    background: rgba(148, 105, 58, .1);
    font-size: 20px;
}

.entry-resource-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.entry-resource-info {
    display: grid;
    gap: 2px;
    font-size: 12px;
    color: #6b5848;
    min-width: 0;
}

.entry-resource-info strong {
    font-size: 13px;
    color: #31251d;
}

.entry-resource-url {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry-resource-status {
    font-size: 11px;
    font-weight: 700;
}

.entry-resource-status.is-pending {
    color: #8a6a1f;
}

.entry-resource-status.is-failed {
    color: #b23a2e;
}

.entry-resource-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.entry-resource-embed {
    flex: 1;
    font-size: 11px;
    padding: 3px 6px;
    background: rgba(148, 105, 58, .12);
    border-radius: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entry-resource-copy {
    font-size: 11px;
    padding: 3px 8px;
    border: 1px solid rgba(148, 105, 58, .4);
    border-radius: 4px;
    background: rgba(255, 255, 255, .7);
    cursor: pointer;
    white-space: nowrap;
}

.entry-resource-remove {
    position: absolute;
    top: 4px;
    right: 6px;
    border: 0;
    background: none;
    color: #8b1f14;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 2px;
}

.entry-resource-form {
    display: grid;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(148, 105, 58, .24);
}

@media (max-width: 960px) {
    .entry-editor-grid {
        grid-template-columns: 1fr;
    }
}

/* Предпросмотр записи */
.entry-preview {
    max-width: 760px;
}

.admin-tab-panel-preview .entry-preview {
    padding-bottom: 28px;
    margin-bottom: 28px;
    border-bottom: 1px solid rgba(115, 101, 56, .2);
}

.admin-tab-panel-preview .entry-preview:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: none;
}

.entry-preview h2 {
    margin: 0 0 8px;
    color: #2f251d;
    font-family: Georgia, 'Times New Roman', serif;
}

.entry-preview-lead {
    color: #6b5848;
    font-style: italic;
    margin: 0 0 16px;
}

.entry-preview-content {
    display: flow-root;
    line-height: 1.6;
    color: #31251d;
}

.entry-preview-text {
    margin: 0 0 14px;
}

.entry-preview-content .content-resource {
    position: relative;
    margin: 0 0 14px;
}

.entry-preview-content .content-clearfix {
    clear: both;
}

.entry-preview-content .content-resource img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.entry-preview-content .content-resource.align-left {
    float: left;
    margin: 0 18px 14px 0;
}

.entry-preview-content .content-resource.align-right {
    float: right;
    margin: 0 0 14px 18px;
}

.entry-preview-content .content-resource.align-center {
    margin: 0 auto 14px;
    float: none;
}

.entry-preview-content .content-resource.align-center img {
    margin: 0 auto;
}

.entry-preview.is-editable .content-resource {
    outline: 1px dashed rgba(139, 31, 20, .35);
    border-radius: 8px;
}

.content-resource-gear {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 30px;
    height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(148, 105, 58, .4);
    background: rgba(255, 255, 255, .85);
    font-size: 15px;
    cursor: pointer;
}

.content-resource-settings {
    position: absolute;
    top: 42px;
    left: 6px;
    z-index: 5;
    display: grid;
    gap: 10px;
    width: max-content;
    padding: 12px;
    background: rgba(255, 248, 235, .98);
    border: 1px solid rgba(148, 105, 58, .4);
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(49, 37, 29, .18);
}

.content-resource-settings label {
    display: grid;
    gap: 4px;
    font-size: 12px;
    color: #6b5848;
    font-weight: 600;
}

.content-resource-settings-actions {
    display: flex;
    gap: 8px;
}

.content-resource-settings-units {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #6b5848;
    font-weight: 600;
    margin-top: -4px;
}

.content-resource-settings-units label {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.content-resource-settings-reset {
    margin-left: auto;
    border: none;
    background: none;
    color: #8b1f14;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

[x-cloak] {
    display: none !important;
}

.content-resource-video {
    width: 100%;
}

.content-resource-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.content-resource-video-frame iframe,
.content-resource-video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.content-resource-video-expand {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: none;
    background: rgba(0, 0, 0, .55);
    color: #fff;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease;
}

.content-resource-video-expand:hover {
    background: rgba(0, 0, 0, .8);
}

.content-resource-video-modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 14, 10, .85);
    padding: 24px;
}

/* Гарантируем, что стандартный <x-modal> для видео раскрывается
   на весь экран, а не в рамках родительского блока ресурса. */
.content-resource-video > .fixed.inset-0 {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    z-index: 1000 !important;
}

.content-resource-video-modal-inner {
    position: relative;
    width: min(90vw, 1280px);
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.content-resource-video-modal-inner iframe,
.content-resource-video-modal-inner video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

.content-resource-video-modal-close {
    z-index: 3;
}

.content-resource-link {
    color: #8b1f14;
    font-weight: 600;
    text-decoration: none;
}

.entry-preview-content .content-resource.content-resource-link {
    display: inline-block;
    padding: 0 5px;
}

.entry-preview-content .content-resource.content-resource-document {
    display: inline-block;
    padding: 0 10px;
}

.content-resource-icon {
    display: inline-block;
    color: #6b5848;
}

.entry-preview-content blockquote {
    margin: 0;
    padding: 10px 16px;
    border-left: 3px solid rgba(139, 31, 20, .5);
    background: rgba(255, 244, 221, .4);
    font-style: italic;
    color: #6b5848;
}

.admin-settings {
    display: grid;
    gap: 18px;
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid rgba(148, 105, 58, .24);
}

.admin-tab-panel .admin-settings {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

.admin-settings h2 {
    margin: 0;
    color: #2f251d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
}

.admin-settings-section {
    display: grid;
    gap: 16px;
    border: 1px solid rgba(148, 105, 58, .24);
    border-radius: 6px;
    background: rgba(255, 244, 221, .18);
    padding: 18px;
}

.admin-settings-label {
    margin: 0;
    color: #5d4c3c;
    font-size: 14px;
    font-weight: 700;
}

.admin-settings-repeat {
    display: grid;
    gap: 14px;
    border-top: 1px solid rgba(148, 105, 58, .18);
    padding-top: 16px;
}

.admin-settings-repeat:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.admin-settings-repeat > strong {
    color: #7a5a31;
    font-size: 13px;
}

.filter-button {
    min-width: 112px;
    justify-content: center;
    padding: 0 14px;
    font-size: 13px;
    letter-spacing: 0;
}

.filter-reset {
    min-width: 112px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 0 14px;
    border: 1px solid rgba(148, 105, 58, .36);
    border-radius: 6px;
    background: rgba(255, 244, 221, .62);
    color: #31251d;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .32);
}

.filter-reset:hover {
    color: #8b1f14;
    border-color: rgba(159, 112, 56, .52);
    background: rgba(255, 244, 221, .78);
    text-shadow: none;
}

.filter-reset:hover .filter-icon {
    background-color: #8b1f14;
}

.filter-icon,
.action-icon,
.program-icon {
    display: inline-block;
    flex: 0 0 auto;
    background-color: #9b6b33;
    -webkit-mask: var(--icon) center / contain no-repeat;
    mask: var(--icon) center / contain no-repeat;
}

.filter-icon {
    width: 16px;
    height: 16px;
}

.icon-filter {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 5h16v2H4V5Zm3 6h10v2H7v-2Zm3 6h4v2h-4v-2Z'/%3E%3Cpath fill='%23000' d='M8 3h2v6H8V3Zm6 6h2v6h-2V9Zm-3 6h2v6h-2v-6Z'/%3E%3C/svg%3E");
}

.icon-search {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10.5 4a6.5 6.5 0 0 1 5.2 10.4l4 4-1.4 1.4-4-4A6.5 6.5 0 1 1 10.5 4Zm0 2a4.5 4.5 0 1 0 0 9 4.5 4.5 0 0 0 0-9Z'/%3E%3C/svg%3E");
}

.icon-reset {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 4a8 8 0 0 1 7.6 5.5l-1.9.6A6 6 0 0 0 7.8 7.8L10 10H4V4l2.3 2.3A7.9 7.9 0 0 1 12 4Zm0 16a8 8 0 0 1-7.6-5.5l1.9-.6a6 6 0 0 0 9.9 2.3L14 14h6v6l-2.3-2.3A7.9 7.9 0 0 1 12 20Z'/%3E%3C/svg%3E");
}

.applications-table-wrap {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.applications-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
    color: var(--ink);
}

.applications-table th,
.applications-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
}

.applications-table th {
    color: #34271e;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}

.applications-table th:first-child,
.applications-table td:first-child {
    padding-left: 26px;
}

.applications-table th:last-child,
.applications-table td:last-child {
    width: 172px;
    padding-right: 22px;
}

.applications-table tr:last-child td {
    border-bottom: 0;
}

.applicant {
    display: grid;
    grid-template-columns: 58px minmax(180px, 1fr);
    align-items: center;
    gap: 16px;
}

.applicant-link {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: 58px minmax(180px, 1fr);
    align-items: center;
    gap: 16px;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
}

.applicant-link:hover strong {
    color: #8b1f14;
}

.applicant-link:hover .applicant-avatar {
    border-color: rgba(139, 31, 20, .34);
    box-shadow: 0 8px 18px rgba(58, 35, 16, .12);
}

.applicant-link:focus-visible {
    outline: 0;
    box-shadow: none;
}

.applicant-link-body {
    min-width: 0;
}

.applicant-avatar {
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(109, 76, 38, .2);
    border-radius: 50%;
    background:
        radial-gradient(circle at 35% 26%, rgba(255, 235, 198, .85), transparent 26%),
        linear-gradient(145deg, #33261c, #a18258);
    color: #f8ead0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.applicant strong,
.program-cell strong {
    display: block;
    color: #1f1914;
    font-size: 15px;
    font-weight: 600;
}

.applicant span,
.program-cell span,
.request-date span {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.applicant span + span {
    margin-top: 3px;
}

.program-cell {
    max-width: 310px;
}

.program-cell.wide {
    max-width: 380px;
}

.program-kind {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

.program-icon {
    width: 15px;
    height: 15px;
}

.program-kind.course .program-icon {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M6 3h12v18H6V3Zm2 2v14h8V5H8Zm2 3h4v2h-4V8Zm0 4h4v2h-4v-2Z'/%3E%3C/svg%3E");
}

.program-kind.practice .program-icon {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3a3 3 0 1 1 0 6 3 3 0 0 1 0-6ZM7 11h10l3 8h-3l-1.7-5H14v7h-4v-7H8.7L7 19H4l3-8Z'/%3E%3C/svg%3E");
}

.program-kind.club .program-icon {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 3 5 8v13h14V8l-7-5Zm0 2.4L17 9v10H7V9l5-3.6ZM9 11h6v2H9v-2Zm0 4h6v2H9v-2Z'/%3E%3C/svg%3E");
}

.request-date {
    display: grid;
    gap: 4px;
}

.request-date span {
    color: #2f251d;
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    height: 28px;
    padding: 0 12px;
    border: 1px solid #a73a2c;
    border-radius: 5px;
    color: #9d281b;
    background: rgba(255, 246, 227, .46);
    font-size: 12px;
    font-weight: 700;
}

.status-pill.is-active {
    border-color: #7a6b2c;
    color: #5d511f;
    background: rgba(214, 191, 106, .2);
}

.status-pill.is-muted {
    border-color: rgba(111, 89, 62, .36);
    color: #766652;
    background: rgba(244, 231, 204, .34);
}

.permission-stack {
    display: flex;
    max-width: 280px;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 6px;
}

.permission-pill {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border: 1px solid rgba(151, 105, 54, .32);
    border-radius: 5px;
    background: rgba(255, 244, 221, .42);
    color: #5e4326;
    font-size: 11px;
    font-weight: 700;
}

.muted-text {
    display: inline-block;
    color: var(--muted);
    font-size: 12px;
}

.metric-cell {
    display: grid;
    gap: 4px;
}

.metric-cell strong {
    color: #1f1914;
    font-size: 20px;
    line-height: 1;
}

.metric-cell span {
    color: var(--muted);
    font-size: 12px;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.row-actions form {
    margin: 0;
}

.row-actions button,
.row-action-link {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(159, 112, 56, .45);
    border-radius: 6px;
    background: rgba(255, 243, 220, .38);
    padding: 0;
}

.notification-nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.notification-nav-item > a {
    flex: 1 1 auto;
    min-width: 0;
    padding-right: 42px;
}

.notification-counter {
    position: absolute;
    top: 50%;
    right: 18px;
    z-index: 21;
    transform: translateY(-50%);
}

.notification-counter-button {
    min-width: 0;
    height: auto;
    display: inline-flex;
    border: 0;
    border-radius: 999px;
    background: transparent;
    padding: 0;
    letter-spacing: 0;
    overflow: visible;
}

.notification-counter-button:hover {
    box-shadow: none;
    transform: none;
}

.notification-popover {
    position: absolute;
    left: calc(100% - 10px);
    top: -8px;
    z-index: 20;
    width: 320px;
    display: none;
    overflow: hidden;
    border: 1px solid rgba(148, 105, 58, .38);
    border-radius: 8px;
    background:
        linear-gradient(180deg, rgba(255, 248, 233, .92), rgba(245, 225, 190, .86)),
        rgba(249, 235, 209, .96);
    box-shadow: 0 18px 34px rgba(54, 34, 15, .18);
}

.notification-counter:hover .notification-popover,
.notification-counter:focus-within .notification-popover {
    display: block;
}

.notification-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(154, 112, 64, .22);
}

.notification-popover-head strong {
    color: #2f251d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 16px;
}

.notification-popover-head button {
    border: 0;
    border-radius: 5px;
    padding: 5px 8px;
    color: #8b1f14;
    font-size: 12px;
    letter-spacing: 0;
}

/* Mark all as read — animated broom */
.mark-all-broom {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 36px;
    height: 40px;
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.mark-all-broom img {
    width: 28px;
    height: 34px;
    object-fit: contain;
    mix-blend-mode: multiply;
    transform-origin: 80% 90%;
    animation: broom-sweep 2.4s linear infinite;
}

@keyframes broom-sweep {
    0%   { transform: translate(2px, 0)     rotate(14deg); }
    12.5%{ transform: translate(6px, -1px)  rotate(8deg); }
    25%  { transform: translate(10px, -3px) rotate(2deg); }
    37.5%{ transform: translate(8px, -4.5px) rotate(-4deg); }
    50%  { transform: translate(4px, -5px)  rotate(-10deg); }
    62.5%{ transform: translate(-2px, -4px) rotate(-4deg); }
    75%  { transform: translate(-6px, -2px) rotate(2deg); }
    87.5%{ transform: translate(-2px, -1px) rotate(8deg); }
    100% { transform: translate(2px, 0)     rotate(14deg); }
}

.mark-all-broom .dust {
    position: absolute;
    bottom: 8px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #cbb89a;
    opacity: 0;
    animation: broom-dust 1.3s ease-in infinite;
}

.mark-all-broom .dust:nth-of-type(2) { left: 10px; animation-delay: 0s; }
.mark-all-broom .dust:nth-of-type(3) { left: 18px; animation-delay: .2s; }
.mark-all-broom .dust:nth-of-type(4) { left: 26px; animation-delay: .4s; }

@keyframes broom-dust {
    0%   { opacity: 0; transform: translate(0, 0) scale(1); }
    15%  { opacity: 1; }
    100% { opacity: 0; transform: translate(-16px, -14px) scale(.4); }
}

.mark-all-broom:hover img {
    animation-duration: .5s;
}

.notification-popover-list {
    max-height: 310px;
    overflow-y: auto;
}

.notification-preview {
    display: grid !important;
    grid-template-columns: 8px 1fr;
    align-items: flex-start !important;
    gap: 10px !important;
    padding: 11px 14px !important;
    border-bottom: 1px solid rgba(154, 112, 64, .16);
    background: transparent !important;
}

.notification-preview:hover {
    background: rgba(255, 244, 221, .56) !important;
}

.notification-preview-dot {
    width: 8px;
    height: 8px;
    margin-top: 6px;
    border-radius: 50%;
    background: rgba(120, 91, 54, .32);
}

.notification-preview.is-unread .notification-preview-dot {
    background: #8b1f14;
}

.notification-preview strong,
.notification-preview small,
.notification-preview em {
    display: block;
}

.notification-preview strong {
    color: #2f251d;
    font-size: 13px;
    line-height: 1.25;
}

.notification-preview small {
    margin-top: 4px;
    color: #6d5d4e;
    font-size: 12px;
    line-height: 1.35;
}

.notification-preview em {
    margin-top: 5px;
    color: #9a7a54;
    font-size: 11px;
    font-style: normal;
}

.notification-empty {
    padding: 18px 14px;
    color: #6d5d4e;
    font-size: 13px;
}

.notification-popover-all {
    display: flex !important;
    justify-content: center;
    padding: 10px 14px !important;
    border-top: 1px solid rgba(154, 112, 64, .22);
    color: #8b1f14 !important;
    font-size: 12px !important;
    font-weight: 700;
}

.side-nav-form {
    margin: 0;
}

.side-nav-form button {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 9px;
    border: 0;
    border-radius: 0;
    background: transparent;
    padding: 4px 12px;
    color: #5c4f45;
    font-size: 13px;
    letter-spacing: 0;
    text-align: left;
    overflow: visible;
}

.side-nav-form button:hover {
    color: var(--accent-red);
    background-color: #f1e9da;
    box-shadow: none;
    filter: none;
    font-weight: bold;
    transform: none;
}

.side-nav-form button:hover .side-icon {
    background-color: var(--accent-red);
}

.action-icon {
    width: 18px;
    height: 18px;
}

.icon-check {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m9 16.2-3.5-3.5L4 14.2 9 19 20.5 7.5 19 6 9 16.2Z'/%3E%3C/svg%3E");
}

.icon-eye {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 5c5 0 8.5 4.5 10 7-1.5 2.5-5 7-10 7s-8.5-4.5-10-7c1.5-2.5 5-7 10-7Zm0 2c-3.4 0-6.1 2.7-7.6 5 1.5 2.3 4.2 5 7.6 5s6.1-2.7 7.6-5C18.1 9.7 15.4 7 12 7Zm0 2.2a2.8 2.8 0 1 1 0 5.6 2.8 2.8 0 0 1 0-5.6Z'/%3E%3C/svg%3E");
}

.icon-runs {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.5a2.45 2.45 0 1 1 0 4.9 2.45 2.45 0 0 1 0-4.9ZM8.55 8.2c.55-.2 1.08.13 1.26.63.25.7.83 1.1 2.19 1.1s1.94-.4 2.19-1.1c.18-.5.71-.83 1.26-.63.54.2.82.8.64 1.35-.31.9-.9 1.5-1.7 1.86 1.12 1.1 2.62 1.68 4.5 1.68.3 0 .58-.1.82-.27.49-.36 1.19-.28 1.57.19.38.48.3 1.17-.17 1.56-.62.52-1.38.78-2.22.78-.98 0-1.9-.13-2.75-.39v2.2h4.5v3.6h-2.15v-1.45h-4.5v-4.95c-.35-.2-.68-.42-.99-.66v3.46h-2v-3.46c-.31.24-.64.46-.99.66v4.95h-4.5v1.45H3.36v-3.6h4.5v-2.2c-.85.26-1.77.39-2.75.39-.84 0-1.6-.26-2.22-.78a1.08 1.08 0 0 1-.17-1.56c.38-.47 1.08-.55 1.57-.19.24.17.52.27.82.27 1.88 0 3.38-.58 4.5-1.68-.8-.36-1.39-.96-1.7-1.86-.18-.55.1-1.15.64-1.35ZM5.2 20.15a1.95 1.95 0 1 1 0 3.9 1.95 1.95 0 0 1 0-3.9Zm6.8 0a1.95 1.95 0 1 1 0 3.9 1.95 1.95 0 0 1 0-3.9Zm6.8 0a1.95 1.95 0 1 1 0 3.9 1.95 1.95 0 0 1 0-3.9Z'/%3E%3C/svg%3E");
}

.icon-requests {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 3h14v18H5V3Zm2 2v14h10V5H7Zm2 3h6v2H9V8Zm0 4h6v2H9v-2Zm0 4h4v2H9v-2Z'/%3E%3Cpath fill='%23000' d='m15.8 15.2 1.4 1.4 3.6-3.6-1.4-1.4-2.2 2.2-.8-.8-1.4 1.4.8.8Z'/%3E%3C/svg%3E");
}

.icon-payments {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M4 5h16a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V7a2 2 0 0 1 2-2Zm0 4h16V7H4v2Zm0 2v6h16v-6H4Zm2 3h5v2H6v-2Zm9.5-1.5a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Zm3 0a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3Z'/%3E%3C/svg%3E");
}

.icon-lessons {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 4h11a3 3 0 0 1 3 3v13H7a2 2 0 0 1-2-2V4Zm2 2v10.2c.3-.1.6-.2 1-.2h9V7a1 1 0 0 0-1-1H7Zm1 12a1 1 0 0 0 0 2h9v-2H8Zm1-9h6v2H9V9Zm0 4h5v2H9v-2Z'/%3E%3C/svg%3E");
}

.icon-users {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M9 4a4 4 0 1 1 0 8A4 4 0 0 1 9 4Zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm0 8c2.67 0 8 1.33 8 4v2H1v-2c0-2.67 5.33-4 8-4Zm0 2c-2.97 0-6 1.46-6 2v.5h12V18c0-.54-3.03-2-6-2Zm7-8a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 2a2 2 0 1 0 0 4 2 2 0 0 0 0-4Zm1 8c-.36 0-.73.03-1.08.07A5.98 5.98 0 0 1 17 18c0-.68-.13-1.32-.36-1.91.12-.03.24-.09.36-.09 2.48 0 5 1.22 5 2v.5h-4V20Z'/%3E%3C/svg%3E");
}

.icon-edit {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16.86 3.5a2.1 2.1 0 0 1 2.97 0l.67.67a2.1 2.1 0 0 1 0 2.97L8.72 18.92 4 20l1.08-4.72L16.86 3.5Zm1.55 2.22-.13-.13L16.9 6.97l.13.13 1.38-1.38ZM7.02 16.32l-.35 1.01 1.01-.35 7.93-7.93-.66-.66-7.93 7.93Z'/%3E%3C/svg%3E");
}

.icon-impersonate {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M10 4a4 4 0 1 1 0 8 4 4 0 0 1 0-8Zm0 10c3.3 0 6 2.2 6 5v1H4v-1c0-2.8 2.7-5 6-5Zm7.6-9.4L22 9l-4.4 4.4-1.4-1.4 2-2H14V8h4.2l-2-2 1.4-1.4Z'/%3E%3C/svg%3E");
}

.icon-more {
    --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M5 10a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm7 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Zm7 0a2 2 0 1 1 0 4 2 2 0 0 1 0-4Z'/%3E%3C/svg%3E");
}


/* dropdown меню "Ещё" в строке таблицы */
.row-more-wrap {
    position: relative;
}

.row-more-dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 50;
    background: var(--color-bg, #fdf5e6);
    border: 1px solid var(--color-border, rgba(150,100,50,.25));
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,.12);
    min-width: 180px;
    padding: 4px 0;
}

.row-more-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 8px 14px;
    font-size: 13px;
    color: var(--color-text, #2b1a0e);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: background .12s;
}

.row-more-item:hover {
    background: var(--color-accent-light, rgba(180,120,50,.1));
}

.impersonation-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid rgba(139, 31, 20, .28);
    background: rgba(255, 244, 221, .92);
    padding: 10px 36px;
    color: #34271e;
    box-shadow: 0 8px 18px rgba(58, 35, 16, .08);
}

.impersonation-bar-info {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px;
}

.impersonation-bar strong {
    color: #8b1f14;
    font-size: 13px;
}

.impersonation-bar span {
    color: #6d5d4e;
    font-size: 12px;
}

.impersonation-password-status {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(148, 105, 58, .34);
    border-radius: 999px;
    padding: 4px 10px;
    background: rgba(255, 248, 233, .72);
    font-weight: 600;
    line-height: 1;
}

.impersonation-password-status.is-set {
    border-color: rgba(59, 112, 61, .3);
    background: rgba(231, 243, 224, .72);
    color: #315f33;
}

.impersonation-password-status.is-missing {
    border-color: rgba(139, 31, 20, .3);
    background: rgba(255, 232, 224, .72);
    color: #8b1f14;
}

.impersonation-bar form {
    margin: 0;
}

.admin-request-modal-window {
    width: min(860px, calc(100vw - 32px)) !important;
    max-width: min(860px, calc(100vw - 32px)) !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.admin-user-modal-window {
    width: min(980px, calc(100vw - 32px)) !important;
    max-width: min(980px, calc(100vw - 32px)) !important;
    overflow: visible !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.request-modal-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-height: min(760px, calc(100vh - 56px));
    overflow: auto;
    border: 1px solid rgba(148, 105, 58, .44);
    border-radius: 10px;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .5), transparent 46%),
        linear-gradient(90deg, rgba(119, 69, 26, .12), transparent 12%, rgba(255, 255, 255, .2) 50%, transparent 88%, rgba(119, 69, 26, .11)),
        linear-gradient(180deg, rgba(255, 248, 233, .94), rgba(247, 229, 195, .92)),
        url('/images/dao/paper-texture.png') center / 420px auto repeat,
        rgba(249, 235, 209, .96);
    box-shadow: 0 26px 80px rgba(24, 18, 13, .34);
    padding: 30px 34px 28px;
    color: #34271e;
}

.request-modal-close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 46px;
    height: 46px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(148, 105, 58, .34);
    border-radius: 999px;
    background:
        radial-gradient(circle at 50% 38%, rgba(255, 255, 255, .55), transparent 54%),
        rgba(255, 247, 232, .74);
    color: #8b1f14;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
    perspective: 420px;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease, text-shadow .2s ease;
}

.request-modal-close:hover {
    transform: translateY(-1px);
    color: #6f2a17;
    border-color: rgba(139, 31, 20, .42);
    background: rgba(255, 241, 214, .92);
    box-shadow: 0 8px 18px rgba(58, 35, 16, .12);
    text-shadow: 0 0 12px rgba(161, 106, 50, .5);
}

.request-modal-close-icon {
    display: inline-block;
    backface-visibility: visible;
    transform-origin: center;
    transform-style: preserve-3d;
    transform: perspective(420px) translate3d(0, 0, 0) rotate(0deg) scale(1);
    will-change: transform, filter, opacity;
}

.request-modal-close:hover .request-modal-close-icon:not(.is-leaving) {
    animation: crossed-swords-close 1.65s linear forwards;
}

.request-modal-close-icon.is-leaving {
    animation: crossed-swords-return .96s linear both;
}

@keyframes crossed-swords-close {
    0% {
        filter: blur(0);
        opacity: 1;
        transform: perspective(420px) translate3d(0, 0, 0) rotate3d(1, 1, 0, 0deg) scale(1);
    }

    8% {
        filter: blur(.1px);
        opacity: .98;
        transform: perspective(420px) translate3d(4px, -2px, -38px) rotate3d(1, 1, 0, 60deg) scale(.94);
    }

    16% {
        filter: blur(.25px);
        opacity: .93;
        transform: perspective(420px) translate3d(8px, -5px, -92px) rotate3d(1, 1, 0, 120deg) scale(.82);
    }

    24% {
        filter: blur(.45px);
        opacity: .86;
        transform: perspective(420px) translate3d(9px, -9px, -145px) rotate3d(1, 1, 0, 180deg) scale(.7);
    }

    32% {
        filter: blur(.7px);
        opacity: .74;
        transform: perspective(420px) translate3d(6px, -12px, -205px) rotate3d(1, 1, 0, 250deg) scale(.57);
    }

    40% {
        filter: blur(1.1px);
        opacity: .58;
        transform: perspective(420px) translate3d(0, -13px, -260px) rotate3d(1, 1, 0, 320deg) scale(.46);
    }

    48% {
        filter: blur(1px);
        opacity: .6;
        transform: perspective(420px) translate3d(-6px, -11px, -250px) rotate(64deg) rotate3d(-1, 1, 0, 55deg) scale(.48);
    }

    56% {
        filter: blur(.9px);
        opacity: .66;
        transform: perspective(420px) translate3d(-8px, -5px, -220px) rotate(112deg) rotate3d(-1, 1, 0, 120deg) scale(.56);
    }

    64% {
        filter: blur(.5px);
        opacity: .78;
        transform: perspective(420px) translate3d(-8px, 2px, -170px) rotate(150deg) rotate3d(-1, 1, 0, 180deg) scale(.67);
    }

    72% {
        filter: blur(.35px);
        opacity: .88;
        transform: perspective(420px) translate3d(-5px, 7px, -105px) rotate(180deg) rotate3d(-1, 1, 0, 235deg) scale(.78);
    }

    82% {
        filter: blur(.2px);
        opacity: .96;
        transform: perspective(420px) translate3d(5px, 7px, -42px) rotate(180deg) rotate3d(-1, 1, 0, 280deg) scale(.96);
    }

    92% {
        filter: blur(.08px);
        opacity: 1;
        transform: perspective(420px) translate3d(3px, 3px, -12px) rotate(180deg) rotate3d(-1, 1, 0, 330deg) scale(1.04);
    }

    100% {
        filter: blur(0);
        opacity: 1;
        transform: perspective(420px) translate3d(0, 0, 0) rotate(180deg) rotate3d(-1, 1, 0, 360deg) scale(1.08);
    }
}

@keyframes crossed-swords-return {
    0% {
        filter: blur(0);
        opacity: 1;
        transform: perspective(420px) translate3d(0, 0, 0) rotate(180deg) scale(1.08);
    }

    76% {
        filter: blur(0);
        opacity: 1;
        transform: perspective(420px) translate3d(0, 0, 0) rotate(360deg) scale(1);
    }

    84% {
        transform: perspective(420px) translate3d(0, 0, 0) rotate(356deg) scale(1);
    }

    92% {
        transform: perspective(420px) translate3d(0, 0, 0) rotate(362deg) scale(1);
    }

    100% {
        filter: blur(0);
        opacity: 1;
        transform: perspective(420px) translate3d(0, 0, 0) rotate(360deg) scale(1);
    }
}

.request-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid rgba(154, 112, 64, .22);
    padding: 0 42px 18px 0;
}

.request-modal-header h2 {
    margin: 0 0 6px;
    color: #2f251d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 24px;
}

.request-modal-header p {
    margin: 0;
    color: #6d5d4e;
    font-size: 13px;
}

.request-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 16px 20px;
    padding: 20px 0;
}

.request-modal-grid div,
.request-modal-message {
    border: 1px solid rgba(148, 105, 58, .2);
    border-radius: 6px;
    background: rgba(255, 244, 221, .35);
    padding: 12px 14px;
}

.request-modal-grid span,
.request-modal-message span {
    display: block;
    margin-bottom: 7px;
    color: #8a6d47;
    font-size: 12px;
    font-weight: 700;
}

.request-modal-grid strong,
.request-modal-grid small {
    display: block;
}

.request-modal-grid strong {
    color: #2f251d;
    font-size: 14px;
}

.request-modal-grid small {
    margin-top: 4px;
    color: #6d5d4e;
    font-size: 12px;
}

.request-modal-message {
    margin-top: 14px;
}

.request-modal-message p {
    margin: 0;
    color: #3b3028;
    font-size: 14px;
    line-height: 1.55;
}

.request-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
}

.request-modal-actions form {
    margin: 0;
}

@media (max-width: 720px) {
    .request-modal-card {
        max-height: calc(100vh - 32px);
        padding: 24px 18px 20px;
    }

    .request-modal-close {
        top: 12px;
        right: 14px;
        width: 40px;
        height: 40px;
    }

    .request-modal-header {
        display: grid;
        padding-right: 48px;
    }

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

    .request-modal-actions {
        justify-content: stretch;
        flex-direction: column;
    }

    .request-modal-actions button {
        width: 100%;
        justify-content: center;
    }
}

.user-modal-card {
    width: 100%;
}

.user-modal-form {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.user-modal-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #34271e;
    font-size: 14px;
}

.user-contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    gap: 10px 14px;
}

.user-contact-list div,
.user-permissions-grid label {
    border: 1px solid rgba(148, 105, 58, .18);
    border-radius: 5px;
    background: rgba(255, 255, 255, .2);
    padding: 9px 10px;
}

.user-contact-list strong,
.user-contact-list span {
    display: block;
}

.user-contact-list strong {
    color: #7a5a31;
    font-size: 12px;
}

.user-contact-list span {
    margin-top: 3px;
    color: #2f251d;
    font-size: 13px;
}

.user-permissions-groups {
    display: grid;
    gap: 14px;
}

.user-permission-group {
    border: 1px solid rgba(148, 105, 58, .28);
    border-radius: 7px;
    background: rgba(255, 248, 235, .28);
    padding: 12px;
}

.user-permission-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    cursor: pointer;
    list-style: none;
}

.user-permission-group summary::-webkit-details-marker {
    display: none;
}

.user-permission-group summary::after {
    content: '';
    width: 9px;
    height: 9px;
    margin-right: 4px;
    border: solid #8b1f14;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    transition: transform .16s ease;
}

.user-permission-group[open] summary::after {
    transform: rotate(225deg);
}

.user-permission-group summary > span {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    border: 1px solid rgba(139, 31, 20, .22);
    border-radius: 999px;
    background: rgba(139, 31, 20, .08);
    padding: 0 11px;
    color: #7d261d;
    font-size: 12px;
    font-weight: 800;
}

.user-permission-group summary > small {
    margin-right: auto;
    color: #7a6958;
    font-size: 12px;
    font-weight: 700;
}

.user-permissions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 10px;
}

.user-permissions-grid label {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 8px;
    align-items: center;
}

.user-permissions-grid input {
    grid-row: auto;
}

.user-permissions-grid span {
    color: #2f251d;
    font-size: 13px;
    font-weight: 700;
}

.inactive-account-panel {
    min-height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 42px 24px;
}

.inactive-account-card {
    width: min(560px, 100%);
    display: grid;
    justify-items: center;
    gap: 14px;
    border: 1px solid rgba(148, 105, 58, .28);
    border-radius: 8px;
    background: rgba(255, 248, 235, .45);
    padding: 34px 28px;
    text-align: center;
}

.inactive-account-card h2 {
    margin: 0;
    color: #2f251d;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 28px;
}

.inactive-account-card p {
    max-width: 410px;
    margin: 0;
    color: #6d5d4e;
    font-size: 14px;
    line-height: 1.55;
}

.inactive-account-actions {
    margin-top: 8px;
}

.inactive-account-actions form {
    margin: 0;
}


.applications-empty {
    padding: 62px 24px;
    border-top: 1px solid var(--line);
    text-align: center;
}

.applications-empty h2 {
    margin-bottom: 8px;
    color: #2f251d;
    font-size: 20px;
}

.applications-empty p {
    color: var(--muted);
    font-size: 13px;
}

.applications-footer {
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 10px 20px;
    color: #30251d;
    font-size: 13px;
}

.applications-pagination {
    display: flex;
    align-items: center;
    gap: 16px;
}

.applications-pagination > span {
    min-width: 138px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(159, 112, 56, .36);
    border-radius: 6px;
    background: rgba(255, 244, 221, .42);
}

.applications-pagination nav > div:first-child {
    display: none;
}

.applications-pagination nav > div:last-child {
    display: flex;
    align-items: center;
    gap: 8px;
}

.applications-pagination nav p {
    display: none;
}

.applications-pagination nav span,
.applications-pagination nav a {
    box-shadow: none !important;
}

.applications-pagination nav a,
.applications-pagination nav span[aria-current] span,
.applications-pagination nav span[aria-disabled="true"] span {
    min-width: 36px;
    height: 36px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(159, 112, 56, .36) !important;
    border-radius: 6px !important;
    background: rgba(255, 244, 221, .42) !important;
    color: #6a4a25 !important;
    font-size: 13px;
}

.applications-pagination nav span[aria-current] span {
    border-color: #a16c31 !important;
    background: #a16c31 !important;
    color: #fff3d8 !important;
}

@media (max-width: 1180px) {
    .applications-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .applications-tabs {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .applications-filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
}

@media (max-width: 760px) {
    .applications-hero h1 {
        font-size: 22px;
    }

    .applications-panel {
        border-radius: 6px;
    }

    .applications-toolbar,
    .applications-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .filter-control,
    .filter-button,
    .filter-reset,
    .filter-date {
        width: 100%;
        min-width: 0;
    }

    .admin-edit-form {
        padding: 0 14px 22px;
    }

    .admin-form-notice {
        margin: 18px 14px 0;
    }

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

    .admin-tabs {
        margin-bottom: 18px;
    }

    .admin-tab {
        min-width: 124px;
        min-height: 46px;
        padding: 0 16px;
        font-size: 14px;
    }

    .admin-tab-panel {
        padding: 18px 0 0 12px;
    }

    .applications-footer,
    .applications-pagination {
        align-items: stretch;
        flex-direction: column;
    }
}
