:root {
    --font-body: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    --font-display: "Sora", "Segoe UI", sans-serif;
    --font-code: "Fira Code", "Cascadia Code", monospace;

    --brand-700: #6f3680;
    --brand-600: #88449e;
    --brand-500: #a65ab0;
    --brand-400: #c781bc;
    --brand-300: #dfb2d5;
    --brand-200: #efd7ea;
    --brand-100: #f7eff8;

    --ink-900: #211128;
    --ink-700: #4a3356;
    --ink-600: #685175;
    --ink-500: #836d90;

    --surface-0: #ffffff;
    --surface-1: #fcf9fd;
    --surface-2: #f7f1fa;
    --surface-3: #efe4f4;

    --line-strong: #d7bfde;
    --line: #e7d7ec;
    --line-soft: #f2e9f4;

    --success-bg: #edfdf3;
    --success-line: #a6eac0;
    --success-ink: #11653f;

    --warning-bg: #fff8ea;
    --warning-line: #f8d79d;
    --warning-ink: #7f4f08;

    --danger-bg: #fff2f4;
    --danger-line: #f4bcc9;
    --danger-ink: #922340;

    --neutral-bg: #f8f3fb;
    --neutral-line: #e3d3e8;
    --neutral-ink: #6a5776;

    --shadow-soft: 0 10px 24px rgba(87, 33, 104, 0.08);
    --shadow-card: 0 18px 38px rgba(87, 33, 104, 0.1);
    --shadow-float: 0 28px 56px rgba(70, 27, 84, 0.2);

    --radius-xs: 0.58rem;
    --radius-sm: 0.78rem;
    --radius-md: 1rem;
    --radius-lg: 1.28rem;
    --radius-xl: 1.65rem;
}

* ,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.45;
    color: var(--ink-900);
    background: #f7eff8;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0;
    background-image: none;
    background-size: auto;
    mask-image: none;
}

.antialiased {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.modal-open {
    overflow: hidden;
}

.skip-link {
    position: fixed;
    top: 0.7rem;
    left: 0.7rem;
    z-index: 120;
    transform: translateY(-150%);
    padding: 0.6rem 0.78rem;
    border-radius: var(--radius-sm);
    background: var(--ink-900);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: var(--shadow-float);
}

.skip-link:focus-visible {
    transform: translateY(0);
}

h1,
h2,
h3 {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.1;
    color: var(--ink-900);
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(1.7rem, 2.2vw, 2.45rem);
}

h2 {
    font-size: clamp(1.12rem, 1.2vw, 1.46rem);
}

h3 {
    font-size: 1.02rem;
}

p {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

input,
textarea,
select,
button,
a,
.button-mini {
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease,
        box-shadow 180ms ease,
        transform 180ms ease,
        opacity 180ms ease;
}

:where(a, button, input, textarea, select, .button-mini):focus-visible {
    outline: 3px solid rgba(136, 68, 158, 0.34);
    outline-offset: 2px;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 49;
    background: rgba(20, 9, 26, 0.58);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

body.nav-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.site-sidebar {
    position: fixed;
    top: 0.95rem;
    bottom: 0.95rem;
    left: 0.95rem;
    width: min(18.5rem, calc(100vw - 1.9rem));
    z-index: 50;
    border-radius: var(--radius-xl);
    background:
        linear-gradient(180deg, rgba(252, 246, 255, 0.96) 0%, rgba(247, 238, 251, 0.94) 100%);
    border: 1px solid rgba(215, 191, 222, 0.9);
    box-shadow: var(--shadow-float);
    transform: translateX(-118%);
    opacity: 0;
    pointer-events: none;
    transition: transform 220ms ease, opacity 220ms ease;
}

body.nav-open .site-sidebar {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.sidebar-inner {
    height: 100%;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-radius: inherit;
    overflow-y: auto;
}

.brand-card {
    padding: 0.95rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(199, 129, 188, 0.45);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, 0.9) 0%, rgba(245, 226, 242, 0.94) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand {
    display: block;
}

.brand-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: var(--radius-md);
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(215, 191, 222, 0.7);
}

.brand-logo-image {
    width: min(10.8rem, 100%);
    height: auto;
}

.brand-copy {
    margin-top: 0.72rem;
}

.brand-kicker {
    display: block;
    font-size: 0.69rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--ink-600);
    font-weight: 700;
}

.brand-copy strong {
    display: block;
    margin-top: 0.22rem;
    font-size: 1.04rem;
}

.brand-copy span {
    display: block;
    margin-top: 0.15rem;
    color: var(--ink-600);
    line-height: 1.5;
    font-size: 0.81rem;
}

.main-nav {
    display: grid;
    gap: 0.95rem;
}

.nav-group,
.sidebar-session {
    display: grid;
    gap: 0.36rem;
}

.nav-form {
    margin: 0;
}

.nav-group-label {
    display: block;
    padding-inline: 0.3rem;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.68rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    color: var(--ink-700);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
}

.nav-link.nav-button {
    width: 100%;
    min-height: 0;
    justify-content: flex-start;
    background: transparent;
    box-shadow: none;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.nav-link:hover,
.nav-link:focus-visible {
    background: rgba(255, 255, 255, 0.88);
    border-color: var(--line);
    color: var(--ink-900);
}

.nav-link.active {
    color: var(--brand-700);
    background: linear-gradient(135deg, rgba(239, 215, 234, 0.78), rgba(255, 255, 255, 0.88));
    border-color: rgba(199, 129, 188, 0.66);
    box-shadow: 0 6px 14px rgba(136, 68, 158, 0.15);
}

.nav-link.nav-button:hover,
.nav-link.nav-button:focus-visible {
    transform: none;
    box-shadow: none;
}

.nav-icon {
    width: 1.15rem;
    text-align: center;
}

.nav-text {
    min-width: 0;
}

.sidebar-foot {
    margin-top: auto;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
}

.sidebar-foot strong {
    display: block;
    font-size: 0.86rem;
}

.sidebar-foot span {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.78rem;
    color: var(--ink-600);
    line-height: 1.52;
}

.site-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    padding: 1rem;
}

.mobile-nav-fab {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 45;
    width: 3rem;
    height: 3rem;
    border-radius: 999px;
    box-shadow: var(--shadow-float);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.9rem;
    padding: 0.7rem 0.82rem;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(215, 191, 222, 0.95);
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(10px);
}

.topbar-main {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.82rem;
}

.topbar-meta {
    min-width: 0;
    display: grid;
    gap: 0.14rem;
}

.topbar-kicker {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--ink-500);
}

.topbar-title {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.02rem, 1.1vw, 1.2rem);
    color: var(--ink-900);
}

.topbar-note {
    display: none;
    color: var(--ink-600);
    font-size: 0.81rem;
}

.topbar-user {
    display: inline-flex;
    align-items: center;
    gap: 0.78rem;
    border-radius: var(--radius-sm);
    padding: 0.46rem 0.62rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    white-space: nowrap;
}

.topbar-avatar {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-400));
    color: #fff;
    box-shadow: 0 7px 18px rgba(136, 68, 158, 0.32);
}

.topbar-avatar i {
    font-size: 0.92rem;
}

.topbar-user-copy {
    display: grid;
    gap: 0.08rem;
    min-width: 0;
}

.topbar-user-copy strong {
    display: block;
    font-size: 0.84rem;
}

.topbar-user-copy span {
    display: block;
    font-size: 0.74rem;
    color: var(--ink-600);
}

.mobile-nav-toggle,
.password-toggle {
    min-width: 2.72rem;
    padding-inline: 0.68rem;
}

.admin-main,
.guest-main {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.95rem;
}

.guest-main {
    padding: 1.08rem;
}

.card {
    position: relative;
    overflow: hidden;
    padding: clamp(1rem, 0.9vw + 0.72rem, 1.26rem);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(215, 191, 222, 0.9);
    background: rgba(255, 255, 255, 0.87);
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(6px);
}

.card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, rgba(136, 68, 158, 0.4), rgba(199, 129, 188, 0.28), transparent 75%);
}

.hero-card {
    background:
        linear-gradient(140deg, rgba(255, 255, 255, 0.95) 0%, rgba(252, 247, 253, 0.94) 60%, rgba(247, 240, 251, 0.94) 100%);
}

.section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.95rem;
    margin-bottom: 0.92rem;
}

.section-head > div {
    min-width: 0;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0.26rem 0.58rem;
    border-radius: 999px;
    border: 1px solid rgba(199, 129, 188, 0.58);
    background: rgba(239, 215, 234, 0.75);
    color: var(--brand-700);
    font-size: 0.66rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    font-weight: 700;
}

.hero-lead,
.section-copy,
.muted,
.filter-caption,
.filter-summary,
.field-note {
    color: var(--ink-600);
    line-height: 1.58;
}

.hero-lead,
.section-copy,
.action-caption,
.summary-note,
.topbar-note,
.brand-copy > span:last-child,
.sidebar-foot > span {
    display: none;
}

.section-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.64rem 0.82rem;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(199, 129, 188, 0.56);
    background: rgba(255, 255, 255, 0.88);
    color: var(--brand-700);
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    cursor: pointer;
}

.section-link:hover,
.section-link:focus-visible {
    background: linear-gradient(140deg, rgba(239, 215, 234, 0.56), rgba(255, 255, 255, 0.95));
}

.section-mark {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid rgba(199, 129, 188, 0.5);
    background: rgba(239, 215, 234, 0.66);
    color: var(--brand-700);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-size: 0.71rem;
}

.grid,
.split-grid,
.toolbar-grid,
.summary-strip,
.record-list,
.info-list,
.panel-list,
.action-list {
    display: grid;
    gap: 0.85rem;
}

.summary-strip {
    grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
}

.summary-strip.compact {
    grid-template-columns: repeat(auto-fit, minmax(min(8.7rem, 100%), 1fr));
}

.summary-item {
    padding: 0.85rem 0.92rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.summary-item.is-attention {
    background: linear-gradient(150deg, rgba(255, 248, 234, 0.95), rgba(255, 255, 255, 0.96));
    border-color: rgba(248, 215, 157, 0.92);
}

.summary-label {
    display: block;
    color: var(--ink-500);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 700;
}

.summary-value {
    display: block;
    margin-top: 0.32rem;
    font-family: var(--font-display);
    font-size: clamp(1.24rem, 1vw + 1rem, 1.75rem);
    line-height: 1.05;
}

.summary-note {
    display: none;
}

.priority-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
    gap: 0.85rem;
}

.priority-card {
    display: grid;
    gap: 0.4rem;
    text-decoration: none;
    color: inherit;
    padding: 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 9px 20px rgba(87, 33, 104, 0.08);
    cursor: pointer;
}

.priority-card:hover,
.priority-card:focus-visible {
    border-color: rgba(199, 129, 188, 0.8);
    box-shadow: 0 14px 28px rgba(87, 33, 104, 0.14);
    transform: translateY(-2px);
}

.priority-card.is-critical {
    background: linear-gradient(150deg, rgba(255, 248, 234, 0.9), rgba(255, 255, 255, 0.97));
    border-color: rgba(248, 215, 157, 1);
}

.priority-icon,
.icon-chip {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(140deg, var(--brand-600), var(--brand-400));
    color: #fff;
    box-shadow: 0 9px 18px rgba(136, 68, 158, 0.28);
}

.priority-value {
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 1vw + 0.95rem, 1.9rem);
    line-height: 1;
}

.priority-label {
    font-size: 0.77rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: var(--ink-500);
    font-weight: 700;
}

.priority-copy {
    color: var(--ink-600);
    line-height: 1.48;
    font-size: 0.84rem;
}

.action-link {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
    color: inherit;
    padding: 0.84rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    cursor: pointer;
}

.action-link:hover,
.action-link:focus-visible {
    border-color: rgba(199, 129, 188, 0.8);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(87, 33, 104, 0.1);
}

.action-body {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.action-caption {
    color: var(--ink-600);
    font-size: 0.84rem;
    line-height: 1.5;
}

.action-tail {
    margin-left: auto;
    color: var(--ink-600);
}

.record-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    padding: 0.88rem;
    background: rgba(255, 255, 255, 0.96);
}

.record-row.is-priority {
    border-color: rgba(248, 215, 157, 0.94);
    background: linear-gradient(160deg, rgba(255, 250, 239, 0.92), rgba(255, 255, 255, 0.96));
}

.record-main {
    min-width: 0;
    display: grid;
    gap: 0.82rem;
}

.record-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.85rem;
}

.record-name {
    display: block;
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.2;
}

.record-subtle {
    display: block;
    margin-top: 0.18rem;
    color: var(--ink-600);
    font-size: 0.8rem;
    line-height: 1.55;
}

.dense-status {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.record-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr));
    gap: 0.58rem;
}

.record-cell {
    padding: 0.62rem 0.68rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line-soft);
    background: rgba(255, 255, 255, 0.93);
}

.record-cell-label {
    display: block;
    color: var(--ink-500);
    font-size: 0.67rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    font-weight: 700;
}

.record-cell-value {
    display: block;
    margin-top: 0.28rem;
    font-size: 0.86rem;
    line-height: 1.55;
    font-weight: 600;
    word-break: break-word;
}

.record-actions {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.utility-top-sm {
    margin-top: 12px;
}

.utility-top-md {
    margin-top: 16px;
}

.card label + input,
.card label + textarea,
.card label + select,
.card .field-note + input,
.card .field-note + textarea,
.card .field-note + select {
    margin-top: 0.2rem;
}

.card input + label,
.card textarea + label,
.card select + label,
.card .field-note + label {
    margin-top: 0.62rem;
}

.card .toggle-line + label {
    margin-top: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
    padding: 0.31rem 0.56rem;
    border-radius: 999px;
    border: 1px solid var(--neutral-line);
    background: var(--neutral-bg);
    color: var(--neutral-ink);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.1;
}

.js-group-status-badge.is-syncing,
.js-group-status-detail.is-syncing {
    opacity: 0.68;
}

.status-icon {
    font-size: 0.75rem;
}

.status-active {
    background: var(--success-bg);
    border-color: var(--success-line);
    color: var(--success-ink);
}

.status-pending,
.status-pending_contact,
.status-processing {
    background: var(--warning-bg);
    border-color: var(--warning-line);
    color: var(--warning-ink);
}

.status-expired {
    background: var(--danger-bg);
    border-color: var(--danger-line);
    color: var(--danger-ink);
}

.status-cancelled {
    background: #fff3ef;
    border-color: #f8bcae;
    color: #9c3117;
}

.status-none {
    background: var(--neutral-bg);
    border-color: var(--neutral-line);
    color: var(--neutral-ink);
}

.grid {
    grid-template-columns: repeat(auto-fit, minmax(min(19rem, 100%), 1fr));
}

.split-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(22rem, 100%), 1fr));
}

.toolbar-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(15rem, 100%), 1fr));
}

.quick-panel {
    display: flex;
    flex-direction: column;
    gap: 0.62rem;
    padding: 0.82rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
}

.quick-panel-head {
    display: inline-flex;
    align-items: center;
    gap: 0.48rem;
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
}

.quick-form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.8rem auto;
    gap: 0.54rem;
    align-items: center;
}

.quick-form-row.single {
    grid-template-columns: minmax(0, 1fr) 7rem;
}

.quick-form-row.blocking {
    grid-template-columns: minmax(0, 1fr);
}

.quick-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.54rem;
}

label {
    display: block;
    margin-bottom: 0.32rem;
    color: var(--ink-700);
    font-size: 0.78rem;
    font-weight: 700;
}

input,
textarea,
select {
    width: 100%;
    min-height: 2.64rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.98);
    color: var(--ink-900);
    font: inherit;
    font-size: 0.91rem;
    line-height: 1.28;
    padding: 0.68rem 0.76rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

textarea {
    min-height: 7.6rem;
    resize: vertical;
}

input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    min-height: 1rem;
    accent-color: var(--brand-600);
    box-shadow: none;
}

input::placeholder,
textarea::placeholder {
    color: #9a85a4;
}

input:focus,
textarea:focus,
select:focus {
    border-color: rgba(136, 68, 158, 0.62);
    box-shadow:
        0 0 0 4px rgba(136, 68, 158, 0.14),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    outline: none;
}

.input-mini {
    min-width: 4.8rem;
    max-width: 5.8rem;
    text-align: center;
    font-weight: 700;
}

.input-with-action {
    position: relative;
    display: block;
}

.input-with-action input {
    min-width: 0;
    padding-right: 3.3rem;
}

.input-with-action .password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    z-index: 1;
    width: 2.25rem;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding: 0;
    border-radius: 999px;
    transform: translateY(-50%);
}

.input-with-action .password-toggle:hover,
.input-with-action .password-toggle:focus-visible {
    transform: translateY(-50%);
}

.input-with-action .password-toggle i {
    pointer-events: none;
}

button,
.button-mini {
    appearance: none;
    border: 1px solid transparent;
    min-height: 2.64rem;
    border-radius: var(--radius-sm);
    padding: 0.66rem 0.9rem;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.48rem;
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    background: linear-gradient(145deg, var(--brand-600), var(--brand-700));
    box-shadow: 0 9px 20px rgba(111, 54, 128, 0.28);
}

button:hover,
button:focus-visible,
.button-mini:hover,
.button-mini:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(111, 54, 128, 0.34);
}

button:disabled,
.button-mini:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.button-danger {
    background: linear-gradient(145deg, #c74b63, #9f2841);
    box-shadow: 0 9px 20px rgba(159, 40, 65, 0.26);
}

.button-danger:hover,
.button-danger:focus-visible {
    box-shadow: 0 12px 24px rgba(159, 40, 65, 0.32);
}

.button-subtle {
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-900);
    border-color: var(--line);
    box-shadow: none;
}

.button-subtle:hover,
.button-subtle:focus-visible {
    background: rgba(239, 215, 234, 0.38);
    border-color: rgba(199, 129, 188, 0.72);
    box-shadow: 0 10px 20px rgba(87, 33, 104, 0.12);
}

.button-strong {
    background: linear-gradient(145deg, #6f3680, #4c235b);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(76, 35, 91, 0.28);
}

.button-strong:hover,
.button-strong:focus-visible {
    box-shadow: 0 16px 28px rgba(76, 35, 91, 0.34);
}

.button-secondary {
    background: linear-gradient(145deg, #9752aa, #7c3f92);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(124, 63, 146, 0.22);
}

.button-secondary:hover,
.button-secondary:focus-visible {
    box-shadow: 0 14px 26px rgba(124, 63, 146, 0.28);
}

.icon-button {
    width: 2.64rem;
    min-width: 2.64rem;
    padding-inline: 0.6rem;
}

.button-label {
    line-height: 1;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 0.9rem 0 1.1rem;
}

.pill {
    display: inline-flex;
    align-items: center;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.74rem;
    font-weight: 700;
}

.pill.ok {
    background: var(--success-bg);
    color: var(--success-ink);
    border-color: var(--success-line);
}

.pill.soft {
    background: rgba(239, 215, 234, 0.7);
    color: var(--brand-700);
    border-color: rgba(199, 129, 188, 0.68);
}

.auth-shell {
    min-height: calc(100vh - 2.2rem);
    display: grid;
    place-items: center;
}

.auth-card {
    width: min(32rem, 100%);
}

.auth-card form {
    display: grid;
    gap: 0.72rem;
    margin-top: 0.9rem;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.7rem;
    margin-bottom: 0.9rem;
}

.filter-row input {
    max-width: 24rem;
}

.filter-form {
    display: grid;
    gap: 0.9rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
    gap: 0.72rem;
}

.filter-grid.compact {
    grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
}

.filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.filter-summary {
    margin-top: 0.15rem;
    font-size: 0.82rem;
}

.section-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.tab-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.4rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    color: var(--ink-700);
    text-decoration: none;
    font-weight: 700;
    padding: 0.58rem 0.85rem;
    cursor: pointer;
}

.tab-link:hover,
.tab-link:focus-visible {
    color: var(--ink-900);
    border-color: rgba(199, 129, 188, 0.68);
}

.tab-link.active {
    color: var(--brand-700);
    border-color: rgba(199, 129, 188, 0.82);
    background: rgba(239, 215, 234, 0.72);
}

.table-empty {
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line-strong);
    padding: 0.88rem 0.94rem;
    color: var(--ink-600);
    background: rgba(255, 255, 255, 0.8);
    line-height: 1.55;
}

.table-wrap {
    overflow: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.97);
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: separate;
    border-spacing: 0;
}

th,
td {
    text-align: left;
    vertical-align: top;
    padding: 0.82rem 0.88rem;
    border-bottom: 1px solid var(--line-soft);
}

thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 0.67rem;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    color: var(--ink-500);
    background: linear-gradient(180deg, rgba(249, 242, 251, 0.98), rgba(252, 247, 253, 0.98));
}

tbody tr:hover {
    background: rgba(239, 215, 234, 0.22);
}

tbody tr:last-child td {
    border-bottom: none;
}

.table-user,
.table-meta {
    display: grid;
    gap: 0.24rem;
}

.table-quiet {
    color: var(--ink-600);
    font-size: 0.78rem;
    line-height: 1.45;
}

.info-row {
    display: grid;
    grid-template-columns: minmax(7.6rem, 10rem) minmax(0, 1fr) auto;
    gap: 0.62rem;
    align-items: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    padding: 0.68rem 0.72rem;
    background: rgba(255, 255, 255, 0.95);
}

.telegram-summary {
    display: grid;
    gap: 0.75rem;
}

.telegram-summary-card {
    padding: 0.9rem 0.95rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.telegram-summary-card.is-ok {
    border-color: var(--success-line);
    background: linear-gradient(145deg, rgba(237, 253, 243, 0.95), rgba(255, 255, 255, 0.98));
}

.telegram-summary-card.is-warning {
    border-color: var(--warning-line);
    background: linear-gradient(145deg, rgba(255, 248, 234, 0.95), rgba(255, 255, 255, 0.98));
}

.telegram-summary-card.is-error {
    border-color: var(--danger-line);
    background: linear-gradient(145deg, rgba(255, 242, 244, 0.95), rgba(255, 255, 255, 0.98));
}

.telegram-summary-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.telegram-summary-copy {
    color: var(--ink-600);
    line-height: 1.55;
}

.telegram-health-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
    gap: 0.72rem;
}

.telegram-health-item {
    padding: 0.84rem 0.9rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
    display: grid;
    gap: 0.45rem;
}

.telegram-health-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}

.telegram-health-label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ink-900);
}

.telegram-health-message {
    color: var(--ink-600);
    line-height: 1.55;
    font-size: 0.82rem;
}

.telegram-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
}

.telegram-note {
    padding: 0.8rem 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line-strong);
    background: rgba(255, 255, 255, 0.88);
    color: var(--ink-600);
    line-height: 1.55;
}

.info-label {
    color: var(--ink-500);
    font-size: 0.68rem;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    font-weight: 700;
}

.info-value {
    min-width: 0;
}

.panel-item {
    padding: 0.82rem 0.88rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
}

.panel-item h3 {
    margin-bottom: 0.36rem;
    display: inline-flex;
    align-items: center;
    gap: 0.44rem;
}

.panel-item p {
    color: var(--ink-600);
    line-height: 1.56;
}

.toggle-line {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-radius: var(--radius-sm);
    border: 1px dashed var(--line-strong);
    background: rgba(255, 255, 255, 0.9);
    padding: 0.66rem 0.72rem;
    margin: 0.18rem 0 0.24rem;
    font-weight: 700;
}

.lookup-panel {
    margin-top: 0.92rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(47, 23, 58, 0.26);
    background: #25152d;
    color: #efe6f5;
    padding: 0.95rem 1rem;
    font-family: var(--font-code);
    font-size: 0.82rem;
    line-height: 1.6;
    white-space: pre-wrap;
    word-break: break-word;
    overflow: auto;
}

code {
    display: inline-flex;
    align-items: center;
    padding: 0.14rem 0.4rem;
    border-radius: 0.45rem;
    background: rgba(239, 215, 234, 0.56);
    color: var(--brand-700);
    font-family: var(--font-code);
    font-size: 0.84em;
    word-break: break-all;
}

pre code {
    background: transparent;
    color: inherit;
    border-radius: 0;
    padding: 0;
}

.copy-button,
.flash-close {
    min-width: 2.32rem;
    padding-inline: 0.7rem;
}

.compact-form {
    display: grid;
    grid-template-columns: 5rem auto auto;
    gap: 0.5rem;
    align-items: center;
}

.table-action-stack {
    display: grid;
    gap: 0.52rem;
}

.table-inline-form {
    display: grid;
    grid-template-columns: 4.5rem minmax(8rem, 1fr);
    gap: 0.5rem;
    align-items: center;
}

.table-block-form {
    grid-template-columns: minmax(0, 1fr) auto;
}

.table-action-stack > * {
    width: 100%;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.54rem;
    margin-top: 0.9rem;
}

.pagination-status {
    margin-right: auto;
    color: var(--ink-600);
    font-size: 0.81rem;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.38rem;
    min-height: 2.26rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--ink-900);
    text-decoration: none;
    font-weight: 700;
    padding: 0.5rem 0.74rem;
    cursor: pointer;
}

.pagination-link:hover,
.pagination-link:focus-visible {
    border-color: rgba(199, 129, 188, 0.75);
    background: #fff;
}

.pagination-link.active {
    color: var(--brand-700);
    border-color: rgba(199, 129, 188, 0.84);
    background: rgba(239, 215, 234, 0.74);
}

.pagination-icon {
    display: inline-flex;
}

.pagination-icon.reverse {
    transform: rotate(180deg);
}

.flash {
    display: flex;
    align-items: center;
    gap: 0.62rem;
    border-radius: var(--radius-md);
    padding: 0.82rem 0.9rem;
    margin: 0 0 0.95rem;
    border: 1px solid transparent;
    box-shadow: var(--shadow-soft);
}

.flash::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.9rem;
}

.flash-success {
    background: var(--success-bg);
    border-color: var(--success-line);
    color: var(--success-ink);
}

.flash-success::before {
    content: "\f058";
}

.flash-error {
    background: var(--danger-bg);
    border-color: var(--danger-line);
    color: var(--danger-ink);
}

.flash-error::before {
    content: "\f071";
}

.flash-close {
    margin-left: auto;
    border: 1px solid currentColor;
    color: currentColor;
    background: transparent;
    box-shadow: none;
}

.flash-close:hover,
.flash-close:focus-visible {
    background: rgba(255, 255, 255, 0.45);
    box-shadow: none;
}

.toast-stack {
    position: fixed;
    top: 0.95rem;
    right: 0.95rem;
    z-index: 80;
    width: min(22rem, calc(100vw - 1.9rem));
    display: grid;
    gap: 0.72rem;
}

.toast-stack .flash {
    margin: 0;
}

.modal-root[hidden] {
    display: none;
}

.modal-root {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(24, 10, 30, 0.62);
    backdrop-filter: blur(5px);
}

.modal-card {
    position: relative;
    z-index: 1;
    width: min(30rem, 100%);
    border-radius: var(--radius-xl);
    border: 1px solid var(--line-strong);
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-float);
    padding: 1.2rem;
}

.modal-card p {
    margin-top: 0.48rem;
    color: var(--ink-600);
    line-height: 1.58;
}

.modal-actions {
    margin-top: 0.95rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

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

button.is-loading,
.button-mini.is-loading {
    opacity: 0.8;
    pointer-events: none;
}

button.is-loading::after,
.button-mini.is-loading::after {
    content: "";
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.38);
    border-top-color: #ffffff;
    animation: spin 780ms linear infinite;
}

.button-subtle.is-loading::after {
    border-color: rgba(136, 68, 158, 0.26);
    border-top-color: var(--brand-600);
}

.hero-lead,
.section-copy,
.summary-note {
    display: block;
}

.section-mark {
    display: inline-flex;
}

.summary-note {
    margin-top: 0.28rem;
    font-size: 0.78rem;
}

.record-row.is-focused,
tbody tr.is-selected {
    border-color: rgba(136, 68, 158, 0.7);
    background: rgba(239, 215, 234, 0.52);
    box-shadow: 0 14px 28px rgba(87, 33, 104, 0.14);
}

.operation-queue {
    gap: 0.72rem;
}

.operation-row {
    position: relative;
    grid-template-columns: minmax(0, 1fr) minmax(13.5rem, 15.5rem);
    padding-left: 1.08rem;
}

.operation-row::before {
    content: "";
    position: absolute;
    top: 0.8rem;
    bottom: 0.8rem;
    left: 0;
    width: 4px;
    border-radius: 999px;
    background: var(--neutral-line);
}

.operation-row.severity-critical::before {
    background: var(--danger-ink);
}

.operation-row.severity-high::before {
    background: var(--warning-ink);
}

.operation-row.severity-medium::before {
    background: #2563eb;
}

.operation-row.severity-critical {
    border-color: rgba(146, 35, 64, 0.28);
    background: linear-gradient(145deg, rgba(255, 242, 244, 0.84), rgba(255, 255, 255, 0.98));
}

.operation-row.severity-high {
    border-color: rgba(127, 79, 8, 0.24);
    background: linear-gradient(145deg, rgba(255, 248, 234, 0.86), rgba(255, 255, 255, 0.98));
}

.operation-row.severity-medium {
    border-color: rgba(37, 99, 235, 0.16);
    background: linear-gradient(145deg, rgba(239, 246, 255, 0.84), rgba(255, 255, 255, 0.98));
}

.compact-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(8.75rem, 100%), 1fr));
}

.bulk-toolbar {
    position: sticky;
    top: 5.25rem;
    z-index: 4;
}

.bulk-toolbar .quick-panel {
    border-color: rgba(199, 129, 188, 0.32);
    background: rgba(255, 255, 255, 0.98);
    background-image: none;
}

tbody tr:hover {
    background: rgba(239, 215, 234, 0.24);
}

.profile-drawer-shell {
    position: fixed;
    inset: 0;
    z-index: 75;
    display: grid;
    justify-items: end;
    pointer-events: none;
}

.profile-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(18, 32, 45, 0.38);
    backdrop-filter: blur(3px);
    pointer-events: auto;
}

.profile-drawer {
    position: relative;
    z-index: 1;
    width: min(42rem, 100vw);
    height: 100vh;
    padding: 0.85rem;
    pointer-events: auto;
}

.profile-drawer-card {
    height: 100%;
    overflow: auto;
    padding: 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(215, 191, 222, 0.92);
    background:
        linear-gradient(180deg, rgba(252, 247, 253, 0.98) 0%, rgba(255, 255, 255, 0.98) 18%, rgba(247, 241, 250, 0.98) 100%);
    box-shadow: var(--shadow-float);
}

.profile-drawer-head {
    position: sticky;
    top: -1rem;
    z-index: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    margin: -1rem -1rem 0.95rem;
    padding: 1rem;
    background: rgba(252, 247, 253, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(10px);
}

.profile-close {
    width: auto;
    min-width: 0;
}

.profile-kpis {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    margin-bottom: 0.9rem;
}

.profile-note {
    display: block;
}

.profile-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr));
    gap: 0.72rem;
    margin-bottom: 0.9rem;
}

.profile-sections {
    align-items: start;
}

.profile-list {
    display: grid;
    gap: 0.65rem;
}

.profile-list-item {
    padding: 0.82rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.profile-summary {
    margin-top: 0;
    min-height: 12rem;
}

.profile-drawer-card {
    padding: 1.15rem;
    background:
        radial-gradient(circle at top right, rgba(199, 129, 188, 0.16), transparent 24rem),
        linear-gradient(180deg, rgba(252, 247, 253, 0.98) 0%, rgba(255, 255, 255, 0.98) 18%, rgba(247, 241, 250, 0.98) 100%);
}

.profile-drawer-head {
    align-items: center;
    gap: 1rem;
}

.profile-hero {
    min-width: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    flex: 1 1 auto;
}

.profile-avatar-shell {
    width: clamp(4.8rem, 7vw, 6.25rem);
    aspect-ratio: 1;
    border-radius: 1.55rem;
    padding: 0.18rem;
    background: linear-gradient(145deg, rgba(199, 129, 188, 0.42), rgba(255, 255, 255, 0.82));
    box-shadow: 0 18px 40px rgba(87, 33, 104, 0.16);
}

.profile-avatar-image,
.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: calc(1.55rem - 0.18rem);
}

.profile-avatar-image {
    object-fit: cover;
    background: rgba(255, 255, 255, 0.9);
}

.profile-avatar-fallback {
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #88449e, #4b2557);
    color: #ffffff;
    font-family: var(--font-display);
    font-size: clamp(1.25rem, 2vw, 1.72rem);
    letter-spacing: 0.06em;
}

.profile-hero-copy {
    min-width: 0;
    display: grid;
    gap: 0.42rem;
}

.profile-hero-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.48rem;
    align-items: center;
}

.profile-hero-pill,
.profile-context-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    padding: 0.35rem 0.78rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-context-pill {
    background: rgba(248, 243, 251, 0.96);
    color: var(--ink-700);
}

.profile-hero-pill.profile-surface-success {
    color: var(--success-ink);
}

.profile-hero-pill.profile-surface-warning {
    color: var(--warning-ink);
}

.profile-hero-pill.profile-surface-danger {
    color: var(--danger-ink);
}

.profile-hero-pill.profile-surface-neutral {
    color: var(--neutral-ink);
}

.profile-meta-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 2rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(215, 191, 222, 0.95);
    background: rgba(255, 255, 255, 0.9);
    color: var(--ink-700);
    font-size: 0.8rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.profile-meta-chip i {
    color: var(--brand-100);
}

.profile-identity-subtitle {
    max-width: 56rem;
}

.profile-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.82rem;
}

.profile-kpi-card {
    display: grid;
    gap: 0.7rem;
    min-height: 8.3rem;
    padding: 1rem;
    border-radius: var(--radius-lg);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.profile-kpi-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.7rem;
}

.profile-kpi-icon {
    display: inline-grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.82);
    color: var(--brand-700);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.profile-kpi-main .status-badge {
    font-size: 0.82rem;
    padding: 0.42rem 0.72rem;
}

.profile-surface-success {
    background: linear-gradient(180deg, rgba(237, 253, 243, 0.92), rgba(255, 255, 255, 0.96));
    border-color: rgba(166, 234, 192, 0.95);
}

.profile-surface-warning {
    background: linear-gradient(180deg, rgba(255, 248, 234, 0.94), rgba(255, 255, 255, 0.96));
    border-color: rgba(248, 215, 157, 0.94);
}

.profile-surface-danger {
    background: linear-gradient(180deg, rgba(255, 242, 244, 0.96), rgba(255, 255, 255, 0.98));
    border-color: rgba(244, 188, 201, 0.96);
}

.profile-surface-neutral {
    background: linear-gradient(180deg, rgba(248, 243, 251, 0.96), rgba(255, 255, 255, 0.98));
    border-color: rgba(227, 211, 232, 0.95);
}

.profile-command-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr));
    gap: 0.82rem;
    margin-bottom: 0.95rem;
}

.profile-panel {
    min-height: 100%;
    padding: 1rem;
    border-radius: var(--radius-lg);
}

.profile-panel-primary {
    background:
        radial-gradient(circle at top right, rgba(199, 129, 188, 0.22), transparent 12rem),
        rgba(255, 255, 255, 0.98);
}

.profile-panel-secondary {
    background: rgba(255, 255, 255, 0.98);
}

.profile-panel-danger {
    background:
        linear-gradient(180deg, rgba(255, 250, 251, 0.98), rgba(255, 255, 255, 0.98));
}

.profile-panel-copy {
    color: var(--ink-600);
    font-size: 0.84rem;
    line-height: 1.5;
}

.profile-grant-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.82rem;
    align-items: end;
}

.profile-stepper-field {
    display: grid;
    gap: 0.42rem;
    margin: 0;
}

.profile-stepper-field > span {
    margin: 0;
    color: var(--ink-600);
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-stepper {
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr) 2.8rem;
    gap: 0.42rem;
    align-items: center;
    padding: 0.35rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.profile-stepper-input {
    min-width: 0;
    min-height: 2.8rem;
    border: none;
    background: transparent;
    box-shadow: none;
    text-align: center;
    font-size: 1.12rem;
    font-weight: 700;
    padding-inline: 0.2rem;
}

.profile-stepper-input:focus {
    box-shadow: none;
}

.profile-stepper-button {
    width: 100%;
    min-height: 2.45rem;
    padding: 0;
    border: 1px solid rgba(199, 129, 188, 0.55);
    border-radius: 0.82rem;
    background: rgba(247, 241, 250, 0.96);
    color: var(--brand-700);
    font: inherit;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: none;
}

.profile-stepper-button:hover,
.profile-stepper-button:focus-visible {
    background: rgba(239, 215, 234, 0.52);
    border-color: rgba(136, 68, 158, 0.58);
    outline: none;
}

.profile-action-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(20rem, 0.95fr);
    gap: 0.82rem;
    margin-bottom: 0.95rem;
    align-items: start;
}

.profile-note-card textarea {
    min-height: 14rem;
}

.profile-note-actions {
    justify-content: flex-start;
}

.profile-overview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.72rem;
    margin-top: 0.95rem;
}

.profile-fact {
    display: grid;
    gap: 0.28rem;
    padding: 0.85rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.96);
}

.profile-fact-label {
    color: var(--ink-500);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-fact-value {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.profile-fact-detail {
    color: var(--ink-600);
    font-size: 0.83rem;
}

.profile-fact.is-success {
    background: var(--success-bg);
    border-color: var(--success-line);
}

.profile-fact.is-warning {
    background: var(--warning-bg);
    border-color: var(--warning-line);
}

.profile-fact.is-danger {
    background: var(--danger-bg);
    border-color: var(--danger-line);
}

.profile-fact.is-accent {
    background: rgba(247, 239, 248, 0.96);
    border-color: rgba(199, 129, 188, 0.68);
}

.profile-inline-alert {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    margin-top: 0.95rem;
    padding: 0.82rem 0.9rem;
    border-radius: 1rem;
    border: 1px solid var(--line);
    font-size: 0.85rem;
    line-height: 1.5;
}

.profile-inline-alert.is-danger {
    background: var(--danger-bg);
    border-color: var(--danger-line);
    color: var(--danger-ink);
}

.profile-inline-alert.is-warning {
    background: var(--warning-bg);
    border-color: var(--warning-line);
    color: var(--warning-ink);
}

.profile-data-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem;
    margin-bottom: 0.95rem;
}

.profile-list-item {
    border-radius: 1rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

:where(a, button, input, textarea, select, .button-mini):focus-visible {
    outline-color: rgba(136, 68, 158, 0.34);
}

.site-sidebar {
    background: rgba(252, 246, 255, 0.98);
    background-image: none;
    border-color: rgba(215, 191, 222, 0.92);
}

.brand-card {
    border-color: rgba(199, 129, 188, 0.45);
    background: rgba(245, 226, 242, 0.94);
    background-image: none;
}

.brand-logo {
    border-color: rgba(215, 191, 222, 0.7);
}

.nav-link.active {
    background: rgba(239, 215, 234, 0.82);
    background-image: none;
    border-color: rgba(199, 129, 188, 0.66);
    box-shadow: 0 6px 14px rgba(136, 68, 158, 0.15);
}

.topbar {
    border-color: rgba(215, 191, 222, 0.95);
    background: rgba(255, 255, 255, 0.9);
}

.topbar-avatar {
    background: var(--brand-600);
    background-image: none;
    box-shadow: 0 7px 18px rgba(136, 68, 158, 0.32);
}

.card {
    border-color: rgba(215, 191, 222, 0.9);
    background: rgba(255, 255, 255, 0.9);
}

.card::before {
    background: rgba(136, 68, 158, 0.24);
    background-image: none;
}

.hero-card {
    background: rgba(252, 247, 253, 0.96);
    background-image: none;
}

button,
.button-mini {
    background: var(--brand-600);
    background-image: none;
    box-shadow: 0 9px 20px rgba(111, 54, 128, 0.28);
}

.button-danger {
    background: #c74b63;
    background-image: none;
}

.hero-eyebrow,
.pill.soft,
.tab-link.active {
    background: rgba(239, 215, 234, 0.84);
    border-color: rgba(199, 129, 188, 0.68);
}

.summary-item.is-attention {
    background: rgba(255, 248, 234, 0.95);
    background-image: none;
}

.priority-card.is-critical {
    background: rgba(255, 248, 234, 0.94);
    background-image: none;
}

.priority-icon,
.icon-chip {
    background: var(--brand-600);
    background-image: none;
}

.section-link,
.button-subtle:hover,
.button-subtle:focus-visible {
    border-color: rgba(199, 129, 188, 0.72);
}

.section-link:hover,
.section-link:focus-visible {
    background: rgba(239, 215, 234, 0.46);
    background-image: none;
}

.operation-row.severity-critical {
    background: rgba(255, 242, 244, 0.92);
    background-image: none;
}

.operation-row.severity-high {
    background: rgba(255, 248, 234, 0.94);
    background-image: none;
}

.operation-row.severity-medium {
    background: rgba(247, 241, 250, 0.96);
    background-image: none;
}

.record-row.is-priority {
    background: rgba(255, 250, 239, 0.94);
    background-image: none;
}

.bulk-toolbar .quick-panel {
    background: rgba(255, 255, 255, 0.98);
    background-image: none;
}

.profile-drawer-card {
    background:
        radial-gradient(circle at top right, rgba(199, 129, 188, 0.16), transparent 24rem),
        linear-gradient(180deg, rgba(252, 247, 253, 0.98) 0%, rgba(255, 255, 255, 0.98) 18%, rgba(247, 241, 250, 0.98) 100%);
}

thead th {
    background: rgba(249, 242, 251, 0.98);
    background-image: none;
}

.lookup-panel {
    border-color: rgba(47, 23, 58, 0.26);
    background: #25152d;
    color: #efe6f5;
}

.telegram-summary-card.is-ok {
    background: var(--success-bg);
    background-image: none;
}

.telegram-summary-card.is-warning {
    background: var(--warning-bg);
    background-image: none;
}

.telegram-summary-card.is-error {
    background: var(--danger-bg);
    background-image: none;
}

.brand-kicker,
.nav-group-label,
.topbar-kicker,
.hero-eyebrow,
.summary-label,
.priority-label,
.record-cell-label,
.status-badge,
.info-label,
label,
.toggle-line,
.pagination-link,
.tab-link,
.section-link,
.nav-link,
strong {
    font-weight: 500;
}

.record-name,
h1,
h2,
h3,
button,
.button-mini {
    font-weight: 600;
}

@media (min-width: 768px) {
    .topbar-note {
        display: block;
    }
}

@media (min-width: 1024px) {
    body.is-authenticated .site-sidebar {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    body.is-authenticated .site-content {
        padding: 1.25rem 1.35rem 1.8rem 20.2rem;
    }

    body.is-authenticated .sidebar-backdrop,
    .mobile-nav-fab {
        display: none;
    }

    body.is-authenticated .profile-drawer-shell {
        justify-items: stretch;
        padding: 0.95rem 0.95rem 0.95rem 20.2rem;
    }

    body.is-authenticated .profile-drawer-backdrop {
        inset: 0.95rem 0.95rem 0.95rem 20.2rem;
        border-radius: var(--radius-xl);
    }

    body.is-authenticated .profile-drawer {
        width: 100%;
        max-width: none;
        height: calc(100vh - 1.9rem);
        padding: 0;
    }
}

@media (max-width: 1023.98px) {
    .record-row {
        grid-template-columns: 1fr;
    }

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

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

    .bulk-toolbar {
        position: static;
    }
}

@media (max-width: 767.98px) {
    body {
        font-size: 14px;
    }

    .site-content,
    .guest-main {
        padding: 0.85rem;
    }

    .mobile-nav-fab {
        right: 0.85rem;
        bottom: 0.85rem;
    }

    .section-head,
    .record-top {
        flex-direction: column;
    }

    .button-mini,
    button,
    .section-link,
    .tab-link,
    .icon-button {
        width: 100%;
    }

    .telegram-summary-top,
    .telegram-health-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-strip,
    .summary-strip.compact,
    .grid,
    .split-grid,
    .toolbar-grid,
    .priority-grid,
    .filter-grid,
    .filter-grid.compact {
        grid-template-columns: 1fr;
    }

    .quick-form-row,
    .quick-form-row.single,
    .compact-form,
    .table-inline-form,
    .input-with-action,
    .info-row {
        grid-template-columns: 1fr;
    }

    .dense-status {
        justify-content: flex-start;
    }

    .modal-actions,
    .filter-actions,
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

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

    .pagination-status {
        margin-right: 0;
    }

    .profile-drawer {
        width: 100vw;
        padding: 0;
    }

    .profile-drawer-card {
        border-radius: 0;
    }

    .profile-drawer-head {
        top: 0;
        margin: 0 0 0.95rem;
        padding-inline: 0;
        background: transparent;
        border-bottom: none;
        backdrop-filter: none;
    }

    .profile-kpis {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1199.98px) {
    .profile-command-grid,
    .profile-data-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-content-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 899.98px) {
    .profile-kpis,
    .profile-command-grid,
    .profile-data-grid,
    .profile-overview-grid {
        grid-template-columns: 1fr;
    }

    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-grant-row {
        grid-template-columns: 1fr;
    }

    .profile-close {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .profile-stepper-button {
        width: auto;
        min-width: 2.65rem;
    }

    .profile-meta-cluster,
    .profile-hero-line {
        flex-direction: column;
        align-items: flex-start;
    }

    .profile-drawer-card {
        padding: 0.95rem 0.85rem 1.1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-home {
    display: grid;
    gap: 1rem;
}

.dashboard-home-header {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.15rem 1.2rem;
}

.dashboard-home-heading {
    display: grid;
    gap: 0.25rem;
}

.dashboard-home-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-home-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.dashboard-kpi-note {
    display: block;
}

.dashboard-quick-link {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(140, 108, 164, 0.12);
    border-radius: 1.1rem;
    background: #ffffff;
    text-decoration: none;
    box-shadow: 0 12px 24px rgba(42, 28, 56, 0.04);
}

.dashboard-quick-link:hover,
.dashboard-quick-link:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(199, 129, 188, 0.6);
    box-shadow: 0 16px 30px rgba(42, 28, 56, 0.08);
}

.dashboard-quick-link-icon,
.dashboard-quick-link-tail {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.dashboard-quick-link-icon {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.82rem;
    background: #f4f6fb;
    color: var(--ink-600);
}

.dashboard-quick-link-label {
    min-width: 0;
    font-weight: 600;
    color: var(--ink-900);
}

.dashboard-quick-link-tail {
    color: var(--ink-500);
}

.dashboard-link-card {
    display: grid;
    gap: 0.85rem;
    text-decoration: none;
    min-height: 14rem;
    align-content: start;
}

.dashboard-link-card:hover,
.dashboard-link-card:focus-visible {
    transform: translateY(-2px);
    box-shadow: var(--shadow-card);
}

.dashboard-link-meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.95rem;
    border-top: 1px solid var(--line-soft);
}

.dashboard-link-meta > div {
    display: grid;
    gap: 0.22rem;
}

.dashboard-link-meta strong {
    font-family: var(--font-display);
    font-size: 1.8rem;
}

.dashboard-link-meta span {
    color: var(--ink-600);
    font-weight: 600;
}

.dashboard-panels {
    align-items: start;
    grid-template-columns: minmax(0, 1.5fr) minmax(20rem, 1fr);
}

.dashboard-panels .card {
    min-height: 100%;
}

.dashboard-panel-primary,
.dashboard-panel-secondary {
    min-width: 0;
}

.compact-table-wrap {
    overflow: hidden;
}

.compact-table th,
.compact-table td {
    white-space: nowrap;
}

.stack-list {
    display: grid;
    gap: 0.85rem;
}

.stack-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--line-soft);
    border-radius: var(--radius-md);
    background: var(--surface-1);
}

.stack-row strong {
    display: block;
}

.stack-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.icon-button {
    width: 2.6rem;
    height: 2.6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid rgba(199, 129, 188, 0.56);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(239, 215, 234, 0.85));
    color: var(--brand-700);
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(111, 54, 128, 0.12);
}

.icon-button:hover,
.icon-button:focus-visible {
    color: var(--ink-900);
    border-color: rgba(136, 68, 158, 0.8);
    transform: translateY(-1px);
}

.action-cell {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.table-evidence,
.inline-evidence {
    display: inline-flex;
    align-items: center;
}

.evidence-thumb {
    display: inline-flex;
    width: 4.1rem;
    height: 4.1rem;
    overflow: hidden;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-0);
    box-shadow: 0 10px 18px rgba(111, 54, 128, 0.08);
}

.evidence-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-lightbox-card {
    width: min(72rem, 100%);
    padding: 1rem;
}

.media-lightbox-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.media-lightbox-body {
    margin-top: 0.9rem;
    display: grid;
    place-items: center;
    min-height: 16rem;
    border-radius: var(--radius-lg);
    background: rgba(245, 243, 248, 0.92);
    overflow: hidden;
}

.media-lightbox-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: min(78vh, 56rem);
    object-fit: contain;
}

.media-lightbox-actions {
    justify-content: flex-end;
}

.request-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.request-inline-form {
    display: inline-flex;
    margin: 0;
}

.request-inline-form .button-mini {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.evidence-file,
.evidence-fallback {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    max-width: 16rem;
    padding: 0.55rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface-1);
    color: var(--ink-700);
    text-decoration: none;
}

.evidence-file span,
.evidence-fallback {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-request-card {
    margin-bottom: 1rem;
}

.profile-proof {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.profile-proof .evidence-thumb {
    width: 5rem;
    height: 5rem;
}

.table-meta {
    display: grid;
    gap: 0.2rem;
}

.requests-table td,
.members-table td {
    vertical-align: middle;
}

@media (max-width: 1120px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-home-actions,
    .dashboard-home-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-panels {
        grid-template-columns: 1fr;
    }

    .dashboard-home-kpis,
    .dashboard-home-actions {
        grid-template-columns: 1fr;
    }

    .stack-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .stack-actions {
        width: 100%;
        justify-content: space-between;
    }

    .evidence-file,
    .evidence-fallback {
        max-width: 100%;
    }
}

/* User profile: minimal admin surface */
.profile-drawer-backdrop {
    background: rgba(23, 18, 28, 0.22);
    backdrop-filter: blur(2px);
}

.profile-drawer-card {
    display: grid;
    gap: 1.35rem;
    height: 100%;
    padding: clamp(1rem, 1vw + 0.8rem, 1.55rem);
    border: 0;
    border-radius: var(--radius-xl);
    background: #f8f6fb;
    box-shadow: 0 14px 30px rgba(33, 17, 40, 0.06);
    container-type: inline-size;
}

.profile-drawer-head {
    top: 0;
    margin: 0;
    padding: 0;
    gap: 1rem;
    align-items: flex-start;
    background: transparent;
    border: 0;
    backdrop-filter: none;
}

.profile-hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: center;
    min-width: 0;
}

.profile-avatar-shell {
    width: clamp(4.2rem, 7.2vw, 5.4rem);
    aspect-ratio: 1;
    padding: 0;
    border-radius: 1.35rem;
    background: #ffffff;
    box-shadow: none;
}

.profile-avatar-image,
.profile-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.profile-avatar-image {
    object-fit: cover;
    background: #ffffff;
}

.profile-avatar-fallback {
    display: grid;
    place-items: center;
    background: #2d2333;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 0.6vw + 0.95rem, 1.35rem);
    font-weight: 600;
    letter-spacing: 0.04em;
}

.profile-hero-copy {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.profile-kicker {
    margin: 0;
    color: var(--ink-500);
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-hero-title-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem 0.9rem;
}

.profile-hero-copy h2 {
    margin: 0;
    font-size: clamp(1.45rem, 0.9vw + 1.1rem, 1.95rem);
    line-height: 1.1;
}

.profile-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
    padding: 0.34rem 0.78rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-hero-badge.is-active {
    background: rgba(161, 88, 223, 0.12);
    color: #7b43b8;
}

.profile-hero-badge.is-alert {
    background: rgba(196, 71, 95, 0.12);
    color: #b53f56;
}

.profile-hero-badge.is-neutral {
    background: rgba(103, 86, 118, 0.1);
    color: var(--ink-600);
}

.profile-identity-subtitle {
    margin: 0;
}

.profile-meta-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    color: var(--ink-600);
    font-size: 0.88rem;
}

.profile-close {
    width: auto;
    min-width: 0;
    align-self: start;
}

.profile-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin: 0;
}

.profile-kpi-card {
    display: grid;
    gap: 0.55rem;
    min-height: 0;
    padding: 1rem 1rem 1.05rem;
    border: 1px solid rgba(140, 108, 164, 0.14);
    border-radius: 1.18rem;
    background: #ffffff;
    box-shadow: inset 0 2px 0 var(--profile-kpi-accent, #ede7f2), 0 12px 24px rgba(42, 28, 56, 0.04);
    overflow: hidden;
}

.profile-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.profile-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.82rem;
    background: #f4f6fb;
    color: var(--ink-500);
    box-shadow: none;
}

.profile-kpi-value {
    font-family: var(--font-body);
    font-size: clamp(1.1rem, 0.55vw + 0.95rem, 1.45rem);
    font-weight: 600;
    line-height: 1.2;
}

.profile-tone-positive {
    --profile-kpi-accent: var(--success-line);
    background: #ffffff;
}

.profile-tone-positive .profile-kpi-value,
.profile-tone-positive .profile-kpi-icon {
    color: var(--success-ink);
}

.profile-tone-positive .profile-kpi-icon {
    background: #ecfbf2;
}

.profile-tone-negative {
    --profile-kpi-accent: var(--danger-line);
    background: #ffffff;
}

.profile-tone-negative .profile-kpi-value,
.profile-tone-negative .profile-kpi-icon {
    color: var(--danger-ink);
}

.profile-tone-negative .profile-kpi-icon {
    background: #fff1f3;
}

.profile-tone-neutral {
    --profile-kpi-accent: #ede7f2;
    background: #ffffff;
}

.profile-tone-neutral .profile-kpi-icon {
    background: #f4f6fb;
    color: var(--ink-600);
}

.profile-main-grid {
    display: grid;
    grid-template-columns: minmax(18.5rem, 20rem) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
}

.profile-side-column,
.profile-main-column {
    display: grid;
    gap: 1rem;
    align-content: start;
    min-width: 0;
}

.profile-drawer-card .card,
.profile-drawer-card .quick-panel,
.profile-section-card {
    border: 1px solid rgba(140, 108, 164, 0.1);
    border-radius: 1.2rem;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(42, 28, 56, 0.04);
}

.profile-section-card::before {
    content: none;
}

.profile-drawer-card .card::before {
    content: none;
}

.profile-section-card {
    overflow: visible;
    min-width: 0;
}

.profile-drawer-card .quick-panel {
    gap: 0.9rem;
    padding: 1rem 1.05rem 1.05rem;
}

.profile-drawer-card .section-head,
.profile-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.profile-panel-header {
    margin-bottom: 0;
}

.profile-drawer-card .section-head h3,
.quick-panel-head {
    margin: 0;
    font-family: var(--font-body);
    font-size: 1.08rem;
    font-weight: 600;
    color: var(--ink-900);
}

.quick-panel-head {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
}

.profile-help {
    width: 1.72rem;
    height: 1.72rem;
    min-height: 0;
    padding: 0;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: transparent;
    color: var(--ink-600);
    box-shadow: none;
}

.profile-help:hover,
.profile-help:focus-visible {
    background: transparent;
    border-color: var(--line);
    color: var(--ink-900);
    transform: none;
    box-shadow: none;
}

.profile-inline-form,
.profile-drawer-card .filter-form {
    display: grid;
    gap: 0.85rem;
    margin: 0;
}

.profile-inline-form-spaced {
    gap: 0.75rem;
}

.profile-grant-block {
    display: grid;
    gap: 0.72rem;
    padding: 0.9rem;
    border-radius: 1rem;
    background: #f1f4f8;
}

.profile-grant-caption {
    color: var(--ink-600);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-grant-row.compact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
    align-items: center;
}

.profile-stepper-field {
    display: grid;
    gap: 0.35rem;
    margin: 0;
}

.profile-stepper-field > span {
    margin: 0;
    color: var(--ink-500);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.profile-stepper {
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr) 2.15rem;
    gap: 0.25rem;
    align-items: center;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.profile-stepper-input {
    min-width: 0;
    min-height: 2.35rem;
    height: 2.35rem;
    padding: 0 0.35rem;
    border: 1px solid rgba(140, 108, 164, 0.18);
    border-radius: 999px;
    background: #ffffff;
    box-shadow: none;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
}

.profile-stepper-input::-webkit-outer-spin-button,
.profile-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.profile-stepper-button {
    width: 2.15rem;
    min-width: 2.15rem;
    min-height: 2.15rem;
    padding: 0;
    border: 1px solid rgba(140, 108, 164, 0.18);
    border-radius: 999px;
    background: #ffffff;
    color: var(--ink-700);
    box-shadow: none;
    font: inherit;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1;
}

.profile-stepper-button:hover,
.profile-stepper-button:focus-visible {
    background: #ffffff;
    border-color: rgba(136, 68, 158, 0.4);
    color: var(--ink-900);
    transform: none;
    box-shadow: none;
}

.profile-action-buttons,
.profile-drawer-card .quick-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.profile-request-card .quick-form-row {
    display: grid;
    grid-template-columns: 6.5rem minmax(0, 1fr);
    gap: 0.65rem;
    align-items: end;
}

.profile-request-card .quick-form-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.profile-drawer-card .quick-form-actions > :only-child {
    grid-column: 1 / -1;
}

.profile-drawer-card .button-mini {
    min-height: 2.7rem;
    padding: 0.72rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 0.95rem;
    background: #211128;
    color: #ffffff;
    box-shadow: none;
    transform: none;
}

.profile-drawer-card .button-mini:hover,
.profile-drawer-card .button-mini:focus-visible {
    transform: none;
    box-shadow: none;
}

.profile-drawer-card .button-subtle {
    border-color: rgba(140, 108, 164, 0.16);
    background: #ffffff;
    color: #31263a;
}

.profile-drawer-card .button-subtle:hover,
.profile-drawer-card .button-subtle:focus-visible {
    background: #ffffff;
    border-color: rgba(136, 68, 158, 0.34);
    color: #211128;
}

.profile-drawer-card .button-strong {
    background: #211128;
    color: #ffffff;
}

.profile-drawer-card .button-secondary {
    background: var(--brand-600);
    color: #ffffff;
}

.profile-drawer-card .button-danger {
    background: #c4475f;
    color: #ffffff;
}

.profile-drawer-card .button-strong:hover,
.profile-drawer-card .button-strong:focus-visible,
.profile-drawer-card .button-secondary:hover,
.profile-drawer-card .button-secondary:focus-visible,
.profile-drawer-card .button-danger:hover,
.profile-drawer-card .button-danger:focus-visible {
    filter: brightness(0.97);
}

.profile-drawer-card input:not([type="hidden"]):not(.profile-stepper-input),
.profile-drawer-card textarea,
.profile-drawer-card select {
    border: 1px solid rgba(140, 108, 164, 0.16);
    background: #f1f4f8;
    box-shadow: none;
}

.profile-drawer-card input:not([type="hidden"]):not(.profile-stepper-input):focus,
.profile-drawer-card textarea:focus,
.profile-drawer-card select:focus,
.profile-stepper-input:focus {
    border-color: transparent;
    box-shadow: 0 0 0 2px rgba(136, 68, 158, 0.14);
}

.profile-note-card textarea {
    min-height: 9rem;
    resize: vertical;
}

.profile-note-actions {
    justify-content: stretch;
}

.profile-note-actions .button-mini {
    width: 100%;
}

.profile-action-buttons .button-mini {
    min-height: 5rem;
    flex-direction: column;
    gap: 0.45rem;
}

.profile-action-buttons .button-mini i {
    font-size: 1rem;
}

.profile-moderation-card {
    border-top: 3px solid #df4954;
}

.profile-context-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.85rem;
    padding: 0.32rem 0.8rem;
    border-radius: 999px;
    background: #f5f6f9;
    color: var(--ink-600);
    font-size: 0.74rem;
    font-weight: 600;
}

.profile-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
    gap: 1.1rem 1.45rem;
    margin-top: 0;
}

.profile-fact {
    display: grid;
    gap: 0.24rem;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.profile-fact-label {
    color: var(--ink-500);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.profile-fact-value {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.25;
}

.profile-fact-detail {
    color: var(--ink-600);
    font-size: 0.82rem;
}

.profile-fact.is-success .profile-fact-value {
    color: var(--success-ink);
}

.profile-fact.is-danger .profile-fact-value {
    color: var(--danger-ink);
}

.profile-fact.is-warning,
.profile-fact.is-neutral,
.profile-fact.is-accent {
    background: transparent;
}

.profile-list {
    display: grid;
    gap: 0;
}

.profile-list-item {
    padding: 1rem 0;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.profile-list-item:first-child {
    padding-top: 0;
}

.profile-list-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.profile-drawer-card .record-kpis {
    margin-top: 0.75rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    gap: 0.7rem 1rem;
}

.profile-drawer-card .record-cell {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.profile-drawer-card .status-badge {
    border: 0;
    box-shadow: none;
    font-weight: 600;
}

.profile-proof {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.profile-drawer-card .evidence-thumb,
.profile-drawer-card .evidence-file,
.profile-drawer-card .evidence-fallback {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.profile-drawer-card .evidence-file,
.profile-drawer-card .evidence-fallback {
    padding: 0;
}

.profile-drawer-card .table-empty {
    padding: 1rem 1.05rem;
    border: 1px dashed rgba(140, 108, 164, 0.22);
    border-radius: 1rem;
    background: #fcfbfe;
}

@container (max-width: 60rem) {
    .profile-main-grid {
        grid-template-columns: 1fr;
    }

    .profile-main-column,
    .profile-side-column {
        gap: 1rem;
    }
}

@container (max-width: 58rem) {
    .profile-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-side-column {
        grid-template-columns: 1fr;
    }

    .profile-request-card .quick-form-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container (max-width: 40rem) {
    .profile-hero {
        grid-template-columns: 1fr;
    }

    .profile-hero-title-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.45rem;
    }

    .profile-meta-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.2rem;
    }

    .profile-kpis,
    .profile-overview-grid,
    .profile-action-buttons,
    .profile-drawer-card .quick-form-actions,
    .profile-grant-row.compact,
    .profile-request-card .quick-form-row,
    .profile-request-card .quick-form-actions {
        grid-template-columns: 1fr;
    }

    .profile-close {
        width: 100%;
    }
}

.profile-page-shell {
    display: grid;
    gap: 1rem;
}

.profile-page-toolbar {
    display: flex;
    justify-content: flex-start;
}

.profile-back-link {
    min-height: 2.7rem;
}

.profile-page-card {
    overflow: visible;
}

.profile-page-card .profile-page-surface {
    display: grid;
    gap: 1.1rem;
}

.profile-page-card .profile-drawer-head {
    position: static;
    top: auto;
    margin: 0;
    padding: 0 0 1rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 21rem);
    gap: 1.25rem;
    align-items: start;
    background: transparent;
    border-bottom: 1px solid var(--line-soft);
    backdrop-filter: none;
}

.profile-page-card .profile-hero-copy h1 {
    margin: 0;
    font-size: clamp(1.7rem, 1.1vw + 1.35rem, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
}

.profile-page-card .profile-meta-line {
    font-size: 0.92rem;
}

.profile-summary-rail {
    display: grid;
    gap: 0.75rem;
}

.profile-summary-card {
    display: grid;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(140, 108, 164, 0.12);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(42, 28, 56, 0.04);
}

.profile-summary-card.is-positive {
    border-color: var(--success-line);
    background: #f8fdf9;
}

.profile-summary-card.is-warning {
    border-color: var(--warning-line);
    background: #fffaf0;
}

.profile-summary-card.is-danger {
    border-color: var(--danger-line);
    background: #fff5f6;
}

.profile-summary-label {
    color: var(--ink-500);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.profile-summary-value {
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
}

.profile-summary-meta {
    color: var(--ink-600);
    font-size: 0.8rem;
}

.profile-page-card .profile-grant-block {
    padding: 0.85rem;
    border: 1px solid rgba(140, 108, 164, 0.12);
    border-radius: 1rem;
    background: #f5f7fa;
}

.profile-page-card .profile-grant-caption {
    font-size: 0.66rem;
    letter-spacing: 0.1em;
}

.profile-page-card .profile-grant-row.compact {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: center;
}

.profile-page-card .profile-stepper {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border: 1px solid rgba(140, 108, 164, 0.18);
    border-radius: 0.72rem;
    overflow: hidden;
    background: #ffffff;
}

.profile-page-card .profile-stepper-button {
    width: 100%;
    min-width: 0;
    min-height: 2.45rem;
    border: 0;
    border-right: 1px solid rgba(140, 108, 164, 0.18);
    border-radius: 0;
    background: #eaf0f5;
    color: #2d3640;
    font-size: 1.02rem;
    font-weight: 700;
}

.profile-page-card .profile-stepper-button[data-stepper-action="increase"] {
    border-right: 0;
    border-left: 1px solid rgba(140, 108, 164, 0.18);
}

.profile-page-card .profile-stepper-button:hover,
.profile-page-card .profile-stepper-button:focus-visible {
    background: #e2e9f0;
    color: #151a1f;
}

.profile-page-card .profile-stepper-input {
    min-height: 2.45rem;
    height: 2.45rem;
    padding: 0 0.3rem;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
    text-align: center;
    font-size: 0.98rem;
    font-weight: 700;
    -moz-appearance: textfield;
}

.profile-page-card .profile-stepper-input::-webkit-outer-spin-button,
.profile-page-card .profile-stepper-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.profile-page-card .button-muted {
    border-color: #d6dde5;
    background: #eef2f5;
    color: #26303a;
}

.profile-page-card .button-muted:hover,
.profile-page-card .button-muted:focus-visible {
    background: #e6ebf0;
    color: #131920;
}

.profile-page-card .button-strong {
    background: #111111;
    color: #ffffff;
}

.profile-page-card .profile-grant-row.compact .button-mini {
    min-height: 2.45rem;
    padding: 0.55rem 0.8rem;
    border-radius: 0.8rem;
    font-size: 0.82rem;
}

.profile-page-card .profile-action-buttons .button-mini {
    min-height: 3rem;
    flex-direction: row;
    justify-content: center;
    gap: 0.55rem;
}

.profile-page-card .profile-moderation-card {
    border-top: 3px solid #111111;
}

.profile-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.profile-history-table {
    width: 100%;
}

.profile-history-table td,
.profile-history-table th {
    white-space: nowrap;
}

.profile-page-card .profile-responsive-table {
    width: 100%;
    table-layout: fixed;
}

.profile-page-card .profile-responsive-table th,
.profile-page-card .profile-responsive-table td {
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.profile-page-card .profile-responsive-table td .status-badge {
    max-width: 100%;
    justify-content: center;
    margin-inline: auto;
    white-space: normal;
}

.profile-page-card .profile-payments-table {
    min-width: 30rem;
}

.profile-page-card .profile-payments-table th:nth-child(1),
.profile-page-card .profile-payments-table td:nth-child(1) {
    width: 22%;
}

.profile-page-card .profile-payments-table th:nth-child(2),
.profile-page-card .profile-payments-table td:nth-child(2) {
    width: 24%;
}

.profile-page-card .profile-payments-table th:nth-child(3),
.profile-page-card .profile-payments-table td:nth-child(3) {
    width: 18%;
}

.profile-page-card .profile-payments-table th:nth-child(4),
.profile-page-card .profile-payments-table td:nth-child(4) {
    width: 24%;
}

.profile-page-card .profile-payments-table th:nth-child(5),
.profile-page-card .profile-payments-table td:nth-child(5) {
    width: 12%;
}

.profile-page-card .profile-activity-table {
    min-width: 32rem;
}

.profile-page-card .profile-activity-table th:nth-child(1),
.profile-page-card .profile-activity-table td:nth-child(1) {
    width: 22%;
}

.profile-page-card .profile-activity-table th:nth-child(2),
.profile-page-card .profile-activity-table td:nth-child(2) {
    width: 18%;
}

.profile-page-card .profile-activity-table th:nth-child(3),
.profile-page-card .profile-activity-table td:nth-child(3) {
    width: 38%;
}

.profile-page-card .profile-activity-table th:nth-child(4),
.profile-page-card .profile-activity-table td:nth-child(4) {
    width: 22%;
}

.profile-table-statuses {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.profile-review-indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.94rem;
}

.profile-review-indicator.is-reviewed {
    border-color: var(--success-line);
    background: var(--success-bg);
    color: var(--success-ink);
}

.profile-review-indicator.is-alert {
    border-color: var(--danger-line);
    background: var(--danger-bg);
    color: var(--danger-ink);
}

.tooltip-bubble {
    position: fixed;
    z-index: 130;
    max-width: min(18rem, calc(100vw - 1.5rem));
    padding: 0.58rem 0.75rem;
    border-radius: 0.8rem;
    background: #1d1821;
    color: #ffffff;
    font-size: 0.78rem;
    line-height: 1.45;
    box-shadow: 0 18px 40px rgba(20, 14, 24, 0.26);
    pointer-events: none;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 140ms ease, transform 140ms ease;
}

.tooltip-bubble::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -0.35rem;
    width: 0.75rem;
    height: 0.75rem;
    background: inherit;
    transform: translateX(-50%) rotate(45deg);
    border-radius: 0.12rem;
}

.tooltip-bubble.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1200px) {
    .profile-page-card .profile-drawer-head {
        grid-template-columns: 1fr;
    }

    .profile-summary-rail {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .profile-summary-rail,
    .profile-page-card .profile-kpis,
    .profile-page-card .profile-action-buttons,
    .profile-page-card .quick-form-actions,
    .profile-page-card .profile-grant-row.compact {
        grid-template-columns: 1fr;
    }

    .profile-page-card .profile-history-table td,
    .profile-page-card .profile-history-table th {
        white-space: normal;
    }
}

.profile-drawer-card-workspace {
    gap: 1.55rem;
    padding: clamp(1rem, 1vw + 0.9rem, 1.65rem);
    background: linear-gradient(180deg, #f4f1f8 0%, #fbfbfe 46%, #ffffff 100%);
    box-shadow: 0 22px 50px rgba(25, 14, 34, 0.08);
}

.profile-drawer-card-workspace .profile-drawer-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: clamp(1.15rem, 1vw + 1rem, 1.5rem);
    border: 0;
    border-radius: 1.7rem;
    background: linear-gradient(135deg, #211128 0%, #5c3a98 48%, #8167ce 100%);
    box-shadow: 0 22px 44px rgba(52, 30, 83, 0.22);
    color: #ffffff;
}

.profile-head-main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.profile-drawer-card-workspace .profile-hero {
    gap: 1.15rem;
    align-items: center;
}

.profile-drawer-card-workspace .profile-avatar-shell {
    width: clamp(4.8rem, 7.8vw, 5.9rem);
    border-radius: 1.55rem;
    background: rgba(255, 255, 255, 0.16);
    box-shadow: 0 18px 36px rgba(21, 10, 29, 0.18);
}

.profile-drawer-card-workspace .profile-avatar-image,
.profile-drawer-card-workspace .profile-avatar-fallback {
    border-radius: inherit;
}

.profile-drawer-card-workspace .profile-avatar-fallback {
    background: rgba(17, 8, 23, 0.5);
}

.profile-drawer-card-workspace .profile-hero-copy {
    gap: 0.55rem;
}

.profile-drawer-card-workspace .profile-kicker {
    color: rgba(245, 240, 255, 0.72);
    font-size: 0.68rem;
    letter-spacing: 0.18em;
}

.profile-drawer-card-workspace .profile-hero-copy h1,
.profile-drawer-card-workspace .profile-hero-copy h2 {
    color: #ffffff;
    font-size: clamp(1.7rem, 0.95vw + 1.35rem, 2.2rem);
    letter-spacing: -0.03em;
}

.profile-drawer-card-workspace .profile-identity-subtitle {
    color: rgba(255, 255, 255, 0.84);
    font-size: 0.94rem;
}

.profile-drawer-card-workspace .profile-hero-badge {
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.profile-drawer-card-workspace .profile-hero-badge.is-active {
    background: rgba(93, 199, 143, 0.18);
}

.profile-drawer-card-workspace .profile-hero-badge.is-alert {
    background: rgba(226, 93, 122, 0.2);
}

.profile-drawer-card-workspace .profile-hero-badge.is-neutral {
    background: rgba(255, 255, 255, 0.12);
}

.profile-drawer-card-workspace .profile-meta-line {
    gap: 0.55rem;
    color: rgba(255, 255, 255, 0.84);
}

.profile-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.1rem;
    padding: 0.45rem 0.78rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: inherit;
    font-size: 0.8rem;
    font-weight: 600;
}

.profile-meta-chip i {
    font-size: 0.78rem;
    opacity: 0.9;
}

.profile-drawer-card-workspace .profile-close {
    align-self: start;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    backdrop-filter: blur(12px);
}

.profile-drawer-card-workspace .profile-close:hover,
.profile-drawer-card-workspace .profile-close:focus-visible {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.24);
    color: #ffffff;
}

.profile-vitals {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 0.85rem;
}

.profile-vital-card {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 1.2rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.profile-vital-card.is-positive {
    background: rgba(93, 199, 143, 0.16);
    border-color: rgba(174, 244, 203, 0.2);
}

.profile-vital-card.is-warning {
    background: rgba(255, 191, 94, 0.16);
    border-color: rgba(255, 224, 170, 0.22);
}

.profile-vital-card.is-danger {
    background: rgba(226, 93, 122, 0.18);
    border-color: rgba(255, 188, 199, 0.22);
}

.profile-vital-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 2.65rem;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: 0.95rem;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

.profile-vital-copy {
    display: grid;
    gap: 0.18rem;
    min-width: 0;
}

.profile-vital-label {
    color: rgba(255, 255, 255, 0.68);
    font-size: 0.66rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.profile-vital-value {
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.22;
}

.profile-vital-meta {
    color: rgba(255, 255, 255, 0.76);
    font-size: 0.78rem;
    line-height: 1.3;
}

.profile-drawer-card-workspace .profile-kpis {
    gap: 1.05rem;
}

.profile-drawer-card-workspace .profile-kpi-card {
    padding: 1.05rem;
    border: 1px solid rgba(126, 95, 154, 0.1);
    border-top-width: 1px;
    border-radius: 1.35rem;
    box-shadow: 0 18px 34px rgba(39, 24, 54, 0.05);
}

.profile-drawer-card-workspace .profile-main-grid {
    gap: 1.35rem;
    grid-template-columns: minmax(19rem, 21rem) minmax(0, 1fr);
}

.profile-drawer-card-workspace .profile-main-grid > * {
    min-width: 0;
}

.profile-drawer-card-workspace .profile-section-card,
.profile-drawer-card-workspace .quick-panel {
    border-radius: 1.45rem;
    border: 1px solid rgba(126, 95, 154, 0.08);
    box-shadow: 0 18px 35px rgba(39, 24, 54, 0.05);
}

.profile-drawer-card-workspace .profile-overview-grid {
    gap: 0.9rem;
}

.profile-drawer-card-workspace .profile-fact {
    gap: 0.3rem;
    padding: 0.95rem 1rem;
    border: 1px solid rgba(126, 95, 154, 0.08);
    border-radius: 1.15rem;
    background: #f8f7fb;
}

.profile-drawer-card-workspace .profile-fact.is-success {
    background: #f2fbf5;
    border-color: rgba(88, 169, 125, 0.18);
}

.profile-drawer-card-workspace .profile-fact.is-warning {
    background: #fff7ee;
    border-color: rgba(235, 179, 102, 0.22);
}

.profile-drawer-card-workspace .profile-fact.is-danger {
    background: #fff4f6;
    border-color: rgba(210, 98, 122, 0.2);
}

.profile-drawer-card-workspace .profile-fact.is-neutral,
.profile-drawer-card-workspace .profile-fact.is-accent {
    background: #f8f7fb;
}

.profile-drawer-card-workspace .profile-list-item {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
}

.profile-drawer-card-workspace .profile-grant-block {
    border: 1px solid rgba(126, 95, 154, 0.08);
    background: linear-gradient(180deg, #f6f3fb 0%, #f1f4f8 100%);
}

@container (max-width: 58rem) {
    .profile-drawer-card-workspace .profile-main-grid {
        grid-template-columns: 1fr;
    }
}

@container (max-width: 40rem) {
    .profile-head-main {
        display: grid;
        grid-template-columns: 1fr;
    }

    .profile-drawer-card-workspace .profile-close {
        width: 100%;
        justify-content: center;
    }

    .profile-meta-chip {
        width: 100%;
        justify-content: flex-start;
    }
}

.pagination {
    justify-content: center;
    align-items: center;
    gap: 0.8rem;
}

.pagination-status {
    margin-right: 0;
    min-width: 8rem;
    text-align: center;
}

.pagination-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.54rem;
}

.pagination-link {
    min-width: 2.5rem;
}

.pagination-link-nav {
    padding-inline: 0.88rem;
}

.pagination-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    color: var(--ink-500);
    font-weight: 700;
}

.memberships-page {
    gap: 1rem;
}

.memberships-hero,
.memberships-filter-card,
.memberships-results-card {
    border: 1px solid rgba(140, 108, 164, 0.08);
    border-radius: 1.3rem;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(42, 28, 56, 0.04);
}

.memberships-hero::before,
.memberships-filter-card::before,
.memberships-results-card::before {
    content: none;
}

.memberships-hero {
    gap: 1.1rem;
}

.memberships-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.memberships-kpi-card {
    border: 0;
    border-radius: 1rem;
    background: #f7f8fb;
    box-shadow: none;
}

.members-toolbar-head,
.members-results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.members-toolbar-note,
.members-results-note {
    margin-top: 0.28rem;
    color: var(--ink-600);
    font-size: 0.84rem;
}

.memberships-filter-form {
    gap: 1rem;
}

.members-toolbar-grid {
    display: grid;
    grid-template-columns: minmax(16rem, 1.8fr) repeat(4, minmax(10rem, 1fr));
    gap: 0.9rem;
}

.members-field {
    display: grid;
    gap: 0.42rem;
}

.members-field > span {
    color: var(--ink-500);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.members-input-shell,
.members-field select {
    min-height: 3rem;
    border: 1px solid rgba(140, 108, 164, 0.14);
    border-radius: 0.95rem;
    background: #f7f8fb;
    box-shadow: none;
}

.members-input-shell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.95rem;
}

.members-input-shell i {
    color: var(--ink-500);
    font-size: 0.88rem;
}

.members-input-shell input,
.members-field select {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink-900);
    box-shadow: none;
}

.members-input-shell input {
    padding: 0;
    min-height: auto;
}

.members-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-inline: 0.95rem 2.25rem;
    border: 1px solid rgba(140, 108, 164, 0.14);
    background-color: #f7f8fb;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(74, 51, 86, 0.72) 50%),
        linear-gradient(135deg, rgba(74, 51, 86, 0.72) 50%, transparent 50%);
    background-position:
        calc(100% - 1.05rem) calc(50% - 0.14rem),
        calc(100% - 0.75rem) calc(50% - 0.14rem);
    background-size: 0.34rem 0.34rem, 0.34rem 0.34rem;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.members-filter-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.memberships-pill-row {
    margin: 0;
}

.memberships-pill {
    min-height: 2.3rem;
    padding-inline: 0.85rem;
    background: #f5f6f9;
    border: 0;
    color: var(--ink-700);
    text-decoration: none;
}

.memberships-pill.is-active,
.memberships-pill:hover,
.memberships-pill:focus-visible {
    background: #111111;
    color: #ffffff;
}

.memberships-filter-actions {
    gap: 0.55rem;
}

.memberships-clear-link,
.memberships-filter-actions .button-mini,
.memberships-filter-actions button {
    min-height: 2.8rem;
}

.memberships-results-card {
    overflow: visible;
}

[data-memberships-results] {
    position: relative;
    display: grid;
    gap: 1rem;
}

[data-memberships-results].is-loading {
    opacity: 0.62;
    pointer-events: none;
}

.members-empty-state {
    border: 0;
    border-radius: 1rem;
    background: #f7f8fb;
}

.members-table-wrap {
    border: 0;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(140, 108, 164, 0.08);
}

.members-table {
    min-width: 860px;
}

.members-table thead th {
    background: #f7f8fb;
}

.members-table tbody tr:hover {
    background: #fafbfc;
}

.members-table td,
.members-table th {
    border-bottom-color: rgba(140, 108, 164, 0.08);
}

.members-table .status-badge {
    border: 0;
    box-shadow: none;
}

@media (max-width: 1120px) {
    .memberships-kpis,
    .members-toolbar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .members-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .memberships-kpis,
    .members-toolbar-grid {
        grid-template-columns: 1fr;
    }

    .members-toolbar-head,
    .members-results-head,
    .members-filter-meta,
    .pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .pagination-links {
        justify-content: center;
    }
}

.history-page {
    gap: 1rem;
}

.history-hero,
.history-tabs-card,
.history-filter-card,
.history-results-card {
    border: 1px solid rgba(140, 108, 164, 0.08);
    border-radius: 1.3rem;
    background: #ffffff;
    box-shadow: 0 12px 24px rgba(42, 28, 56, 0.04);
}

.history-hero::before,
.history-tabs-card::before,
.history-filter-card::before,
.history-results-card::before {
    content: none;
}

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

.history-kpi-card {
    border: 0;
    border-radius: 1rem;
    background: #f7f8fb;
    box-shadow: none;
}

.history-tabs {
    display: inline-flex;
    gap: 0.55rem;
    padding: 0.3rem;
    border-radius: 999px;
    background: #f5f6f9;
}

.history-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.5rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    color: var(--ink-700);
    text-decoration: none;
    font-weight: 700;
}

.history-tab.is-active,
.history-tab:hover,
.history-tab:focus-visible {
    background: #111111;
    color: #ffffff;
}

.history-toolbar-head,
.history-results-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.history-toolbar-note,
.history-results-note {
    margin-top: 0.28rem;
    color: var(--ink-600);
    font-size: 0.84rem;
}

.history-filter-form,
.history-results-card [data-history-results] {
    display: grid;
    gap: 1rem;
}

.history-toolbar-grid {
    display: grid;
    grid-template-columns: minmax(18rem, 1.8fr) minmax(12rem, 1fr);
    gap: 0.9rem;
}

.history-toolbar-grid-payments {
    grid-template-columns: minmax(18rem, 1.8fr) repeat(4, minmax(10rem, 1fr));
}

.history-field {
    display: grid;
    gap: 0.42rem;
}

.history-field > span {
    color: var(--ink-500);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.history-input-shell,
.history-field select {
    min-height: 3rem;
    border: 1px solid rgba(140, 108, 164, 0.14);
    border-radius: 0.95rem;
    background: #f7f8fb;
    box-shadow: none;
}

.history-input-shell {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0 0.95rem;
}

.history-input-shell i {
    color: var(--ink-500);
    font-size: 0.88rem;
}

.history-input-shell input,
.history-field select {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink-900);
    box-shadow: none;
}

.history-input-shell input {
    padding: 0;
    min-height: auto;
}

.history-field select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-inline: 0.95rem 2.25rem;
    border: 1px solid rgba(140, 108, 164, 0.14);
    background-color: #f7f8fb;
    background-image:
        linear-gradient(45deg, transparent 50%, rgba(74, 51, 86, 0.72) 50%),
        linear-gradient(135deg, rgba(74, 51, 86, 0.72) 50%, transparent 50%);
    background-position:
        calc(100% - 1.05rem) calc(50% - 0.14rem),
        calc(100% - 0.75rem) calc(50% - 0.14rem);
    background-size: 0.34rem 0.34rem, 0.34rem 0.34rem;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
}

.history-filter-actions {
    display: flex;
    justify-content: flex-end;
}

.history-empty-state {
    border: 0;
    border-radius: 1rem;
    background: #f7f8fb;
}

.history-table-wrap {
    border: 0;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(140, 108, 164, 0.08);
}

.history-table thead th {
    background: #f7f8fb;
}

.history-table tbody tr:hover {
    background: #fafbfc;
}

.history-table td,
.history-table th {
    border-bottom-color: rgba(140, 108, 164, 0.08);
}

.history-table .status-badge {
    border: 0;
    box-shadow: none;
}

@media (max-width: 1120px) {
    .history-kpis,
    .history-toolbar-grid,
    .history-toolbar-grid-payments {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .history-search-field {
        grid-column: 1 / -1;
    }
}

@media (max-width: 720px) {
    .history-kpis,
    .history-toolbar-grid,
    .history-toolbar-grid-payments {
        grid-template-columns: 1fr;
    }

    .history-toolbar-head,
    .history-results-head,
    .history-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .history-tabs {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}
