/* Small shared component layer; Tailwind utilities provide the layout and theme. */
:root { color-scheme: dark; }
main h2 { margin-bottom: 1.25rem; color: #f8fafc; font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; }
main h3 { margin: 1.5rem 0 .75rem; color: #f8fafc; font-size: 1.125rem; font-weight: 600; }
main a { color: #67e8f9; }
main a:hover { color: #a5f3fc; }
main form:not(.filters) { max-width: 48rem; }
main label { color: #cbd5e1; font-size: .875rem; font-weight: 500; }
main input:not([type="hidden"]), main select, main textarea { margin-top: .35rem; width: 100%; border: 1px solid #475569; border-radius: .5rem; background: #0f172a; padding: .65rem .75rem; color: #f8fafc; }
main textarea { box-sizing: border-box; }
main button { border-radius: .5rem; background: #0891b2; padding: .65rem 1rem; color: white; font-size: .875rem; font-weight: 600; transition: background .15s; }
main button:hover { background: #06b6d4; }
main code { border-radius: .25rem; background: #1e293b; padding: .1rem .35rem; color: #bae6fd; }
main pre { overflow: auto; white-space: pre-wrap; word-break: break-word; border: 1px solid #334155; border-radius: .75rem; background: #020617; padding: 1rem; color: #cbd5e1; }
.page-intro { margin: -.75rem 0 1.5rem; color: #94a3b8; }
.panel { border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); padding: 1.25rem; box-shadow: 0 12px 32px rgba(0,0,0,.15); }
.form-actions { margin-top: 1rem; }
.filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 1rem; align-items: end; border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); padding: 1rem; }
.filters a { align-self: center; padding: .65rem .25rem; text-align: center; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(250px,1fr)); gap: 1rem; margin-top: 1.25rem; }
.media-card { position: relative; overflow: hidden; border: 1px solid #334155; border-radius: 1rem; background: #0f172a; padding: .75rem; transition: transform .15s,border-color .15s; }
.media-card:hover { transform: translateY(-2px); border-color: #0891b2; }
.media-card img,.media-card video,.preview-placeholder { display: block; width: 100%; height: 190px; object-fit: cover; border-radius: .7rem; background: #020617; }
.preview-placeholder { align-content: center; text-align: center; color: #64748b; }
.media-card-link { color: inherit; text-decoration: none; }
.media-card-link::after { content: ""; position: absolute; inset: 0; }
.media-card p { margin: .45rem 0; color: #cbd5e1; font-size: .875rem; }
.media-card h3 { margin: .85rem 0 .35rem; }
.media-sort-help { margin: .8rem 0; color: #94a3b8; font-size: .8rem; }
.media-table { min-width: 1380px; }
.media-table td { max-width: 260px; }
.sort-button { display: inline-flex; gap: .35rem; align-items: center; border: 0; background: transparent; padding: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; }
.sort-button:hover { background: transparent; color: #e2e8f0; }
.media-preview-button { position: relative; display: block; overflow: hidden; width: 104px; height: 70px; border: 1px solid #475569; border-radius: .55rem; background: #020617; padding: 0; }
.media-preview-button:hover { background: #020617; border-color: #22d3ee; }
.media-preview-button img,.media-preview-button video { width: 100%; height: 100%; object-fit: cover; }
.play-indicator { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%,-50%); display: grid; width: 28px; height: 28px; place-items: center; border-radius: 999px; background: rgba(2,6,23,.8); color: white; font-size: .7rem; }
.table-preview-placeholder { display: grid; width: 104px; height: 70px; place-items: center; border-radius: .55rem; background: #020617; color: #64748b; }
.compact-button { white-space: nowrap; padding: .4rem .6rem; }
.media-preview-dialog { width: min(94vw,1100px); max-width: none; border: 1px solid #475569; border-radius: 1rem; background: #0f172a; padding: 0; color: #e2e8f0; box-shadow: 0 30px 80px rgba(0,0,0,.65); }
.media-preview-dialog::backdrop { background: rgba(2,6,23,.85); }
.preview-dialog-header { display: flex; justify-content: space-between; align-items: center; gap: 1rem; border-bottom: 1px solid #334155; padding: .75rem 1rem; }
.preview-dialog-header button { background: transparent; padding: .15rem .5rem; color: #cbd5e1; font-size: 1.7rem; line-height: 1; }
#preview-dialog-content { display: grid; min-height: 180px; max-height: 82vh; place-items: center; padding: 1rem; }
.dialog-media { display: block; max-width: 100%; max-height: 78vh; border-radius: .65rem; background: #020617; object-fit: contain; }
.status,.cost-badge { display: inline-flex; border: 1px solid #475569; border-radius: 999px; background: #334155; padding: .2rem .6rem; color: #cbd5e1; font-size: .75rem; font-weight: 600; }
.status-completed { border-color: rgba(16,185,129,.4); background: rgba(16,185,129,.12); color: #6ee7b7; }
.status-processing,.status-submitted { border-color: rgba(245,158,11,.4); background: rgba(245,158,11,.12); color: #fcd34d; }
.status-failed { border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.12); color: #fca5a5; }
.status-queued,.status-pending { border-color: #475569; background: #334155; color: #cbd5e1; }
.detail-media { max-width: 100%; max-height: 650px; border-radius: 1rem; background: #020617; }
.detail-list { display: grid; grid-template-columns: minmax(120px,180px) 1fr; gap: .75rem 1rem; border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); padding: 1.25rem; }
.detail-list dt { color: #94a3b8; font-weight: 600; }
.detail-list dd { min-width: 0; }
.rating-form { border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); padding: 1.25rem; }
.rating-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 1rem; }
.muted { color: #94a3b8; }
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 1rem; }
.dashboard-card { border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); padding: 1.25rem; }
.dashboard-card p { margin-top: .5rem; color: #94a3b8; font-size: .875rem; }
.cost-stats { display: grid; grid-template-columns: repeat(auto-fit,minmax(210px,1fr)); gap: 1rem; }
.cost-stat-card { border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); padding: 1.1rem; box-shadow: 0 12px 32px rgba(0,0,0,.12); }
.cost-stat-label { color: #94a3b8; font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.cost-stat-value { margin-top: .45rem; color: #f8fafc; font-size: 1.5rem; font-weight: 700; letter-spacing: -.025em; }
.cost-stat-help { margin-top: .45rem; color: #64748b; font-size: .75rem; line-height: 1.4; }
.cost-method-note { margin-top: 1rem; color: #94a3b8; font-size: .8rem; }
.table-wrap { overflow-x: auto; border: 1px solid #334155; border-radius: 1rem; background: rgba(15,23,42,.75); }
.cost-table { width: 100%; min-width: 800px; border-collapse: collapse; }
.cost-table th { background: rgba(30,41,59,.75); padding: .8rem 1rem; color: #94a3b8; font-size: .75rem; font-weight: 600; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.cost-table td { border-top: 1px solid #334155; padding: .9rem 1rem; color: #cbd5e1; font-size: .875rem; vertical-align: middle; }
.cost-table tbody tr:hover { background: rgba(30,41,59,.35); }
.model-id { display: block; margin-top: .2rem; color: #64748b; font-family: ui-monospace,SFMono-Regular,Menlo,monospace; font-size: .72rem; }
.empty-table { padding: 2rem !important; color: #64748b !important; text-align: center; }
.benchmark-table { min-width: 1050px; }
.benchmark-score { display: inline-flex; min-width: 3rem; justify-content: center; border: 1px solid rgba(34,211,238,.35); border-radius: .5rem; background: rgba(6,182,212,.12); padding: .3rem .55rem; color: #67e8f9; font-weight: 700; }
.animation-image-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(160px,1fr)); gap: .8rem; max-height: 38rem; overflow-y: auto; padding: .2rem; }
.animation-image-option { position: relative; display: grid; gap: .45rem; cursor: pointer; border: 1px solid #334155; border-radius: .8rem; background: #0f172a; padding: .55rem; }
.animation-image-option:has(input:checked) { border-color: #22d3ee; box-shadow: 0 0 0 2px rgba(34,211,238,.2); }
.animation-image-option input { position: absolute; top: .75rem; right: .75rem; width: auto !important; margin: 0 !important; accent-color: #06b6d4; }
.animation-image-option img { width: 100%; height: 130px; border-radius: .55rem; background: #020617; object-fit: cover; }
.animation-image-option span { color: #94a3b8; font-size: .72rem; line-height: 1.35; }
.animation-source { display: grid; grid-template-columns: minmax(120px,220px) 1fr; gap: 1rem; align-items: center; }
.animation-source img { width: 100%; max-height: 220px; border-radius: .75rem; background: #020617; object-fit: contain; }
.animation-settings { display: grid; grid-template-columns: repeat(auto-fit,minmax(145px,1fr)); gap: 1rem; }
.source-media-thumbnail { display: block; width: 160px; max-height: 120px; margin-bottom: .4rem; border-radius: .6rem; background: #020617; object-fit: contain; }
.button-link { display: inline-flex; border-radius: .5rem; background: #0891b2; padding: .55rem .8rem; color: white !important; font-size: .8rem; font-weight: 600; text-decoration: none; }
.button-link:hover { background: #06b6d4; }
@media (max-width: 640px) { .detail-list { grid-template-columns: 1fr; gap: .25rem; } .detail-list dd { margin-bottom: .75rem; } .media-preview-dialog { width: 98vw; } }
