.curator-panel .curator-panel-toolbar {
    min-height: 4.5rem;
    padding: 0.85rem 1.25rem;
    gap: 1rem;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}

.curator-panel-toolbar__intro {
    display: grid;
    margin-right: 0.75rem;
}

.curator-panel-toolbar__intro strong {
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.25rem;
}

.curator-panel-toolbar__intro span {
    color: #64748b;
    font-size: 0.72rem;
}

.curator-panel .curator-panel-toolbar label {
    width: min(22rem, 42vw);
    border-color: #dbe2ea;
    border-radius: 0.65rem;
    background: #f8fafc;
}

.curator-panel .curator-panel-toolbar input {
    min-height: 2.4rem;
}

.curator-panel .curator-panel-gallery {
    padding: 1.25rem;
    background: #f8fafc;
}

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

.curator-panel .curator-picker-grid,
[wire\:key*=open_curator_picker] .curator-picker-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)) !important;
    align-items: stretch;
    gap: 1rem !important;
}

.curator-panel .curator-picker-grid > li {
    min-width: 0;
}

.curator-media-card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbe2ea;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 150ms ease, box-shadow 150ms ease, opacity 150ms ease, transform 150ms ease;
}

.curator-media-card:hover {
    border-color: #94a3b8;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.09);
    transform: translateY(-1px);
}

.curator-media-card:focus-within {
    outline: 3px solid rgba(20, 184, 166, 0.2);
    outline-offset: 2px;
}

.curator-media-card.is-selected {
    border-color: #0d9488;
    box-shadow: 0 0 0 2px #14b8a6, 0 8px 22px rgba(15, 118, 110, 0.13);
}

.curator-media-card.is-dimmed {
    opacity: 0.62;
}

.curator-media-card__button {
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    text-align: left;
}

.curator-media-card__preview {
    display: flex;
    width: 100%;
    aspect-ratio: 4 / 3;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid #edf2f7;
    background: linear-gradient(145deg, #fff7f7, #f8fafc);
}

.curator-media-card__asset,
.curator-media-card__preview .media-file-preview {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    object-fit: contain;
}

.curator-media-card__preview .media-file-preview--image {
    object-fit: cover;
}

.curator-media-card__preview .media-file-preview--pdf svg,
.curator-media-card__preview .media-file-preview--document svg {
    width: 3.25rem;
    height: 3.25rem;
    color: #e11d48;
    opacity: 0.82;
}

.curator-media-card__preview .curator-document-image > span:not(.sr-only) {
    position: absolute;
    padding: 0.18rem 0.38rem;
    border-radius: 0.3rem;
    background: #e11d48;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
}

.curator-media-card__name {
    display: -webkit-box;
    min-height: 3.75rem;
    overflow: hidden;
    padding: 0.75rem 0.8rem 0.45rem;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 650;
    line-height: 1.25rem;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.curator-media-card__meta {
    display: flex;
    width: calc(100% - 1.6rem);
    justify-content: space-between;
    gap: 0.5rem;
    margin: auto 0.8rem 0;
    padding: 0.55rem 0 0.7rem;
    border-top: 1px solid #f1f5f9;
    color: #94a3b8;
    font-size: 0.68rem;
    font-weight: 600;
}

.curator-media-card__selected {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    z-index: 2;
    display: flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
}

.curator-media-card__check {
    display: flex;
    width: 1.8rem;
    height: 1.8rem;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #10b981;
    color: #fff;
    box-shadow: 0 3px 9px rgba(15, 23, 42, 0.22);
}

.curator-panel .curator-panel-sidebar {
    border-left: 1px solid #e2e8f0;
    background: #fff;
}

.curator-panel .curator-panel-sidebar h4 {
    padding: 1rem 1.25rem 0.75rem;
    color: #0f172a;
    font-size: 0.9rem;
}

.curator-edit-preview {
    position: relative;
    display: flex;
    height: 12rem;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #dbe2ea;
    border-radius: 0.75rem;
    background: #f8fafc;
}

.curator-edit-preview--pdf {
    display: block;
    height: clamp(24rem, 56vh, 42rem);
    background: #525659;
}

.curator-edit-preview__pdf {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #525659;
}

.curator-edit-preview__fallback {
    position: absolute;
    right: 0.75rem;
    bottom: 0.75rem;
    z-index: 2;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 650;
    text-decoration: none;
    backdrop-filter: blur(6px);
}

.curator-edit-preview__fallback:hover {
    background: #0f172a;
}

.curator-edit-preview__image {
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
}

.curator-edit-preview__video {
    width: 100%;
    max-height: 100%;
}

.curator-edit-preview__actions {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    display: flex;
    overflow: hidden;
    border-bottom-left-radius: 0.5rem;
    background: rgba(15, 23, 42, 0.9);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.18);
}

.curator-panel .curator-panel-sidebar .filepond--panel-root {
    border: 2px dashed #5eead4;
    border-radius: 0.8rem;
    background: rgba(240, 253, 250, 0.5);
}

.curator-panel .curator-panel-sidebar > div > div > div:last-child {
    border-color: #e2e8f0;
    background: #f8fafc;
}

.curator-media-picker > ul {
    overflow: hidden;
    border: 1px solid #dbe2ea;
    border-radius: 0.8rem;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.curator-media-picker > ul > li {
    min-width: 0;
}

.curator-media-picker > ul > li > div {
    min-height: 4.5rem;
    padding: 0.55rem 0.65rem;
    gap: 0.8rem;
}

.curator-media-picker .curator-picker-list-preview {
    position: relative;
    display: flex;
    width: 3.25rem !important;
    height: 3.25rem !important;
    flex: 0 0 3.25rem;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 0.6rem;
    background: linear-gradient(145deg, #fff7f7, #f8fafc);
}

.curator-media-picker .curator-picker-list-preview .media-file-preview {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    object-fit: cover;
}

.curator-media-picker .curator-picker-list-preview .curator-document-image svg {
    width: 1.5rem;
    height: 1.5rem;
    color: #e11d48;
    opacity: 0.82;
}

.curator-media-picker .curator-picker-list-preview .curator-document-image > span:not(.sr-only) {
    position: absolute;
    right: 0.25rem;
    bottom: 0.25rem;
    padding: 0.12rem 0.25rem;
    border-radius: 0.25rem;
    background: #e11d48;
    color: #fff;
    font-size: 0.5rem;
    font-weight: 800;
    line-height: 1;
}

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

.curator-media-picker .curator-picker-list-details {
    min-width: 0;
    color: #334155;
}

.curator-media-picker .curator-picker-list-preview + .curator-picker-list-details {
    flex: 1 1 auto;
    font-size: 0.82rem;
    font-weight: 650;
}

.curator-media-picker .curator-picker-list-details p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.curator-media-picker .curator-picker-list-details + .curator-picker-list-details {
    color: #64748b;
    font-size: 0.72rem;
    font-variant-numeric: tabular-nums;
}

.curator-media-picker .curator-picker-list-actions {
    flex: 0 0 auto;
}

.curator-media-picker > div:last-child {
    margin-top: 0.7rem;
}

.curator-media-picker .curator-picker-selection-grid {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 20rem));
    gap: 0.85rem;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.curator-media-picker .curator-picker-selection-grid > li {
    width: 100%;
}

.curator-media-picker .curator-picker-selection-grid > li > div {
    position: relative;
    display: block;
    width: 100%;
    height: 10rem;
    min-height: 0;
    overflow: hidden;
    padding: 0;
    border: 1px solid #dbe2ea;
    border-radius: 0.8rem;
    background: #f8fafc;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.curator-media-picker .curator-picker-selection-grid .media-file-preview {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    border: 0;
    object-fit: contain;
}

.curator-media-picker .curator-picker-selection-grid .media-file-preview--image {
    object-fit: cover;
}

.curator-media-picker .curator-picker-selection-grid .curator-document-image svg {
    width: 3rem;
    height: 3rem;
    color: #e11d48;
    opacity: 0.8;
}

.curator-media-picker .curator-picker-selection-grid .curator-document-image > span:not(.sr-only) {
    padding: 0.18rem 0.38rem;
    border-radius: 0.3rem;
    background: #e11d48;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    line-height: 1;
}

.curator-media-picker .curator-picker-selection-grid .curator-picker-card-actions {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    z-index: 3;
    overflow: hidden;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(8px);
}

.curator-media-picker .curator-picker-selection-grid .curator-picker-card-meta {
    position: absolute;
    inset: auto 0 0;
    z-index: 2;
    display: flex;
    min-height: 3.4rem;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1.4rem 0.8rem 0.65rem;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 650;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
}

.curator-media-picker .curator-picker-selection-grid .curator-picker-card-meta p:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.curator-media-picker .curator-picker-selection-grid .curator-picker-card-meta p:last-child {
    flex: 0 0 auto;
    color: #e2e8f0;
    font-variant-numeric: tabular-nums;
}

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

.dark .curator-media-picker .curator-picker-selection-grid > li > div {
    border-color: #334155;
    background: #111827;
}

.dark .curator-media-picker > ul {
    border-color: #334155;
    background: #111827;
}

.dark .curator-media-picker .curator-picker-list-preview {
    border-color: #334155;
    background: linear-gradient(145deg, #1f2937, #111827);
}

.dark .curator-media-picker .curator-picker-list-details {
    color: #e2e8f0;
}

@media (max-width: 640px) {
    .curator-media-picker > ul > li > div {
        gap: 0.6rem;
        padding: 0.5rem;
    }

    .curator-media-picker .curator-picker-list-preview {
        width: 2.75rem !important;
        height: 2.75rem !important;
        flex-basis: 2.75rem;
    }

    .curator-media-picker .curator-picker-list-details + .curator-picker-list-details {
        display: none;
    }
}

.media-manager-page {
    --media-blue: #2563eb;
    --media-border: #e2e8f0;
    --media-muted: #64748b;
    --media-ink: #0f172a;
}

.fi-panel-admin .media-manager-page .fi-page-header {
    align-items: center;
    padding: 0 0 1rem;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.fi-panel-admin .media-manager-page .fi-header-heading {
    color: var(--media-ink);
    font-size: 1.35rem;
    font-weight: 750;
}

.fi-panel-admin .media-manager-page .fi-header-subheading {
    margin-top: 0.2rem;
    color: var(--media-muted);
    font-size: 0.78rem;
}

.media-manager-page .fi-header-actions .fi-btn:first-child {
    min-width: 10.5rem;
    justify-content: center;
    background: var(--media-blue);
}

.media-manager-shell {
    overflow: hidden;
    border: 1px solid var(--media-border);
    border-radius: 0.9rem;
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.media-manager-layout {
    display: grid;
    min-height: 34rem;
    grid-template-columns: 13rem minmax(0, 1fr);
}

.media-manager-tree {
    padding: 1.2rem 0.8rem;
    border-right: 1px solid var(--media-border);
    background: #f8fafc;
}

.media-manager-tree__heading {
    padding: 0 0.55rem 0.65rem;
    color: #94a3b8;
    font-size: 0.66rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.media-manager-tree__item {
    display: flex;
    min-height: 2.6rem;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border-radius: 0.55rem;
    color: #334155;
    font-size: 0.78rem;
    font-weight: 650;
}

.media-manager-tree__item.is-active {
    background: #eaf2ff;
    color: #1d4ed8;
}

.media-manager-tree__item svg {
    width: 1rem;
    height: 1rem;
    color: currentColor;
}

.media-manager-tree__item strong {
    min-width: 1.7rem;
    margin-left: auto;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 0.66rem;
    text-align: center;
}

.media-manager-tree__note {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.75rem;
    border: 1px solid var(--media-border);
    border-radius: 0.65rem;
    background: #fff;
    color: var(--media-muted);
    font-size: 0.67rem;
    line-height: 1.35;
}

.media-manager-tree__note svg {
    width: 1rem;
    height: 1rem;
    flex: 0 0 1rem;
    color: var(--media-blue);
}

.media-manager-content {
    min-width: 0;
    padding: 1rem;
    background: #fff;
}

.media-manager-content__head {
    display: flex;
    min-height: 3.35rem;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.85rem;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--media-border);
    border-radius: 0.65rem;
    background: #f8fafc;
}

.media-manager-content__head > div {
    display: grid;
    gap: 0.08rem;
}

.media-manager-content__head > div span {
    color: #94a3b8;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
}

.media-manager-content__head > div strong {
    color: var(--media-ink);
    font-size: 0.84rem;
}

.media-manager-view-toggle {
    display: inline-flex;
    min-height: 2rem;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.6rem;
    border: 1px solid var(--media-border);
    border-radius: 0.5rem;
    background: #fff;
    color: #475569;
    font-size: 0.7rem;
    font-weight: 650;
}

.media-manager-view-toggle:hover {
    border-color: #93c5fd;
    color: #1d4ed8;
}

.media-manager-view-toggle svg {
    width: 0.95rem;
    height: 0.95rem;
}

.media-manager-page .fi-ta {
    overflow: hidden;
    border: 1px solid var(--media-border);
    border-radius: 0.7rem;
    box-shadow: none;
}

.media-manager-page .fi-ta-header-ctn {
    display: block;
    border-bottom: 1px solid var(--media-border);
    background: #fff;
}

.media-manager-page .fi-ta-ctn {
    border: 0;
    background: #fff;
    box-shadow: none;
}

.media-manager-page .fi-ta-table {
    border-collapse: collapse;
}

.media-manager-page .fi-ta-header-cell {
    padding-block: 0.65rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.64rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.media-manager-page .fi-ta-row {
    min-height: 4.6rem;
    border-top: 1px solid #edf2f7;
}

.media-manager-page .fi-ta-row:hover {
    background: #f8fbff;
}

.media-manager-page .media-manager-file-thumb {
    display: grid;
    width: 2.75rem;
    height: 2.75rem;
    place-items: center;
    overflow: hidden;
    border: 1px solid #fecdd3;
    border-radius: 0.65rem;
    background: #fff1f2;
}

.media-manager-page .media-manager-file-thumb .media-file-preview {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: cover;
}

.media-manager-page .media-manager-file-thumb .curator-document-image svg {
    width: 1.25rem;
    height: 1.25rem;
    color: #e11d48;
    opacity: 0.8;
}

.media-manager-page .media-manager-file-thumb .curator-document-image > span:not(.sr-only) {
    right: 0.2rem;
    bottom: 0.2rem;
    padding: 0.08rem 0.2rem;
    border-radius: 0.2rem;
    background: #e11d48;
    color: #fff;
    font-size: 0.46rem;
    font-weight: 800;
}

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

.media-manager-page .fi-ta-text-item-label {
    color: #172033;
    font-size: 0.78rem;
    font-weight: 680;
}

.media-manager-page .fi-ta-text-description {
    margin-top: 0.18rem;
    color: #94a3b8;
    font-size: 0.65rem;
}

.media-manager-page .fi-ta-footer {
    border-top: 1px solid var(--media-border);
    background: #f8fafc;
}

.dark .media-manager-shell,
.dark .media-manager-content,
.dark .media-manager-page .fi-ta-ctn,
.dark .media-manager-page .fi-ta-header-ctn {
    background: #111827;
}

.dark .media-manager-tree,
.dark .media-manager-content__head,
.dark .media-manager-page .fi-ta-header-cell,
.dark .media-manager-page .fi-ta-footer {
    background: #0f172a;
}

.dark .media-manager-shell,
.dark .media-manager-tree,
.dark .media-manager-content__head,
.dark .media-manager-page .fi-ta {
    border-color: #334155;
}

.dark .media-manager-content__head > div strong,
.dark .media-manager-page .fi-ta-text-item-label {
    color: #e2e8f0;
}

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

    .media-manager-tree {
        border-right: 0;
        border-bottom: 1px solid var(--media-border);
    }

    .media-manager-tree__note {
        display: none;
    }
}

@media (max-width: 640px) {
    .media-manager-content {
        padding: 0.65rem;
    }

    .media-manager-content__head {
        align-items: stretch;
        flex-direction: column;
    }

    .media-manager-view-toggle {
        justify-content: center;
    }
}

.dark .curator-panel .curator-panel-toolbar,
.dark .curator-panel .curator-panel-sidebar,
.dark .curator-media-card {
    border-color: #334155;
    background: #111827;
}

.dark .curator-panel .curator-panel-gallery {
    background: #0f172a;
}

.dark .curator-panel-toolbar__intro strong,
.dark .curator-media-card__name,
.dark .curator-panel .curator-panel-sidebar h4 {
    color: #e2e8f0;
}

.dark .curator-media-card__preview {
    border-color: #334155;
    background: linear-gradient(145deg, #1f2937, #111827);
}

@media (max-width: 1023px) {
    .curator-panel .curator-panel-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .curator-panel .curator-panel-toolbar label {
        width: 100%;
    }

    .curator-panel .curator-picker-grid,
    [wire\:key*=open_curator_picker] .curator-picker-grid {
        grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .curator-panel .curator-panel-gallery {
        padding: 0.8rem;
    }

    .curator-panel .curator-picker-grid,
    [wire\:key*=open_curator_picker] .curator-picker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }

    .curator-media-card__name {
        padding-inline: 0.65rem;
    }
}
