/* Visual foundation adapted from octo-pontua-blueprint. */
* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    min-height: 100%;
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-sans);
    background: var(--background);
    color: var(--foreground);
    -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

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

button, a {
    -webkit-tap-highlight-color: transparent;
}

:focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

h1, h2, h3, h4, p {
    margin-top: 0;
}

.app-loader {
    min-height: 100vh;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 1rem;
    color: var(--muted-foreground);
}

.app-loader__mark {
    width: 3rem;
    height: 3rem;
    border: .25rem solid var(--border);
    border-top-color: var(--primary);
    border-right-color: var(--secondary);
    border-radius: 999px;
    animation: spin .8s linear infinite;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    inset: auto 1rem 1rem 1rem;
    z-index: 9999;
    padding: 1rem 3rem 1rem 1rem;
    border: 1px solid var(--destructive);
    border-radius: .75rem;
    background: var(--destructive);
    color: var(--destructive-foreground);
    box-shadow: 0 20px 50px rgba(0, 0, 0, .25);
}

#blazor-error-ui .reload {
    text-decoration: underline;
    margin-left: .5rem;
}

#blazor-error-ui .dismiss {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    font-size: 1.25rem;
}

.validation-message {
    display: block;
    color: var(--destructive);
    font-size: .78rem;
    margin-top: .35rem;
}

.invalid {
    border-color: var(--destructive) !important;
}

.valid.modified:not([type="checkbox"]) {
    border-color: var(--success) !important;
}

/* Shell */
.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 17rem minmax(0, 1fr);
}

.app-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--sidebar);
    border-right: 1px solid var(--sidebar-border);
    z-index: 40;
}

.app-sidebar__brand {
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--sidebar-border);
}

.app-sidebar__brand img {
    width: 9.5rem;
    height: auto;
}

.app-sidebar__body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem .75rem;
}

.app-sidebar__footer {
    padding: .85rem;
    border-top: 1px solid var(--sidebar-border);
    font-size: .72rem;
    color: var(--muted-foreground);
}

.app-main {
    min-width: 0;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 30;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem clamp(1rem, 3vw, 2rem);
    background: color-mix(in srgb, var(--background) 88%, transparent);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
}

.app-header__title {
    min-width: 0;
    flex: 1;
}

.app-header__title strong {
    display: block;
    font-size: .95rem;
}

.app-header__title span {
    display: block;
    color: var(--muted-foreground);
    font-size: .75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-content {
    width: 100%;
    max-width: 100rem;
    margin: 0 auto;
    padding: clamp(1rem, 3vw, 2rem);
}

.sidebar-overlay {
    display: none;
}

.mobile-menu-button {
    display: none !important;
}

.nav-section-title {
    padding: .75rem .75rem .4rem;
    color: var(--muted-foreground);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.nav-list {
    display: grid;
    gap: .25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    gap: .75rem;
    padding: .65rem .75rem;
    border-radius: .65rem;
    color: var(--sidebar-foreground);
    font-size: .875rem;
    font-weight: 500;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.nav-link:hover {
    background: var(--sidebar-accent);
    color: var(--sidebar-accent-foreground);
}

.nav-link.active {
    background: var(--sidebar-primary);
    color: var(--sidebar-primary-foreground);
    font-weight: 600;
}

.nav-link svg {
    flex: 0 0 auto;
}

/* Page structure */
.page-stack {
    display: grid;
    gap: 1.25rem;
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.page-header__eyebrow {
    margin: 0 0 .35rem;
    color: var(--primary);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.page-header h1 {
    margin: 0;
    font-size: clamp(1.55rem, 3vw, 2rem);
    line-height: 1.15;
    letter-spacing: -.03em;
}

.page-header p {
    margin: .4rem 0 0;
    color: var(--muted-foreground);
    max-width: 46rem;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
    flex-wrap: wrap;
}

.section-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.section-description {
    margin: .35rem 0 0;
    color: var(--muted-foreground);
    font-size: .875rem;
}

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

.text-success {
    color: var(--success);
}

.text-warning {
    color: var(--warning);
}

.text-danger {
    color: var(--destructive);
}

.text-primary {
    color: var(--primary);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.nowrap {
    white-space: nowrap;
}

.w-full {
    width: 100%;
}

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

.col-12 {
    grid-column: span 12;
}

.col-9 {
    grid-column: span 9;
}

.col-8 {
    grid-column: span 8;
}

.col-7 {
    grid-column: span 7;
}

.col-6 {
    grid-column: span 6;
}

.col-5 {
    grid-column: span 5;
}

.col-4 {
    grid-column: span 4;
}

.col-3 {
    grid-column: span 3;
}

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

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

/* Forms */
.form-grid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.form-field {
    grid-column: span 12;
    display: grid;
    gap: .42rem;
    min-width: 0;
}

.form-field--6 {
    grid-column: span 6;
}

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

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

.form-field label {
    font-size: .82rem;
    font-weight: 650;
    color: var(--foreground);
}

.form-help {
    color: var(--muted-foreground);
    font-size: .75rem;
}

.form-control {
    width: 100%;
    min-height: 2.65rem;
    padding: .6rem .75rem;
    border: 1px solid var(--input);
    border-radius: .6rem;
    background: var(--background);
    color: var(--foreground);
    transition: border .15s ease, box-shadow .15s ease, background .15s ease;
}

.form-control:not(:disabled):not([readonly]):hover {
    border-color: color-mix(in srgb, var(--primary) 45%, var(--input));
}

.form-control:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 18%, transparent);
}

.form-control:disabled, .form-control[readonly] {
    cursor: not-allowed;
    background: var(--muted);
    color: var(--muted-foreground);
}

textarea.form-control {
    min-height: 7rem;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding-top: .5rem;
}

.input-prefix {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: stretch;
}

.input-prefix span {
    display: grid;
    place-items: center;
    padding: 0 .8rem;
    border: 1px solid var(--input);
    border-right: 0;
    border-radius: .6rem 0 0 .6rem;
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: .85rem;
}

.input-prefix .form-control {
    border-radius: 0 .6rem .6rem 0;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: .6rem;
    min-height: 2.5rem;
}

.checkbox-row input {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
}

/* Data display */
.table-shell {
    width: 100%;
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: .75rem;
}

.data-table {
    width: 100%;
    min-width: 48rem;
    border-collapse: collapse;
    background: var(--card);
}

.data-table th {
    padding: .75rem 1rem;
    text-align: left;
    background: var(--muted);
    color: var(--muted-foreground);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: .9rem 1rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border);
    font-size: .86rem;
}

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

.table-primary {
    font-weight: 650;
}

.table-secondary {
    display: block;
    margin-top: .2rem;
    color: var(--muted-foreground);
    font-size: .75rem;
}

.table-actions {
    display: flex;
    justify-content: flex-end;
    gap: .25rem;
}

.table-toolbar {
    display: flex;
    align-items: end;
    gap: .75rem;
    flex-wrap: wrap;
}

.table-toolbar__search {
    flex: 1 1 18rem;
}

.table-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    min-height: 1.65rem;
    padding: .2rem .55rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    white-space: nowrap;
}

.status-badge--success {
    color: #05733a;
    background: #e8fff2;
    border-color: #a7f3c6;
}

.status-badge--warning {
    color: #92400e;
    background: #fff7e8;
    border-color: #fed7aa;
}

.status-badge--danger {
    color: #991b1b;
    background: #fff0f0;
    border-color: #fecaca;
}

.status-badge--info {
    color: #075985;
    background: #e9f7ff;
    border-color: #bae6fd;
}

.status-badge--neutral {
    color: var(--muted-foreground);
    background: var(--muted);
    border-color: var(--border);
}

.dark .status-badge--success {
    color: #7af0ad;
    background: #103322;
    border-color: #17653a;
}

.dark .status-badge--warning {
    color: #ffd991;
    background: #3a2a0e;
    border-color: #725218;
}

.dark .status-badge--danger {
    color: #fca5a5;
    background: #3b1717;
    border-color: #7f1d1d;
}

.dark .status-badge--info {
    color: #8bd5f9;
    background: #102d3d;
    border-color: #155e75;
}

.metric-card {
    position: relative;
    overflow: hidden;
    min-height: 10.5rem;
}

.metric-card::after {
    pointer-events: none;
    content: "";
    position: absolute;
    width: 7rem;
    height: 7rem;
    border-radius: 999px;
    right: -2.5rem;
    top: -2.5rem;
    background: color-mix(in srgb, var(--metric-color, var(--primary)) 11%, transparent);
}

.metric-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.metric-card__icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: .7rem;
    color: var(--metric-color, var(--primary));
    background: color-mix(in srgb, var(--metric-color, var(--primary)) 12%, transparent);
}

.metric-card__icon,
.quick-action > span,
.op-icon-slot,
.op-account-menu-icon,
.op-account-trigger__chevron {
    line-height: 0;
}

.metric-card__icon svg,
.quick-action > span svg,
.op-icon-slot svg,
.op-account-menu-icon svg,
.op-account-trigger__chevron svg {
    display: block;
}

.metric-card__label {
    margin: 1.1rem 0 .25rem;
    color: var(--muted-foreground);
    font-size: .8rem;
}

.metric-card__value {
    margin: 0;
    font-size: clamp(1.45rem, 4vw, 2rem);
    font-weight: 780;
    letter-spacing: -.04em;
}

.metric-card__description {
    margin: .35rem 0 0;
    color: var(--muted-foreground);
    font-size: .75rem;
}

.empty-state, .route-state {
    min-height: 17rem;
    display: grid;
    place-content: center;
    justify-items: center;
    text-align: center;
    gap: .75rem;
    padding: 2rem;
    color: var(--muted-foreground);
}

.empty-state h2, .route-state h1 {
    color: var(--foreground);
    margin: 0;
}

.empty-state p, .route-state p {
    max-width: 32rem;
    margin: 0;
}

.loading-block {
    min-height: 15rem;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: .8rem;
    color: var(--muted-foreground);
}

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

/* Auth layouts */
.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(28rem, 1.25fr);
}

.auth-panel {
    display: grid;
    align-items: center;
    padding: clamp(1.25rem, 5vw, 4rem);
    background: var(--card);
}

.auth-panel__inner {
    width: min(100%, 32rem);
    margin: 0 auto;
}

.auth-brand {
    width: 11rem;
    margin-bottom: 2rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.auth-footer {
    margin-top: 2rem;
    text-align: center;
    color: var(--muted-foreground);
    font-size: .75rem;
}

.auth-showcase {
    position: relative;
    overflow: hidden;
    display: grid;
    align-content: center;
    padding: clamp(2rem, 7vw, 6rem);
    color: #fff;
    background: #5f3e98;
}

.auth-showcase::before, .auth-showcase::after {
    pointer-events: none;
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, .07);
}

.auth-showcase::before {
    width: 28rem;
    height: 28rem;
    right: -9rem;
    top: -12rem;
}

.auth-showcase::after {
    width: 22rem;
    height: 22rem;
    left: -8rem;
    bottom: -10rem;
}

.auth-showcase__content {
    position: relative;
    z-index: 1;
    max-width: 45rem;
}

.auth-showcase h2 {
    margin: 0;
    font-size: clamp(2rem, 5vw, 3.6rem);
    line-height: 1.05;
    letter-spacing: -.05em;
}

.auth-showcase h2 span {
    color: #73f3aa;
}

.auth-showcase p {
    max-width: 38rem;
    margin: 1rem 0 0;
    color: rgba(255, 255, 255, .82);
    font-size: 1.05rem;
    line-height: 1.7;
}

.benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .75rem;
    margin-top: 2rem;
}

.benefit-card {
    min-height: 7rem;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: .55rem;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, .17);
    border-radius: .85rem;
    background: rgba(255, 255, 255, .09);
    text-align: center;
    backdrop-filter: blur(8px);
}

/* Public marketing */
.public-layout {
    min-height: 100vh;
    background: var(--background);
}

.public-topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 4.5rem;
    padding: .75rem clamp(1rem, 5vw, 4rem);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    background: color-mix(in srgb, #523584 88%, transparent);
    backdrop-filter: blur(14px);
}

.public-topbar img {
    width: 9.5rem;
    filter: brightness(0) invert(1);
}

.public-topbar {
    flex-wrap: nowrap;
}

.public-topbar .page-actions {
    width: auto;
    flex: 0 0 auto;
    flex-wrap: nowrap;
}

.public-topbar .page-actions > * {
    flex: 0 0 auto;
    white-space: nowrap;
}

@media (max-width: 640px) {
    .public-topbar {
        gap: .5rem;
    }

    .public-topbar img {
        width: 4rem;
    }

    .public-topbar .page-actions {
        gap: .25rem;
    }

    .public-topbar .page-actions :is(a, button) {
        padding-inline: .5rem;
    }
}

.public-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(4rem, 10vw, 8rem) clamp(1rem, 6vw, 5rem);
    color: #fff;
    background: #5d3b94;
}

.public-hero__inner {
    width: min(74rem, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.public-hero h1 {
    font-size: clamp(2.6rem, 7vw, 5.2rem);
    line-height: .98;
    letter-spacing: -.065em;
    margin: 1rem 0;
}

.public-hero h1 span {
    color: #60ee9d;
}

.public-hero p {
    color: rgba(255, 255, 255, .82);
    font-size: clamp(1rem, 2vw, 1.2rem);
    line-height: 1.7;
}

.public-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .75rem;
    border: 1px solid rgba(255, 255, 255, .25);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: .76rem;
    font-weight: 700;
}

.public-image {
    border-radius: 1.5rem;
    box-shadow: 0 30px 70px rgba(29, 14, 55, .35);
    transform: rotate(1.5deg);
}

.marketing-section {
    width: min(74rem, 100%);
    margin: 0 auto;
    padding: clamp(3.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2rem);
}

.marketing-heading {
    text-align: center;
    max-width: 46rem;
    margin: 0 auto 2.5rem;
}

.marketing-heading h2 {
    font-size: clamp(1.9rem, 4vw, 3rem);
    letter-spacing: -.04em;
    margin-bottom: .75rem;
}

.marketing-heading p {
    color: var(--muted-foreground);
    line-height: 1.7;
}

.marketing-card {
    height: 100%;
}

.marketing-icon {
    width: 3.2rem;
    height: 3.2rem;
    display: grid;
    place-items: center;
    border-radius: .9rem;
    color: var(--primary);
    background: var(--secondary);
    margin-bottom: 1rem;
}

.marketing-band {
    border-radius: 1.5rem;
    padding: clamp(2rem, 6vw, 4rem);
    color: #fff;
    background: #1d2430;
}

.marketing-band__grid {
    display: grid;
    grid-template-columns:1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.benefit-list {
    display: grid;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.benefit-item__icon {
    flex: 0 0 auto;
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: .7rem;
    background: rgba(0, 204, 98, .15);
    color: #55ed9a;
}

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

    .col-3 {
        grid-column: span 6;
    }

    .public-hero__inner {
        grid-template-columns: 1fr;
    }

    .public-image {
        max-width: 36rem;
        margin: 0 auto;
    }
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: min(18rem, 86vw);
        transform: translateX(-105%);
        transition: transform .22s ease;
        box-shadow: 20px 0 50px rgba(0, 0, 0, .2);
    }

    .app-shell.sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 35;
        border: 0;
        background: rgba(2, 6, 23, .55);
        opacity: 0;
        visibility: hidden;
        transition: opacity .22s ease, visibility .22s ease;
    }

    .app-shell.sidebar-open .sidebar-overlay {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu-button {
        display: inline-flex !important;
    }

    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .marketing-band__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .app-content {
        padding: 1rem;
    }

    .page-actions {
        width: 100%;
    }

    .page-actions > * {
        flex: 1 1 auto;
    }

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

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

    .col-12, .col-9, .col-8, .col-7, .col-6, .col-5, .col-4, .col-3,
    .form-field, .form-field--6, .form-field--4, .form-field--3 {
        grid-column: 1;
    }

    .table-shell {
        border: 0;
        overflow: visible;
    }

    .data-table {
        min-width: 0;
        display: block;
        background: transparent;
    }

    .data-table thead {
        display: none;
    }

    .data-table tbody {
        display: grid;
        gap: .75rem;
    }

    .data-table tr {
        display: grid;
        gap: .6rem;
        padding: 1rem;
        border: 1px solid var(--border);
        border-radius: .75rem;
        background: var(--card);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(7rem, 38%) 1fr;
        gap: .75rem;
        padding: 0;
        border: 0;
        text-align: left !important;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted-foreground);
        font-size: .72rem;
        font-weight: 700;
        text-transform: uppercase;
    }

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

    .table-footer {
        align-items: stretch;
        flex-direction: column;
    }

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

    .public-topbar {
        padding-inline: 1rem;
    }
}

@media (max-width: 430px) {
    .app-header {
        padding-inline: .75rem;
    }

    .app-header__title span {
        display: none;
    }

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

    .form-actions > * {
        flex: 1 1 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Blueprint integration and shared utilities */
.mt-4 {
    margin-top: 1rem;
}

.h-full {
    height: 100%;
}

.validation-summary {
    margin: 0 0 1rem;
    padding: .85rem 1rem;
    border: 1px solid color-mix(in srgb, var(--destructive) 30%, var(--border));
    border-radius: .65rem;
    background: color-mix(in srgb, var(--destructive) 7%, var(--card));
    color: var(--destructive);
    font-size: .82rem;
}

.validation-summary:empty {
    display: none;
}

.content-divider {
    height: 1px;
    margin: 1.5rem 0;
    background: var(--border);
}

.compact-loading {
    min-height: 9rem;
}

.last-update {
    display: flex;
    align-items: center;
    gap: .4rem;
    margin: -.4rem 0 0;
    color: var(--muted-foreground);
    font-size: .75rem;
}

.button-success {
    background: #00a950 !important;
    color: #fff !important;
    border-color: #00a950 !important;
}

.user-menu-trigger {
    min-width: 0;
    display: flex !important;
    align-items: center;
    gap: .55rem;
    padding-inline: .45rem .65rem !important;
}

.user-menu-trigger__text {
    min-width: 0;
    display: grid;
    text-align: left;
    line-height: 1.15;
}

.user-menu-trigger__text strong {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .8rem;
}

.user-menu-trigger__text small {
    max-width: 11rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--muted-foreground);
    font-size: .68rem;
}

.search-control {
    position: relative;
}

.search-control > svg {
    position: absolute;
    z-index: 1;
    left: .75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
    pointer-events: none;
}

.search-control .form-control {
    padding-left: 2.35rem;
}

.inline-link {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--primary);
    font-weight: 600;
}

.inline-link:hover {
    text-decoration: underline;
}

.filter-status-field {
    flex: 0 1 12rem;
}

.filter-actions {
    padding-top: 1rem;
}

.record-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--border);
}

.detail-item {
    min-width: 0;
    padding: 1rem;
    background: var(--card);
}

.detail-item span {
    display: block;
    margin-bottom: .3rem;
    color: var(--muted-foreground);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .035em;
    text-transform: uppercase;
}

.detail-item strong {
    overflow-wrap: anywhere;
    font-size: .9rem;
}

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

.details-list > div {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--border);
}

.details-list > div:last-child {
    border-bottom: 0;
}

.details-list span {
    color: var(--muted-foreground);
    font-size: .8rem;
}

.details-list strong {
    text-align: right;
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.record-note {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--muted);
}

.record-note span {
    display: block;
    margin-bottom: .45rem;
    color: var(--muted-foreground);
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.record-note p {
    margin: 0;
    line-height: 1.6;
    white-space: pre-wrap;
}

.switch-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.25rem;
    padding: .7rem .85rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: var(--card);
    cursor: pointer;
}

.switch-row input {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--primary);
}

.switch-row span {
    display: grid;
    gap: .15rem;
}

.switch-row strong {
    font-size: .85rem;
}

.switch-row small {
    color: var(--muted-foreground);
    font-size: .72rem;
}

.reward-preview {
    position: sticky;
    top: 5.5rem;
    display: grid;
    gap: .85rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: .85rem;
    background: var(--muted);
}

.reward-preview__label {
    color: var(--muted-foreground);
    font-size: .72rem;
    font-weight: 750;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.reward-preview img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border-radius: .7rem;
    background: #fff;
}

.reward-preview > div {
    display: grid;
    gap: .25rem;
}

.reward-preview strong {
    overflow-wrap: anywhere;
}

.reward-preview span:last-child {
    color: var(--primary);
    font-size: .85rem;
    font-weight: 700;
}

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

.reward-card {
    overflow: hidden;
    height: 100%;
}

.reward-card__image {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 13rem;
    padding: 1rem;
    background: var(--muted);
}

.reward-card__image img {
    width: 100%;
    height: 12rem;
    object-fit: contain;
}

.reward-card__image .status-badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
}

.reward-card__content {
    display: flex;
    flex-direction: column;
    min-height: 15rem;
}

.reward-card__id {
    color: var(--muted-foreground);
    font-size: .68rem;
    font-weight: 750;
    letter-spacing: .06em;
}

.reward-card h2 {
    margin: .35rem 0 .45rem;
    font-size: 1.05rem;
}

.reward-card p {
    flex: 1;
    display: -webkit-box;
    overflow: hidden;
    margin-bottom: .9rem;
    color: var(--muted-foreground);
    font-size: .82rem;
    line-height: 1.55;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.reward-card__points {
    display: flex;
    align-items: baseline;
    gap: .35rem;
    color: var(--primary);
}

.reward-card__points strong {
    font-size: 1.25rem;
}

.reward-card__points span {
    font-size: .75rem;
}

.reward-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    margin-top: 1rem;
    padding-top: .8rem;
    border-top: 1px solid var(--border);
}

.reward-card__footer small {
    color: var(--muted-foreground);
}

.card-skeleton {
    display: grid;
    gap: .85rem;
    min-height: 8rem;
    align-content: center;
}

.card-skeleton > * {
    display: block;
    overflow: hidden;
    border-radius: .4rem;
    background: linear-gradient(90deg, var(--muted) 25%, color-mix(in srgb, var(--muted) 65%, var(--card)) 50%, var(--muted) 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.3s infinite;
}

.card-skeleton span {
    width: 42%;
    height: .8rem;
}

.card-skeleton strong {
    width: 72%;
    height: 2rem;
}

.card-skeleton small {
    width: 55%;
    height: .65rem;
}

@keyframes skeleton-shimmer {
    to {
        background-position: -200% 0;
    }
}

.metric-card--primary {
    --metric-color: #8259c9;
}

.metric-card--success {
    --metric-color: #00a950;
}

.metric-card--info {
    --metric-color: #0284c7;
}

.metric-card--warning {
    --metric-color: #d97706;
}

.metric-card__value--code {
    font-size: clamp(1rem, 2.5vw, 1.35rem);
    overflow-wrap: anywhere;
    letter-spacing: .01em;
}

.metric-card__value--small {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    overflow-wrap: anywhere;
}

.movement-title {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.movement-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    border-radius: .55rem;
}

.movement-icon.status-badge--success {
    color: #05733a;
}

.movement-icon.status-badge--danger {
    color: #991b1b;
}

.movement-icon.status-badge--warning {
    color: #92400e;
}

.movement-icon.status-badge--info {
    color: #075985;
}

.movement-value {
    white-space: nowrap;
}

.wallet-table {
    min-width: 62rem;
}

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

.quick-action {
    display: flex;
    align-items: center;
    gap: .8rem;
    min-height: 4.5rem;
    padding: .8rem;
    border: 1px solid var(--border);
    border-radius: .7rem;
    transition: border-color .15s ease, transform .15s ease, background .15s ease;
}

.quick-action > span {
    flex: 0 0 auto;
    width: 2.4rem;
    height: 2.4rem;
    display: grid;
    place-items: center;
    border-radius: .65rem;
    color: var(--primary);
    background: var(--secondary);
}

.quick-action div {
    min-width: 0;
    display: grid;
    gap: .15rem;
}

.quick-action strong {
    font-size: .82rem;
}

.quick-action small {
    color: var(--muted-foreground);
    font-size: .7rem;
}

.op-home-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
}

.op-icon-slot {
    display: inline-grid;
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 1.125rem;
    place-items: center;
}

/* Authentication */
.auth-card {
    width: 100%;
}

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

.auth-card__header {
    text-align: center;
    align-items: center;
}

.auth-card__icon {
    width: 3rem;
    height: 3rem;
    display: grid;
    place-items: center;
    margin: 0 auto .5rem;
    border-radius: .85rem;
    color: var(--primary);
    background: var(--secondary);
}

.auth-card__icon--success {
    color: var(--success);
    background: var(--success-soft);
}

.auth-card__actions {
    display: grid;
    gap: .65rem;
    margin-top: 1.25rem;
}

.auth-card__switch {
    margin: 1.25rem 0 0;
    text-align: center;
    color: var(--muted-foreground);
    font-size: .82rem;
}

.auth-card__switch a, .field-link {
    color: var(--primary);
    font-weight: 650;
}

.field-link:hover {
    text-decoration: underline;
}

.password-field {
    position: relative;
}

.password-field > input {
    padding-right: 2.8rem;
}

.password-field__toggle {
    position: absolute;
    right: .3rem;
    top: 50%;
    transform: translateY(-50%);
}

.result-card {
    text-align: center;
}

.result-card__icon {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    margin: 0 auto 1.1rem;
    border-radius: 999px;
}

.result-card__icon--success {
    color: var(--success);
    background: var(--success-soft);
}

.result-card h1 {
    margin-bottom: .65rem;
    font-size: 1.65rem;
}

.result-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* Public page extensions */
.public-login-button {
    color: #fff !important;
}

.public-rewards {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin: 1.25rem 0;
}

.public-rewards span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .7rem;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: .78rem;
}

.public-hero__actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

.public-hero__actions small {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: rgba(255, 255, 255, .72);
}

.public-dashboard-preview {
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 18px 45px rgba(0, 0, 0, .18);
}

.public-dashboard-preview__head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.public-dashboard-preview__head span {
    color: rgba(255, 255, 255, .62);
    font-size: .75rem;
}

.preview-stat {
    padding: 1.25rem;
}

.preview-stat + .preview-stat {
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.preview-stat small {
    display: block;
    color: rgba(255, 255, 255, .68);
}

.preview-stat strong {
    display: block;
    margin: .35rem 0 .75rem;
    font-size: 1.65rem;
}

.preview-stat div {
    overflow: hidden;
    height: .42rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
}

.preview-stat i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #57eba0;
}

.preview-stat--points i {
    background: #bba1e8;
}

.public-faq {
    width: min(50rem, 100%);
    margin: 0 auto;
}

.final-public-cta {
    text-align: center;
}

.final-public-cta > div {
    padding: clamp(2rem, 6vw, 4rem);
    border-radius: 1.25rem;
    background: var(--secondary);
}

.final-public-cta h2 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.final-public-cta p {
    color: var(--muted-foreground);
}

@media (max-width: 700px) {
    .user-menu-trigger__text {
        display: none;
    }

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

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

    .reward-preview {
        position: static;
    }

    .filter-status-field {
        flex: 1 1 100%;
    }

    .public-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .public-hero__actions > * {
        width: 100%;
        justify-content: center;
    }
}

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

    .details-list > div {
        flex-direction: column;
        gap: .3rem;
    }

    .details-list strong {
        text-align: left;
    }

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

/* Compatibility styles retained from the current Blueprint architecture. */
html, body {
    min-height: 100%;
    margin: 0;
    background: radial-gradient(circle at 8% 0%, color-mix(in oklch, var(--primary) 8%, transparent), transparent 28rem),
    radial-gradient(circle at 96% 8%, color-mix(in oklch, var(--chart-4) 8%, transparent), transparent 24rem),
    var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
}

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

h1, h2, h3, h4, h5, h6, p {
    margin-block: 0;
}

a {
    color: inherit;
}

body {
    background-attachment: fixed;
}

::selection {
    background: color-mix(in oklch, var(--primary) 24%, transparent);
}

:where(button, a, input, textarea, select):focus-visible {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Shared visual language used by every authenticated page. */
.op-page-stack {
    display: grid;
    width: 100%;
    min-width: 0;
    gap: 1.5rem;
}

.op-page-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    overflow: hidden;
    padding: 1.5rem;
    border: 1px solid color-mix(in oklch, var(--primary) 16%, var(--border));
    border-radius: calc(var(--radius) + .5rem);
    background: linear-gradient(135deg, color-mix(in oklch, var(--card) 96%, var(--primary)), var(--card));
    box-shadow: 0 18px 55px -38px color-mix(in oklch, var(--primary) 65%, transparent);
}

.op-page-hero::after {
    content: "";
    position: absolute;
    width: 10rem;
    height: 10rem;
    right: -4rem;
    top: -5rem;
    border-radius: 999px;
    background: color-mix(in oklch, var(--primary) 10%, transparent);
    pointer-events: none;
}

.op-eyebrow {
    font-size: 1.75rem;
    font-weight: 750;
    letter-spacing: -.035em;
}

.op-page-subtitle {
    margin-top: .35rem;
    color: var(--muted-foreground);
    font-size: .925rem;
}

.op-button-fit {
    width: auto !important;
    max-width: max-content;
    flex: 0 0 auto !important;
    align-self: center;
}

.op-icon-button {
    width: 2.25rem !important;
    min-width: 2.25rem !important;
    max-width: 2.25rem;
    flex: 0 0 2.25rem !important;
    padding-inline: 0 !important;
}

.op-home-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    overflow: hidden;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border: 1px solid color-mix(in oklch, var(--primary) 18%, var(--border));
    border-radius: calc(var(--radius) + .75rem);
    background: radial-gradient(circle at 92% 20%, color-mix(in oklch, var(--chart-4) 18%, transparent), transparent 14rem),
    linear-gradient(135deg, color-mix(in oklch, var(--card) 92%, var(--primary)), var(--card));
    box-shadow: 0 24px 70px -48px var(--primary);
}

.op-overview-hero {
    position: relative;
    display: flex;
    min-height: 21rem;
    align-items: center;
    overflow: hidden;
    padding: clamp(1.75rem, 5vw, 3.5rem);
    border: 1px solid color-mix(in oklch, var(--primary) 20%, var(--border));
    border-radius: calc(var(--radius) + 1rem);
    background: radial-gradient(circle at 82% 18%, color-mix(in oklch, var(--chart-4) 28%, transparent), transparent 18rem), radial-gradient(circle at 95% 100%, color-mix(in oklch, var(--primary) 22%, transparent), transparent 25rem), linear-gradient(135deg, color-mix(in oklch, var(--card) 94%, var(--primary)), var(--card));
    box-shadow: 0 30px 90px -58px var(--primary);
}

.op-overview-mark {
    position: absolute;
    right: clamp(2rem, 9vw, 8rem);
    display: grid;
    width: 8rem;
    height: 8rem;
    place-items: center;
    border: 1px solid color-mix(in oklch, var(--primary) 22%, transparent);
    border-radius: 2.25rem;
    background: color-mix(in oklch, var(--primary) 11%, transparent);
    color: var(--primary);
    transform: rotate(8deg);
    box-shadow: 0 24px 70px -42px var(--primary);
}

.op-live-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    font-size: .75rem;
    color: var(--muted-foreground);
}

.op-live-pill span {
    width: .5rem;
    height: .5rem;
    border-radius: 999px;
    background: var(--alert-success);
    box-shadow: 0 0 0 4px color-mix(in oklch, var(--alert-success) 14%, transparent);
}

.op-journey-step {
    display: flex;
    align-items: center;
    gap: .9rem;
    padding: 1.15rem 1.25rem;
    text-decoration: none;
    transition: background .18s ease;
}

.op-journey-step:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.op-step-number {
    color: var(--muted-foreground);
    font-family: var(--font-mono);
    font-size: .7rem;
}

.op-dashboard-card {
    height: 100%;
    overflow: hidden;
}

.op-quick-action {
    display: flex;
    min-width: 0;
    gap: .8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + .2rem);
    background: color-mix(in oklch, var(--card) 96%, var(--primary));
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.op-list-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.op-list-header {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
}

.op-list-heading {
    min-width: 0;
    display: grid;
    gap: .3rem;
}

.op-list-controls {
    min-width: min(100%, 24rem);
    flex: 1 1 34rem;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: flex-end;
    gap: .75rem;
}

.op-list-controls--prizes {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 11rem) auto;
    max-width: 58rem;
}

.op-list-controls--wallet {
    flex: 0 1 auto;
}

.op-search-input {
    width: min(100%, 40rem);
    min-height: 2.75rem;
    flex: 1 1 30rem;
}

.op-primary-action {
    width: auto !important;
    min-width: max-content;
    flex: 0 0 auto !important;
    color: var(--primary-foreground) !important;
    box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--primary) 85%, transparent);
}

.op-secondary-action {
    width: auto !important;
    min-width: max-content;
    flex: 0 0 auto !important;
}

.op-filter-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
}

.op-status-approved {
    border-color: #9ee6bd !important;
    background: #e9fbf1 !important;
    color: #08783e !important;
}

.op-status-review {
    border-color: #f2d38a !important;
    background: #fff8e8 !important;
    color: #8a5a05 !important;
}

.op-status-lost {
    border-color: #fecaca !important;
    background: #fff1f2 !important;
    color: #b4232d !important;
}

.op-status-neutral {
    border-color: var(--border) !important;
    background: var(--muted) !important;
    color: var(--muted-foreground) !important;
}

.dark .op-status-approved {
    border-color: #17653a !important;
    background: #103322 !important;
    color: #7af0ad !important;
}

.dark .op-status-review {
    border-color: #725218 !important;
    background: #3a2a0e !important;
    color: #ffd991 !important;
}

.dark .op-status-lost {
    border-color: #7f1d1d !important;
    background: #3b1717 !important;
    color: #fca5a5 !important;
}

.op-action-approve {
    border-color: #9ee6bd !important;
    background: #e9fbf1 !important;
    color: #08783e !important;
}

.op-action-delete {
    color: var(--destructive) !important;
}

.op-prize-table-image {
    width: 3.75rem;
    height: 3.75rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    background: #fff;
    object-fit: contain;
}

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

.op-table {
    width: 100%;
    min-width: 56rem;
}

.op-table thead {
    background: color-mix(in oklch, var(--muted) 72%, transparent);
}

.op-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid var(--border);
}

.op-actions {
    display: flex;
    width: max-content;
    max-width: 24rem;
    align-items: center;
    justify-content: flex-end;
    gap: .25rem;
}

.op-actions :where(a, button) {
    width: auto !important;
    min-width: auto !important;
    flex: 0 0 auto !important;
    white-space: nowrap;
}

.op-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-top: 1px solid var(--border);
}

.op-data-grid {
    width: 100%;
    max-width: 100%;
    overflow: auto;
}

.op-pagination-shell {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
}

.op-empty-state {
    display: grid;
    min-height: 12rem;
    place-items: center;
    align-content: center;
    gap: .75rem;
    color: var(--muted-foreground);
    text-align: center;
}

.op-prize-card {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.op-prize-image {
    display: block;
    width: 100%;
    height: 12rem;
    padding: .75rem;
    background: var(--muted);
    object-fit: contain;
}

main [data-slot="card"] {
    border-color: color-mix(in oklch, var(--border) 86%, var(--primary));
    box-shadow: 0 14px 40px -34px color-mix(in oklch, var(--foreground) 45%, transparent);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}


.wallet-summary-card {
    position: relative;
    min-height: 10.5rem;
    overflow: hidden;
}

.wallet-summary-card::after {
    pointer-events: none;
    content: "";
    position: absolute;
    right: -2rem;
    bottom: -3rem;
    width: 8rem;
    height: 8rem;
    border-radius: 999px;
    background: color-mix(in oklch, var(--primary) 7%, transparent);
}

/* Data tables only: calendar tables retain Blueprint's cell geometry. */
:where(.op-table, .data-table, .op-data-grid table) {
    border-collapse: separate;
    border-spacing: 0;
}

:where(.op-table, .data-table, .op-data-grid table) > thead > tr > th {
    color: var(--muted-foreground);
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

:where(.op-table, .data-table, .op-data-grid table) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
    padding: .875rem 1rem;
    text-align: left;
    vertical-align: middle;
}

@media (hover: hover) {
    :where(.op-table, .data-table, .op-data-grid table) > tbody > tr:hover {
        background-color: var(--interactive-hover-soft);
    }
}

main > * {
    animation: op-page-in .32s ease both;
}

.text-muted {
    color: var(--muted-foreground);
}

.white-text {
    color: white;
}

.wrap-mobile {
    flex-wrap: wrap;
}


.loader-container {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    background: var(--background);
}

.loader {
    width: 2.5rem;
    aspect-ratio: 1;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}


@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}

@keyframes op-page-in {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 640px) {
    .op-page-hero {
        align-items: stretch;
        padding: 1.15rem;
    }

    .op-page-hero .op-button-fit {
        align-self: flex-start;
    }

    .op-eyebrow {
        font-size: 1.45rem;
    }

    .op-list-toolbar {
        align-items: stretch;
    }

    .op-search-input {
        width: 100%;
    }

    .op-list-footer {
        justify-content: center;
        text-align: center;
    }

    .op-pagination-shell {
        justify-content: center;
        text-align: center;
    }

    .op-overview-hero {
        min-height: auto;
    }

    .op-overview-mark {
        display: none;
    }

    :where(.op-table, .data-table, .op-data-grid table) > :is(thead, tbody, tfoot) > tr > :is(th, td) {
        padding: .75rem;
    }
}


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

    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

/* Blueprint application shell */
.op-sidebar-surface {
    --sidebar-menu-button-py: .75rem;
    --sidebar-menu-button-px: .875rem;
    --sidebar-menu-button-gap: .75rem;
    --sidebar-menu-button-icon-size: 1.375rem;
    --sidebar-menu-button-collapsed-size: 2.75rem;
    --sidebar-menu-button-collapsed-padding: .6875rem;
    /* Keep the sidebar below Blueprint's portaled modal overlays. */
    isolation: isolate;
    color: var(--sidebar-foreground);
    background: var(--sidebar) !important;
    border-color: var(--sidebar-border) !important;
    box-shadow: 16px 0 36px -32px color-mix(in srgb, var(--foreground) 45%, transparent);
}

.op-sidebar-surface,
.op-sidebar-surface > *,
.op-sidebar-header,
.op-sidebar-scroll,
.op-sidebar-footer {
    background-color: var(--sidebar) !important;
}

.op-sidebar-scroll {
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.op-sidebar-header,
.op-sidebar-footer {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
}

.op-sidebar-monogram {
    display: none;
}

[data-collapsible="icon"] .op-sidebar-logo {
    display: none;
}

[data-collapsible="icon"] .op-sidebar-monogram {
    display: block;
}

[data-collapsible="icon"] .op-sidebar-header {
    padding: .75rem .5rem;
}

[data-collapsible="icon"] .op-brand-link {
    justify-content: center;
    padding-inline: 0;
    min-height: 2.75rem;
}

[data-collapsible="icon"] .op-sidebar-scroll {
    scrollbar-gutter: auto;
    overflow-x: hidden;
}

[data-collapsible="icon"] [data-sidebar="menu"] {
    align-items: center;
}

[data-collapsible="icon"] [data-sidebar="menu-button"] {
    justify-content: center;
    flex-shrink: 0;
}

[data-collapsible="icon"] [data-sidebar="menu-button"] > span {
    display: none;
}

.op-account-identity {
    display: grid;
    min-width: 0;
    max-width: clamp(8rem, 20vw, 16rem);
    gap: .125rem;
    text-align: left;
}

.op-sidebar-inset {
    position: relative;
    z-index: 0;
    display: flex;
    width: 100%;
    min-height: 100vh;
    min-width: 0;
    flex-direction: column;
    background: var(--background);
}

.op-app-main {
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: 1 1 auto;
    padding: clamp(1rem, 2.25vw, 2rem);
}

.op-app-header {
    background: color-mix(in srgb, var(--background) 94%, var(--card)) !important;
    box-shadow: 0 1px 0 var(--border), 0 12px 28px -26px var(--foreground);
    backdrop-filter: blur(16px);
}

/* Popup surfaces share colors; Blueprint controls portal stacking and transitions. */
.op-dropdown-surface,
[data-slot="dropdown-menu-content"],
[data-slot="select-content"],
[data-slot="popover-content"],
[role="listbox"] {
    border: 1px solid var(--border) !important;
    background: var(--popover) !important;
    color: var(--popover-foreground) !important;
    box-shadow: 0 18px 50px -18px color-mix(in srgb, var(--foreground) 40%, transparent) !important;
}

.op-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.op-account-trigger__chevron {
    display: inline-grid;
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    place-items: center;
}

.op-account-menu-item {
    display: flex !important;
    align-items: center !important;
    gap: .625rem !important;
}

.op-account-menu-icon {
    display: inline-grid;
    width: 1.25rem;
    height: 1.25rem;
    flex: 0 0 1.25rem;
    place-items: center;
}

/* Consistent form language across authenticated and public flows. */
.op-form-card {
    overflow: visible !important;
    border-top: 3px solid color-mix(in srgb, var(--primary) 72%, var(--border));
}

.op-form {
    display: grid;
    gap: 1.5rem;
}

.op-form [data-slot="field-group"] {
    gap: 1.15rem;
}

.op-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, button[role="combobox"]) {
    min-height: 2.85rem;
}

.op-form :where(input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), textarea, button[role="combobox"]):focus-visible {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 16%, transparent);
}

.op-form textarea {
    min-height: 7rem;
    resize: vertical;
}

.op-textarea-large {
    min-height: 7rem !important;
    resize: vertical;
}

.op-form .validation-message {
    display: flex;
    align-items: center;
    gap: .35rem;
    font-weight: 550;
}

.op-form-section {
    display: grid;
    gap: 1rem;
    padding: 1.15rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + .15rem);
    background: color-mix(in srgb, var(--card) 96%, var(--muted));
}

.op-form-actions {
    position: static;
    z-index: 10;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: .875rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + .15rem);
    background: color-mix(in srgb, var(--card) 97%, transparent);
    box-shadow: 0 16px 38px -30px color-mix(in srgb, var(--foreground) 55%, transparent);
    backdrop-filter: blur(14px);
}

@media (max-width: 640px) {
    .op-form-actions {
        padding: .75rem;
    }
}

/* Shared CREATE page pattern */
.op-create-page {
    width: 100%;
    min-width: 0;
}

.op-create-badge {
    white-space: nowrap;
}

.op-create-card {
    overflow: visible !important;
}

.op-create-card__header {
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, color-mix(in srgb, var(--secondary) 52%, transparent), transparent 72%);
}

.op-create-card__content {
    padding-top: 1.5rem;
}

.op-create-preview {
    position: sticky;
    top: 5.5rem;
    overflow: hidden;
    border-style: dashed;
    background: color-mix(in srgb, var(--card) 96%, var(--secondary));
}

.op-prize-preview {
    width: 100%;
    max-width: 16rem;
    justify-self: end;
}

.op-prize-preview__image {
    display: block;
    width: 100%;
    height: 9rem;
    padding: .5rem;
    border: 1px solid var(--border);
    border-radius: .75rem;
    background: var(--muted);
    object-fit: contain;
}

.op-form-button {
    min-width: 9rem;
    justify-content: center;
}

.op-form-button--primary {
    box-shadow: 0 10px 24px -16px color-mix(in srgb, var(--primary) 85%, transparent);
}

/* Read-only lead details */
.op-lead-view {
    align-content: start;
}

.op-lead-summary {
    overflow: hidden;
    border-color: color-mix(in srgb, var(--primary) 22%, var(--border)) !important;
    background: linear-gradient(135deg, color-mix(in srgb, var(--card) 94%, var(--primary)), var(--card));
}

.op-lead-avatar {
    border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--border));
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.op-lead-summary__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

.op-detail-card {
    min-width: 0;
    overflow: hidden;
}

.op-detail-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.op-detail-item {
    min-width: 0;
    padding: .9rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card) 96%, var(--secondary));
}

.op-detail-item [data-slot="item-title"] {
    overflow-wrap: anywhere;
}

.op-view-actions {
    display: flex;
    width: 100%;
    justify-content: flex-end;
}

.op-account-aside {
    position: sticky;
    top: 5.5rem;
    min-width: 0;
    overflow: hidden;
}

.op-account-aside .op-detail-item {
    padding: .75rem;
}

.op-password-rule {
    min-height: 2.5rem;
    padding: .6rem .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: color-mix(in srgb, var(--card) 96%, var(--secondary));
    color: var(--muted-foreground);
    font-size: .875rem;
}

.op-password-rule [data-slot="item-media"] {
    color: var(--primary);
}

/* One theme-driven interaction palette, without moving or resizing click targets. */
:where(a[href], button, [role="button"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="tab"]) {
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
    touch-action: manipulation;
}

/*@media (hover: hover) {*/
/*    :is(a[href], button, [role="button"], [role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"], [role="tab"]):not(:disabled):not([aria-disabled="true"]):not([data-disabled="true"]):not([data-disabled=""]):not(.sidebar-overlay):not(.op-brand-link):not([data-slot$="overlay"]):hover {*/
/*        border-color: var(--interactive-hover) !important;*/
/*        background-color: var(--interactive-hover) !important;*/
/*        color: var(--interactive-hover-foreground) !important;*/
/*        --muted-foreground: var(--interactive-hover-foreground);*/
/*    }*/
/*}*/

/* Keyboard menu navigation uses the same colors as pointer navigation. */
:is([role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], [role="option"]):not([aria-disabled="true"]):not([data-disabled="true"]):not([data-disabled=""])[data-highlighted] {
    background-color: var(--interactive-hover);
    color: var(--interactive-hover-foreground);
    --muted-foreground: var(--interactive-hover-foreground);
}

:where(button:disabled, [aria-disabled="true"]) {
    cursor: not-allowed;
}

:where([data-slot="field-group"]) {
    gap: 1.25rem;
}

:where([data-slot="field-description"], [data-slot="field-error"]) {
    line-height: 1.5;
}

@media (max-width: 640px) {
    .op-create-badge {
        display: none;
    }

    .op-create-card__content {
        padding: 1rem;
    }

    .op-create-preview {
        position: static;
    }

    .op-prize-preview {
        max-width: 18rem;
        justify-self: center;
    }

    .op-form-actions {
        display: grid !important;
        grid-template-columns: 1fr;
    }

    .op-form-button {
        width: 100%;
    }

    .op-list-header {
        align-items: stretch;
    }

    .op-list-controls, .op-list-controls--prizes {
        display: grid;
        grid-template-columns: 1fr;
        min-width: 0;
        width: 100%;
        max-width: none;
    }

    .op-list-controls--wallet {
        grid-template-columns: 1fr;
    }

    .op-list-controls :where(button, a), .op-primary-action, .op-secondary-action {
        width: 100% !important;
    }

    .op-filter-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .op-filter-actions button {
        width: 100% !important;
    }

    .op-lead-summary [data-slot="item"] {
        align-items: flex-start;
    }

    .op-lead-summary__actions {
        width: 100%;
        justify-content: flex-start;
    }

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

    .op-view-actions > * {
        width: 100% !important;
    }

    .op-account-aside {
        position: static;
    }
}
