:root {
    --bg: #eef4ff;
    --bg-deep: #d9e7ff;
    --panel: rgba(255, 255, 255, 0.88);
    --panel-strong: #ffffff;
    --line: rgba(36, 85, 180, 0.14);
    --line-strong: rgba(36, 85, 180, 0.24);
    --text: #163050;
    --muted: #5d7699;
    --brand: #1163ff;
    --brand-strong: #0d4dd9;
    --brand-soft: #e9f1ff;
    --danger: #d63d57;
    --danger-soft: #ffe9ee;
    --success: #13885c;
    --success-soft: #e9fff4;
    --warning: #d97706;
    --warning-soft: #fff3dc;
    --shadow: 0 28px 70px rgba(17, 68, 160, 0.14);
    --radius-xl: 30px;
    --radius-lg: 22px;
    --radius-md: 18px;
    --radius-sm: 14px;
}

/* Member portal */
.member-portal-page {
    max-width: 1540px;
}

.member-list-switcher {
    margin-bottom: 18px;
    padding: 16px 18px;
}

.member-list-switcher form {
    display: grid;
    grid-template-columns: minmax(140px, 220px) minmax(220px, 420px);
    align-items: center;
    gap: 14px;
}

.member-list-switcher label {
    margin: 0;
}

.member-status-card {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(240px, .8fr) minmax(0, 2fr);
    gap: 30px;
    margin-bottom: 20px;
    padding: clamp(24px, 3vw, 38px);
    color: #f8fbff;
    border: 1px solid rgba(135, 169, 211, .3);
    border-radius: 28px;
    background:
        radial-gradient(circle at 85% 10%, rgba(90, 153, 228, .25), transparent 34%),
        linear-gradient(135deg, #0b1b30 0%, #102b4b 58%, #123d5c 100%);
    box-shadow: 0 24px 55px rgba(20, 47, 80, .16);
}

.member-status-card::after {
    content: "";
    position: absolute;
    right: -80px;
    bottom: -120px;
    width: 300px;
    height: 300px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
}

.member-status-copy,
.member-kpi-grid,
.member-invoice-total {
    position: relative;
    z-index: 1;
}

.member-status-copy .eyebrow,
.member-status-copy p {
    color: #bcd1ea;
}

.member-status-copy p {
    margin: 8px 0 0;
}

.member-status-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.member-status-heading h2 {
    margin: 4px 0 0;
    color: #fff;
    font-size: clamp(1.55rem, 2.5vw, 2.3rem);
}

.member-kpi-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(105px, 1fr));
    align-items: center;
    gap: 12px;
}

.member-kpi-grid > div {
    min-width: 0;
    padding: 15px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 16px;
    background: rgba(255, 255, 255, .06);
}

.member-kpi-grid span,
.member-kpi-grid strong,
.member-invoice-total span,
.member-invoice-total strong {
    display: block;
}

.member-kpi-grid span,
.member-invoice-total span {
    margin-bottom: 5px;
    color: #bcd1ea;
    font-size: .78rem;
}

.member-kpi-grid strong {
    overflow-wrap: anywhere;
    color: #fff;
    font-size: .98rem;
}

.member-progress {
    position: absolute;
    right: 38px;
    bottom: 18px;
    left: 38px;
    z-index: 1;
    height: 4px;
    overflow: hidden;
    border-radius: 20px;
    background: rgba(255, 255, 255, .12);
}

.member-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #6eb8d9;
}

.member-badge,
.member-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid #cbd9e9;
    border-radius: 999px;
    color: #31506e;
    background: #eef5fb;
    font-size: .78rem;
    font-weight: 750;
    white-space: nowrap;
}

.member-status-card .member-badge {
    border-color: rgba(255, 255, 255, .2);
    color: #fff;
    background: rgba(255, 255, 255, .1);
}

.member-badge-active,
.member-badge-paid {
    border-color: #b7ddcd;
    color: #176044;
    background: #e7f5ef;
}

.member-badge-expiring,
.member-badge-partial,
.member-badge-sent,
.member-badge-review,
.member-badge-pending {
    border-color: #ead6a8;
    color: #765411;
    background: #fff7df;
}

.member-badge-expired,
.member-badge-overdue,
.member-badge-cancelled,
.member-badge-rejected {
    border-color: #efc6c3;
    color: #8a322d;
    background: #fff0ee;
}

.member-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.member-section {
    min-width: 0;
    margin-bottom: 20px;
}

.member-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.member-section-head h2 {
    margin: 3px 0 0;
    font-size: 1.28rem;
}

.member-empty-compact {
    padding: 18px;
    border: 1px dashed #cad7e6;
    border-radius: 15px;
    color: #63758a;
    background: #f8fbfe;
}

.member-task-list,
.member-card-list,
.member-document-list,
.member-activity-list,
.member-timeline {
    display: grid;
    gap: 10px;
}

.member-task {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid #d8e2ed;
    border-radius: 15px;
    color: inherit;
    background: #fbfdff;
    text-decoration: none;
}

.member-task small,
.member-document-list small {
    display: block;
    margin-top: 3px;
    color: #718298;
}

.member-task-dot,
.member-timeline-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #d29a28;
    box-shadow: 0 0 0 5px rgba(210, 154, 40, .12);
}

.member-task-info .member-task-dot {
    background: #4b84b6;
    box-shadow: 0 0 0 5px rgba(75, 132, 182, .12);
}

.member-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.member-detail-grid > div {
    min-width: 0;
    padding: 14px;
    border: 1px solid #d8e2ed;
    border-radius: 14px;
    background: #fbfdff;
}

.member-detail-grid dt {
    margin-bottom: 5px;
    color: #718298;
    font-size: .78rem;
}

.member-detail-grid dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-weight: 700;
}

.member-information {
    margin-top: 14px;
    padding: 14px 16px;
    border-left: 3px solid #7ca7d4;
    color: #405b78;
    background: #f4f8fc;
}

.member-information > :first-child {
    margin-top: 0;
}

.member-information > :last-child {
    margin-bottom: 0;
}

.member-information a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    margin-top: 6px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #fff;
    background: #d88900;
    font-weight: 700;
    text-decoration: none;
}

.member-information a:hover,
.member-information a:focus-visible {
    background: #bb7500;
}

.member-profile-percent {
    color: #173c62;
    font-size: 1.45rem;
}

.member-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.member-chip-list span {
    padding: 6px 10px;
    border-radius: 999px;
    color: #765411;
    background: #fff5dc;
    font-size: .8rem;
}

.member-section-actions {
    margin-top: 18px;
}

.partner-membership-overview {
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
}

.partner-profile-summary {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

.partner-profile-avatar {
    display: grid;
    flex: 0 0 92px;
    width: 92px;
    height: 92px;
    overflow: hidden;
    place-items: center;
    border: 1px solid #d7e2ee;
    border-radius: 24px;
    color: #31506e;
    background: #eef5fb;
    font-size: 1.8rem;
    font-weight: 800;
}

.partner-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.partner-profile-copy {
    min-width: 0;
}

.partner-profile-copy h3 {
    margin: 0 0 5px;
    overflow-wrap: anywhere;
    font-size: 1.3rem;
}

.partner-profile-copy p {
    margin: 0 0 10px;
    color: #718298;
}

.partner-membership-remaining {
    margin: 14px 0 0;
    color: #526b86;
    font-size: .88rem;
    font-weight: 650;
}

.member-invoice-card {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(150px, auto) auto;
    align-items: center;
    gap: 20px;
    padding: 18px;
    border: 1px solid #d7e2ee;
    border-radius: 18px;
    background: #fbfdff;
}

.member-invoice-card h3 {
    margin: 9px 0 3px;
}

.member-invoice-card p,
.member-invoice-amount span {
    margin: 0;
    color: #718298;
    font-size: .86rem;
}

.member-invoice-amount strong {
    display: block;
    margin-bottom: 3px;
    color: #15395d;
    font-size: 1.15rem;
}

.member-timeline > div {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    padding: 10px 4px;
}

.member-timeline p {
    margin: 4px 0;
    color: #718298;
}

.member-document-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #d8e2ed;
    border-radius: 14px;
    color: inherit;
    background: #fbfdff;
    text-decoration: none;
}

.member-document-list svg,
.member-task svg {
    width: 20px;
    height: 20px;
}

.member-activity-list > div {
    display: grid;
    grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
    gap: 18px;
    padding: 11px 0;
    border-bottom: 1px solid #e1e9f1;
}

.member-activity-list time {
    color: #718298;
    font-size: .82rem;
}

.member-activity-accordion > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    list-style: none;
    cursor: pointer;
}

.member-activity-accordion > summary::-webkit-details-marker {
    display: none;
}

.member-activity-accordion > summary strong {
    display: block;
    margin-top: 3px;
    font-size: 1.28rem;
}

.member-activity-accordion > summary::after {
    content: "+";
    display: inline-grid;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    place-items: center;
    border: 1px solid #cad7e6;
    border-radius: 10px;
    color: #63758a;
}

.member-activity-accordion[open] > summary::after {
    content: "−";
}

.member-activity-content {
    margin-top: 18px;
}

.member-invoice-total {
    align-self: center;
    justify-self: end;
    text-align: right;
}

.member-invoice-total strong {
    color: #fff;
    font-size: clamp(1.6rem, 3vw, 2.6rem);
}

.member-invoice-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(90px, auto) minmax(120px, auto);
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid #e1e9f1;
}

.member-invoice-item p {
    margin: 4px 0 0;
    color: #718298;
}

html[data-theme="dark"] .member-task,
html[data-theme="dark"] .member-detail-grid > div,
html[data-theme="dark"] .member-invoice-card,
html[data-theme="dark"] .member-document-list a,
html[data-theme="dark"] .member-empty-compact,
html[data-theme="dark"] .partner-profile-avatar {
    border-color: #2a4059;
    color: #e8f0f8;
    background: #101d2d;
}

html[data-theme="dark"] .member-information {
    color: #c4d5e7;
    background: #12243a;
}

html[data-theme="dark"] .member-activity-accordion > summary::after {
    border-color: #2a4059;
    color: #c4d5e7;
}

html[data-theme="dark"] .member-profile-percent,
html[data-theme="dark"] .member-invoice-amount strong {
    color: #dceaff;
}

html[data-theme="dark"] .partner-profile-copy p,
html[data-theme="dark"] .partner-membership-remaining {
    color: #aebfd2;
}

html[data-theme="dark"] .member-badge {
    border-color: #3b536c;
    color: #d8e6f3;
    background: #172a3f;
}

@media (max-width: 1120px) {
    .member-status-card {
        grid-template-columns: 1fr;
    }

    .member-kpi-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .member-invoice-card {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .member-invoice-card .button-row {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .member-status-card,
    .member-section {
        border-radius: 20px;
    }

    .member-status-card {
        padding: 22px;
    }

    .member-kpi-grid,
    .member-dashboard-grid,
    .partner-membership-overview,
    .member-detail-grid,
    .member-invoice-card,
    .member-list-switcher form {
        grid-template-columns: 1fr;
    }

    .member-progress {
        right: 22px;
        left: 22px;
    }

    .member-invoice-card .button-row {
        grid-column: auto;
    }

    .member-invoice-card .button-row .btn {
        flex: 1 1 100%;
        min-height: 44px;
    }

    .member-activity-list > div,
    .member-invoice-item {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .member-invoice-total {
        justify-self: start;
        text-align: left;
    }
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0f1726;
    --bg-deep: #09111d;
    --panel: rgba(17, 27, 43, 0.92);
    --panel-strong: #162235;
    --line: rgba(152, 180, 226, 0.18);
    --line-strong: rgba(179, 201, 236, 0.34);
    --text: #edf3ff;
    --muted: #a6b7cf;
    --brand: #6a9dff;
    --brand-strong: #9fc0ff;
    --brand-soft: rgba(106, 157, 255, 0.18);
    --danger-soft: rgba(214, 61, 87, 0.14);
    --success-soft: rgba(19, 136, 92, 0.16);
    --warning-soft: rgba(217, 119, 6, 0.14);
    --shadow: 0 28px 70px rgba(3, 8, 18, 0.46);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(17, 99, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(8, 145, 178, 0.12), transparent 26%),
        linear-gradient(180deg, #f7fbff 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

html[data-theme="dark"] body {
    background:
        radial-gradient(circle at top left, rgba(94, 151, 255, 0.18), transparent 28%),
        radial-gradient(circle at top right, rgba(45, 212, 191, 0.1), transparent 26%),
        linear-gradient(180deg, #111a29 0%, var(--bg) 50%, var(--bg-deep) 100%);
}

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

img {
    max-width: 100%;
}

.app-shell {
    width: min(1880px, calc(100vw - 24px));
    max-width: none;
    margin: 0 auto;
    padding: 20px 12px 28px;
}

.app-shell.member-portal-page {
    width: min(1540px, calc(100vw - 24px));
}

.admin-page {
    display: grid;
    gap: 18px;
}

.admin-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: start;
}

.admin-stack {
    display: grid;
    gap: 18px;
}

.admin-lead-card,
.admin-aside-card {
    display: grid;
    gap: 16px;
}

.admin-lead-card .page-header {
    margin: 0;
}

.admin-aside-card {
    align-content: start;
}

.admin-aside-card .button-row {
    flex-direction: column;
    align-items: stretch;
}

.admin-aside-card .button-row > * {
    width: 100%;
}

.admin-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.surface,
.hero,
.panel,
.modal-card,
.login-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow);
}

.hero {
    display: block;
    padding: 22px 24px 24px;
    margin-bottom: 16px;
    position: relative;
    z-index: 21000;
    isolation: isolate;
    overflow: visible;
    text-align: center;
}

.hero-main {
    width: min(100%, 660px);
    margin: 0 auto;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.hero-brand {
    display: flex;
    gap: 18px;
    align-items: center;
}

.hero-brand-stacked {
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hero-logo-wrap {
    display: grid;
    place-items: center;
    min-height: 62px;
}

.brand-mark,
.brand-logo {
    width: min(100%, 180px);
    min-width: 96px;
    height: 62px;
    border-radius: 0;
    background: transparent;
    border: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}

.brand-logo img {
    width: auto;
    max-width: min(100%, 180px);
    height: auto;
    max-height: 48px;
    object-fit: contain;
    padding: 0;
}

.brand-mark span {
    font-size: 36px;
    font-weight: 800;
    color: var(--brand-strong);
}

.eyebrow,
.hero-system-name {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero-copy {
    display: grid;
    gap: 5px;
    justify-items: center;
}

.hero h1,
.page-header h1,
.login-card h1 {
    margin: 10px 0 6px;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.04;
}

.hero h1 {
    margin: 0;
    font-size: clamp(24px, 2.8vw, 33px);
    letter-spacing: -0.02em;
}

.hero p,
.page-header p,
.muted,
.hint {
    color: var(--muted);
}

.hero-subtitle {
    margin: 0;
    max-width: 60ch;
    font-size: 0.88rem;
    line-height: 1.55;
}

.top-actions,
.nav-pills,
.button-row,
.row-actions,
.toolbar,
.stats-grid,
.footer-row,
.segmented {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.nav-pills {
    margin-top: 10px;
    gap: 10px;
    justify-content: center;
}

.top-actions {
    position: absolute;
    top: 16px;
    right: 18px;
    z-index: 120;
    overflow: visible;
    gap: 10px;
}

.top-action-form {
    margin: 0;
}

.top-action-btn {
    min-height: 40px;
    padding: 10px 14px;
    border-radius: 999px;
    gap: 8px;
}

.top-action-btn svg {
    width: 16px;
    height: 16px;
}

.lang-switch {
    justify-content: flex-end;
}

.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid var(--line);
    box-shadow: none;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--line-strong);
}

.theme-toggle-icon {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.theme-toggle-icon svg {
    width: 16px;
    height: 16px;
}

html[data-theme="light"] .theme-toggle-icon-moon,
html[data-theme="dark"] .theme-toggle-icon-sun {
    opacity: 0;
    transform: scale(0.85);
}

html[data-theme="light"] .theme-toggle-icon-sun,
html[data-theme="dark"] .theme-toggle-icon-moon {
    opacity: 1;
    transform: scale(1);
}

.nav-pill,
.btn,
button,
.icon-btn {
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.nav-pill,
.btn,
button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: 0 10px 22px rgba(17, 99, 255, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.nav-pill.secondary,
.btn.secondary,
button.secondary {
    background: #fff;
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn.ghost,
.nav-pill.ghost {
    background: rgba(255, 255, 255, 0.62);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.btn.is-active {
    background: var(--brand-soft);
    color: var(--brand-strong);
    border-color: rgba(17, 99, 255, 0.16);
}

.nav-pills .nav-pill {
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    border: 1px solid var(--line);
    box-shadow: none;
}

.nav-pills .nav-pill.nav-pill-dashboard {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    border-color: transparent;
    box-shadow: 0 14px 30px rgba(17, 99, 255, 0.2);
}

.nav-pills .nav-pill:hover,
.nav-pills .nav-pill:focus-visible {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--line-strong);
}

.nav-pills .nav-pill.nav-pill-dashboard:hover,
.nav-pills .nav-pill.nav-pill-dashboard:focus-visible {
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    border-color: transparent;
}

html[data-theme="dark"] .nav-pill.secondary,
html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .nav-pill.ghost,
html[data-theme="dark"] .nav-pills .nav-pill,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .mini-list-row,
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .online-popover-card,
html[data-theme="dark"] .notification-popover-card,
html[data-theme="dark"] .detail-linkedin-link,
html[data-theme="dark"] .user-menu-panel,
html[data-theme="dark"] .user-menu-trigger {
    background: rgba(18, 32, 51, 0.94);
    color: var(--text);
    border-color: var(--line);
}

html[data-theme="dark"] .nav-pills .nav-pill:hover,
html[data-theme="dark"] .nav-pills .nav-pill:focus-visible,
html[data-theme="dark"] .btn.ghost:hover,
html[data-theme="dark"] .btn.ghost:focus-visible,
html[data-theme="dark"] .theme-toggle:hover,
html[data-theme="dark"] .theme-toggle:focus-visible,
html[data-theme="dark"] .user-menu-trigger:hover,
html[data-theme="dark"] .user-menu-trigger:focus-visible,
html[data-theme="dark"] .user-menu.is-open .user-menu-trigger {
    background: rgba(24, 40, 63, 0.98);
    border-color: var(--line-strong);
}

html[data-theme="dark"] .surface,
html[data-theme="dark"] .hero,
html[data-theme="dark"] .panel,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .panel-callout,
html[data-theme="dark"] .preview-tile,
html[data-theme="dark"] .role-display-card,
html[data-theme="dark"] .admin-permission-row,
html[data-theme="dark"] .role-display-setting-row,
html[data-theme="dark"] .editor-section,
html[data-theme="dark"] .editor-checkbox-panel,
html[data-theme="dark"] .editor-upload-preview,
html[data-theme="dark"] .editor-file-row,
html[data-theme="dark"] .editor-preview-tile,
html[data-theme="dark"] .text-override-card,
html[data-theme="dark"] .field-row,
html[data-theme="dark"] .choice-card,
html[data-theme="dark"] .roles-grid > div,
html[data-theme="dark"] .gallery-config-row,
html[data-theme="dark"] .gallery-config-toggle,
html[data-theme="dark"] .field-style-row,
html[data-theme="dark"] .bulk-actions-bar,
html[data-theme="dark"] .pager-size-form,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .copy-entry-summary,
html[data-theme="dark"] .note-content,
html[data-theme="dark"] .admin-summary-card,
html[data-theme="dark"] .admin-accordion,
html[data-theme="dark"] .online-popover-card,
html[data-theme="dark"] .notification-popover-card,
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .mini-list-row,
html[data-theme="dark"] .detail-photo-thumb,
html[data-theme="dark"] .detail-photo-frame,
html[data-theme="dark"] .detail-linkedin-link,
html[data-theme="dark"] .user-chip,
html[data-theme="dark"] .icon-btn {
    background: rgba(18, 30, 46, 0.94);
    border-color: rgba(152, 180, 226, 0.16);
    color: var(--text);
    box-shadow: 0 16px 36px rgba(3, 8, 18, 0.24);
}

html[data-theme="dark"] .hero::after,
html[data-theme="dark"] .stat-card,
html[data-theme="dark"] .admin-summary-card,
html[data-theme="dark"] .admin-accordion[open],
html[data-theme="dark"] .role-display-card,
html[data-theme="dark"] .editor-section,
html[data-theme="dark"] .table-wrap {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 42px rgba(3, 8, 18, 0.26);
}

html[data-theme="dark"] .preview-tile,
html[data-theme="dark"] .panel-callout,
html[data-theme="dark"] .editor-checkbox-panel,
html[data-theme="dark"] .editor-upload-preview,
html[data-theme="dark"] .editor-file-row,
html[data-theme="dark"] .editor-preview-tile,
html[data-theme="dark"] .copy-entry-summary,
html[data-theme="dark"] .note-content,
html[data-theme="dark"] .role-display-setting-row,
html[data-theme="dark"] .gallery-text-block,
html[data-theme="dark"] .text-override-default-value {
    background: rgba(14, 24, 38, 0.96);
}

html[data-theme="dark"] .hero-system-name,
html[data-theme="dark"] .eyebrow,
html[data-theme="dark"] .section-subtitle,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .hint,
html[data-theme="dark"] .muted,
html[data-theme="dark"] label,
html[data-theme="dark"] .detail-row > span:first-child,
html[data-theme="dark"] .gallery-config-label span,
html[data-theme="dark"] .field-style-label span,
html[data-theme="dark"] .editor-meta-pill span,
html[data-theme="dark"] .text-override-label,
html[data-theme="dark"] th,
html[data-theme="dark"] .table-meta,
html[data-theme="dark"] .admin-summary-note,
html[data-theme="dark"] .user-menu-trigger-copy .muted {
    color: #9fb1cb;
}

html[data-theme="dark"] .hero h1,
html[data-theme="dark"] .page-header h1,
html[data-theme="dark"] .login-card h1,
html[data-theme="dark"] .section-title,
html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .choice-card span,
html[data-theme="dark"] .gallery-config-label strong,
html[data-theme="dark"] .field-style-label strong,
html[data-theme="dark"] .role-display-setting-copy strong,
html[data-theme="dark"] .user-chip strong,
html[data-theme="dark"] .admin-summary-card strong,
html[data-theme="dark"] .mini-list-row strong,
html[data-theme="dark"] .text-override-card-head strong,
html[data-theme="dark"] .note-content,
html[data-theme="dark"] td,
html[data-theme="dark"] .detail-row > span:last-child,
html[data-theme="dark"] .gallery-text-block-body,
html[data-theme="dark"] .gallery-text-block-rest {
    color: var(--text);
}

html[data-theme="dark"] .btn.secondary,
html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .btn.ghost,
html[data-theme="dark"] .nav-pill.secondary,
html[data-theme="dark"] .nav-pill.ghost,
html[data-theme="dark"] .nav-pills .nav-pill,
html[data-theme="dark"] .theme-toggle,
html[data-theme="dark"] .user-menu-trigger,
html[data-theme="dark"] .user-menu-panel,
html[data-theme="dark"] .icon-btn {
    background: rgba(18, 30, 46, 0.92);
    color: var(--text);
    border: 1px solid rgba(152, 180, 226, 0.16);
}

html[data-theme="dark"] .icon-btn:hover,
html[data-theme="dark"] .icon-btn:focus-visible,
html[data-theme="dark"] .btn.secondary:hover,
html[data-theme="dark"] .btn.secondary:focus-visible,
html[data-theme="dark"] button.secondary:hover,
html[data-theme="dark"] button.secondary:focus-visible,
html[data-theme="dark"] .nav-pill.secondary:hover,
html[data-theme="dark"] .nav-pill.secondary:focus-visible {
    background: rgba(24, 40, 63, 0.96);
    border-color: rgba(179, 201, 236, 0.28);
}

html[data-theme="dark"] .icon-btn.note-btn,
html[data-theme="dark"] .btn.is-active,
html[data-theme="dark"] .badge-soft,
html[data-theme="dark"] .tag,
html[data-theme="dark"] .multi-inline-icon {
    background: rgba(94, 151, 255, 0.16);
    color: #bdd3ff;
    border-color: rgba(94, 151, 255, 0.16);
}

html[data-theme="dark"] .choice-card:hover,
html[data-theme="dark"] .choice-card:has(input[type="checkbox"]:checked),
html[data-theme="dark"] .role-display-priority-list span {
    background: rgba(21, 36, 56, 0.96);
    border-color: rgba(179, 201, 236, 0.2);
    color: var(--text);
}

html[data-theme="dark"] .entry-card {
    background: linear-gradient(180deg, rgba(17, 29, 44, 0.98), rgba(11, 20, 33, 0.96));
    border-color: rgba(152, 180, 226, 0.16);
    box-shadow: 0 20px 48px rgba(3, 8, 18, 0.34);
}

html[data-theme="dark"] .entry-media {
    background: linear-gradient(135deg, rgba(31, 62, 115, 0.72), rgba(16, 111, 129, 0.52));
}

html[data-theme="dark"] .entry-id,
html[data-theme="dark"] .list-column-sort.is-active,
html[data-theme="dark"] .list-column-sort:hover,
html[data-theme="dark"] .list-column-sort:focus-visible,
html[data-theme="dark"] .list-column-sort-indicator,
html[data-theme="dark"] .text-override-default-value a,
html[data-theme="dark"] a {
    color: #9ec0ff;
}

html[data-theme="dark"] .entry-media-nav {
    background: rgba(14, 24, 38, 0.84);
    border-color: rgba(181, 204, 238, 0.24);
    color: #edf4ff;
}

html[data-theme="dark"] .entry-media-nav:hover,
html[data-theme="dark"] .entry-media-nav:focus-visible {
    background: rgba(20, 34, 53, 0.96);
    border-color: rgba(181, 204, 238, 0.42);
    color: #8db5ff;
}

html[data-theme="dark"] .entry-media-gender-badge,
html[data-theme="dark"] .winner-badge,
html[data-theme="dark"] .birthday-marker {
    box-shadow: 0 10px 24px rgba(3, 8, 18, 0.28);
}

html[data-theme="dark"] tr:hover td {
    background: rgba(94, 151, 255, 0.08);
}

html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .field-row,
html[data-theme="dark"] .gallery-config-row,
html[data-theme="dark"] .field-style-row,
html[data-theme="dark"] .roles-grid > div,
html[data-theme="dark"] .admin-accordion,
html[data-theme="dark"] .admin-summary-card,
html[data-theme="dark"] .editor-section,
html[data-theme="dark"] .choice-card,
html[data-theme="dark"] .text-override-card {
    border-color: rgba(152, 180, 226, 0.14);
}

html[data-theme="dark"] th {
    background: rgba(94, 151, 255, 0.08);
}

html[data-theme="dark"] .admin-accordion summary::after,
html[data-theme="dark"] .user-menu-panel::before {
    background: rgba(18, 30, 46, 0.96);
    border-color: rgba(152, 180, 226, 0.16);
    color: #9fb1cb;
}

html[data-theme="dark"] .flash.success {
    background: rgba(19, 136, 92, 0.16);
    color: #77d3ae;
    border-color: rgba(19, 136, 92, 0.28);
}

html[data-theme="dark"] .flash.error {
    background: rgba(214, 61, 87, 0.16);
    color: #ff9cad;
    border-color: rgba(214, 61, 87, 0.28);
}

html[data-theme="dark"] .footer,
html[data-theme="dark"] .footer a {
    color: #9fb1cb;
}

html[data-theme="dark"] .editor-actions-card,
html[data-theme="dark"] .bulk-actions-bar,
html[data-theme="dark"] .pager-size-form,
html[data-theme="dark"] .table-meta,
html[data-theme="dark"] .editor-meta-pill,
html[data-theme="dark"] .gallery-config-toggle,
html[data-theme="dark"] .role-display-priority-list span,
html[data-theme="dark"] .field-style-color-control input[type="color"] {
    background: rgba(20, 32, 49, 0.96);
    border-color: rgba(152, 180, 226, 0.18);
    color: var(--text);
}

html[data-theme="dark"] .editor-actions-card {
    background: linear-gradient(180deg, rgba(19, 30, 47, 0.98), rgba(13, 22, 35, 0.96));
}

html[data-theme="dark"] .editor-meta-pill strong,
html[data-theme="dark"] .table-meta,
html[data-theme="dark"] .list-column-sort.is-active,
html[data-theme="dark"] .list-column-sort:hover,
html[data-theme="dark"] .list-column-sort:focus-visible {
    color: #c7dbff;
}

html[data-theme="dark"] .pager-summary,
html[data-theme="dark"] .role-access-label span,
html[data-theme="dark"] .gallery-text-block-more,
html[data-theme="dark"] .footer-meta,
html[data-theme="dark"] .page-header p,
html[data-theme="dark"] .panel-heading p {
    color: var(--muted);
}

html[data-theme="dark"] .gallery-text-block,
html[data-theme="dark"] .detail-row {
    border-color: rgba(152, 180, 226, 0.12);
}

html[data-theme="dark"] .gallery-text-block {
    background: rgba(15, 24, 38, 0.92);
}

html[data-theme="dark"] .gallery-text-block-more:hover,
html[data-theme="dark"] .gallery-text-block-more:focus-visible {
    color: #d4e3ff;
}

html[data-theme="dark"] .user-avatar {
    background: linear-gradient(135deg, rgba(106, 157, 255, 0.18), rgba(45, 212, 191, 0.14));
    color: #d8e7ff;
}

html[data-theme="dark"] .user-menu-trigger-icon {
    background: rgba(106, 157, 255, 0.12);
    border-color: rgba(152, 180, 226, 0.16);
    color: #c7dbff;
}

html[data-theme="dark"] .dashboard-search-field input,
html[data-theme="dark"] .permission-select,
html[data-theme="dark"] .pager-size-form select {
    background: rgba(13, 22, 35, 0.98);
    border-color: rgba(152, 180, 226, 0.18);
    color: var(--text);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
    outline: 2px solid rgba(106, 157, 255, 0.22);
    border-color: rgba(106, 157, 255, 0.4);
}

html[data-theme="dark"] select option {
    background: #162235;
    color: var(--text);
}

html[data-theme="dark"] input:-webkit-autofill,
html[data-theme="dark"] input:-webkit-autofill:hover,
html[data-theme="dark"] input:-webkit-autofill:focus,
html[data-theme="dark"] textarea:-webkit-autofill,
html[data-theme="dark"] select:-webkit-autofill {
    -webkit-text-fill-color: var(--text);
    box-shadow: 0 0 0 1000px #162235 inset;
    transition: background-color 9999s ease-in-out 0s;
}

html[data-theme="dark"] .modal {
    background: rgba(4, 9, 17, 0.72);
}

html[data-theme="dark"] .detail-photo-thumb {
    background: rgba(13, 22, 35, 0.98);
    border-color: rgba(152, 180, 226, 0.16);
    box-shadow: 0 14px 28px rgba(3, 8, 18, 0.28);
}

html[data-theme="dark"] .detail-photo-thumb:hover,
html[data-theme="dark"] .detail-photo-thumb:focus-visible {
    box-shadow: 0 18px 34px rgba(3, 8, 18, 0.38);
}

html[data-theme="dark"] .dashboard-search-submit,
html[data-theme="dark"] .filters-actions .btn,
html[data-theme="dark"] .filters-actions button {
    box-shadow: none;
}

html[data-theme="dark"] .table-wrap td::before {
    color: #90a6c5;
}

.btn.danger,
button.danger {
    background: var(--danger);
    box-shadow: 0 14px 28px rgba(214, 61, 87, 0.18);
}

.icon-btn {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    display: inline-grid;
    place-items: center;
    color: var(--text);
    box-shadow: none;
}

.icon-btn svg,
.btn svg,
.nav-pill svg {
    width: 18px;
    height: 18px;
}

.icon-btn.is-favorite {
    background: rgba(255, 214, 102, 0.42);
    border-color: rgba(217, 119, 6, 0.42);
    color: #a16207;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

html[data-theme="dark"] .icon-btn.is-favorite,
html[data-theme="dark"] .icon-btn.is-favorite:hover,
html[data-theme="dark"] .icon-btn.is-favorite:focus-visible,
html[data-theme="dark"] .entry-card .icon-btn.is-favorite,
html[data-theme="dark"] .entry-card .icon-btn.is-favorite:hover,
html[data-theme="dark"] .entry-card .icon-btn.is-favorite:focus-visible {
    background: rgba(245, 158, 11, 0.34);
    border-color: rgba(251, 191, 36, 0.55);
    color: #fcd34d;
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.22), 0 10px 24px rgba(15, 23, 42, 0.28);
}

html[data-theme="dark"] .entry-action-popover-card {
    border-color: rgba(135, 168, 255, 0.16);
    background: rgba(15, 24, 39, 0.98);
    box-shadow: 0 20px 44px rgba(0, 0, 0, 0.42);
}

html[data-theme="dark"] .entry-action-popover[open] .entry-action-popover-trigger {
    border-color: rgba(100, 145, 255, 0.28);
    background: rgba(24, 38, 60, 0.98);
    color: #f3f7ff;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .entry-action-popover-head strong {
    color: #8ea6c9;
}

html[data-theme="dark"] .entry-action-popover-link {
    background: rgba(24, 38, 60, 0.92);
    color: #d8e5ff;
    border-color: rgba(135, 168, 255, 0.12);
}

html[data-theme="dark"] .entry-action-popover-link:hover,
html[data-theme="dark"] .entry-action-popover-link:focus-visible {
    background: rgba(39, 57, 86, 0.98);
    color: #ffffff;
    border-color: rgba(135, 168, 255, 0.22);
}

.icon-btn.static-indicator {
    cursor: default;
    pointer-events: none;
}

.icon-btn.static-indicator span {
    font-size: 18px;
    line-height: 1;
}

.icon-btn.note-btn {
    background: var(--brand-soft);
    border-color: rgba(17, 99, 255, 0.14);
    color: var(--brand-strong);
}

.notification-trigger {
    position: relative;
}

.notification-badge {
    position: absolute;
    top: -6px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d63d57;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 14px rgba(214, 61, 87, 0.28);
}

.user-chip {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(17, 99, 255, 0.12), rgba(8, 145, 178, 0.12));
    display: grid;
    place-items: center;
    color: var(--brand-strong);
    font-weight: 700;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.altum-login-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
}

.altum-login-btn-image {
    width: 18px;
    height: 18px;
    object-fit: contain;
    display: block;
}

html[data-theme="dark"] .altum-login-btn-image {
    filter: brightness(1.08);
}

.user-menu {
    position: relative;
    z-index: 160;
}

.user-menu.is-open {
    z-index: 10020;
}

.user-menu-trigger {
    min-width: 0;
    padding: 9px 12px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.88);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    box-shadow: none;
}

.user-menu-trigger:hover,
.user-menu-trigger:focus-visible,
.user-menu.is-open .user-menu-trigger {
    background: rgba(255, 255, 255, 0.98);
    border-color: var(--line-strong);
}

.user-menu-trigger-copy {
    display: grid;
    gap: 2px;
    text-align: left;
    line-height: 1.1;
}

.user-menu-trigger-copy strong {
    font-size: 14px;
    font-weight: 700;
}

.user-menu-trigger-copy .muted {
    font-size: 12px;
}

.user-menu-trigger-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: rgba(17, 99, 255, 0.05);
    display: inline-grid;
    place-items: center;
    color: var(--brand-strong);
    flex: 0 0 auto;
}

.user-menu-trigger-icon svg {
    width: 14px;
    height: 14px;
}

.user-menu-panel {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 220px;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 40px rgba(11, 42, 102, 0.14);
    display: none;
    grid-template-columns: 1fr;
    gap: 2px;
}

.user-menu.is-open .user-menu-panel {
    display: grid;
}

.user-menu-panel::before {
    content: "";
    position: absolute;
    top: -6px;
    right: 22px;
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
    transform: rotate(45deg);
}

.user-menu-item,
.user-menu-item-button {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 10px 12px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text);
    text-decoration: none;
    box-shadow: none;
    font-size: 14px;
    text-align: left;
}

.user-menu-item + .user-menu-item,
.user-menu-panel form + form,
.user-menu-panel a + form,
.user-menu-panel form + a {
    margin-top: 2px;
}

.user-menu-item:hover,
.user-menu-item:focus-visible,
.user-menu-item-button:hover,
.user-menu-item-button:focus-visible {
    background: var(--brand-soft);
    color: var(--brand-strong);
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.panel,
.surface {
    padding: 24px;
    margin-bottom: 18px;
}

.stats-grid {
    align-items: stretch;
    gap: 14px;
}

.stat-card {
    flex: 1 1 180px;
    min-width: 180px;
    display: grid;
    gap: 8px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(255,255,255,0.94), rgba(240,247,255,0.92));
    border: 1px solid var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.stat-card strong {
    display: block;
    margin-top: 0;
    font-size: 30px;
    line-height: 1;
}

.account-modal-card {
    width: min(620px, calc(100vw - 40px));
    display: grid;
    gap: 24px;
    padding: 26px 28px;
}

.account-modal-card .page-header {
    text-align: center;
    justify-items: center;
    gap: 10px;
}

.account-modal-intro {
    max-width: 460px;
    margin: 2px auto 0;
    text-align: center;
    line-height: 1.7;
}

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

.account-modal-block-head {
    display: flex;
    justify-content: center;
}

.account-modal-block-label {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.06);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.account-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.account-modal-section {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid rgba(36, 85, 180, 0.1);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(246,250,255,0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.account-modal-section-wide {
    grid-column: 1 / -1;
}

.account-modal-section strong {
    font-size: 17px;
    line-height: 1.4;
    font-weight: 700;
}

.account-access-card {
    display: grid;
    gap: 16px;
    padding: 20px 22px 18px;
    border-radius: 24px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,246,255,0.94));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.account-access-grid {
    display: grid;
    gap: 12px;
}

.account-access-info {
    display: grid;
    gap: 10px;
    margin-top: 18px;
    padding-top: 20px;
    border-top: 1px solid rgba(36, 85, 180, 0.12);
}

.account-access-info-copy {
    color: var(--text);
    line-height: 1.7;
    white-space: normal;
    padding: 14px 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(36, 85, 180, 0.08);
}

.dashboard-access-card {
    display: grid;
    gap: 10px;
}

.dashboard-access-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.dashboard-access-value {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    text-align: right;
}

.account-access-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
}

.account-access-row span {
    color: var(--muted);
    font-size: 13px;
    letter-spacing: 0.01em;
}

.account-access-row strong {
    margin: 0;
    font-size: 17px;
    line-height: 1.25;
    text-align: right;
}

.account-access-note {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(187, 127, 16, 0.12);
    color: #8e5a00;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.account-access-card-expired {
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(255,244,242,0.94));
    border-color: rgba(193, 79, 54, 0.18);
}

.account-modal-actions {
    justify-content: center;
    padding-top: 4px;
}

.account-modal-actions > * {
    min-width: 170px;
}

.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-end;
    margin-bottom: 0;
}

.section-title {
    margin: 8px 0 0;
    font-size: 24px;
    line-height: 1.15;
}

.panel-heading {
    display: grid;
    gap: 8px;
}

.panel-heading p {
    margin: 0;
    max-width: 72ch;
}

.section-subtitle {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.admin-table-panel,
.admin-filter-panel,
.admin-section-panel {
    display: grid;
    gap: 18px;
}

.admin-table-panel .admin-accordion:last-child,
.admin-section-panel .admin-accordion:last-child {
    margin-bottom: 0;
}

.admin-table-header,
.admin-filter-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}

.table-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.06);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.panel-callout {
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(248, 251, 255, 0.9);
}

.preview-tile {
    display: grid;
    place-items: center;
    min-height: 112px;
    padding: 14px;
    border-radius: 20px;
    border: 1px dashed rgba(36, 85, 180, 0.22);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(240,247,255,0.86));
}

.preview-tile.preview-tile-small {
    min-height: 88px;
}

.preview-tile .brand-logo,
.preview-tile .brand-mark {
    box-shadow: none;
}

.role-display-callout {
    display: grid;
    gap: 10px;
}

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

.role-display-priority-list span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--line);
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.role-display-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.role-display-card {
    display: grid;
    gap: 16px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.role-display-card-head {
    display: grid;
    gap: 8px;
}

.role-display-card-head .eyebrow {
    margin-bottom: 2px;
}

.role-display-card-head .section-title {
    margin-top: 0;
    font-size: 20px;
}

.admin-permission-list {
    display: grid;
    gap: 12px;
}

.admin-permission-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(248, 251, 255, 0.9);
}

.admin-permission-copy {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.admin-permission-copy strong {
    font-size: 14px;
    line-height: 1.45;
}

.admin-permission-description {
    display: block;
    line-height: 1.55;
}

.admin-permission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-permission-default {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.08);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.admin-permission-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.admin-permission-toggle .editor-checkbox-panel {
    min-width: 122px;
    justify-content: center;
    margin: 0;
}

.role-display-settings {
    display: grid;
    gap: 12px;
}

.role-display-setting-row {
    display: grid;
    gap: 10px;
    padding: 14px 14px 12px;
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(248, 251, 255, 0.9);
}

.role-display-setting-copy {
    display: grid;
    gap: 4px;
}

.role-display-setting-copy strong,
.role-display-setting-copy span {
    display: block;
}

.role-display-setting-copy strong {
    font-size: 14px;
}

.role-display-setting-copy span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
}

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

.flash {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.flash.success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(19, 136, 92, 0.14);
}

.flash.error {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: rgba(214, 61, 87, 0.16);
}

.filters,
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.editor-form {
    margin-top: 6px;
}

.editor-form-shell {
    display: grid;
    gap: 2px;
}

.editor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.95fr);
    gap: 22px;
    align-items: start;
}

.editor-layout-wide {
    grid-template-columns: minmax(0, 1.9fr) minmax(340px, 0.95fr);
}

.editor-main,
.editor-sidebar-stack {
    display: grid;
    gap: 18px;
}

.editor-sidebar {
    min-width: 0;
}

.editor-sidebar-stack {
    position: sticky;
    top: 18px;
}

.invoice-template-layout {
    grid-template-columns: minmax(0, 0.88fr) minmax(380px, 440px);
    align-items: start;
    gap: 16px;
}

.invoice-template-sidebar {
    min-width: 0;
    width: 100%;
}

.invoice-template-form {
    width: 100%;
    max-width: 440px;
    justify-self: stretch;
}

.invoice-template-sidebar .editor-sidebar-stack {
    position: static;
}

.invoice-template-form .admin-accordion > summary {
    padding-bottom: 16px;
}

.invoice-template-form .editor-section {
    padding: 22px 22px 20px;
}

.invoice-template-form .editor-grid-main {
    gap: 16px 14px;
}

.invoice-template-form .editor-field label {
    margin-bottom: 7px;
}

.invoice-template-form textarea {
    min-height: 108px;
    resize: vertical;
}

.invoice-template-form .button-row {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    justify-content: flex-start;
    gap: 10px;
}

.invoice-template-form .button-row .btn,
.invoice-template-form .button-row button {
    min-height: 40px;
}

.invoice-template-layout .table-wrap {
    overflow-x: auto;
}

.invoice-templates-page .editor-main.panel {
    min-width: 0;
}

.invoice-templates-page .invoice-responsive-table {
    table-layout: fixed;
}

.invoice-templates-page .invoice-responsive-table th,
.invoice-templates-page .invoice-responsive-table td {
    padding-left: 6px;
    padding-right: 6px;
}

.invoice-templates-page .invoice-responsive-table th,
.invoice-templates-page .invoice-responsive-table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.invoice-templates-page .invoice-responsive-table td:last-child .button-row {
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 8px;
}

.invoice-templates-page .invoice-responsive-table td:last-child form {
    margin: 0;
}

.invoice-summary-icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    display: inline-grid;
    place-items: center;
    margin-right: 8px;
}

.invoice-summary-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}

.user-invoice-actions {
    margin: 16px 0 12px;
}

.user-invoice-table-wrap {
    margin-top: 12px;
}

.user-invoice-table td {
    vertical-align: middle;
}

.user-invoice-table td:last-child .button-row {
    gap: 8px;
    flex-wrap: wrap;
}

.user-invoice-empty {
    margin-top: 14px;
}

.invoice-page {
    --invoice-touch-size: 42px;
}

.invoice-detail-page {
    width: min(1380px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    overflow-x: hidden;
}

.invoice-detail-page .admin-main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
}

.invoice-detail-page .admin-main-grid,
.invoice-detail-page .admin-lead-card,
.invoice-detail-page .admin-aside-card,
.invoice-detail-page .panel,
.invoice-detail-page .admin-accordion,
.invoice-detail-page .admin-summary-grid,
.invoice-detail-page .table-wrap {
    min-width: 0;
    max-width: 100%;
}

.invoice-detail-page .admin-summary-grid-compact {
    grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
}

.invoice-detail-page .admin-summary-card strong,
.invoice-detail-page .page-header h2,
.invoice-detail-page .page-header p,
.invoice-detail-page .section-subtitle {
    overflow-wrap: anywhere;
}

.invoice-detail-page .invoice-responsive-table th,
.invoice-detail-page .invoice-responsive-table td {
    overflow-wrap: anywhere;
}

.invoice-detail-page .table-wrap {
    overflow-x: auto;
    overscroll-behavior-x: contain;
}

.invoice-page .admin-summary-card,
.invoice-page .stat-card,
.invoice-page .panel-callout {
    min-width: 0;
    overflow-wrap: anywhere;
}

.invoice-page .button-row {
    align-items: center;
}

.invoice-page .button-row .btn,
.invoice-page .button-row button,
.invoice-page .compact-submit {
    min-height: var(--invoice-touch-size);
}

.invoice-page input,
.invoice-page select,
.invoice-page textarea {
    min-width: 0;
    max-width: 100%;
}

.invoice-page textarea {
    min-height: 116px;
    resize: vertical;
}

.invoice-tax-toggle-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px 24px;
}

.invoice-tax-toggle-row .editor-inline-check {
    min-height: 32px;
}

.invoice-vat-disclaimer {
    margin-top: 16px;
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 0 12px 12px 0;
    background: var(--accent-soft);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.invoice-responsive-table {
    width: 100%;
    table-layout: auto;
}

.invoice-responsive-table th,
.invoice-responsive-table td {
    min-width: 0;
    vertical-align: top;
}

.invoice-responsive-table td:last-child .button-row {
    gap: 8px;
}

.invoice-item-card {
    border-radius: 20px;
    padding: 18px;
    min-width: 0;
}

.invoice-items-stack {
    gap: 14px;
}

.invoice-public-panel {
    max-width: min(1180px, calc(100vw - 48px));
    margin: 40px auto;
}

.invoice-public-methods {
    display: grid;
    gap: 14px;
}

.invoice-public-method-card {
    overflow: hidden;
}

.invoice-public-method-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.invoice-public-method-details {
    margin-top: 16px;
}

.invoice-public-iban-card strong {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-variant-numeric: tabular-nums;
    font-size: clamp(0.9rem, 1.25vw, 1.08rem);
    letter-spacing: -0.02em;
}

.invoice-public-method-card > .editor-section > .admin-summary-grid {
    grid-template-columns: minmax(150px, 0.72fr) minmax(150px, 0.72fr) minmax(340px, 1.35fr);
}

.invoice-public-method-card > .editor-section > .admin-summary-grid .admin-summary-card {
    min-width: 0;
}

.invoice-public-message-card {
    margin-top: 14px;
    width: 100%;
}

.invoice-public-message-card strong {
    display: block;
    max-width: 100%;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.invoice-public-qr-layout {
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    align-items: center;
}

.invoice-public-qr-image {
    width: min(220px, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    display: block;
}

.invoice-public-method-card .admin-summary-card:not(.invoice-public-iban-card) strong {
    overflow-wrap: anywhere;
}

.editor-section {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(245,250,255,0.94));
    box-shadow: 0 18px 40px rgba(17, 68, 160, 0.08);
    min-width: 0;
    position: relative;
    overflow: visible;
}

.editor-section-compact {
    padding: 20px;
}

.editor-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.editor-section-head > div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.editor-section-title {
    margin: 8px 0 0;
    font-size: 22px;
    line-height: 1.15;
}

.editor-section-intro {
    margin: 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.editor-section-stack {
    display: grid;
    gap: 18px;
}

.editor-subsection {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(36, 85, 180, 0.1);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(247, 250, 255, 0.88));
}

.editor-subsection-head {
    display: grid;
    gap: 6px;
}

.editor-subsection-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.3;
    color: var(--text);
}

.editor-subsection-text {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

.editor-meta-pill {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(240, 247, 255, 0.78);
    text-align: right;
}

.editor-meta-pill span,
.editor-meta-pill strong {
    display: block;
}

.editor-meta-pill span {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.editor-meta-pill strong {
    margin-top: 6px;
    font-size: 14px;
    color: var(--brand-strong);
}

.editor-grid {
    display: grid;
    gap: 16px;
}

.editor-grid-main {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.editor-field {
    min-width: 0;
    display: grid;
    gap: 8px;
    align-content: start;
}

.editor-field > label {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.editor-field input[type="date"] {
    min-height: 48px;
}

.editor-field .hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
}

.editor-field-span-2 {
    grid-column: span 2;
}

.editor-field-span-3 {
    grid-column: span 3;
}

.editor-field-span-4 {
    grid-column: span 4;
}

.editor-field-span-6 {
    grid-column: 1 / -1;
}

.editor-checkbox-panel {
    margin: 0;
    min-height: 54px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.96);
}

.editor-inline-check {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.editor-upload-preview {
    margin-top: 12px;
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.9);
}

html[data-theme="dark"] .editor-subsection {
    border-color: rgba(111, 140, 194, 0.22);
    background: linear-gradient(180deg, rgba(26, 34, 51, 0.96), rgba(20, 28, 43, 0.94));
}

html[data-theme="dark"] .editor-subsection-title {
    color: rgba(245, 248, 255, 0.96);
}

html[data-theme="dark"] .editor-subsection-text {
    color: rgba(173, 186, 214, 0.84);
}

html[data-theme="dark"] .editor-section-intro {
    color: rgba(173, 186, 214, 0.84);
}

.editor-upload-preview img {
    display: block;
    max-width: min(320px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.14);
}

.editor-photo-panel {
    display: grid;
    gap: 12px;
}

.editor-media-section .editor-field {
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.09);
    background: rgba(248, 251, 255, 0.78);
}

.editor-media-section .editor-field + .editor-field {
    margin-top: 2px;
}

.editor-photo-panel-preview {
    padding: 14px;
    border-radius: 20px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(243,248,255,0.92));
}

.editor-field-public-avatar {
    gap: 10px;
}

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

.editor-avatar-library-launch {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.editor-avatar-picker-label {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(233, 241, 255, 0.9);
    border: 1px solid rgba(36, 85, 180, 0.12);
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.editor-avatar-picker-preview {
    display: grid;
    justify-content: start;
}

.editor-avatar-picker-preview-frame {
    width: 78px;
    height: 78px;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(255, 255, 255, 0.94);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.editor-avatar-picker-preview-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.avatar-library-modal {
    padding-top: 34px;
}

.avatar-library-card {
    width: min(1120px, 100%);
    display: grid;
    gap: 16px;
}

.avatar-library-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.avatar-library-close {
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.avatar-library-toolbar {
    display: grid;
    gap: 12px;
}

.avatar-library-search input {
    width: 100%;
    max-width: 320px;
}

.avatar-library-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-library-chip {
    appearance: none;
    border: 1px solid rgba(36, 85, 180, 0.14);
    background: rgba(255, 255, 255, 0.9);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 11px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.avatar-library-chip.is-active {
    background: rgba(31, 100, 246, 0.1);
    border-color: rgba(31, 100, 246, 0.24);
    color: var(--brand);
}

.avatar-library-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 8px;
}

.avatar-library-recent-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-library-recent-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 5px 9px 5px 5px;
    border-radius: 999px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
    cursor: pointer;
}

.avatar-library-recent-item img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-library-recent-item span {
    max-width: 154px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
    font-weight: 600;
}

.avatar-library-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
}

.avatar-library-item {
    appearance: none;
    display: grid;
    gap: 4px;
    padding: 4px;
    border-radius: 12px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 248, 255, 0.92));
    text-align: left;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.avatar-library-item:hover,
.avatar-library-item:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(31, 100, 246, 0.22);
    box-shadow: 0 10px 20px rgba(34, 70, 150, 0.1);
}

.avatar-library-item.is-selected {
    border-color: rgba(31, 100, 246, 0.28);
    box-shadow: 0 0 0 1px rgba(31, 100, 246, 0.12);
}

.avatar-library-item-frame {
    display: block;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(226, 235, 249, 0.7);
}

.avatar-library-item-frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.avatar-library-item-label {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text);
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.05;
    opacity: 0.78;
}

.avatar-library-empty {
    padding: 20px;
    border-radius: 18px;
    border: 1px dashed rgba(36, 85, 180, 0.14);
    background: rgba(245, 248, 255, 0.72);
    color: var(--muted);
    text-align: center;
}

@media (max-width: 900px) {
    .avatar-library-card {
        padding: 20px;
    }

    .avatar-library-grid {
        grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
        gap: 8px;
    }
}

@media (max-width: 640px) {
    .avatar-library-modal {
        padding: 16px;
    }

    .avatar-library-head {
        align-items: center;
    }

    .avatar-library-categories {
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 2px;
    }

    .avatar-library-chip {
        flex: 0 0 auto;
    }

    .avatar-library-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .avatar-library-item {
        padding: 4px;
        border-radius: 10px;
    }
}

.editor-file-list {
    display: grid;
    gap: 10px;
}

.editor-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(248, 251, 255, 0.9);
}

.editor-file-row a {
    min-width: 0;
    overflow-wrap: anywhere;
}

.editor-actions-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(238,245,255,0.96));
}

.editor-actions {
    display: grid;
    gap: 12px;
}

.editor-form-footer-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(36, 85, 180, 0.08);
}

.compact-submit-small,
.btn-small {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
    border-radius: 14px;
}

.editor-choice-grid {
    gap: 12px;
}

.editor-choice-grid .choice-card {
    min-height: 52px;
    border-radius: 18px;
    padding: 12px 14px;
}

.editor-sidebar .editor-section {
    box-shadow: 0 14px 34px rgba(17, 68, 160, 0.07);
}

.editor-sidebar .editor-section-head {
    margin-bottom: 16px;
}

.editor-accordion-stack,
.editor-check-grid {
    display: grid;
    gap: 16px;
}

.editor-choice-grid {
    margin-top: 12px;
}

.editor-preview-tile {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.9);
}

.editor-preview-tile img {
    display: block;
    max-width: min(220px, 100%);
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.14);
}

.editor-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
}

.self-entry-admin-layout {
    align-items: start;
}

.self-entry-settings-panel .page-header {
    margin-bottom: 4px;
}

.self-entry-control-grid,
.self-entry-legal-grid {
    align-items: start;
}

.self-entry-link-row {
    align-items: stretch;
}

.self-entry-link-field {
    min-width: 0;
}

.self-entry-link-field input,
.self-entry-settings-panel input[type="url"] {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.self-entry-link-actions {
    margin-top: 0;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: flex-start;
}

.self-entry-link-actions > .btn,
.self-entry-link-actions > .compact-submit,
.self-entry-link-actions > button,
.self-entry-link-actions > a {
    min-height: 46px;
}

.self-entry-footer-actions {
    margin-top: 4px;
    padding: 18px 22px 0;
    border-top: 1px solid rgba(187, 202, 227, 0.45);
    justify-content: flex-start;
}

html[data-theme="dark"] .self-entry-footer-actions {
    border-top-color: rgba(91, 117, 152, 0.34);
}

.self-entry-public-layout {
    align-items: start;
}

.self-entry-public-notes {
    display: grid;
    gap: 16px;
}

.self-entry-public-note-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 10px;
    color: var(--text-soft);
    line-height: 1.6;
}

.self-entry-public-note-list li {
    margin: 0;
}

.text-override-grid {
    display: grid;
    gap: 16px;
}

.text-override-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(249, 252, 255, 0.96);
}

.text-override-card-head {
    display: grid;
    gap: 4px;
}

.text-override-card-head strong {
    font-size: 16px;
    line-height: 1.3;
}

.text-override-default,
.text-override-input {
    display: grid;
    gap: 8px;
}

.text-override-label {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.text-override-default-value {
    padding: 12px 14px;
    border: 1px solid rgba(36, 85, 180, 0.1);
    border-radius: 16px;
    background: rgba(235, 244, 255, 0.8);
    color: var(--text);
    line-height: 1.55;
}

.full {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

input,
select,
textarea {
    width: 100%;
    padding: 13px 14px;
    border-radius: 18px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    font: inherit;
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: rgba(15, 24, 38, 0.94);
    color: var(--text);
    border-color: var(--line);
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: rgba(159, 177, 203, 0.86);
}

input[type="checkbox"],
input[type="radio"] {
    width: 18px;
    height: 18px;
    padding: 0;
    border-radius: 6px;
    accent-color: var(--brand);
    flex: 0 0 auto;
}

textarea {
    min-height: 132px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(17, 99, 255, 0.18);
    border-color: rgba(17, 99, 255, 0.36);
}

.field-builder {
    display: grid;
    gap: 14px;
}

.field-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: start;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
}

.field-row > div,
.field-row > label,
.field-row > section {
    min-width: 0;
}

.field-row-advanced {
    min-width: 0;
}

.field-row-advanced .hint {
    margin-top: 8px;
}

.field-row-matrix {
    grid-column: 1 / -1;
    display: grid;
    gap: 14px;
    padding: 16px 18px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.95), rgba(255, 255, 255, 0.98));
}

.field-row > .btn.danger {
    grid-column: 1 / -1;
    justify-self: flex-end;
    margin-top: 2px;
}

.field-row-matrix-head,
.field-row-matrix-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.field-row-matrix-head strong,
.field-row-matrix-card-head strong {
    display: block;
    color: var(--text-strong);
}

.field-row-matrix-required {
    margin-left: auto;
    white-space: nowrap;
}

.field-row-matrix-help {
    display: grid;
    gap: 8px;
}

.field-row-matrix-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.field-row-matrix-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(36, 85, 180, 0.1);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
}

.field-row-matrix-add {
    padding-inline: 12px;
}

.field-row-matrix-items {
    display: grid;
    gap: 10px;
}

.field-row-matrix-item {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(120px, 0.9fr) auto;
    gap: 10px;
    align-items: center;
}

.matrix-input {
    display: grid;
    gap: 14px;
}

.matrix-input-table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(36, 85, 180, 0.12);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.95);
}

.matrix-input-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 560px;
}

.matrix-input-table th,
.matrix-input-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(36, 85, 180, 0.1);
    text-align: center;
    vertical-align: middle;
}

.matrix-input-table thead th {
    background: rgba(246, 249, 255, 0.96);
    color: var(--text-soft);
    font-size: 13px;
    font-weight: 700;
}

.matrix-input-table tbody th {
    text-align: left;
    color: var(--text-strong);
    font-weight: 700;
    background: rgba(255, 255, 255, 0.95);
}

.matrix-input-table tbody tr:last-child th,
.matrix-input-table tbody tr:last-child td {
    border-bottom: 0;
}

.matrix-input-choice {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 64px;
    cursor: pointer;
}

.matrix-input-choice span {
    font-size: 13px;
    color: var(--text-soft);
}

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

.matrix-display-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(246, 249, 255, 0.92);
    border: 1px solid rgba(36, 85, 180, 0.08);
}

.matrix-display-label {
    color: var(--text-soft);
    font-size: 13px;
}

.matrix-display-value {
    color: var(--text-strong);
    font-size: 14px;
}

.gallery-matrix-block .matrix-display-item {
    padding: 9px 11px;
}

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

.multi-select-field-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.choice-card {
    margin: 0;
    min-height: 58px;
    padding: 13px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(36, 85, 180, 0.14);
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.94));
    box-shadow: none;
    transition: border-color 120ms ease, background-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
    cursor: pointer;
}

.choice-card:hover {
    border-color: rgba(17, 99, 255, 0.24);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(240, 247, 255, 0.98));
    box-shadow: 0 12px 24px rgba(17, 68, 160, 0.08);
}

.choice-card input[type="checkbox"] {
    margin: 0;
    position: relative;
    top: -1px;
}

.choice-card span {
    min-width: 0;
    color: #18355a;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.choice-card:has(input[type="checkbox"]:checked) {
    border-color: rgba(17, 99, 255, 0.3);
    background: linear-gradient(180deg, rgba(235, 244, 255, 0.98), rgba(227, 239, 255, 0.96));
    box-shadow: inset 0 0 0 1px rgba(17, 99, 255, 0.08), 0 14px 28px rgba(17, 68, 160, 0.08);
}

.choice-card:has(input[type="checkbox"]:focus-visible) {
    outline: 2px solid rgba(17, 99, 255, 0.22);
    outline-offset: 2px;
}

.roles-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.7fr) repeat(var(--role-columns, 4), minmax(118px, 0.9fr));
    gap: 12px;
    margin-top: 14px;
    align-items: stretch;
}

.roles-grid > div {
    min-width: 0;
    padding: 12px 14px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.88);
}

.role-grid-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
}

.role-grid-heading {
    display: grid;
    align-items: center;
    background: rgba(244, 248, 255, 0.94);
}

.role-grid-heading strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.field-style-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.gallery-config-grid {
    grid-template-columns: minmax(160px, 1.7fr) minmax(90px, .7fr) minmax(110px, .8fr);
}

.gallery-config-list {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}

.gallery-config-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(130px, .8fr) minmax(120px, .8fr);
    gap: 12px;
    align-items: center;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.gallery-config-label strong,
.gallery-config-label span {
    display: block;
}

.gallery-config-label strong {
    font-size: 15px;
}

.gallery-config-label span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.gallery-config-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(240, 247, 255, 0.92);
    border: 1px solid var(--line);
}

.gallery-config-position label {
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.field-style-head,
.field-style-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 12px;
    align-items: end;
}

.field-style-head {
    padding: 0 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-style-row {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
}

.self-entry-field-grid-head,
.self-entry-field-grid-row {
    grid-template-columns: minmax(260px, 1.9fr) minmax(130px, 0.85fr) minmax(130px, 0.85fr) minmax(140px, 0.9fr);
}

.self-entry-summary-grid {
    gap: 12px;
}

.self-entry-sidebar-actions {
    margin-top: 16px;
}

.self-entry-public-form .editor-main {
    max-width: 980px;
    margin: 0 auto;
}

.self-entry-public-form .editor-section {
    border-radius: 24px;
}

.self-entry-public-form .choice-card {
    margin: 0;
}

.self-entry-copy-block {
    margin: 0 0 18px;
    padding: 16px 18px;
    border: 1px solid rgba(180, 197, 222, 0.48);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(247, 250, 255, 0.92), rgba(241, 246, 255, 0.82));
    color: #31435b;
    line-height: 1.65;
}

.self-entry-copy-block-intro {
    font-weight: 500;
}

.self-entry-copy-block-notice,
.self-entry-copy-block-legal {
    background: linear-gradient(180deg, rgba(251, 252, 255, 0.96), rgba(245, 248, 255, 0.9));
}

.self-entry-copy-block-footer,
.self-entry-copy-block-success {
    margin-top: 18px;
}

.self-entry-field-label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.self-entry-help-trigger,
.self-entry-help-admin-trigger {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 13px;
    height: 13px;
    min-width: 13px;
    min-height: 13px;
    padding: 0;
    margin: 0;
    border: 1px solid rgba(128, 173, 246, 0.22);
    border-radius: 999px;
    background: rgba(132, 180, 255, 0.1);
    color: #7faff7;
    font-size: 7px;
    font-weight: 600;
    font-style: normal;
    font-family: inherit;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    text-align: center;
    cursor: pointer;
    flex: 0 0 auto;
    vertical-align: super;
    align-self: flex-start;
    box-sizing: border-box;
    background-image: none;
    transform: translateY(-6px);
    box-shadow: none;
    opacity: 0.9;
    transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.self-entry-help-trigger:hover,
.self-entry-help-trigger:focus-visible,
.self-entry-help-admin-trigger:hover,
.self-entry-help-admin-trigger:focus-visible {
    background: rgba(132, 180, 255, 0.18);
    border-color: rgba(128, 173, 246, 0.34);
    box-shadow: 0 3px 10px rgba(82, 126, 208, 0.08);
    outline: none;
}

.self-entry-help-popover {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(248, 251, 255, 0.96);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.self-entry-field-error {
    margin-top: 8px;
    color: #b4232f;
    font-size: 13px;
    line-height: 1.5;
}

.self-entry-field-invalid > input,
.self-entry-field-invalid > select,
.self-entry-field-invalid > textarea,
.self-entry-field-invalid .self-entry-multiselect-trigger,
.self-entry-field-invalid .matrix-input-table-wrap,
.self-entry-field-invalid .self-entry-upload-preview-card,
.self-entry-field-invalid .self-entry-upload-file-list,
.self-entry-field-invalid .self-entry-upload-preview-frame,
.self-entry-choice-invalid {
    border-color: rgba(193, 57, 70, 0.22) !important;
    box-shadow: 0 0 0 2px rgba(193, 57, 70, 0.05);
}

.self-entry-field-invalid .self-entry-field-label > span,
.self-entry-choice-invalid span {
    color: #a54752;
}

.self-entry-submit-alert {
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 10px 14px 11px;
    border-radius: 14px;
    border: 1px solid rgba(193, 57, 70, 0.14);
    background: linear-gradient(180deg, rgba(255, 247, 248, 0.98), rgba(255, 250, 250, 0.94));
    color: #9d4650;
    font-size: 13px;
    line-height: 1.5;
}

.self-entry-submit-alert-note {
    margin-top: 5px;
    color: #ab5560;
    font-size: 12px;
}

.self-entry-field-label-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.self-entry-help-admin-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.self-entry-help-admin-panel {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 12px;
    border-radius: 16px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(248, 251, 255, 0.92);
}

.self-entry-help-admin-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 5px 9px;
    border-radius: 999px;
    border: 1px solid rgba(36, 85, 180, 0.1);
    background: rgba(255, 255, 255, 0.82);
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.self-entry-help-admin-status.is-present {
    color: #275d93;
    background: rgba(233, 241, 255, 0.9);
    border-color: rgba(36, 85, 180, 0.16);
}

.self-entry-help-admin-toggle {
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none;
}

.self-entry-help-admin-toggle:hover,
.self-entry-help-admin-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(36, 85, 180, 0.2);
}

.self-entry-upload-shell {
    display: grid;
    gap: 12px;
}

.self-entry-upload-shell-photo {
    grid-template-columns: minmax(0, 1fr) 180px;
    align-items: start;
}

.self-entry-upload-main {
    min-width: 0;
}

.self-entry-upload-preview-card,
.self-entry-upload-file-list {
    display: grid;
    gap: 10px;
    padding: 12px;
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(248, 251, 255, 0.9);
}

.self-entry-upload-preview-frame {
    min-height: 136px;
    border-radius: 16px;
    border: 1px dashed rgba(36, 85, 180, 0.18);
    background: rgba(255, 255, 255, 0.82);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.self-entry-upload-preview-frame img {
    width: 100%;
    height: 136px;
    object-fit: cover;
    display: block;
}

.self-entry-upload-preview-empty {
    padding: 14px;
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.self-entry-upload-preview-meta {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.self-entry-file-row {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(36, 85, 180, 0.08);
}

.self-entry-file-icon {
    min-width: 48px;
    height: 34px;
    padding: 0 10px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    background: rgba(17, 99, 255, 0.08);
    color: var(--brand-strong);
}

.self-entry-file-icon-pdf {
    background: rgba(200, 31, 56, 0.10);
    color: #b4232f;
}

.self-entry-file-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.self-entry-file-copy strong,
.self-entry-file-copy span {
    overflow-wrap: anywhere;
}

.self-entry-file-remove {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 0;
}

.self-entry-file-remove:hover,
.self-entry-file-remove:focus-visible {
    color: var(--text);
}

.self-entry-multiselect {
    position: relative;
    display: grid;
    gap: 10px;
    z-index: 5;
}

.self-entry-multiselect.is-open {
    z-index: 2600;
}

.self-entry-multiselect-trigger {
    width: 100%;
    min-height: 52px;
    padding: 13px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: var(--text);
    text-align: left;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.self-entry-multiselect.is-open .self-entry-multiselect-trigger,
.self-entry-multiselect-trigger:hover,
.self-entry-multiselect-trigger:focus-visible {
    border-color: var(--line-strong);
    box-shadow: 0 0 0 4px rgba(17, 99, 255, 0.08);
}

.self-entry-multiselect-trigger-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.self-entry-multiselect-trigger-placeholder {
    color: var(--muted);
}

.self-entry-multiselect-trigger-summary {
    color: #101828;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 600;
}

.self-entry-multiselect-trigger-icon {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(17, 99, 255, 0.05);
    display: inline-grid;
    place-items: center;
    color: var(--brand-strong);
    transform: rotate(90deg);
    flex: 0 0 auto;
}

.self-entry-multiselect-panel {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 2400;
}

.self-entry-multiselect-popover {
    width: 100%;
    max-height: min(420px, calc(100vh - 140px));
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    gap: 12px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 18px 34px rgba(11, 42, 102, 0.14);
}

.self-entry-multiselect-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.self-entry-multiselect-title {
    margin: 0;
    color: #101828;
    font-size: 16px;
    line-height: 1.25;
}

.self-entry-multiselect-close {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 1px solid rgba(36, 85, 180, 0.12);
    background: rgba(17, 99, 255, 0.04);
    color: var(--text);
    font-size: 20px;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
}

.self-entry-multiselect-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding-bottom: 2px;
}

.self-entry-multiselect-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: #1d4ed8;
    font-size: 13px;
    font-weight: 600;
}

.self-entry-multiselect-options {
    display: grid;
    gap: 8px;
    overflow: auto;
    padding-right: 4px;
    align-content: start;
}

.self-entry-multiselect-option {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid rgba(36, 85, 180, 0.08);
    background: rgba(248, 251, 255, 0.92);
    color: #101828;
    cursor: pointer;
}

.self-entry-multiselect-option input {
    margin-top: 2px;
    flex: 0 0 auto;
    accent-color: #2563eb;
}

.self-entry-multiselect-option span {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    color: #101828;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
}

.self-entry-multiselect-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.self-entry-multiselect-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.08);
    color: var(--brand-strong);
    font-size: 13px;
    font-weight: 700;
}

.self-entry-multiselect-dialog-actions {
    display: flex;
    justify-content: center;
    padding-top: 8px;
    border-top: 1px solid rgba(36, 85, 180, 0.08);
}

.self-entry-multiselect-done {
    min-width: 132px;
    min-height: 38px;
    padding: 8px 12px;
    border-radius: 14px;
    font-size: 13px;
}

.self-entry-review-list {
    display: grid;
    gap: 14px;
}

.self-entry-review-card {
    padding: 18px;
    border-radius: 24px;
}

.self-entry-review-card-main {
    display: grid;
    gap: 10px;
    min-width: 0;
}

.self-entry-review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.self-entry-review-card-meta {
    display: flex;
    gap: 10px 14px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.self-entry-review-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.self-entry-review-card-meta span::before {
    content: "";
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.38);
}

.self-entry-review-card-meta span:first-child::before {
    display: none;
}

.self-entry-review-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
}

.badge-subtle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(17, 99, 255, 0.14);
    background: rgba(236, 244, 255, 0.92);
    color: var(--brand-strong);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.field-style-label {
    min-width: 0;
}

.field-style-label strong,
.field-style-label span {
    display: block;
}

.field-style-label strong {
    font-size: 15px;
}

.field-style-label span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.field-style-control {
    min-width: 0;
}

.field-style-control label {
    margin-bottom: 6px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.field-style-color-control input[type="color"] {
    width: 100%;
    min-height: 46px;
    padding: 6px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.95);
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.entry-card {
    min-width: 0;
    display: grid;
    grid-template-rows: auto 1fr;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(240,247,255,0.9));
    box-shadow: 0 18px 46px rgba(17, 68, 160, 0.12);
}

.entry-card .row-actions {
    gap: 4px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    max-width: 100%;
    row-gap: 4px;
    overflow: visible;
}

.entry-card .icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 14px;
}

.entry-card .icon-btn svg {
    width: 16px;
    height: 16px;
}

.entry-action-popover {
    position: relative;
}

.entry-action-popover summary {
    list-style: none;
}

.entry-action-popover[open] .entry-action-popover-trigger {
    border-color: rgba(17, 99, 255, 0.22);
    background: rgba(233, 242, 255, 0.98);
    color: var(--brand-strong);
    box-shadow: 0 10px 24px rgba(17, 68, 160, 0.16);
}

.entry-action-popover summary::-webkit-details-marker {
    display: none;
}

.entry-action-popover-card {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 15;
    min-width: 228px;
    display: grid;
    gap: 10px;
    padding: 10px;
    border-radius: 16px;
    border: 1px solid rgba(24, 53, 90, 0.1);
    background: rgba(255, 255, 255, 0.985);
    box-shadow: 0 18px 34px rgba(12, 33, 61, 0.14);
}

.entry-action-popover-head {
    padding: 4px 6px 2px;
}

.entry-action-popover-head strong {
    display: block;
    font-size: 12px;
    line-height: 1.25;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--text-soft);
}

.entry-action-popover-list {
    display: grid;
    gap: 4px;
}

.entry-action-popover-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    background: rgba(248, 251, 255, 0.96);
    border: 1px solid rgba(36, 85, 180, 0.08);
    transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease, transform 120ms ease;
}

.entry-action-popover-link span {
    font-size: 13px;
    font-weight: 600;
    color: inherit;
}

.entry-action-popover-link svg {
    width: 14px;
    height: 14px;
    opacity: 0.7;
    flex: 0 0 auto;
}

.entry-action-popover-link:hover,
.entry-action-popover-link:focus-visible {
    background: rgba(233, 241, 255, 0.98);
    border-color: rgba(17, 99, 255, 0.16);
    color: var(--text-strong);
    transform: translateY(-1px);
}

.gallery.compact-search-gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 360px));
    justify-content: center;
    align-items: start;
}

.gallery.compact-search-gallery .entry-card {
    width: 100%;
}

.entry-card-no-media .entry-body {
    padding-top: 22px;
}

.entry-media {
    position: relative;
    aspect-ratio: 4 / 5;
    min-height: 350px;
    background: linear-gradient(135deg, rgba(17, 99, 255, 0.24), rgba(8, 145, 178, 0.2));
    display: grid;
    place-items: center;
    color: #fff;
    overflow: hidden;
    isolation: isolate;
}

.entry-media-frame {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.06);
    box-sizing: border-box;
    overflow: hidden;
}

.entry-media-nav {
    position: absolute;
    top: 50%;
    z-index: 4;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.78);
    color: #18355a;
    display: inline-grid;
    place-items: center;
    backdrop-filter: blur(12px);
    box-shadow: 0 10px 24px rgba(10, 25, 55, 0.14);
    opacity: 0.92;
}

.entry-media-nav:hover,
.entry-media-nav:focus-visible {
    background: rgba(255, 255, 255, 0.92);
    border-color: rgba(255, 255, 255, 0.62);
    color: #0d4dd9;
}

.entry-media-nav svg {
    width: 16px;
    height: 16px;
}

.entry-media-nav-prev {
    left: 10px;
}

.entry-media-nav-next {
    right: 10px;
}

.entry-media-gender-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 3;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.65);
    box-shadow: 0 10px 20px rgba(10, 25, 55, 0.16);
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.gender-badge-male {
    color: #0f5bcc;
}

.gender-badge-female {
    color: #c2418c;
}

.entry-media-badges {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    z-index: 3;
}

.entry-inline-badges {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.winner-badge {
    position: relative;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(10, 25, 55, 0.18);
    font-size: 18px;
    border: 1px solid rgba(255, 255, 255, 0.56);
}

.winner-state-won {
    background: rgba(34, 197, 94, 0.92);
    color: #fff;
}

.winner-state-lost {
    background: rgba(239, 68, 68, 0.92);
    color: #fff;
}

.winner-state-blocked {
    background: rgba(185, 28, 28, 0.95);
    color: #fff;
}

.winner-state-neutral {
    background: rgba(148, 163, 184, 0.92);
    color: #fff;
}

.entry-media img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    object-position: center;
    background: rgba(255, 255, 255, 0.08);
}

.entry-media-fallback {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
}

.entry-body {
    display: grid;
    align-content: start;
    padding: 18px;
}

.entry-card .toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px 12px;
}

.entry-card .toolbar > :first-child {
    flex: 1 1 180px;
    min-width: 0;
}

.entry-card .toolbar > .row-actions {
    margin-left: auto;
    flex: 0 1 auto;
    min-width: 0;
}

.entry-title {
    margin: 0 0 8px;
    font-size: 24px;
    line-height: 1.14;
    overflow-wrap: break-word;
    word-break: normal;
    hyphens: auto;
}

.entry-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.entry-id {
    display: block;
    margin-bottom: 6px;
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 1.4;
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: normal;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 14px;
}

.tag {
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 500;
}

.tag-company {
    font-size: 11px;
    font-weight: 500;
}

.inline-icon-choice {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.4em;
    font-size: 1.25em;
    line-height: 1;
}

.multi-value-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}

.multi-inline-icon {
    padding: 4px;
    border-radius: 999px;
    background: rgba(240, 247, 255, 0.9);
}

.birthday-marker {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 999px;
    color: #d97706;
    background: rgba(255, 247, 237, 0.95);
    border: 1px solid rgba(245, 158, 11, 0.28);
    box-shadow: 0 6px 14px rgba(10, 25, 55, 0.12);
}

.birthday-marker svg {
    width: 15px;
    height: 15px;
}

.name-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.bulk-actions-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(240, 247, 255, 0.92);
    border: 1px solid rgba(36, 85, 180, 0.14);
}

.bulk-actions-bar select {
    min-width: 220px;
}

.bulk-select-col {
    width: 44px;
    text-align: center;
}

.pager-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
}

.pager-summary {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pager-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.pager-size-form {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(240, 247, 255, 0.92);
    border: 1px solid rgba(36, 85, 180, 0.14);
}

.pager-size-form select {
    min-width: 90px;
}

.role-access-grid {
    align-items: start;
    min-width: 760px;
}

.role-access-label {
    display: grid;
    gap: 5px;
    align-content: start;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
}

.role-access-label strong {
    line-height: 1.35;
}

.role-access-label span {
    line-height: 1.5;
}

.role-access-control {
    display: grid;
    align-items: center;
}

.permission-select {
    width: 100%;
    min-width: 0;
    max-width: none;
    padding-right: 34px;
}

.detail-list {
    display: grid;
    gap: 8px;
    margin: 14px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(36, 85, 180, 0.08);
    min-width: 0;
}

.detail-row > span:first-child {
    color: var(--muted);
    flex: 1 1 42%;
    min-width: 0;
}

.detail-row > span:last-child {
    flex: 1 1 58%;
    min-width: 0;
    text-align: right;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.detail-row-stack {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.detail-row-stack > span:last-child {
    width: 100%;
    text-align: left;
}

.gallery-text-block-list {
    display: grid;
    gap: 12px;
    margin: 14px 0 4px;
}

.gallery-text-block {
    display: grid;
    gap: 8px;
    width: 100%;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.1);
    background: rgba(247, 250, 255, 0.96);
}

.gallery-text-block-title {
    min-width: 0;
}

.gallery-text-block-title-label {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.gallery-text-block-body {
    width: 100%;
    color: var(--text);
    line-height: 1.55;
    white-space: normal;
    word-break: break-word;
}

.gallery-text-block-expand {
    display: grid;
    gap: 8px;
}

.gallery-text-block-more {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: rgba(79, 98, 132, 0.82);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.2;
}

.gallery-text-block-more:hover,
.gallery-text-block-more:focus-visible {
    color: rgba(56, 74, 108, 0.92);
}

.gallery-text-block-rest {
    width: 100%;
    color: var(--text);
    line-height: 1.55;
    white-space: normal;
    word-break: break-word;
}

.gallery-multi-rest {
    padding-top: 2px;
}

.field-emphasis {
    display: inline;
}

.field-style-none {
    font-weight: inherit;
    font-style: normal;
    text-decoration: none;
}

.field-style-bold {
    font-weight: 800;
}

.field-style-italic {
    font-style: italic;
}

.field-style-underline {
    text-decoration: underline;
    text-underline-offset: 0.14em;
}

.field-style-color {
    font-weight: inherit;
}

.field-size-sm {
    font-size: 0.9em;
}

.field-size-md {
    font-size: 1em;
}

.field-size-lg {
    font-size: 1.08em;
}

.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: 24px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.8);
    width: 100%;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    padding: 6px 8px;
}

.users-table-wrap {
    overflow-y: auto;
    max-height: 640px;
}

.dashboard-list-table-wrap {
    overflow-x: auto;
    overflow-y: hidden;
}

.dashboard-list-table {
    display: table;
    width: max-content;
    min-width: 100%;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
}

.dashboard-list-table thead {
    display: table-header-group;
}

.dashboard-list-table tbody {
    display: table-row-group;
}

.dashboard-list-table tr {
    display: table-row;
}

.dashboard-list-table th,
.dashboard-list-table td {
    display: table-cell;
    width: auto;
    min-width: 132px;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    vertical-align: middle;
}

.dashboard-list-table td::before {
    content: none !important;
    display: none !important;
}

.dashboard-list-table th {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
}

.dashboard-list-table th.list-column-header {
    white-space: nowrap;
}

.dashboard-list-table .list-column-header-label {
    display: inline-block;
    min-width: max-content;
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.dashboard-list-table .list-column-sort {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: auto;
    min-width: max-content;
}

.dashboard-list-table td {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dashboard-list-table td.col-checkbox,
.dashboard-list-table th.col-checkbox {
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    text-align: center;
}

.dashboard-list-table td.col-actions,
.dashboard-list-table th.col-actions {
    width: 150px;
    min-width: 150px;
    max-width: 150px;
}

.dashboard-list-table td:first-child,
.dashboard-list-table th:first-child {
    padding-left: 18px;
}

.dashboard-list-table td:last-child,
.dashboard-list-table th:last-child {
    padding-right: 18px;
}

.dashboard-list-table .row-actions {
    flex-wrap: nowrap;
    gap: 8px;
    align-items: center;
    min-width: max-content;
}

.dashboard-list-table td.col-actions .row-actions {
    justify-content: flex-start;
}

.dashboard-list-table .icon-btn,
.dashboard-list-table .static-indicator {
    width: 34px;
    height: 34px;
    border-radius: 12px;
}

.dashboard-list-table .icon-btn svg {
    width: 14px;
    height: 14px;
}

.dashboard-list-table .list-column-resize-handle {
    position: absolute;
    top: 8px;
    right: -5px;
    width: 10px;
    height: calc(100% - 16px);
    cursor: col-resize;
    border-radius: 999px;
    z-index: 3;
}

.dashboard-list-table .list-column-resize-handle::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.36);
}

.dashboard-list-table th.is-resizing {
    user-select: none;
}

.dashboard-list-table th.is-resizing .list-column-resize-handle::before,
.dashboard-list-table .list-column-resize-handle:hover::before {
    background: rgba(17, 99, 255, 0.46);
}

.dashboard-list-table td > * {
    max-width: 100%;
}

.dashboard-list-table td .field-emphasis,
.dashboard-list-table td .badge-soft,
.dashboard-list-table td .submission-badge,
.dashboard-list-table td a:not(.icon-btn):not(.btn) {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

html[data-theme="dark"] .dashboard-list-table-wrap {
    background: rgba(16, 26, 41, 0.94);
}

html[data-theme="dark"] .dashboard-list-table td::before {
    content: none !important;
    display: none !important;
}

table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(36, 85, 180, 0.1);
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

th {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: rgba(17, 99, 255, 0.055);
}

th.list-column-header {
    position: relative;
    cursor: grab;
    user-select: none;
    transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
    white-space: normal;
}

th.list-column-header::before {
    content: "⋮⋮";
    display: inline-block;
    margin-right: 8px;
    color: rgba(93, 118, 153, 0.75);
    letter-spacing: -0.1em;
}

th.list-column-header.is-dragging {
    opacity: 0.55;
    cursor: grabbing;
}

th.list-column-header.is-drop-target {
    background: rgba(17, 99, 255, 0.11);
    color: var(--brand-strong);
    box-shadow: inset 0 -2px 0 rgba(17, 99, 255, 0.22);
}

.list-column-header-label {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    overflow-wrap: anywhere;
}

.list-column-sort {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    color: inherit;
    text-decoration: none;
}

.list-column-sort:hover,
.list-column-sort:focus-visible {
    color: var(--brand-strong);
}

.list-column-sort.is-active {
    color: var(--brand-strong);
}

.list-column-sort-indicator {
    font-size: 12px;
    line-height: 1;
    color: rgba(93, 118, 153, 0.9);
}

.list-column-sort.is-active .list-column-sort-indicator {
    color: var(--brand-strong);
}

tr:hover td {
    background: rgba(17, 99, 255, 0.03);
}

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

.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.08);
    color: var(--brand-strong);
    font-size: 12px;
    font-weight: 700;
}

.badge-soft-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.submission-badge {
    gap: 5px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
}

.submission-badge-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.submission-badge-icon svg {
    width: 11px;
    height: 11px;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 50px 24px 24px;
    background: rgba(10, 25, 55, 0.5);
    z-index: 20050;
}

.modal.is-open {
    display: flex;
}

body.modal-open {
    overflow: hidden;
}

.modal-card {
    width: min(980px, 100%);
    max-height: calc(100vh - 74px);
    overflow: auto;
    padding: 26px;
}

.copy-entry-modal {
    width: min(620px, 100%);
}

.copy-entry-form {
    display: grid;
    gap: 18px;
}

.copy-entry-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
    gap: 16px;
    align-items: start;
}

.copy-entry-summary {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(233, 241, 255, 0.74), rgba(255, 255, 255, 0.86));
    border: 1px solid var(--line);
}

.copy-entry-summary strong {
    font-size: 14px;
}

.copy-entry-summary p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.note-content {
    padding: 18px 20px;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    line-height: 1.7;
    white-space: normal;
}

.my-favorites-info-card {
    position: relative;
    overflow: hidden;
    border-color: rgba(36, 85, 180, 0.14);
    background:
        radial-gradient(circle at top right, rgba(142, 188, 255, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(247, 251, 255, 0.98), rgba(255, 255, 255, 0.92));
}

.my-favorites-info-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, rgba(74, 129, 226, 0.92), rgba(143, 181, 244, 0.45));
}

.my-favorites-info-card .page-header {
    position: relative;
    margin-bottom: 10px;
    padding-left: 4px;
}

.my-favorites-info-card .section-title {
    max-width: 28ch;
}

.my-favorites-info-content {
    position: relative;
    padding: 20px 22px;
    border-radius: 22px;
    border-color: rgba(36, 85, 180, 0.12);
    background: rgba(255, 255, 255, 0.76);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 16px 30px rgba(17, 68, 160, 0.06);
}

.my-favorites-info-content > :first-child {
    margin-top: 0;
}

.my-favorites-info-content > :last-child {
    margin-bottom: 0;
}

.my-favorites-info-content p,
.my-favorites-info-content ul,
.my-favorites-info-content ol {
    margin: 0 0 12px;
}

.my-favorites-info-content ul,
.my-favorites-info-content ol {
    padding-left: 20px;
}

.my-favorites-info-content li + li {
    margin-top: 6px;
}

.my-favorites-info-content a {
    color: var(--brand-strong);
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px solid rgba(74, 129, 226, 0.28);
}

.my-favorites-info-content a:hover,
.my-favorites-info-content a:focus-visible {
    border-bottom-color: rgba(74, 129, 226, 0.72);
}

html[data-theme="dark"] .my-favorites-info-card {
    border-color: rgba(118, 163, 232, 0.18);
    background:
        radial-gradient(circle at top right, rgba(76, 123, 204, 0.18), transparent 36%),
        linear-gradient(180deg, rgba(17, 28, 44, 0.98), rgba(14, 23, 36, 0.96));
}

html[data-theme="dark"] .my-favorites-info-card::before {
    background: linear-gradient(180deg, rgba(118, 163, 232, 0.96), rgba(118, 163, 232, 0.34));
}

html[data-theme="dark"] .my-favorites-info-content {
    background: rgba(12, 21, 33, 0.88);
    border-color: rgba(118, 163, 232, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.04),
        0 18px 36px rgba(3, 8, 18, 0.28);
}

html[data-theme="dark"] .my-favorites-info-content a {
    color: rgba(160, 194, 255, 0.96);
    border-bottom-color: rgba(160, 194, 255, 0.24);
}

html[data-theme="dark"] .my-favorites-info-content a:hover,
html[data-theme="dark"] .my-favorites-info-content a:focus-visible {
    border-bottom-color: rgba(160, 194, 255, 0.7);
}

.panel-subsection {
    margin-bottom: 18px;
}

.quick-action-card {
    padding: 18px;
}

.admin-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin-bottom: 0;
}

.admin-summary-grid-compact {
    margin-bottom: 0;
}

.admin-summary-card {
    display: grid;
    gap: 8px;
    padding: 16px 18px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.admin-summary-card strong {
    font-size: 18px;
    line-height: 1.2;
}

.admin-jump-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    margin: 18px 0 20px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

.admin-jump-card strong {
    font-size: 14px;
    line-height: 1.3;
}

.admin-jump-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.55;
}

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

.admin-jump-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 8px 12px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    box-shadow: none;
    transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.admin-jump-link:hover,
.admin-jump-link:focus-visible {
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--line-strong);
    color: var(--brand-strong);
    transform: translateY(-1px);
}

.admin-accordion {
    position: relative;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    padding: 0 18px 18px;
    margin-bottom: 16px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
    overflow: visible;
}

.admin-accordion[open] {
    z-index: 220;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 16px 34px rgba(17, 68, 160, 0.08);
}

.admin-accordion.is-jump-highlighted {
    border-color: rgba(17, 99, 255, 0.38);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 4px rgba(17, 99, 255, 0.08),
        0 20px 40px rgba(17, 68, 160, 0.12);
    animation: adminAccordionJumpHighlight 1.7s ease;
}

.admin-accordion summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 4px;
    font-size: 16px;
    font-weight: 700;
}

.admin-accordion summary::after {
    content: "+";
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid var(--line);
    display: inline-grid;
    place-items: center;
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
    background: rgba(255, 255, 255, 0.92);
}

.admin-accordion[open] summary::after {
    content: "−";
}

.admin-summary-note {
    margin-left: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
}

.admin-accordion summary::-webkit-details-marker {
    display: none;
}

@keyframes adminAccordionJumpHighlight {
    0% {
        border-color: rgba(17, 99, 255, 0.48);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.92),
            0 0 0 0 rgba(17, 99, 255, 0.2),
            0 24px 46px rgba(17, 68, 160, 0.16);
    }
    100% {
        border-color: rgba(17, 99, 255, 0.18);
        box-shadow:
            inset 0 1px 0 rgba(255, 255, 255, 0.82),
            0 0 0 10px rgba(17, 99, 255, 0),
            0 16px 34px rgba(17, 68, 160, 0.08);
    }
}

.admin-checkbox-grid {
    display: grid;
    gap: 10px;
}

.admin-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    align-items: end;
}

.admin-filter-actions {
    align-self: end;
}

.dashboard-filter-panel {
    position: relative;
    z-index: 500;
    overflow: visible;
    isolation: isolate;
}

.filters {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(160px, 0.72fr) minmax(280px, 1.55fr) repeat(auto-fit, minmax(220px, 1fr));
    align-items: end;
}

.admin-accordion .filters {
    grid-template-columns:
        74px
        minmax(0, 1fr)
        minmax(0, 0.9fr)
        minmax(0, 0.9fr)
        minmax(0, 0.96fr)
        108px
        minmax(0, 0.88fr)
        minmax(0, 0.86fr);
    gap: 16px 12px;
    align-items: end;
}

.admin-accordion .filters > .dashboard-filter-field {
    max-width: none;
    width: 100%;
}

.dashboard-search-field input {
    min-height: 42px;
    padding: 10px 14px;
}

.dashboard-filter-field {
    position: relative;
    min-width: 0;
    width: 100%;
}

.dashboard-filter-field input,
.dashboard-filter-field select,
.dashboard-filter-field .dashboard-multiselect,
.dashboard-filter-field .dashboard-multiselect-trigger {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dashboard-filter-field input,
.dashboard-filter-field select,
.dashboard-filter-field .dashboard-multiselect-trigger,
.dashboard-filter-field .self-entry-multiselect-trigger-summary,
.dashboard-filter-field .self-entry-multiselect-trigger-placeholder,
.dashboard-filter-field .self-entry-multiselect-option,
.dashboard-filter-field .self-entry-multiselect-option span {
    color: #101828;
    -webkit-text-fill-color: #101828;
}

.dashboard-filter-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.95);
}

.dashboard-filter-field select option {
    color: #101828;
    background: #ffffff;
}

.dashboard-filter-panel .dashboard-filter-field select,
.dashboard-filter-panel .dashboard-filter-field select option,
.dashboard-filter-panel .dashboard-multiselect-trigger,
.dashboard-filter-panel .dashboard-multiselect-trigger span,
.dashboard-filter-panel .dashboard-multiselect-popover,
.dashboard-filter-panel .dashboard-multiselect-popover h3,
.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-link,
.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-option,
.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-option span,
.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-trigger-placeholder,
.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-trigger-summary {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
}

.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-option {
    justify-content: flex-start !important;
}

.dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-option span {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
}

.dashboard-filter-panel .dashboard-filter-option-label {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
}

.dashboard-filter-panel .dashboard-multiselect-popover {
    background: #ffffff !important;
}

.dashboard-filter-panel .self-entry-multiselect-options {
    display: block !important;
}

.dashboard-filter-panel .self-entry-multiselect-option {
    display: grid !important;
    grid-template-columns: 18px minmax(0, 1fr) !important;
    align-items: start !important;
    justify-content: stretch !important;
    column-gap: 12px !important;
    row-gap: 0 !important;
    width: 100% !important;
    min-height: 54px !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    border: 1px solid rgba(36, 85, 180, 0.08) !important;
    background: rgba(248, 251, 255, 0.96) !important;
    color: #101828 !important;
    box-sizing: border-box !important;
}

.dashboard-filter-panel .self-entry-multiselect-option input {
    display: block !important;
    width: 18px !important;
    height: 18px !important;
    flex: 0 0 auto !important;
    justify-self: start !important;
    align-self: start !important;
    margin: 0 !important;
}

.dashboard-filter-entry_id {
    max-width: 74px;
}

.dashboard-filter-entry_id input {
    max-width: 74px;
}

.dashboard-filter-skills,
.dashboard-filter-skills_experience,
.dashboard-filter-faehigkeiten,
.dashboard-filter-faehigkeiten_und_erfahrungsbereiche {
    max-width: none;
}

.dashboard-filter-language,
.dashboard-filter-languages,
.dashboard-filter-sprache,
.dashboard-filter-sprachen {
    max-width: 108px;
}

.dashboard-filter-language select,
.dashboard-filter-languages select,
.dashboard-filter-sprache select,
.dashboard-filter-sprachen select {
    max-width: 108px;
}

.dashboard-multiselect {
    width: 100%;
    gap: 8px;
}

.dashboard-multiselect-trigger {
    min-height: 49px;
    padding: 13px 14px;
    border-radius: 18px;
    border-color: var(--line-strong);
    background: rgba(255, 255, 255, 0.95);
    color: #101828;
    -webkit-text-fill-color: #101828;
    box-shadow: none;
}

.dashboard-multiselect-popover {
    min-width: min(360px, calc(100vw - 48px));
}

.dashboard-multiselect .self-entry-multiselect-trigger-copy {
    gap: 0;
}

.dashboard-multiselect .self-entry-multiselect-trigger-placeholder,
.dashboard-multiselect .self-entry-multiselect-trigger-summary {
    color: #101828;
    -webkit-text-fill-color: #101828;
    font-weight: 500;
    line-height: 1.35;
}

.dashboard-multiselect .self-entry-multiselect-trigger-summary {
    color: #101828;
    -webkit-text-fill-color: #101828;
}

.dashboard-multiselect .self-entry-multiselect-trigger-icon {
    width: 22px;
    height: 22px;
    border: 0;
    background: transparent;
    transform: none;
}

.dashboard-multiselect .self-entry-multiselect-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.08);
}

.dashboard-multiselect .self-entry-multiselect-chips {
    display: none !important;
}

.admin-accordion .dashboard-multiselect-trigger,
.admin-accordion .dashboard-multiselect-trigger span,
.admin-accordion .dashboard-multiselect-popover,
.admin-accordion .dashboard-multiselect-popover h3,
.admin-accordion .dashboard-multiselect-popover .self-entry-multiselect-link,
.admin-accordion .dashboard-multiselect-popover .self-entry-multiselect-option,
.admin-accordion .dashboard-multiselect-popover .self-entry-multiselect-option span {
    color: #101828 !important;
    -webkit-text-fill-color: #101828 !important;
}

.admin-accordion .dashboard-multiselect-trigger {
    background: rgba(255, 255, 255, 0.95) !important;
    background-image: none !important;
}

.admin-accordion .dashboard-multiselect-popover {
    background: rgba(255, 255, 255, 0.99) !important;
}

.dashboard-filter-actions {
    gap: 8px;
    align-items: center;
}

.dashboard-search-submit {
    min-height: 42px;
    padding: 9px 15px;
    box-shadow: none;
    white-space: nowrap;
    line-height: 1.2;
    flex: 0 0 auto;
}

.dashboard-filter-actions .btn,
.dashboard-filter-actions button {
    min-height: 42px;
    white-space: nowrap;
    line-height: 1.2;
    align-self: center;
}

@media (max-width: 1580px) {
    .admin-accordion .filters {
        grid-template-columns:
            74px
            minmax(0, 0.95fr)
            minmax(0, 0.86fr)
            minmax(0, 0.86fr)
            minmax(0, 0.92fr)
            104px
            minmax(0, 0.82fr)
            minmax(0, 0.8fr);
        gap: 14px 10px;
    }
}

@media (max-width: 1420px) {
    .admin-accordion .filters {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px 12px;
    }

    .dashboard-filter-entry_id,
    .dashboard-filter-language,
    .dashboard-filter-languages,
    .dashboard-filter-sprache,
    .dashboard-filter-sprachen {
        max-width: none;
    }

    .dashboard-filter-entry_id input,
    .dashboard-filter-language select,
    .dashboard-filter-languages select,
    .dashboard-filter-sprache select,
    .dashboard-filter-sprachen select {
        max-width: none;
    }
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    align-items: end;
}

.filters-grid-compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 14px;
}

.admin-filter-panel-compact {
    gap: 14px;
}

.admin-filter-panel-compact .panel-heading {
    gap: 6px;
}

.admin-filter-panel-compact .section-title {
    font-size: 20px;
}

.admin-filter-panel-compact .section-subtitle {
    font-size: 13px;
}

.admin-filter-panel-compact .filters {
    gap: 12px;
}

.admin-filter-panel-compact .filters-actions {
    gap: 8px;
}

.security-log-filters {
    display: grid;
    gap: 14px;
}

.security-log-filters-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.security-log-filters-grid > div {
    min-width: 0;
    display: grid;
    gap: 6px;
    align-content: start;
}

.security-log-filters label {
    margin-bottom: 0;
    font-size: 12px;
    letter-spacing: 0.01em;
    color: #58739b;
}

.security-log-filters input,
.security-log-filters select {
    min-height: 42px;
    padding: 10px 12px;
    width: 100%;
    border-radius: 16px;
}

.security-log-filters select,
.security-log-filters input[type="date"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background: rgba(255, 255, 255, 0.96);
    color: #101828;
    -webkit-text-fill-color: #101828;
    border-color: rgba(36, 85, 180, 0.16);
    box-shadow: none;
}

.security-log-filters select option {
    background: #ffffff;
    color: #101828;
}

.security-log-filters select:focus,
.security-log-filters input[type="date"]:focus {
    border-color: rgba(17, 99, 255, 0.28);
    box-shadow: 0 0 0 3px rgba(17, 99, 255, 0.08);
}

.security-log-filters .filters-actions {
    justify-content: flex-start;
    gap: 10px;
    align-items: center;
    padding-top: 2px;
}

.security-log-filters .filters-actions .compact-submit,
.security-log-filters .filters-actions .btn {
    min-height: 42px;
    padding-inline: 18px;
}

.filters-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
}

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

.personality-pdf-link-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
}

.personality-pdf-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    color: var(--brand-strong);
    text-decoration: none;
    font-size: 11px;
    line-height: 1;
    opacity: 0.82;
}

.personality-pdf-link:hover,
.personality-pdf-link:focus-visible {
    opacity: 1;
    background: rgba(17, 99, 255, 0.08);
}

html[data-theme="dark"] .personality-pdf-link {
    color: #cfe0ff;
}

html[data-theme="dark"] .personality-pdf-link:hover,
html[data-theme="dark"] .personality-pdf-link:focus-visible {
    background: rgba(113, 153, 226, 0.12);
}

.mini-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.page-header {
    display: grid;
    gap: 8px;
}

.page-header p {
    margin: 0;
    max-width: 74ch;
    line-height: 1.6;
}

.mini-list-row strong,
.mini-list-row span {
    display: block;
}

.switch-view-search {
    position: relative;
}

.switch-view-search-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 30;
    display: grid;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
}

.switch-view-search-option,
.switch-view-search-empty {
    width: 100%;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(248, 250, 252, 0.96);
    color: var(--text);
    text-align: left;
}

.switch-view-search-option {
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.switch-view-search-option:hover,
.switch-view-search-option:focus-visible {
    border-color: var(--accent);
    background: rgba(232, 240, 255, 0.92);
    transform: translateY(-1px);
}

.switch-view-search-option strong {
    display: block;
    font-size: 0.88rem;
    line-height: 1.25;
    font-weight: 600;
}

.switch-view-search-empty {
    color: var(--muted);
}

html[data-theme="dark"] .switch-view-search-results,
body.theme-dark .switch-view-search-results {
    border-color: rgba(152, 180, 226, 0.28);
    background: #101b2c;
    box-shadow: 0 18px 40px rgba(2, 6, 23, 0.48);
}

html[data-theme="dark"] .switch-view-search-option,
html[data-theme="dark"] .switch-view-search-empty,
body.theme-dark .switch-view-search-option,
body.theme-dark .switch-view-search-empty {
    border-color: rgba(152, 180, 226, 0.22);
    background: #162235;
    color: #edf3ff;
}

html[data-theme="dark"] .switch-view-search-option:hover,
html[data-theme="dark"] .switch-view-search-option:focus-visible,
body.theme-dark .switch-view-search-option:hover,
body.theme-dark .switch-view-search-option:focus-visible {
    border-color: rgba(106, 157, 255, 0.68);
    background: #223958;
    color: #ffffff;
}

html[data-theme="dark"] .switch-view-search-empty,
body.theme-dark .switch-view-search-empty {
    color: #b7c7df;
}

.database-history-row {
    align-items: flex-start;
    gap: 12px;
}

.database-history-actions {
    justify-content: flex-end;
    align-items: center;
}

.database-history-actions form {
    margin: 0;
}

.modal-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.detail-photo-frame {
    width: 100%;
    min-height: 320px;
    border-radius: 24px;
    border: 1px solid rgba(36, 85, 180, 0.14);
    background: linear-gradient(135deg, rgba(17, 99, 255, 0.12), rgba(8, 145, 178, 0.08));
    overflow: hidden;
    display: grid;
    place-items: center;
    padding: 14px;
}

.detail-photo-frame-tall {
    min-height: 420px;
}

.detail-photo {
    display: block;
    width: 100%;
    height: 100%;
    max-height: 420px;
    object-fit: contain;
    object-position: center;
}

.detail-photo-cover {
    object-fit: cover;
}

.detail-photo-fallback {
    width: 100%;
    min-height: 290px;
    border-radius: 20px;
}

.detail-media-panel {
    display: grid;
    gap: 14px;
}

.detail-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.detail-photo-thumb {
    display: block;
    width: 88px;
    height: 88px;
    padding: 0;
    border: 1px solid rgba(26, 58, 112, 0.14);
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 24px rgba(17, 68, 160, 0.1);
    cursor: pointer;
}

.detail-photo-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.detail-photo-thumb:hover,
.detail-photo-thumb:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(17, 68, 160, 0.16);
}

.detail-link-row {
    display: flex;
    justify-content: flex-start;
}

.detail-linkedin-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 52, 92, 0.12);
    box-shadow: 0 10px 24px rgba(17, 68, 160, 0.08);
    color: #35506f;
    text-decoration: none;
    font-weight: 600;
}

.detail-linkedin-link svg {
    width: 16px;
    height: 16px;
}

.detail-linkedin-link:hover,
.detail-linkedin-link:focus-visible {
    background: rgba(244, 248, 252, 0.98);
    color: #19324d;
}

.detail-entry-id {
    margin-bottom: 10px;
}

.form-photo-frame {
    max-width: 292px;
    min-height: 210px;
}

.history-list {
    display: grid;
    gap: 12px;
}

.history-item {
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.84);
}

.footer {
    margin-top: 26px;
    padding: 18px 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.footer .footer-row {
    justify-content: space-between;
    align-items: flex-end;
}

.footer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.footer a {
    color: inherit;
}

.online-popover {
    position: relative;
}

.notification-popover {
    position: relative;
    z-index: 200;
}

.notification-popover[open] {
    z-index: 10000;
}

.online-popover summary {
    list-style: none;
}

.notification-popover summary {
    list-style: none;
}

.online-popover summary::-webkit-details-marker {
    display: none;
}

.notification-popover summary::-webkit-details-marker {
    display: none;
}

.online-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.online-popover-card {
    position: absolute;
    right: 0;
    bottom: calc(100% + 12px);
    width: min(380px, 90vw);
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(11, 42, 102, 0.18);
    z-index: 40;
}

.notification-popover-card {
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    width: min(430px, 92vw);
    padding: 16px;
    border-radius: 22px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 20px 50px rgba(11, 42, 102, 0.18);
    z-index: 9999;
}

.login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    gap: 18px;
}

.login-card {
    width: min(460px, 100%);
    padding: 30px;
}

.login-branding {
    margin-bottom: 18px;
}

.login-subtle-text {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.6;
}

.login-logo,
.login-logo-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    margin: 0 auto 18px;
}

.login-logo img {
    display: block;
    width: auto;
    max-width: min(250px, 100%);
    max-height: 60px;
    height: auto;
    object-fit: contain;
}

.login-logo-fallback span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(17, 99, 255, 0.1);
    color: var(--brand-strong);
    font-size: 24px;
    font-weight: 800;
}

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

.login-helper-links {
    display: flex;
    justify-content: center;
    margin-top: 14px;
}

.login-helper-links-left {
    justify-content: flex-start;
    margin-top: 10px;
}

.login-text-link {
    color: #7b8798;
    text-decoration: none;
    font-size: 14px;
}

.login-text-link:hover {
    color: #5f6c7e;
    text-decoration: none;
}

.login-submit {
    min-width: 118px;
    padding: 8px 14px;
    box-shadow: none;
}

.compact-submit {
    min-width: 124px;
    padding: 8px 14px;
    background: var(--brand);
    box-shadow: none;
    border-radius: 14px;
}

.twofa-setup-card {
    padding: 20px;
}

.twofa-qr-image {
    display: block;
    width: min(196px, 100%);
    max-width: 100%;
    margin: 8px 0 12px;
    border-radius: 18px;
    border: 1px solid rgba(36, 85, 180, 0.14);
    background: rgba(255, 255, 255, 0.94);
}

.twofa-action-row,
.twofa-secondary-action {
    display: flex;
    align-items: center;
    gap: 10px;
}

.center {
    text-align: center;
}

.login-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 18px;
    width: min(460px, 100%);
    margin: 0 auto;
    padding: 0 8px 4px;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: center;
}

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

.login-footer a:hover {
    color: var(--brand-ink);
}

html[data-theme="dark"] .panel-callout,
html[data-theme="dark"] .preview-tile,
html[data-theme="dark"] .role-display-card,
html[data-theme="dark"] .role-display-setting-row,
html[data-theme="dark"] .editor-section,
html[data-theme="dark"] .editor-checkbox-panel,
html[data-theme="dark"] .editor-upload-preview,
html[data-theme="dark"] .editor-file-row,
html[data-theme="dark"] .editor-preview-tile,
html[data-theme="dark"] .text-override-card,
html[data-theme="dark"] .text-override-default-value,
html[data-theme="dark"] .field-row,
html[data-theme="dark"] .choice-card,
html[data-theme="dark"] .roles-grid > div,
html[data-theme="dark"] .gallery-config-row,
html[data-theme="dark"] .field-style-row,
html[data-theme="dark"] .copy-entry-summary,
html[data-theme="dark"] .note-content,
html[data-theme="dark"] .admin-summary-card,
html[data-theme="dark"] .admin-accordion,
html[data-theme="dark"] .mini-list-row,
html[data-theme="dark"] .history-item,
html[data-theme="dark"] .online-popover-card,
html[data-theme="dark"] .notification-popover-card,
html[data-theme="dark"] .detail-linkedin-link,
html[data-theme="dark"] .login-card,
html[data-theme="dark"] .twofa-setup-card {
    background: rgba(18, 29, 45, 0.96);
    color: var(--text);
}

html[data-theme="dark"] .preview-tile,
html[data-theme="dark"] .editor-upload-preview,
html[data-theme="dark"] .editor-file-row,
html[data-theme="dark"] .editor-preview-tile,
html[data-theme="dark"] .text-override-default-value,
html[data-theme="dark"] .gallery-text-block,
html[data-theme="dark"] .copy-entry-summary,
html[data-theme="dark"] .detail-linkedin-link {
    background: rgba(14, 23, 36, 0.98);
}

html[data-theme="dark"] .choice-card:hover,
html[data-theme="dark"] .choice-card:has(input[type="checkbox"]:checked),
html[data-theme="dark"] .admin-accordion[open],
html[data-theme="dark"] .user-menu-item:hover,
html[data-theme="dark"] .user-menu-item:focus-visible,
html[data-theme="dark"] .user-menu-item-button:hover,
html[data-theme="dark"] .user-menu-item-button:focus-visible {
    background: rgba(27, 42, 64, 0.98);
}

html[data-theme="dark"] .choice-card span,
html[data-theme="dark"] .gallery-config-label strong,
html[data-theme="dark"] .field-style-label strong,
html[data-theme="dark"] .role-display-setting-copy strong,
html[data-theme="dark"] .copy-entry-summary strong,
html[data-theme="dark"] .detail-linkedin-link,
html[data-theme="dark"] .detail-row > span:last-child,
html[data-theme="dark"] .entry-body,
html[data-theme="dark"] .entry-title,
html[data-theme="dark"] .panel-heading strong,
html[data-theme="dark"] .admin-accordion summary,
html[data-theme="dark"] .mini-list-row strong,
html[data-theme="dark"] .login-text-link {
    color: var(--text);
}

html[data-theme="dark"] .role-display-setting-copy span,
html[data-theme="dark"] .gallery-config-label span,
html[data-theme="dark"] .field-style-label span,
html[data-theme="dark"] .copy-entry-summary p,
html[data-theme="dark"] .detail-row > span:first-child,
html[data-theme="dark"] .gallery-text-block-title-label,
html[data-theme="dark"] .login-subtle-text,
html[data-theme="dark"] .login-footer,
html[data-theme="dark"] .login-footer a,
html[data-theme="dark"] .login-text-link:hover {
    color: var(--muted);
}

html[data-theme="dark"] .detail-linkedin-link:hover,
html[data-theme="dark"] .detail-linkedin-link:focus-visible {
    background: rgba(22, 35, 53, 0.98);
    color: #d7e5ff;
    border-color: rgba(179, 201, 236, 0.28);
}

html[data-theme="dark"] .table-wrap {
    background: rgba(16, 26, 41, 0.94);
}

html[data-theme="dark"] th,
html[data-theme="dark"] td {
    border-bottom-color: rgba(152, 180, 226, 0.12);
}

html[data-theme="dark"] th {
    background: rgba(106, 157, 255, 0.07);
    color: #adc0dc;
}

html[data-theme="dark"] tr:hover td {
    background: rgba(106, 157, 255, 0.08);
}

html[data-theme="dark"] .entry-media-frame,
html[data-theme="dark"] .entry-media img {
    background: rgba(10, 17, 28, 0.3);
}

html[data-theme="dark"] .entry-media-gender-badge {
    background: rgba(16, 27, 42, 0.9);
    border-color: rgba(179, 201, 236, 0.18);
}

html[data-theme="dark"] .gender-badge-male {
    color: #7eb4ff;
}

html[data-theme="dark"] .gender-badge-female {
    color: #f08ac0;
}

html[data-theme="dark"] .dashboard-search-field input,
html[data-theme="dark"] .dashboard-search-submit {
    min-height: 42px;
}

html[data-theme="dark"] .dashboard-filter-field input,
html[data-theme="dark"] .dashboard-filter-field select,
html[data-theme="dark"] .dashboard-filter-field .dashboard-multiselect-trigger,
html[data-theme="dark"] .dashboard-filter-field .self-entry-multiselect-trigger-summary,
html[data-theme="dark"] .dashboard-filter-field .self-entry-multiselect-trigger-placeholder,
html[data-theme="dark"] .dashboard-filter-field .self-entry-multiselect-option,
html[data-theme="dark"] .dashboard-filter-field .self-entry-multiselect-option span {
    color: #f3f7ff;
    -webkit-text-fill-color: #f3f7ff;
}

html[data-theme="dark"] .dashboard-filter-field select {
    background-color: rgba(15, 24, 38, 0.94);
}

html[data-theme="dark"] .dashboard-filter-field select option {
    color: #f3f7ff;
    background: #16202f;
}

html[data-theme="dark"] .dashboard-multiselect-trigger {
    color: #f3f7ff;
    -webkit-text-fill-color: #f3f7ff;
}

html[data-theme="dark"] .admin-accordion .dashboard-multiselect-trigger,
html[data-theme="dark"] .admin-accordion .dashboard-multiselect-trigger span,
html[data-theme="dark"] .admin-accordion .dashboard-multiselect-popover,
html[data-theme="dark"] .admin-accordion .dashboard-multiselect-popover h3,
html[data-theme="dark"] .admin-accordion .dashboard-multiselect-popover .self-entry-multiselect-link,
html[data-theme="dark"] .admin-accordion .dashboard-multiselect-popover .self-entry-multiselect-option,
html[data-theme="dark"] .admin-accordion .dashboard-multiselect-popover .self-entry-multiselect-option span {
    color: #f3f7ff !important;
    -webkit-text-fill-color: #f3f7ff !important;
}

html[data-theme="dark"] .admin-accordion .dashboard-multiselect-trigger {
    background: rgba(15, 24, 38, 0.94) !important;
    background-image: none !important;
}

html[data-theme="dark"] .admin-accordion .dashboard-multiselect-popover {
    background: rgba(16, 27, 43, 0.98) !important;
}

html[data-theme="dark"] .dashboard-filter-panel .dashboard-filter-field select,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-filter-field select option,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-trigger,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-trigger span,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover h3,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-link,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-option,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-option span,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-trigger-placeholder,
html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover .self-entry-multiselect-trigger-summary {
    color: #f3f7ff !important;
    -webkit-text-fill-color: #f3f7ff !important;
}

html[data-theme="dark"] .dashboard-filter-panel .dashboard-multiselect-popover {
    background: rgba(16, 27, 43, 0.98) !important;
}

html[data-theme="dark"] .dashboard-filter-panel .self-entry-multiselect-option {
    background: rgba(21, 33, 51, 0.94) !important;
    border-color: rgba(152, 180, 226, 0.12) !important;
}

html[data-theme="dark"] .dashboard-filter-panel .dashboard-filter-option-label {
    color: #f3f7ff !important;
    -webkit-text-fill-color: #f3f7ff !important;
}

html[data-theme="dark"] .top-actions,
html[data-theme="dark"] .toolbar,
html[data-theme="dark"] .button-row,
html[data-theme="dark"] .segmented,
html[data-theme="dark"] .nav-pills {
    color: var(--text);
}


html[data-theme="dark"] .surface {
    background: rgba(15, 24, 38, 0.96);
}

html[data-theme="dark"] .stats-grid .stat-card {
    background: linear-gradient(180deg, rgba(20, 32, 49, 0.98), rgba(14, 23, 36, 0.96));
    border-color: rgba(152, 180, 226, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 36px rgba(3, 8, 18, 0.26);
}

html[data-theme="dark"] .stats-grid .stat-card > span,
html[data-theme="dark"] .stats-grid .stat-card .muted {
    color: #9fb1cb;
}

html[data-theme="dark"] .stats-grid .stat-card strong {
    color: #f2f6ff;
}

html[data-theme="dark"] .account-modal-section {
    background: linear-gradient(180deg, rgba(21, 35, 55, 0.98), rgba(16, 27, 43, 0.94));
    border-color: rgba(152, 180, 226, 0.16);
}

html[data-theme="dark"] .editor-media-section .editor-field {
    background: rgba(21, 33, 51, 0.82);
    border-color: rgba(152, 180, 226, 0.12);
}

html[data-theme="dark"] .editor-photo-panel-preview {
    background: linear-gradient(180deg, rgba(22, 35, 54, 0.98), rgba(16, 27, 43, 0.94));
    border-color: rgba(152, 180, 226, 0.16);
}

html[data-theme="dark"] .editor-avatar-picker-preview-frame {
    background: rgba(17, 29, 46, 0.94);
    border-color: rgba(152, 180, 226, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .editor-avatar-picker-label,
html[data-theme="dark"] .avatar-library-close,
html[data-theme="dark"] .avatar-library-chip,
html[data-theme="dark"] .avatar-library-recent-item,
html[data-theme="dark"] .avatar-library-item {
    background: rgba(13, 22, 37, 0.96);
    border-color: rgba(152, 180, 226, 0.16);
    color: rgba(241, 246, 255, 0.96);
}

html[data-theme="dark"] .avatar-library-chip.is-active {
    background: rgba(67, 126, 255, 0.16);
    border-color: rgba(118, 162, 255, 0.28);
    color: rgba(214, 229, 255, 0.98);
}

html[data-theme="dark"] .avatar-library-item-frame {
    background: rgba(21, 34, 61, 0.9);
}

html[data-theme="dark"] .avatar-library-empty {
    background: rgba(13, 21, 40, 0.92);
    border-color: rgba(118, 162, 255, 0.16);
    color: rgba(219, 230, 248, 0.86);
}

html[data-theme="dark"] .self-entry-upload-preview-card,
html[data-theme="dark"] .self-entry-upload-file-list {
    background: rgba(13, 25, 44, 0.86);
    border-color: rgba(92, 120, 166, 0.24);
}

html[data-theme="dark"] .self-entry-copy-block {
    background: linear-gradient(180deg, rgba(18, 31, 49, 0.96), rgba(15, 25, 40, 0.92));
    border-color: rgba(92, 120, 166, 0.28);
    color: #d8e4f5;
}

html[data-theme="dark"] .self-entry-help-popover,
html[data-theme="dark"] .self-entry-help-admin-panel {
    background: rgba(21, 31, 49, 0.96);
    border-color: rgba(141, 180, 255, 0.14);
}

html[data-theme="dark"] .self-entry-help-trigger,
html[data-theme="dark"] .self-entry-help-admin-trigger {
    background: rgba(143, 185, 255, 0.14);
    border-color: rgba(171, 204, 255, 0.26);
    color: #a9cbff;
}

html[data-theme="dark"] .admin-jump-card {
    background: rgba(18, 29, 45, 0.96);
    border-color: rgba(152, 180, 226, 0.18);
}

html[data-theme="dark"] .admin-jump-note {
    color: var(--muted);
}

html[data-theme="dark"] .admin-jump-link,
html[data-theme="dark"] .self-entry-help-admin-toggle {
    background: rgba(13, 22, 37, 0.96);
    border-color: rgba(152, 180, 226, 0.16);
    color: #edf3ff;
}

html[data-theme="dark"] .admin-jump-link:hover,
html[data-theme="dark"] .admin-jump-link:focus-visible,
html[data-theme="dark"] .self-entry-help-admin-toggle:hover,
html[data-theme="dark"] .self-entry-help-admin-toggle:focus-visible {
    background: rgba(21, 33, 51, 0.98);
    border-color: rgba(179, 201, 236, 0.24);
    color: #d7e6ff;
}

html[data-theme="dark"] .admin-accordion.is-jump-highlighted {
    border-color: rgba(122, 167, 255, 0.42);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.05),
        0 0 0 4px rgba(67, 126, 255, 0.12),
        0 22px 46px rgba(3, 8, 18, 0.34);
}

html[data-theme="dark"] .self-entry-help-admin-status {
    background: rgba(14, 23, 36, 0.96);
    border-color: rgba(152, 180, 226, 0.16);
    color: #a6b7cf;
}

html[data-theme="dark"] .self-entry-help-admin-status.is-present {
    background: rgba(67, 126, 255, 0.16);
    border-color: rgba(118, 162, 255, 0.24);
    color: #d7e6ff;
}

html[data-theme="dark"] .self-entry-field-error {
    color: #ff9ba6;
}

html[data-theme="dark"] .self-entry-field-invalid > input,
html[data-theme="dark"] .self-entry-field-invalid > select,
html[data-theme="dark"] .self-entry-field-invalid > textarea,
html[data-theme="dark"] .self-entry-field-invalid .self-entry-multiselect-trigger,
html[data-theme="dark"] .self-entry-field-invalid .matrix-input-table-wrap,
html[data-theme="dark"] .self-entry-field-invalid .self-entry-upload-preview-card,
html[data-theme="dark"] .self-entry-field-invalid .self-entry-upload-file-list,
html[data-theme="dark"] .self-entry-field-invalid .self-entry-upload-preview-frame,
html[data-theme="dark"] .self-entry-choice-invalid {
    border-color: rgba(255, 124, 138, 0.24) !important;
    box-shadow: 0 0 0 2px rgba(255, 124, 138, 0.05);
}

html[data-theme="dark"] .self-entry-field-invalid .self-entry-field-label > span,
html[data-theme="dark"] .self-entry-choice-invalid span,
html[data-theme="dark"] .self-entry-submit-alert {
    color: #ffc3ca;
}

html[data-theme="dark"] .self-entry-submit-alert {
    border-color: rgba(255, 124, 138, 0.14);
    background: linear-gradient(180deg, rgba(64, 28, 35, 0.88), rgba(50, 22, 29, 0.84));
}

html[data-theme="dark"] .self-entry-submit-alert-note {
    color: #ffb1bb;
}

html[data-theme="dark"] .self-entry-upload-preview-frame,
html[data-theme="dark"] .self-entry-file-row {
    background: rgba(18, 31, 51, 0.86);
    border-color: rgba(92, 120, 166, 0.18);
}

html[data-theme="dark"] .self-entry-upload-preview-empty,
html[data-theme="dark"] .self-entry-upload-preview-meta,
html[data-theme="dark"] .self-entry-file-remove {
    color: rgba(210, 221, 242, 0.72);
}

html[data-theme="dark"] .self-entry-file-remove:hover,
html[data-theme="dark"] .self-entry-file-remove:focus-visible {
    color: rgba(245, 248, 255, 0.96);
}

html[data-theme="dark"] .account-modal-block-label {
    background: rgba(113, 153, 226, 0.12);
    color: #d7e6ff;
}

html[data-theme="dark"] .admin-permission-default {
    background: rgba(80, 140, 255, 0.12);
    color: rgba(219, 228, 245, 0.76);
}

html[data-theme="dark"] .account-access-card {
    background: linear-gradient(180deg, rgba(20, 33, 52, 0.98), rgba(14, 23, 36, 0.96));
    border-color: rgba(152, 180, 226, 0.18);
}

html[data-theme="dark"] .account-access-info {
    border-top-color: rgba(152, 180, 226, 0.14);
}

html[data-theme="dark"] .account-access-info-copy {
    background: rgba(15, 26, 42, 0.72);
    border-color: rgba(152, 180, 226, 0.1);
}

html[data-theme="dark"] .account-access-row span {
    color: #9fb1cb;
}

html[data-theme="dark"] .dashboard-access-row .muted {
    color: #9fb1cb;
}

html[data-theme="dark"] .account-access-note {
    background: rgba(224, 170, 55, 0.16);
    color: #ffd486;
}

html[data-theme="dark"] .account-access-card-expired {
    background: linear-gradient(180deg, rgba(39, 25, 27, 0.98), rgba(27, 18, 22, 0.96));
    border-color: rgba(210, 112, 92, 0.28);
}

html[data-theme="dark"] .twofa-qr-image {
    background: rgba(12, 20, 34, 0.96);
    border-color: rgba(152, 180, 226, 0.16);
}

html[data-theme="dark"] .self-entry-multiselect-trigger {
    background: rgba(18, 32, 51, 0.96);
    border-color: rgba(152, 180, 226, 0.16);
    color: var(--text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html[data-theme="dark"] .self-entry-multiselect-trigger-placeholder {
    color: #9fb1cb;
}

html[data-theme="dark"] .self-entry-multiselect-trigger-summary,
html[data-theme="dark"] .self-entry-multiselect-title,
html[data-theme="dark"] .self-entry-multiselect-option,
html[data-theme="dark"] .self-entry-multiselect-option span {
    color: #f3f7ff;
}

html[data-theme="dark"] .self-entry-multiselect-trigger-icon {
    background: rgba(113, 153, 226, 0.1);
    border-color: rgba(152, 180, 226, 0.14);
    color: #d7e6ff;
}

html[data-theme="dark"] .self-entry-multiselect-popover {
    background: rgba(16, 27, 43, 0.98);
    border-color: rgba(152, 180, 226, 0.18);
    box-shadow: 0 22px 46px rgba(3, 8, 18, 0.42);
}

html[data-theme="dark"] .self-entry-multiselect-option {
    background: rgba(21, 33, 51, 0.92);
    border-color: rgba(152, 180, 226, 0.12);
}

html[data-theme="dark"] .self-entry-multiselect-close {
    background: rgba(113, 153, 226, 0.08);
    border-color: rgba(152, 180, 226, 0.14);
    color: #f2f6ff;
}

html[data-theme="dark"] .self-entry-multiselect-link {
    color: #d7e6ff;
}

html[data-theme="dark"] .self-entry-multiselect-dialog-actions {
    border-top-color: rgba(152, 180, 226, 0.12);
}

html[data-theme="dark"] .self-entry-multiselect-chip {
    background: rgba(113, 153, 226, 0.14);
    color: #d7e6ff;
}

html[data-theme="dark"] .panel .filters,
html[data-theme="dark"] .panel .filters-grid,
html[data-theme="dark"] .panel .filters-grid-compact {
    color: var(--text);
}

html[data-theme="dark"] .panel .dashboard-search-field,
html[data-theme="dark"] .panel .filters > div,
html[data-theme="dark"] .panel .filters-grid > div,
html[data-theme="dark"] .panel .filters-grid-compact > div {
    min-width: 0;
}

html[data-theme="dark"] .panel .dashboard-search-field label,
html[data-theme="dark"] .panel .filters label,
html[data-theme="dark"] .panel .filters-grid label,
html[data-theme="dark"] .panel .filters-grid-compact label {
    color: #a9bbd3;
}

html[data-theme="dark"] .security-log-filters select,
html[data-theme="dark"] .security-log-filters input[type="date"] {
    background: rgba(17, 27, 43, 0.96);
    color: #f3f7ff;
    -webkit-text-fill-color: #f3f7ff;
    border-color: rgba(152, 180, 226, 0.2);
}

html[data-theme="dark"] .security-log-filters select option {
    background: #16202f;
    color: #f3f7ff;
}

html[data-theme="dark"] .security-log-filters label {
    color: #a9bbd3;
}

html[data-theme="dark"] .invoice-page .invoice-item-card,
html[data-theme="dark"] .invoice-page .panel-callout,
html[data-theme="dark"] .invoice-public-panel {
    background: rgba(17, 28, 43, 0.96);
    border-color: rgba(152, 180, 226, 0.14);
}

html[data-theme="dark"] .invoice-page .invoice-responsive-table tr {
    border-color: rgba(152, 180, 226, 0.14);
}

html[data-theme="dark"] .invoice-vat-disclaimer {
    background: rgba(55, 116, 220, 0.12);
    color: #b9c8dc;
}

@media (max-width: 1400px) {
    .security-log-filters-grid {
        grid-template-columns: 1fr;
    }
}

html[data-theme="dark"] .panel .admin-accordion summary {
    color: #edf3ff;
}

html[data-theme="dark"] .panel .admin-accordion {
    background: rgba(17, 28, 43, 0.96);
    border-color: rgba(152, 180, 226, 0.14);
}

html[data-theme="dark"] .dashboard-filter-actions {
    align-items: center;
}

html[data-theme="dark"] .dashboard-filter-actions .btn,
html[data-theme="dark"] .dashboard-filter-actions button,
html[data-theme="dark"] .dashboard-search-submit {
    min-height: 42px;
}

@media (max-width: 980px) {
    .admin-main-grid {
        grid-template-columns: 1fr;
    }

    .invoice-detail-page .admin-main-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .editor-layout {
        grid-template-columns: 1fr;
    }

    .editor-layout-wide {
        grid-template-columns: 1fr;
    }

    .editor-sidebar-stack {
        position: static;
    }

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

    .editor-field-span-2,
    .editor-field-span-3,
    .editor-field-span-4,
    .editor-field-span-6 {
        grid-column: 1 / -1;
    }

    .hero {

        padding-top: 78px;
    }

    .hero-brand {
        width: 100%;
    }

    .top-actions {
        width: auto;
        justify-content: flex-end;
    }

    .modal-grid,
    .field-row {
        grid-template-columns: 1fr;
    }

    .field-row-matrix,
    .field-row-matrix-grid,
    .field-row-matrix-item {
        grid-template-columns: 1fr;
    }

    .field-row-matrix-head,
    .field-row-matrix-card-head {
        flex-direction: column;
        align-items: stretch;
    }

    .matrix-input-table {
        min-width: 0;
    }

    .matrix-input-table th,
    .matrix-input-table td {
        padding: 10px 8px;
    }

    .matrix-input-choice {
        min-width: 44px;
        gap: 6px;
    }

    .matrix-input-choice span {
        font-size: 12px;
    }

    .field-style-head {
        display: none;
    }

    .field-style-row {
        grid-template-columns: 1fr 1fr;
    }

    .self-entry-field-grid-row {
        grid-template-columns: 1fr 1fr;
    }

    .self-entry-review-actions {
        justify-content: flex-start;
    }

    .self-entry-link-actions {
        width: 100%;
    }

    .self-entry-upload-shell-photo {
        grid-template-columns: 1fr;
    }

    .self-entry-file-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .self-entry-file-remove {
        grid-column: 1 / -1;
        justify-self: flex-start;
    }

    .field-style-label {
        grid-column: 1 / -1;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }

    .gallery.compact-search-gallery {
        grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
    }

    .page-toolbar {
        align-items: flex-start;
    }

    .admin-table-header,
    .admin-filter-header,
    .filters-actions {
        align-items: stretch;
    }
}

@media (max-width: 1320px) {
    .invoice-template-layout {
        grid-template-columns: minmax(0, 0.96fr) minmax(340px, 400px);
        gap: 14px;
    }

    .invoice-template-form {
        max-width: 400px;
    }

    .invoice-template-sidebar .editor-sidebar-stack {
        position: static;
    }
}

@media (max-width: 1120px) {
    .invoice-template-layout {
        grid-template-columns: 1fr;
    }

    .invoice-template-form {
        max-width: none;
    }
}

@media (max-width: 1180px) {
    .invoice-form-layout,
    .invoice-settings-page .editor-layout-wide,
    .invoice-send-page .editor-layout {
        grid-template-columns: 1fr;
    }

    .invoice-page .editor-sidebar-stack {
        position: static;
    }
}

@media (max-width: 860px) {
    .invoice-page {
        --invoice-touch-size: 40px;
    }

    .invoice-page .admin-table-header,
    .invoice-page .panel-heading,
    .invoice-page .page-header {
        min-width: 0;
    }

    .invoice-page .admin-filter-grid {
        grid-template-columns: 1fr;
    }

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

    .invoice-page .button-row {
        width: 100%;
        flex-wrap: wrap;
        gap: 8px;
    }

    .invoice-page .button-row .btn,
    .invoice-page .button-row button,
    .invoice-page .compact-submit {
        flex: 0 1 auto;
        width: auto;
        min-width: 0;
        padding: 8px 12px;
        border-radius: 13px;
        font-size: 13px;
        line-height: 1.15;
    }

    .invoice-page .admin-aside-card .button-row .btn,
    .invoice-page .admin-aside-card .button-row button {
        flex: 1 1 150px;
    }

    .invoice-page .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
    }

    .invoice-responsive-table,
    .invoice-responsive-table thead,
    .invoice-responsive-table tbody,
    .invoice-responsive-table tr,
    .invoice-responsive-table td,
    .invoice-responsive-table th {
        display: block;
        width: 100%;
    }

    .invoice-responsive-table thead {
        display: none;
    }

    .invoice-responsive-table tbody {
        display: grid;
        gap: 12px;
    }

    .invoice-responsive-table tr {
        padding: 14px 15px;
        border: 1px solid var(--line);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.92);
        box-shadow: 0 12px 28px rgba(16, 24, 40, 0.06);
    }

    .invoice-responsive-table td {
        display: grid;
        grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
        gap: 8px 12px;
        align-items: start;
        white-space: normal;
        padding: 8px 0;
        border-bottom: 0;
        overflow-wrap: anywhere;
    }

    .invoice-responsive-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.04em;
    }

    .invoice-responsive-table td > * {
        min-width: 0;
    }

    .invoice-responsive-table td:last-child {
        grid-template-columns: 1fr;
    }

    .invoice-responsive-table td:last-child::before {
        margin-bottom: 4px;
    }

    .invoice-responsive-table td:last-child .button-row .btn,
    .invoice-responsive-table td:last-child .button-row button {
        flex: 1 1 112px;
    }

    .invoice-item-card {
        padding: 15px;
        border-radius: 18px;
    }

    .invoice-public-panel {
        max-width: calc(100vw - 24px);
        margin: 18px auto;
    }

    .invoice-public-qr-layout {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .invoice-public-qr-image {
        width: min(210px, 74vw);
        margin: 0 auto;
    }

    .invoice-public-iban-card strong {
        white-space: normal;
        overflow-wrap: anywhere;
        overflow: visible;
        text-overflow: clip;
        font-size: 1rem;
        letter-spacing: 0;
    }

    .invoice-public-method-card > .editor-section > .admin-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }
}

@media (max-width: 560px) {
    .invoice-page .admin-summary-grid,
    .invoice-page .stats-grid {
        grid-template-columns: 1fr;
    }

    .invoice-page .admin-accordion {
        padding-left: 12px;
        padding-right: 12px;
        border-radius: 18px;
    }

    .invoice-page .admin-accordion summary {
        align-items: flex-start;
        font-size: 14px;
        gap: 10px;
    }

    .invoice-page .admin-summary-note {
        display: block;
        margin: 4px 0 0;
        font-size: 12px;
    }

    .invoice-page .editor-section,
    .invoice-page .editor-section-compact {
        padding: 14px;
        border-radius: 16px;
    }

    .invoice-page .editor-grid-main {
        grid-template-columns: 1fr;
    }

    .invoice-page .editor-field-span-2,
    .invoice-page .editor-field-span-3,
    .invoice-page .editor-field-span-4,
    .invoice-page .editor-field-span-6 {
        grid-column: 1 / -1;
    }

    .invoice-page .button-row .btn,
    .invoice-page .button-row button,
    .invoice-page .compact-submit {
        flex: 1 1 100%;
        justify-content: center;
    }

    .invoice-responsive-table td {
        grid-template-columns: 1fr;
        gap: 3px;
    }

    .invoice-page textarea {
        min-height: 132px;
    }

    .invoice-tax-toggle-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .invoice-public-qr-image {
        width: min(196px, 78vw);
    }
}

@media (max-width: 1180px) {
    .hero {
        padding-top: 16px;
    }

    .hero-main,
    .hero-brand {
        width: 100%;
    }

    .top-actions {
        position: static;
        width: 100%;
        justify-content: flex-end;
        margin-top: 14px;
    }

    .top-action-form {
        flex: 0 0 100%;
        display: flex;
        justify-content: flex-end;
        order: 20;
    }

    .dashboard-filter-actions {
        width: 100%;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
    }

    .dashboard-filter-actions .btn,
    .dashboard-filter-actions button,
    .dashboard-search-submit {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        padding: 8px 12px;
        border-radius: 14px;
        font-size: 14px;
        line-height: 1.15;
        box-shadow: none;
    }
}

@media (max-width: 720px) {
    .app-shell {
        width: calc(100vw - 12px);
        padding: 10px 6px 18px;
    }

    .app-shell.member-portal-page {
        width: calc(100vw - 12px);
    }

    .login-shell {
        min-height: 100svh;
        place-items: start center;
        padding: 14px 10px 20px;
        gap: 14px;
    }

    .hero,
    .panel,
    .surface,
    .login-card,
    .modal-card {
        padding: 16px;
        border-radius: 24px;
    }

    .stats-grid,
    .button-row,
    .row-actions,
    .filters-actions {
        gap: 10px;
    }

    .table-meta {
        align-self: flex-start;
    }

    .editor-section,
    .editor-section-compact {
        padding: 18px;
        border-radius: 22px;
    }

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

    .editor-subsection {
        padding: 16px;
        border-radius: 20px;
        gap: 12px;
    }

    .editor-meta-pill {
        text-align: left;
    }

    .copy-entry-grid {
        grid-template-columns: 1fr;
    }

    .editor-grid-main {
        grid-template-columns: 1fr;
    }

    .editor-file-row {
        grid-template-columns: 1fr;
    }

    .self-entry-link-actions {
        flex-direction: column;
    }

    .self-entry-link-actions > .btn,
    .self-entry-link-actions > .compact-submit,
    .self-entry-link-actions > button,
    .self-entry-link-actions > a {
        width: 100%;
    }

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

    .self-entry-link-row {
        grid-template-columns: 1fr;
    }

    .login-logo,
    .login-logo-fallback {
        margin-bottom: 16px;
    }

    .login-logo img {
        max-width: min(220px, 100%);
        max-height: 56px;
    }

    .login-submit {
        width: 100%;
        min-width: 0;
        padding: 8px 13px;
    }

    .login-actions {
        width: 100%;
    }

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

    .filters-grid-compact {
        grid-template-columns: 1fr;
    }

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

    .filters-actions > * {
        width: 100%;
    }

    .admin-jump-card {
        padding: 14px 15px;
        border-radius: 18px;
    }

    .admin-jump-list {
        gap: 8px;
    }

    .admin-jump-link {
        min-height: 34px;
        padding: 7px 10px;
        border-radius: 12px;
        font-size: 12px;
    }

    .self-entry-help-admin-row {
        width: 100%;
        align-items: flex-start;
    }

    .self-entry-help-admin-toggle {
        font-size: 11px;
        padding: 6px 9px;
    }

    .dashboard-filter-actions {
        width: 100%;
        justify-content: flex-start;
        align-items: flex-start;
        gap: 8px;
    }

    .dashboard-filter-actions .btn,
    .dashboard-filter-actions button,
    .dashboard-search-submit {
        flex: 0 0 auto;
        width: auto;
        min-width: 0;
        padding: 7px 11px;
        border-radius: 12px;
        font-size: 13px;
        line-height: 1.1;
        box-shadow: none;
    }

    .login-card .button-row {
        width: 100%;
        flex-wrap: wrap;
    }

    .login-card .button-row .btn {
        flex: 1 1 auto;
    }

    .compact-submit {
        min-width: 108px;
        padding: 8px 12px;
        border-radius: 12px;
    }

    .btn,
    button,
    .nav-pill {
        padding: 8px 12px;
        border-radius: 13px;
    }

    .twofa-setup-card {
        padding: 16px;
        border-radius: 20px;
    }

    .twofa-qr-image {
        width: min(168px, 100%);
        margin-bottom: 10px;
    }

    .twofa-action-row,
    .twofa-secondary-action {
        width: 100%;
        flex-wrap: wrap;
    }

    .twofa-action-row .compact-submit,
    .twofa-secondary-action .btn,
    .twofa-secondary-action button {
        min-width: 0;
        font-size: 14px;
        padding: 7px 11px;
        border-radius: 12px;
        box-shadow: none;
    }

    .hero-brand {
        align-items: center;
    }

    .page-toolbar,
    .mini-list-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .field-style-row {
        grid-template-columns: 1fr;
    }

    .self-entry-field-grid-row {
        grid-template-columns: 1fr;
    }

    .self-entry-review-card-head,
    .self-entry-review-card-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .login-footer {
        width: min(100%, 420px);
        font-size: 0.85rem;
    }

    .top-actions,
    .toolbar,
    .button-row,
    .segmented,
    .nav-pills {
        width: 100%;
    }

    .top-actions {
        position: static;
        gap: 10px;
        justify-content: space-between;
        margin-bottom: 12px;
    }

    .top-actions > * {
        max-width: 100%;
    }

    .hero {
        padding-top: 16px;
        text-align: center;
    }

    .hero-main {
        width: 100%;
    }

    .brand-mark,
    .brand-logo {
        min-width: 0;
        width: min(100%, 154px);
        height: 54px;
    }

    .brand-logo img {
        max-width: min(100%, 154px);
        max-height: 40px;
    }

    .hero-copy {
        justify-items: center;
    }

    .nav-pills {
        justify-content: center;
    }

    .user-menu {
        margin-left: auto;
    }

    .user-menu-trigger {
        width: 100%;
        justify-content: space-between;
    }

    .user-menu-panel {
        right: 0;
        left: auto;
        min-width: min(220px, calc(100vw - 36px));
        max-width: calc(100vw - 36px);
    }

    .lang-switch {
        justify-content: flex-start;
    }

    .segmented .btn,
    .button-row .btn,
    .button-row button,
    .nav-pills .nav-pill {
        flex: 1 1 auto;
    }

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

    .gallery.compact-search-gallery {
        grid-template-columns: 1fr;
        justify-content: stretch;
    }

    .entry-media {
        height: auto;
        min-height: 0;
        aspect-ratio: 4 / 5;
    }

    .winner-badge {
        width: 38px;
        height: 38px;
        font-size: 20px;
    }

    .entry-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .entry-media-nav {
        width: 32px;
        height: 32px;
        margin-top: -16px;
    }

    .entry-media-nav-prev {
        left: 8px;
    }

    .entry-media-nav-next {
        right: 8px;
    }

    .detail-photo-frame {
        min-height: 240px;
    }

    .detail-photo-frame-tall {
        min-height: 320px;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .detail-row span:last-child {
        text-align: left;
    }

    .gallery-text-block {
        padding: 13px 14px;
    }

    .bulk-actions-bar {
        align-items: stretch;
    }

    .bulk-actions-bar select,
    .bulk-actions-bar button {
        width: 100%;
    }

    .gallery-config-grid,
    .gallery-config-row {
        grid-template-columns: 1fr;
    }

    .pager-bar,
    .role-access-grid,
    .pager-summary,
    .pager-controls,
    .pager-size-form {
        width: 100%;
    }

    .pager-bar,
    .role-access-grid,
    .pager-summary,
    .pager-controls,
    .pager-size-form {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .dashboard-list-table-wrap {
        padding: 0;
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .dashboard-list-table,
    .dashboard-list-table thead,
    .dashboard-list-table tbody,
    .dashboard-list-table tr,
    .dashboard-list-table td,
    .dashboard-list-table th {
        display: block;
        width: 100%;
    }

    .dashboard-list-table thead {
        display: none;
    }

    .dashboard-list-table tbody {
        display: grid;
        gap: 14px;
    }

    .dashboard-list-table tr {
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.9);
        box-shadow: 0 14px 34px rgba(16, 24, 40, 0.06);
    }

    .dashboard-list-table td {
        display: grid;
        grid-template-columns: minmax(88px, 112px) minmax(0, 1fr);
        gap: 10px 14px;
        align-items: start;
        white-space: normal;
        padding: 9px 0;
        border-bottom: 0;
    }

    .dashboard-list-table td::before {
        content: attr(data-label);
        display: block;
        margin: 0;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.05em;
    }

    .dashboard-list-table td > * {
        min-width: 0;
    }

    .dashboard-list-table td .row-actions {
        gap: 8px;
    }

    .dashboard-list-table td.bulk-select-col {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .dashboard-list-table td.bulk-select-col input[type="checkbox"] {
        justify-self: start;
    }

    html[data-theme="dark"] .dashboard-list-table tr {
        background: rgba(12, 22, 40, 0.92);
        box-shadow: 0 16px 36px rgba(0, 0, 0, 0.28);
    }
}

@media (min-width: 1600px) {
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }

    .gallery.compact-search-gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 380px));
    }
}

.birthday-mail-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}

.birthday-mail-list-card {
    display: grid;
    gap: 10px;
    padding: 16px 18px;
    border: 1px solid rgba(199, 210, 254, 0.9);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: 0 16px 36px rgba(37, 99, 235, 0.08);
}

.birthday-mail-action-row {
    justify-content: flex-start;
}

.birthday-mail-log-wrap {
    overflow-x: auto;
}

.birthday-mail-log-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
}

.birthday-mail-log-table th,
.birthday-mail-log-table td {
    padding: 13px 14px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.7);
    text-align: left;
    vertical-align: top;
}

.birthday-mail-log-table th {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    color: #475569;
    white-space: nowrap;
}

.birthday-mail-log-table td {
    color: #0f172a;
    background: rgba(255, 255, 255, 0.72);
}

.birthday-mail-log-pager {
    margin-top: 12px;
}

.birthday-mail-log-actions {
    margin-top: 10px;
    justify-content: flex-end;
}

.btn-small {
    min-height: 36px;
    padding: 7px 12px;
    border-radius: 14px;
    font-size: 0.82rem;
}

body.theme-dark .birthday-mail-list-card,
html[data-theme="dark"] .birthday-mail-list-card {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(15, 23, 42, 0.82);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.36);
}

body.theme-dark .birthday-mail-log-table th,
html[data-theme="dark"] .birthday-mail-log-table th {
    color: #cbd5f5;
}

body.theme-dark .birthday-mail-log-table td,
html[data-theme="dark"] .birthday-mail-log-table td {
    color: #f8fafc;
    background: rgba(15, 23, 42, 0.7);
    border-bottom-color: rgba(71, 85, 105, 0.72);
}

.api-secret-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-secret-row input {
    flex: 1 1 auto;
}

.api-status-card {
    padding: 18px 20px;
}

.global-search-page .admin-jump-link,
.global-search-page .admin-summary-note {
    white-space: normal;
}

.global-search-form {
    display: grid;
    gap: 16px;
    margin-top: 18px;
}

.global-search-input-wrap {
    position: relative;
}

.global-search-input-wrap input {
    padding-left: 46px;
    min-height: 52px;
    border-radius: 18px;
    font-size: 1rem;
}

.global-search-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--muted);
    display: inline-grid;
    place-items: center;
}

.global-search-input-icon svg {
    width: 18px;
    height: 18px;
}

.global-search-rebuild-form {
    margin-top: 12px;
}

.global-search-stats {
    margin-top: 16px;
}

.global-search-group + .global-search-group {
    margin-top: 18px;
}

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

.global-search-card {
    padding: 18px 20px;
    border-radius: 22px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(247, 250, 255, 0.86));
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.07);
}

.global-search-card-head {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 14px;
    align-items: start;
}

.global-search-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    display: inline-grid;
    place-items: center;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

.global-search-card-icon svg {
    width: 18px;
    height: 18px;
}

.global-search-card h3 {
    margin: 0;
    font-size: 1rem;
}

.global-search-card p {
    margin: 5px 0 0;
    color: var(--muted);
}

.global-search-reference {
    margin-top: 10px;
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: #1e3a8a;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.global-search-card-actions {
    margin-top: 14px;
}

html[data-theme="dark"] .global-search-card {
    background: linear-gradient(180deg, rgba(17, 27, 42, 0.96), rgba(13, 22, 35, 0.92));
    border-color: rgba(152, 180, 226, 0.14);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.28);
}

html[data-theme="dark"] .global-search-card-icon {
    background: rgba(96, 165, 250, 0.14);
    color: #bfdbfe;
}

html[data-theme="dark"] .global-search-reference {
    background: rgba(96, 165, 250, 0.12);
    color: #dbeafe;
}

@media (max-width: 720px) {
    .api-secret-row {
        flex-direction: column;
        align-items: stretch;
    }

    .api-secret-row .btn {
        width: 100%;
    }

    .global-search-card-head {
        grid-template-columns: auto 1fr;
    }

    .global-search-card-head .badge-subtle {
        grid-column: 1 / -1;
        justify-self: start;
    }
}

@media (max-width: 860px) {
    .invoice-page .button-row .btn,
    .invoice-page .button-row button,
    .invoice-page .compact-submit {
        width: auto;
        min-width: 0;
        padding: 8px 12px;
        border-radius: 13px;
        font-size: 13px;
        line-height: 1.15;
    }

    .invoice-page .admin-aside-card .button-row .btn,
    .invoice-page .admin-aside-card .button-row button,
    .invoice-responsive-table td:last-child .button-row .btn,
    .invoice-responsive-table td:last-child .button-row button {
        flex: 1 1 112px;
    }

}

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

.telegram-settings-layout {
    grid-template-columns: minmax(0, 1.95fr) minmax(280px, 0.72fr);
}

.telegram-action-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(241,246,255,0.96));
    box-shadow: 0 14px 34px rgba(17, 68, 160, 0.06);
}

.telegram-action-strip-top {
    margin-bottom: 16px;
}

.telegram-action-strip-bottom {
    margin-top: 18px;
}

.telegram-action-strip > div:first-child {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.telegram-recipient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.telegram-add-recipient {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 320px);
    gap: 14px;
    align-items: end;
    margin-bottom: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.74);
}

.telegram-add-recipient select {
    width: 100%;
}

.telegram-recipient-card {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(248, 251, 255, 0.88);
    overflow: hidden;
}

.telegram-recipient-card > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
    padding: 14px 16px;
    list-style: none;
}

.telegram-recipient-card > summary::-webkit-details-marker,
.telegram-folded-numbers > summary::-webkit-details-marker {
    display: none;
}

.telegram-recipient-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.telegram-recipient-main strong,
.telegram-recipient-main .muted {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.telegram-recipient-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.telegram-recipient-body {
    padding: 0 16px 16px;
}

.telegram-rule-card {
    gap: 12px;
}

.telegram-rule-card select[multiple] {
    min-height: 116px;
}

.telegram-test-panel {
    margin-top: 20px;
}

.telegram-folded-numbers {
    border: 1px dashed rgba(80, 115, 170, 0.28);
    border-radius: 14px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.55);
}

.telegram-folded-numbers > summary {
    cursor: pointer;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.telegram-folded-numbers label {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.telegram-page .admin-summary-card {
    min-width: 0;
}

.telegram-recipient-table input,
.telegram-rule-card select,
.telegram-rule-card textarea,
.telegram-test-panel textarea {
    width: 100%;
}

.telegram-page code {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 9px;
    background: rgba(15, 23, 42, 0.06);
    color: inherit;
}

html[data-theme="dark"] .telegram-page code {
    background: rgba(226, 232, 240, 0.1);
}

html[data-theme="dark"] .telegram-action-strip,
html[data-theme="dark"] .telegram-add-recipient,
html[data-theme="dark"] .telegram-recipient-card,
html[data-theme="dark"] .telegram-folded-numbers {
    background: rgba(15, 23, 42, 0.82);
    border-color: rgba(148, 163, 184, 0.22);
}

@media (max-width: 1080px) {
    .telegram-settings-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .telegram-settings-layout .editor-sidebar-stack {
        position: static;
    }
}

@media (max-width: 720px) {
    .telegram-rule-grid {
        grid-template-columns: 1fr;
    }

    .telegram-action-strip {
        align-items: stretch;
        flex-direction: column;
    }

    .telegram-action-strip .button-row {
        width: 100%;
    }

    .telegram-add-recipient {
        grid-template-columns: 1fr;
    }

    .telegram-page .admin-summary-grid > form.admin-summary-card {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 560px) {
    .invoice-page .button-row .btn,
    .invoice-page .button-row button,
    .invoice-page .compact-submit,
    .invoice-confirm-page .button-row .btn,
    .invoice-confirm-page .button-row button {
        flex: 1 1 100%;
        width: 100%;
    }

}
