/* ==========================================================================
   Components
   ========================================================================== */

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-size: var(--text-sm);
    font-weight: 500;
    white-space: nowrap;
    user-select: none;
    transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease),
        color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform 80ms var(--ease);
}

.btn:active:not(:disabled) {
    transform: translateY(1px);
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.btn--primary {
    background: var(--text);
    color: #0b0a12;
}

.btn--primary:hover:not(:disabled) {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(167, 139, 250, 0.18);
}

.btn--accent {
    background: var(--accent-strong);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12) inset, 0 6px 20px -8px rgba(139, 92, 246, 0.9);
}

.btn--accent:hover:not(:disabled) {
    background: #9b6dfa;
}

.btn--secondary {
    background: var(--surface-2);
    border-color: var(--border-strong);
    color: var(--text);
}

.btn--secondary:hover:not(:disabled) {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.2);
}

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

.btn--ghost:hover:not(:disabled) {
    background: var(--surface-hover);
    color: var(--text);
}

.btn--danger {
    background: var(--danger-strong);
    color: #fff;
}

.btn--danger:hover:not(:disabled) {
    background: #f05252;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.btn--sm {
    height: 28px;
    padding: 0 10px;
    font-size: var(--text-xs);
}

.btn--icon {
    width: 32px;
    padding: 0;
}

.btn--icon.btn--sm {
    width: 28px;
}

.btn--block {
    width: 100%;
}

.btn--danger-ghost {
    color: var(--text-muted);
}

.btn--danger-ghost:hover:not(:disabled) {
    background: var(--danger-soft);
    color: var(--danger);
}

.btn.is-loading {
    color: transparent !important;
    pointer-events: none;
}

.btn.is-loading > * {
    visibility: hidden;
}

.btn.is-loading::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 15px;
    height: 15px;
    border: 2px solid currentColor;
    border-color: rgba(127, 127, 127, 0.35);
    border-top-color: var(--spinner-color, #0b0a12);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

.btn--accent.is-loading::after,
.btn--danger.is-loading::after {
    --spinner-color: #fff;
}

.btn--secondary.is-loading::after,
.btn--ghost.is-loading::after {
    --spinner-color: var(--text);
}

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

/* ── Form fields ─────────────────────────────────────────────────────────── */
.form {
    display: grid;
    gap: 18px;
}

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

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

.field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--text);
    font-size: var(--text-sm);
    font-weight: 500;
}

.field__optional {
    color: var(--text-subtle);
    font-weight: 400;
}

.field__hint {
    color: var(--text-subtle);
    font-size: var(--text-xs);
}

.field__error {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--danger);
    font-size: var(--text-xs);
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 36px;
    padding: 8px 12px;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    color: var(--text);
    font-size: var(--text-base);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), background var(--dur) var(--ease);
}

.input::placeholder,
.textarea::placeholder {
    color: var(--text-subtle);
}

.input:hover,
.select:hover,
.textarea:hover {
    border-color: rgba(255, 255, 255, 0.2);
}

.input:focus,
.select:focus,
.textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
    background: #0b0a12;
}

.input[aria-invalid="true"],
.select[aria-invalid="true"],
.textarea[aria-invalid="true"] {
    border-color: rgba(248, 113, 113, 0.7);
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}

.textarea {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

.textarea--tall {
    min-height: 280px;
}

.select {
    appearance: none;
    padding-right: 34px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a3a1b3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    cursor: pointer;
}

.select option {
    background: var(--surface);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group > .icon {
    position: absolute;
    left: 11px;
    color: var(--text-subtle);
    pointer-events: none;
}

.input-group > .input {
    padding-left: 34px;
}

.input-group__suffix {
    position: absolute;
    right: 4px;
}

.input-group--prefix-text > .input {
    padding-left: 30px;
}

.input-group__prefix {
    position: absolute;
    left: 12px;
    color: var(--text-subtle);
    pointer-events: none;
}

.char-count {
    color: var(--text-subtle);
    font-size: var(--text-xs);
    font-variant-numeric: tabular-nums;
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
    display: flex;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.alert .icon {
    margin-top: 2px;
}

.alert--danger {
    border-color: rgba(248, 113, 113, 0.35);
    background: var(--danger-soft);
    color: #fecaca;
}

.alert--info {
    border-color: rgba(167, 139, 250, 0.3);
    background: var(--accent-soft);
    color: #ddd6fe;
}

.alert--warning {
    border-color: rgba(251, 191, 36, 0.3);
    background: var(--warning-soft);
    color: #fde68a;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 22px;
    padding: 0 8px;
    border: 1px solid var(--border-strong);
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 500;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge--plain::before {
    display: none;
}

.badge--success {
    border-color: rgba(52, 211, 153, 0.28);
    background: var(--success-soft);
    color: var(--success);
}

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

.badge--gold {
    border-color: rgba(245, 185, 74, 0.3);
    background: var(--gold-soft);
    color: var(--gold);
}

.badge--accent {
    border-color: rgba(167, 139, 250, 0.3);
    background: var(--accent-soft);
    color: var(--accent);
}

/* ── Card / panel ────────────────────────────────────────────────────────── */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.card__body {
    padding: 22px;
}

.card__header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.card__title {
    font-size: var(--text-md);
}

.card__desc {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.card__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 22px;
    border-top: 1px solid var(--border);
}

/* ── Toolbar (search + filters) ──────────────────────────────────────────── */
.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.toolbar__search {
    flex: 1 1 260px;
    max-width: 360px;
}

.toolbar__meta {
    margin-left: auto;
    color: var(--text-subtle);
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
}

.segmented {
    display: inline-flex;
    padding: 3px;
    gap: 2px;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
}

.segmented__option {
    position: relative;
}

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

.segmented__option span {
    display: inline-flex;
    align-items: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: var(--text-sm);
    font-weight: 500;
    cursor: pointer;
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}

.segmented__option span:hover {
    color: var(--text);
}

.segmented__option input:checked + span {
    background: var(--surface-hover);
    color: var(--text);
    box-shadow: 0 0 0 1px var(--border-strong) inset, var(--shadow-sm);
}

.segmented__option input:focus-visible + span {
    outline: 2px solid var(--accent-ring);
}

/* ── Data table ──────────────────────────────────────────────────────────── */
.table-wrap {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-base);
}

.table th {
    height: 38px;
    padding: 0 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    color: var(--text-subtle);
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: left;
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.table tbody tr {
    transition: background var(--dur) var(--ease);
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

.table .col-actions {
    width: 1%;
    text-align: right;
    white-space: nowrap;
}

.table .col-num {
    width: 1%;
    color: var(--text-subtle);
    font-family: var(--font-mono);
    font-size: var(--text-sm);
    white-space: nowrap;
}

.cell-title {
    font-weight: 500;
}

.cell-sub {
    margin-top: 2px;
    max-width: 60ch;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.row-actions {
    display: inline-flex;
    gap: 2px;
    opacity: 0.75;
    transition: opacity var(--dur) var(--ease);
}

tr:hover .row-actions,
.row-actions:focus-within,
.media-card:hover .row-actions,
.media-card:focus-within .row-actions {
    opacity: 1;
}

/* Mobile: tables become stacked cards */
@media (max-width: 720px) {
    .table thead {
        display: none;
    }

    .table,
    .table tbody,
    .table tr,
    .table td {
        display: block;
        width: 100%;
    }

    .table tbody tr {
        position: relative;
        padding: 14px 16px;
        border-bottom: 1px solid var(--border);
    }

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

    .table td {
        padding: 3px 0;
        border: 0;
    }

    .table td[data-label]:not(.col-main)::before {
        content: attr(data-label);
        display: inline-block;
        min-width: 92px;
        color: var(--text-subtle);
        font-size: var(--text-xs);
    }

    .table .col-num {
        width: auto;
    }

    .table .col-actions {
        position: absolute;
        top: 10px;
        right: 10px;
        width: auto;
        padding: 0;
    }

    .table .col-main {
        padding-right: 80px;
    }

    .row-actions {
        opacity: 1;
    }
}

/* ── Card grid (services, videos) ────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.media-card {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: border-color var(--dur) var(--ease), box-shadow 240ms var(--ease), transform 240ms var(--ease);
}

.media-card:hover {
    border-color: var(--border-strong);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.media-card.is-inactive .media-card__media {
    filter: grayscale(0.85);
    opacity: 0.55;
}

.media-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background:
        radial-gradient(circle at 25% 20%, rgba(167, 139, 250, 0.22), transparent 60%),
        radial-gradient(circle at 85% 90%, rgba(245, 185, 74, 0.14), transparent 55%),
        var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}

.media-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 600ms var(--ease);
}

.media-card:hover .media-card__media img {
    transform: scale(1.03);
}

.media-card__placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: var(--text-subtle);
}

.media-card__overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.media-card__overlay .badge {
    background: rgba(8, 7, 13, 0.78);
    backdrop-filter: blur(8px);
}

.media-card__play {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
}

.media-card__play span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(8, 7, 13, 0.7);
    border: 1px solid rgba(245, 185, 74, 0.6);
    color: var(--gold);
    backdrop-filter: blur(6px);
    transition: transform 240ms var(--ease), background 240ms var(--ease), color 240ms var(--ease);
}

.media-card:hover .media-card__play span {
    transform: scale(1.08);
    background: var(--gold);
    color: #0b0a12;
}

.media-card__body {
    display: grid;
    gap: 6px;
    flex: 1;
    padding: 14px 16px 12px;
}

.media-card__title {
    font-size: var(--text-md);
    font-weight: 600;
    line-height: 1.35;
}

.media-card__text {
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.media-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 12px 10px 16px;
    border-top: 1px solid var(--border);
}

.price {
    color: var(--gold);
    font-family: var(--font-mono);
    font-size: var(--text-md);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.price small {
    margin-left: 4px;
    color: var(--text-subtle);
    font-size: 11px;
    font-weight: 500;
}

.link-out {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    color: var(--text-muted);
    font-size: var(--text-xs);
}

.link-out:hover {
    color: var(--accent);
}

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    color: var(--text-subtle);
    font-size: var(--text-sm);
}

.pagination__buttons {
    display: flex;
    gap: 6px;
}

/* ── States: skeleton, empty, error ──────────────────────────────────────── */
.skeleton {
    position: relative;
    overflow: hidden;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent);
    animation: shimmer 1.4s infinite;
}

@keyframes shimmer {
    to {
        transform: translateX(100%);
    }
}

.skeleton-line {
    height: 12px;
}

.state {
    display: grid;
    justify-items: center;
    gap: 10px;
    padding: 56px 24px;
    background: var(--surface);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    text-align: center;
}

.state__icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 4px;
    border-radius: 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    color: var(--text-muted);
}

.state--error .state__icon {
    background: var(--danger-soft);
    border-color: rgba(248, 113, 113, 0.3);
    color: var(--danger);
}

.state__title {
    font-size: var(--text-md);
}

.state__text {
    max-width: 44ch;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.state .btn {
    margin-top: 8px;
}

/* ── Modal (native <dialog>) ─────────────────────────────────────────────── */
.modal {
    width: min(560px, calc(100vw - 24px));
    max-height: min(88vh, 860px);
    margin: auto;
    padding: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.modal--lg {
    width: min(720px, calc(100vw - 24px));
}

.modal--sm {
    width: min(420px, calc(100vw - 24px));
}

.modal::backdrop {
    background: var(--overlay);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.modal[open] {
    display: flex;
    flex-direction: column;
    animation: modal-in 220ms var(--ease);
}

.modal[open]::backdrop {
    animation: fade-in 220ms var(--ease);
}

@keyframes modal-in {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
    }
}

.modal > form {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.modal__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
}

.modal__title {
    font-size: var(--text-md);
}

.modal__desc {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

.modal__body {
    display: grid;
    gap: 18px;
    padding: 20px;
    overflow-y: auto;
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 14px 20px;
    background: var(--bg-elevated);
    border-top: 1px solid var(--border);
}

/* Confirm dialog */
.confirm__body {
    display: flex;
    gap: 14px;
    padding: 22px 20px 18px;
}

.confirm__icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--danger-soft);
    color: var(--danger);
}

.confirm--neutral .confirm__icon {
    background: var(--accent-soft);
    color: var(--accent);
}

.confirm__text {
    margin-top: 4px;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ── Toasts ──────────────────────────────────────────────────────────────── */
.toasts {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: grid;
    gap: 8px;
    width: min(380px, calc(100vw - 32px));
    pointer-events: none;
}

/* The region is a manual popover (top layer); undo the UA popover box styles. */
.toasts[popover] {
    inset: auto 20px 20px auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
    color: inherit;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    background: var(--surface-2);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    pointer-events: auto;
    animation: toast-in 260ms var(--ease);
}

.toast.is-leaving {
    animation: toast-out 200ms var(--ease) forwards;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
}

@keyframes toast-out {
    to {
        opacity: 0;
        transform: translateY(6px) scale(0.98);
    }
}

.toast__icon {
    margin-top: 1px;
}

.toast--success .toast__icon {
    color: var(--success);
}

.toast--error .toast__icon {
    color: var(--danger);
}

.toast--info .toast__icon {
    color: var(--accent);
}

.toast__content {
    flex: 1;
    min-width: 0;
}

.toast__title {
    font-size: var(--text-sm);
    font-weight: 600;
}

.toast__text {
    margin-top: 2px;
    color: var(--text-muted);
    font-size: var(--text-sm);
}

/* ── Image uploader ──────────────────────────────────────────────────────── */
.uploader {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 168px;
    overflow: hidden;
    background: var(--bg);
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.uploader:hover,
.uploader.is-dragging {
    border-color: var(--accent);
    background: rgba(167, 139, 250, 0.05);
}

.uploader:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
}

.uploader input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.uploader__prompt {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 20px;
    color: var(--text-muted);
    font-size: var(--text-sm);
    text-align: center;
    pointer-events: none;
}

.uploader__prompt strong {
    color: var(--text);
    font-weight: 500;
}

.uploader__prompt .icon {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
    color: var(--accent);
}

.uploader__preview {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

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

.uploader__preview::after {
    content: "Cambiar imagen";
    position: absolute;
    left: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(8, 7, 13, 0.8);
    border: 1px solid var(--border-strong);
    color: var(--text);
    font-size: var(--text-xs);
    backdrop-filter: blur(6px);
}

.uploader.has-preview .uploader__prompt {
    visibility: hidden;
}

/* Video link preview */
.video-preview {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.video-preview img {
    width: 120px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 6px;
}

.video-preview__meta {
    min-width: 0;
    font-size: var(--text-sm);
}

/* ── Login ───────────────────────────────────────────────────────────────── */
.auth {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 1fr);
    min-height: 100vh;
}

.auth__aside {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 40px;
    overflow: hidden;
    background:
        radial-gradient(60% 50% at 25% 20%, rgba(139, 92, 246, 0.35), transparent 70%),
        radial-gradient(45% 40% at 80% 85%, rgba(245, 185, 74, 0.18), transparent 70%),
        var(--bg-elevated);
    border-right: 1px solid var(--border);
}

.auth__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: radial-gradient(70% 60% at 40% 40%, #000, transparent);
    -webkit-mask-image: radial-gradient(70% 60% at 40% 40%, #000, transparent);
    opacity: 0.18;
    pointer-events: none;
}

.auth__quote {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth__quote h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 3.4vw, 3rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.auth__quote p {
    margin-top: 12px;
    color: var(--text-muted);
}

.auth__main {
    display: grid;
    place-items: center;
    padding: 40px 24px;
}

.auth__card {
    width: min(380px, 100%);
}

.auth__card h2 {
    font-size: var(--text-xl);
}

.auth__card .form {
    margin-top: 28px;
}

@media (max-width: 860px) {
    .auth {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth__aside {
        display: none;
    }
}

@media (max-width: 560px) {
    .form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .modal {
        width: calc(100vw - 16px);
        max-height: 92vh;
    }

    .page-header__actions {
        width: 100%;
    }

    .page-header__actions .btn {
        flex: 1;
    }

    .toolbar__search {
        max-width: none;
    }

    .toolbar__meta {
        margin-left: 0;
    }
}
