/* Reusable component surfaces. Feature pages keep only their workflow-specific layout and accents. */
.ui-page-shell { isolation: isolate; }

body[data-ui-feature] .ui-panel,
body[data-ui-feature] .ui-workspace-section {
    border: 1px solid var(--color-border, var(--app-border));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
}

body[data-ui-feature] .ui-control-group,
body[data-ui-feature] .ui-form-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

body[data-ui-feature] .ui-control-group > label,
body[data-ui-feature] .ui-form-field > label {
    color: var(--color-text-tertiary, var(--app-text-muted));
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
}

body[data-ui-feature] .ui-form-field :is(input, textarea, select):not(.mac-select-native) {
    border-color: var(--color-border, var(--app-border));
    background: rgba(15, 15, 35, 0.95);
    color: var(--color-text, var(--app-text));
    transition: border-color 0.2s var(--app-ease), box-shadow 0.2s var(--app-ease), background-color 0.2s var(--app-ease);
}

body[data-ui-feature] .ui-form-field :is(input, textarea, select):not(.mac-select-native):focus {
    border-color: rgba(167, 139, 250, 0.62);
    box-shadow: 0 0 0 3px rgba(124, 111, 233, 0.12);
    outline: none;
}

body[data-ui-feature="generation"] .ui-media-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border, var(--app-border));
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018);
    transition: transform 0.28s var(--app-ease), border-color 0.28s var(--app-ease), background-color 0.28s var(--app-ease), box-shadow 0.28s var(--app-ease);
}

@media (hover: hover) and (pointer: fine) {
    body[data-ui-feature="generation"] .ui-media-card:hover {
        transform: translateY(-2px);
        border-color: rgba(167, 139, 250, 0.38);
        background: rgba(255, 255, 255, 0.055);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.025);
    }
}

body[data-ui-feature] .ui-modal-layer {
    background: rgba(3, 3, 12, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

body[data-ui-feature] .ui-modal-panel {
    border-color: rgba(255, 255, 255, 0.13);
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

body[data-ui-feature="generation"] .ui-panel {
    background: rgba(255, 255, 255, 0.03);
}

body[data-ui-feature="assets"] .ui-workspace-section {
    background: rgba(255, 255, 255, 0.026);
}

body[data-ui-feature="assets"] .ui-media-card {
    overflow: visible;
    border-radius: 10px;
    background: rgba(17, 17, 38, 0.88);
}

.asset-placeholder {
    width: 100%;
    height: 100%;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 8px;
    padding: 14px;
    background: linear-gradient(145deg, rgba(55, 47, 112, 0.92), rgba(31, 29, 70, 0.96));
    color: #d9d3ff;
    font-size: 11px;
    font-weight: 650;
}

.asset-placeholder-mark {
    position: relative;
    width: 34px;
    height: 24px;
    border: 1px solid rgba(222, 216, 255, 0.72);
    border-radius: 6px;
}

.asset-placeholder-mark::before,
.asset-placeholder-mark::after {
    content: '';
    position: absolute;
    bottom: 5px;
    width: 11px;
    border-top: 1px solid rgba(222, 216, 255, 0.68);
    transform-origin: left center;
}

.asset-placeholder-mark::before { left: 5px; transform: rotate(-32deg); }
.asset-placeholder-mark::after { right: 3px; transform: rotate(38deg); }

@media (prefers-reduced-motion: reduce) {
    .ui-media-card,
    .ui-form-field :is(input, textarea, select) { transition: none !important; }
}
