/* Shared studio shell and visual system. No frontend build step required. */
:root { --sidebar-width: 244px; }
body { background: var(--canvas); }
[hidden] { display: none !important; }
.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; vertical-align: middle; }
a, button, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
a, button { transition: background .18s, color .18s, border-color .18s, box-shadow .18s, transform .18s; }
a:hover { text-decoration: none; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
button:disabled { opacity: .5; cursor: not-allowed; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 300; padding: 12px 20px; background: white; border: 1px solid var(--accent); border-radius: var(--radius-lg); }
.skip-link:focus { top: 12px; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--bg); border-right: 1px solid var(--border); padding: 30px 18px 0; display: flex; flex-direction: column; z-index: 120; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-size: 1.1875rem; font-weight: 750; letter-spacing: -.7px; line-height: 1.1; padding: 0 10px; }
.brand-mark { height: 39px; width: 39px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--accent); color: white; box-shadow: inset 0 1px 0 #ffffff30; }
.brand-mark .icon { width: 24px; height: 24px; fill: currentColor; stroke: none; transform: translateX(-2px); }
.brand-secondary { display: block; font-size: 1.0625rem; font-weight: 500; margin-top: 2px; }
.brand-dot { color: var(--accent); }
.workspace-label { margin: 34px 0 28px; padding: 12px 10px; display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: white; font-size: 0.75rem; font-weight: 600; }
.workspace-label small { display: block; color: var(--muted); font-size: 0.75rem; margin-top: 2px; font-weight: 400; }
.tiny-avatar { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface-2); color: var(--muted); font-size: 0.75rem; }
.nav-caption { font-size: 0.75rem; font-weight: 600; letter-spacing: 1.4px; color: var(--muted); margin: 0 12px 11px; }
.main-nav { display: grid; gap: 5px; }
.nav-link { display: flex; align-items: center; gap: 12px; padding: 11px 13px; border-radius: var(--radius-lg); color: var(--muted); font-size: 0.875rem; font-weight: 500; }
.nav-link .icon { width: 18px; height: 18px; }
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-link.active { background: var(--accent-bg); color: var(--text); font-weight: 600; }
.nav-divider { height: 1px; background: var(--border); margin: 20px 10px 14px; }
.nav-badge { margin-left: auto; background: var(--surface-2); color: var(--text); min-width: 21px; height: 21px; font-size: 0.75rem; }
.sidebar-bottom { margin-top: auto; padding-top: 50px; }
.account-row { border-top: 1px solid var(--border); display: flex; align-items: center; gap: 10px; padding: 18px 3px; }
.account-avatar { height: 33px; width: 33px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--surface-2); font-weight: 600; font-size: 0.75rem; }
.account-name { flex: 1; font-size: 0.75rem; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.account-name small { display: block; color: var(--muted); font-size: 0.75rem; font-weight: 400; margin-top: 2px; }
.icon-button { padding: 8px; background: transparent; color: var(--muted); border-radius: 7px; }
.icon-button:hover { color: var(--text); background: var(--surface-2); }
.workspace-main { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { height: 70px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 0 38px; background: var(--bg); }
.topbar-location, .topbar-meta { display: flex; align-items: center; gap: 19px; font-size: 0.75rem; color: var(--muted); }
.topbar-location .icon { width: 16px; height: 16px; color: var(--muted); }
.breadcrumb-slash { color: var(--border-strong); }
.topbar-meta { font-size: 0.75rem; color: var(--muted); }
.workspace-indicator { display: inline-flex; align-items: center; gap: 7px; }
.status-dot { display: inline-block; height: 6px; width: 6px; border-radius: 50%; background: #809873; box-shadow: 0 0 0 3px #80987312; flex-shrink: 0; }
.topbar-divider { height: 15px; width: 1px; background: var(--border); }
.mobile-menu { display: none; }
main { max-width: 1540px; padding: 36px 38px 24px; margin: 0 auto; min-width: 0; }
main:focus { outline: none; }
h1 { font-weight: 650; letter-spacing: -1.1px; line-height: 1.25; overflow-wrap: anywhere; }
h2 { font-weight: 600; letter-spacing: -.3px; }
.page-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 27px; }
.page-header .subtitle { color: var(--muted); margin-top: 7px; line-height: 1.65; }
.page-header > div { min-width: 0; }
.page-header > div:last-child:not(:first-child) { flex-wrap: wrap; max-width: 100%; }
.eyebrow { display: block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1.7px; color: var(--muted); margin-bottom: 11px; }
.header-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.button, button { font-weight: 550; }
.button:hover, .btn-primary:hover { box-shadow: 0 3px 9px #1118270a; }
.button.secondary, button.secondary { border-color: var(--border); box-shadow: 0 1px 2px #11182703; }
.button .icon, button .icon { width: 16px; height: 16px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 0.75rem; font-weight: 500; }
.text-link:hover { color: var(--accent); }
.text-link .icon { width: 15px; height: 15px; }
.stats-grid { gap: 14px; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 29px; }
.stat-card { padding: 20px; min-width: 0; box-shadow: var(--shadow); }
a.stat-card { color: var(--text); }
a.stat-card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 20px; }
.stat-top .stat-label { color: var(--muted); font-size: 0.75rem; }
.stat-top .icon { color: var(--muted); width: 16px; height: 16px; }
.stat-value { font-size: 1.875rem; font-weight: 550; margin-bottom: 9px; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 0.75rem; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.stat-foot .status-dot { width: 5px; height: 5px; box-shadow: none; }
.stat-card.attention .stat-value { color: var(--accent); }
.stat-card.attention .stat-top .icon { color: var(--warning); }
.card { box-shadow: var(--shadow); }
.section { margin-top: 28px; }
.section-header { align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 17px; }
.section-header h2 { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; }
.count-pill { font-size: 0.75rem; line-height: 1; padding: 4px 7px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; color: var(--muted); font-weight: 500; }
.library-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.library-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 19px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.filter-button { padding: 6px 11px; border-radius: 6px; font-size: 0.75rem; background: none; color: var(--muted); }
.filter-button:hover { background: var(--surface); color: var(--text); }
.filter-button.active { color: var(--text); background: var(--surface-2); }
.search-field { display: flex; align-items: center; gap: 8px; position: relative; color: var(--muted); }
.search-field .icon { position: absolute; left: 10px; width: 15px; height: 15px; pointer-events: none; }
.search-field input[type="search"] { width: 210px; min-height: 34px; padding: 7px 10px 7px 33px; background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 7px; font: inherit; font-size: 0.75rem; }
.search-field input::placeholder { color: var(--muted); }
.library-panel .table-wrapper { border: none; border-radius: 0; }
.table-wrapper { background: #fff; }
.video-table { min-width: 1030px; }
.video-table th { font-size: 0.75rem; letter-spacing: .3px; text-transform: none; background: var(--surface); padding: 12px 16px; }
.video-table td { padding: 17px 16px; font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.video-table td:first-child { min-width: 270px; max-width: 350px; }
.video-cell { display: flex; align-items: center; gap: 12px; }
.video-thumb { flex-shrink: 0; position: relative; width: 74px; height: 44px; overflow: hidden; border-radius: 5px; background: var(--surface-2); color: var(--muted); display: grid; place-items: center; }
.video-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-table .cell-primary { font-size: 0.75rem; line-height: 1.5; }
.cell-primary a { color: var(--text); }
.cell-primary a:hover { color: var(--accent); }
.video-table .cell-secondary { font-size: 0.75rem; color: var(--muted); }
.badge { font-size: 0.75rem; padding: 3px 8px; gap: 5px; font-weight: 500; }
.badge-green { color: var(--success); background: var(--success-bg); }
.badge-yellow { color: var(--warning); background: var(--warning-bg); }
.badge-red { color: var(--danger); background: var(--danger-bg); }
.badge-blue { color: var(--info); background: var(--info-bg); }
.badge-gray { color: var(--muted); background: var(--surface); }
.badge-green::before, .badge-yellow::before, .badge-red::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.table-note { background: #fff; font-size: 0.75rem; color: var(--muted); padding: 13px 18px; }
.table-scroll-hint { float: right; }
.empty-state { border: 1px solid var(--border); background: #fff; padding: 42px 24px; color: var(--muted); }
.empty-icon { display: grid; place-items: center; width: 46px; height: 46px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); margin: 0 auto 17px; color: var(--muted); }
.empty-state h3 { color: var(--text); font-size: 0.9375rem; margin-bottom: 7px; }
.empty-state p { max-width: 380px; margin: 0 auto 20px; font-size: 0.75rem; line-height: 1.8; }
.empty-state .button { font-size: 0.75rem; }
.library-panel > .empty-state { border: 0; border-radius: 0; }
.connection-banner { margin-bottom: 27px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); display: flex; align-items: center; gap: 13px; padding: 16px 19px; }
.connection-banner > .icon { color: var(--muted); }
.connection-banner p { font-size: 0.75rem; color: var(--muted); margin: 2px 0 0; }
.connection-banner strong { font-size: 0.75rem; font-weight: 550; }
.connection-banner .button { margin-left: auto; font-size: 0.75rem; }
.overview-bottom { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(250px, 1fr); gap: 24px; margin-top: 28px; }
.overview-bottom > .section { margin-top: 0; min-width: 0; }
.activity-list { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }
.activity-row { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--border); }
.activity-row:last-child { border-bottom: 0; }
.activity-icon { color: var(--muted); background: var(--surface); border-radius: var(--radius-lg); padding: 8px; display: grid; place-items: center; }
.activity-icon .icon { width: 15px; height: 15px; }
.activity-copy { flex: 1; min-width: 0; }
.activity-copy a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); font-size: 0.75rem; font-weight: 500; }
.activity-copy a:hover { color: var(--accent); }
.activity-copy small { font-size: 0.75rem; color: var(--muted); }
.workflow-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: white; padding: 8px 19px; }
.workflow-step { display: flex; align-items: center; gap: 13px; padding: 16px 0; border-bottom: 1px solid var(--border); color: var(--text); }
.workflow-step:last-child { border-bottom: 0; }
.workflow-step:hover strong { color: var(--accent); }
.step-number { display: grid; place-items: center; width: 28px; height: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); color: var(--muted); font-size: 0.75rem; }
.workflow-step strong { display: block; font-size: 0.75rem; font-weight: 550; }
.workflow-step small { display: block; font-size: 0.75rem; color: var(--muted); margin-top: 3px; }
.workflow-step > .icon { margin-left: auto; width: 14px; color: var(--muted); }
.workspace-footer { display: flex; justify-content: space-between; gap: 20px; margin-top: 48px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.75rem; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.upload-layout > .card + .card { margin-top: 0; }
.panel-heading { display: flex; align-items: center; gap: 11px; margin-bottom: 20px; }
.panel-heading .panel-icon { display: grid; place-items: center; width: 35px; height: 35px; background: var(--surface); color: var(--muted); border-radius: var(--radius-lg); }
.panel-heading h2 { margin: 0; font-size: 0.875rem; }
.panel-heading p { margin: 2px 0 0; color: var(--muted); font-size: 0.75rem; }
.upload-dropzone { position: relative; display: flex; align-items: center; flex-direction: column; justify-content: center; min-height: 185px; padding: 25px; background: var(--surface); border: 1.5px dashed var(--border-strong); border-radius: 10px; text-align: center; margin-bottom: 22px; cursor: pointer; transition: background .18s, border-color .18s; }
.upload-dropzone:hover, .upload-dropzone.dragging, .upload-dropzone:focus-within { border-color: var(--accent); background: var(--surface); }
.upload-dropzone > .icon { width: 25px; height: 25px; color: var(--muted); margin-bottom: 12px; }
.upload-dropzone strong { color: var(--text); font-size: 0.75rem; font-weight: 550; }
.upload-dropzone .upload-browse { color: var(--accent); }
.upload-dropzone small { color: var(--muted); font-size: 0.75rem; margin-top: 7px; }
.upload-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; max-width: none; }
.upload-file-name { max-width: 100%; overflow-wrap: anywhere; }
.upload-form-bottom { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.upload-form-bottom > div { flex: 1; min-width: 150px; }
.upload-form-bottom label { font-size: 0.75rem; }
.helptext { font-size: 0.75rem; line-height: 1.7; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="file"], select, textarea { border-color: var(--border-strong); padding: 10px 12px; background-color: #fff; }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
input[type="file"]::file-selector-button { border: 0; border-radius: 5px; padding: 6px 10px; background: var(--surface-2); color: var(--muted); margin-right: 10px; font: inherit; }
select { padding-right: 30px; }
progress { accent-color: var(--accent); height: 8px; border-radius: 10px; overflow: hidden; }
.settings-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; align-items: start; }
.settings-nav { position: sticky; top: 24px; display: grid; gap: 3px; }
.settings-nav a { font-size: 0.75rem; color: var(--muted); padding: 10px 12px; border-radius: 7px; }
.settings-nav a:hover { background: var(--surface-2); color: var(--text); }
.settings-layout .card { padding: 28px; }
.settings-layout form { max-width: 780px; }
.settings-layout input, .settings-layout textarea, .settings-layout select { max-width: none; }
.settings-layout .section { border-top: 1px solid var(--border); padding-top: 25px; scroll-margin-top: 24px; }
.settings-save { position: sticky; bottom: 0; background: #fffffff2; border-top: 1px solid var(--border); margin: 28px -28px -28px; padding: 18px 28px; border-radius: 0 0 14px 14px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.settings-save small { font-size: 0.75rem; color: var(--muted); }
.asset-grid { grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 22px; }
.asset-card { box-shadow: var(--shadow); }
.asset-card-body { padding: 17px; }
.asset-card img { background: var(--surface-2); }
.asset-card-name { font-size: 0.875rem; }
.asset-card-tags { margin-top: 6px; margin-bottom: 17px; }
.asset-card .danger { background: #fff; border-color: #e9dcd4; color: #b97862; }
.approval-review-layout { display: grid; gap: 24px; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); }
.clip-card { padding: 17px; gap: 17px; }
.clip-card-heading h2 { font-size: 0.875rem; }
.split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.meta-panel { background: white; gap: 26px; }
.meta-label { color: var(--muted); }
.auth-header { padding: 30px 5%; display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.auth-header .brand { font-size: 1.125rem; }
.auth-page main { max-width: 1150px; padding: 60px 35px; }
.login-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 110px; align-items: center; min-height: 560px; }
.login-wrap h1 { font-size: 1.8125rem; margin-bottom: 9px; }
.login-wrap .subtitle { font-size: 0.875rem; color: var(--muted); margin-bottom: 30px; }
.login-wrap form p label { font-size: 0.75rem; }
.login-wrap input { min-height: 44px; }
.login-wrap button[type="submit"] { width: 100%; margin-top: 6px; padding: 12px 18px; }
.login-note { text-align: center; margin-top: 23px; font-size: 0.75rem; color: var(--muted); }
@media (min-width: 1600px) { main { padding-top: 42px; } }
@media (max-width: 1200px) { :root { --sidebar-width: 220px; } .sidebar { padding-left: 14px; padding-right: 14px; } main { padding: 28px 26px 24px; } .topbar { padding: 0 26px; } .stat-card { padding: 17px 14px; } .stat-top { gap: 5px; } .stat-top .stat-label { font-size: 0.75rem; } .stat-top .icon { width: 14px; } .settings-layout { grid-template-columns: 160px minmax(0,1fr); gap: 18px; } .clip-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 980px) { .stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .upload-layout, .overview-bottom { grid-template-columns: 1fr; } .settings-layout { grid-template-columns: 1fr; } .settings-nav { position: static; display: flex; flex-wrap: wrap; gap: 4px; } .settings-nav a { background: var(--surface-2); } .login-layout { gap: 55px; } .approval-review-layout { grid-template-columns: 1fr; } .approval-review-layout video { max-height: 350px !important; } }
@media (max-width: 760px) { .sidebar { transform: translateX(-100%); transition: transform .2s; width: 244px; } .nav-open .sidebar { transform: translateX(0); box-shadow: 12px 0 35px #00000015; } .nav-backdrop { position: fixed; inset: 0; background: #11182766; border: none; border-radius: 0; z-index: 110; } .nav-open { overflow: hidden; } .workspace-main { margin-left: 0; } .mobile-menu { display: inline-flex; } .desktop-home, .breadcrumb-slash { display: none; } .topbar { padding: 0 20px; height: 60px; } .topbar-location { gap: 10px; } .topbar-meta { gap: 12px; } main { padding: 26px 20px 22px; } .stats-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } .page-header { margin-bottom: 23px; } h1 { font-size: 1.6875rem; } .auth-header { padding: 24px; } .auth-header > .muted { display: none; } .login-layout { gap: 35px; } .auth-page main { padding: 25px; } }
@media (max-width: 540px) { .today, .topbar-divider { display: none; } .topbar-meta { font-size: 0.75rem; } .topbar { padding: 0 14px; } main { padding: 23px 16px 20px; } .page-header .subtitle { font-size: 0.75rem; } .header-actions { width: 100%; } .header-actions .button, .header-actions button { font-size: 0.75rem; padding: 9px 12px; } .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; } .stat-card { padding: 17px; } .stat-top .stat-label { font-size: 0.75rem; } .stat-top { margin-bottom: 14px; } .stat-value { font-size: 1.8125rem; } .stats-grid > :last-child:nth-child(odd) { grid-column: 1 / -1; } .connection-banner { flex-wrap: wrap; padding: 16px; } .connection-banner > div { flex: 1; min-width: 170px; } .connection-banner .button { margin-left: 0; } .library-toolbar { padding: 12px; } .search-field, .search-field input[type="search"] { width: 100%; } .filter-button { font-size: 0.75rem; padding: 6px 10px; } .table-scroll-hint { float: none; display: block; margin-top: 4px; } .card { padding: 20px; } .section-header { gap: 9px; } .overview-bottom { gap: 26px; } .split, .clip-grid { grid-template-columns: 1fr; } .settings-layout .card { padding: 21px; } .settings-save { margin: 24px -21px -21px; padding: 15px 21px; } .settings-save small { font-size: 0.75rem; } .workspace-footer { margin-top: 32px; } .login-layout { grid-template-columns: 1fr; min-height: 0; } .login-wrap { padding: 5px 4px 30px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; animation: none !important; } }

@media (max-height: 820px) { .sidebar-bottom { padding-top: 24px; } }
/* Grid children must be allowed to shrink below native form-control widths. */
.card, .settings-layout > *, .upload-layout > *, .login-layout > * { min-width: 0; }
@media (max-width: 980px) { .settings-layout, .upload-layout, .overview-bottom { grid-template-columns: minmax(0, 1fr); } }

@media (max-width: 540px) { }

/* Projects: a quiet, preview-first library. */
.project-controls { margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
.project-controls > summary { width: fit-content; cursor: pointer; font-size: 0.875rem; color: var(--text); padding: 8px 0; }
.project-controls[open] > summary { margin-bottom: 16px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 28px 20px; }
.project-tile { display: block; min-width: 0; color: var(--text); }
.project-tile-art { aspect-ratio: 16 / 9; border: 1px solid var(--border); background: var(--surface); border-radius: var(--radius-lg); display: grid; place-items: center; position: relative; transition: border-color .18s; }
.project-tile-art .icon { width: 42px; height: 42px; color: var(--muted); }
.project-tile-art span { position: absolute; bottom: 12px; right: 12px; background: var(--bg); border-radius: 5px; padding: 4px 8px; font-size: 0.75rem; }
.project-tile:hover .project-tile-art { border-color: var(--accent); }
.project-tile h3 { margin: 12px 0 6px; font-size: 0.875rem; overflow-wrap: anywhere; }
.project-tile p { font-size: 0.75rem; color: var(--muted); }
.clip-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); gap: 32px 18px; }
.clip-card { position: relative; padding: 0; gap: 10px; background: transparent; border: 0; box-shadow: none; }
.clip-card:has(.clip-menu[open]) { z-index: 20; }
.clip-preview { position: relative; overflow: hidden; border-radius: 6px; background: #28292c; }
.clip-preview video, .clip-preview .empty-state { aspect-ratio: 1; max-height: none; object-fit: contain; border-radius: 0; background: linear-gradient(120deg, #383a3f, #242529); }
.clip-preview .empty-state { margin: 0; padding: 25px; color: #bfc1c8; border: 0; }
.clip-duration { position: absolute; right: 8px; top: 8px; border-radius: 4px; background: #000b; color: white; padding: 3px 6px; font-size: 0.75rem; font-variant-numeric: tabular-nums; pointer-events: none; }
.clip-card-body { display: block; padding: 0 4px; }
.clip-card-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; }
.clip-title { margin: 5px 0 0; font-size: 0.875rem; font-weight: 500; line-height: 1.5; overflow-wrap: anywhere; }
.clip-card .badge { font-size: 0.75rem; }
.clip-menu { position: static; }
.clip-menu-trigger { display: grid; place-items: center; cursor: pointer; width: 34px; height: 30px; border-radius: 5px; color: var(--muted); list-style: none; letter-spacing: 2px; font-size: 0.75rem; }
.clip-menu-trigger::-webkit-details-marker { display: none; }
.clip-menu-trigger:hover, .clip-menu[open] > summary { color: var(--text); background: var(--surface-2); }
.clip-menu-panel { position: absolute; right: 0; bottom: 50px; width: 100%; max-height: min(560px, 65vh); overflow-y: auto; overscroll-behavior: contain; padding: 14px; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--bg); box-shadow: var(--shadow); display: grid; gap: 10px; }
.clip-menu-panel .button { display: flex; justify-content: flex-start; }
.clip-menu-panel p { overflow-wrap: anywhere; }
.clip-menu-panel pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.clip-menu-section { border-top: 1px solid var(--border); padding-top: 10px; }
.clip-menu-section > summary { cursor: pointer; font-size: 0.75rem; font-weight: 600; padding: 4px 0; }
.clip-menu-section[open] > summary { margin-bottom: 12px; }
.clip-task-stack { margin-top: 8px; }
@media (min-width: 1900px) { .clip-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 540px) { .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; } .clip-menu-panel { position: fixed; top: auto; bottom: 16px; left: 16px; right: 16px; width: auto; max-height: 65vh; } .clip-card .badge { padding: 3px 5px; font-size: 0.75rem; } .clip-title { font-size: 0.75rem; } }
@media (max-width: 360px) { .clip-grid { grid-template-columns: 1fr; } }

.project-workspace .clip-grid + .project-controls, .project-workspace .clip-grid + details { margin-top: 28px; }
.project-workspace .topbar-location { min-width: 0; }
.project-workspace .topbar-location > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Project library uses the shared studio shell and theme. */
.project-library-tabs { display: flex; gap: 26px; font-size: 0.875rem; margin-bottom: 42px; color: var(--muted); }
.project-library-tabs > span { padding: 0 6px 10px; border-bottom: 2px solid var(--accent); color: var(--text); }
.project-library-section > .section-header { margin-bottom: 28px; align-items: center; }
.project-library-section > .section-header h2 { font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.project-storage { font-size: 0.75rem; color: var(--muted); }
.projects-library .project-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 310px)); gap: 26px 16px; align-items: start; }
.project-upload-tile { min-height: 238px; min-width: 0; margin: 0; border: 1px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--bg); display: flex; flex-direction: column; font-size: 0.75rem; color: var(--muted); text-align: center; }
.project-upload-tile:hover, .project-upload-tile.dragging, .project-upload-tile:focus-within { background: var(--accent-bg); color: var(--accent); border-color: var(--accent); }
.project-upload-tile:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.project-upload-dropzone { position: relative; display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 24px 16px; margin: 0; font-size: 0.75rem; font-weight: 400; color: var(--muted); cursor: pointer; }
.project-upload-icon { font-size: 1.6875rem; font-weight: 300; line-height: 1; }
.project-upload-dropzone strong { max-width: 100%; overflow-wrap: anywhere; font-size: 0.875rem; font-weight: 500; color: var(--text); }
.project-upload-dropzone small { font-size: 0.75rem; }
.project-upload-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; max-width: none; }
.project-upload-tile.is-uploading .project-upload-dropzone, .project-upload-dropzone input:disabled { cursor: default; }
.project-upload-feedback { padding: 0 16px 16px; overflow-wrap: anywhere; }
.project-upload-feedback progress { width: 100%; margin-top: 8px; }
.project-upload-feedback button { margin-top: 12px; }
.project-upload-tile [hidden] { display: none; }
.projects-library .project-tile { position: relative; }
.projects-library .project-tile:has(.clip-menu[open]) { z-index: 20; }
.projects-library .project-tile-art { overflow: hidden; border-radius: var(--radius-lg); background: var(--surface); }
.project-tile-art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; opacity: 0; }
.project-tile-art video.is-loaded { opacity: 1; }
.project-tile-art .project-retention { left: 0; right: 0; bottom: 0; border-radius: 0; padding: 5px 10px; text-align: center; font-size: 0.75rem; background: #090a0cbf; color: #b7b8bf; }
.project-tile-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 8px; }
.projects-library .project-tile h3 { margin: 0; font-size: 0.75rem; font-weight: 500; min-width: 0; }
.project-tile h3 a { color: var(--text); }
.projects-library .project-tile p { margin: 2px 0 0; font-size: 0.75rem; color: var(--muted); }
.project-tile p > span { margin: 0 4px; }
.project-tile .clip-menu-panel { bottom: 44px; width: 200px; }
.project-tile .project-delete-action { width: 100%; color: var(--danger); padding: 6px; border: 0; background: transparent; box-shadow: none; font: inherit; font-size: 0.75rem; font-weight: 400; text-align: left; border-radius: 4px; }
.project-tile .project-delete-action:hover { background: var(--surface-2); }
.project-tile .project-delete-action:focus-visible { outline: 2px solid var(--danger); outline-offset: 2px; }
@media (max-width: 760px) {
  .projects-library .project-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px 14px; }
  .project-upload-tile { min-height: 238px; }
  .project-storage { font-size: 0.75rem; }
}
@media (max-width: 540px) { .project-tile .clip-menu-panel { width: auto; bottom: 16px; } }
@media (max-width: 380px) { .projects-library .project-grid { grid-template-columns: 1fr; } }

/* Shared workspace composition and readable controls. */
body{font-family:var(--font-sans);font-size:1rem}.brand{font-weight:650;font-size:1.125rem;padding-inline:4px;gap:9px}.brand-mark{width:28px;height:30px;border-radius:6px;box-shadow:none;flex-shrink:0}.brand-mark .icon{width:17px;height:17px}.brand-secondary{display:inline;font:inherit}.sidebar{background:var(--surface);padding-top:26px}.workspace-label{background:var(--bg);margin:28px 0 24px}.nav-link{font-size:.875rem;border-radius:6px}.nav-link.active{background:var(--surface-2);color:var(--text);box-shadow:none}.sidebar-bottom{padding-top:25px}.account-name{font-size:.875rem}.topbar{background:var(--bg)}.topbar-location{font-size:.875rem}.topbar-location>span:last-child{overflow-wrap:anywhere}.page-header .subtitle{font-size:1rem;max-width:720px}.eyebrow{letter-spacing:.08em}.stats-grid{grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr))}.stat-card,.card,.asset-card,.library-panel{box-shadow:none}.stat-card:hover{transform:none}.stat-label,.stat-top .stat-label{font-size:.875rem}.stat-top .icon{flex-shrink:0}.section-header h2,.panel-heading h2{font-size:1.125rem}.text-link,.filter-button,.settings-nav a,.project-controls>summary,.project-library-tabs,.project-library-section>.section-header h2{font-size:.875rem}.project-tile-heading{align-items:flex-start}.projects-library .project-tile h3,.clip-title{font-size:.875rem}.projects-library .project-tile p,.project-storage,.project-tile-art .project-retention,.clip-duration,.clip-card .badge{font-size:.75rem}.projects-library .project-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,260px),1fr))}.helptext{font-size:.75rem}.panel-heading p,.upload-dropzone strong,.upload-form-bottom label{font-size:.875rem}.upload-dropzone{background:var(--surface)}.upload-dropzone:hover,.upload-dropzone.dragging{background:var(--surface-2)}.settings-save{border-radius:0 0 var(--radius-lg) var(--radius-lg)}
.auth-page{background:var(--surface)}.auth-header{max-width:1180px;margin:auto;border-bottom:1px solid var(--border)}.auth-header>.muted{display:none}.login-layout{display:block;min-height:0;max-width:460px;margin:40px auto 70px}.login-wrap{border:1px solid var(--border);border-radius:var(--radius-lg);background:var(--bg);padding:32px;max-width:none}.login-wrap h1{font-size:1.75rem;letter-spacing:-.04em;font-weight:550}.login-wrap .subtitle{font-size:1rem;margin-bottom:26px}.login-wrap form p label{font-size:.875rem}.login-wrap form button{width:100%;min-height:44px}.login-wrap .helptext a,.login-note a{text-decoration:underline;text-underline-offset:3px}.login-wrap ul{padding-left:20px}.login-wrap .errorlist{padding-left:0}.login-wrap .errorlist li{margin-bottom:6px}.login-wrap a{overflow-wrap:anywhere}.login-wrap form:empty{display:none}
@media(max-width:760px){.auth-page main{padding:24px 18px}.auth-header{padding:22px 18px}.login-layout{margin:14px auto 40px}.login-wrap{padding:25px}.topbar{height:auto;min-height:60px;padding-block:12px}.topbar-meta{flex-shrink:0}.settings-save{position:static}.projects-library .project-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,240px),1fr))}.clip-grid{grid-template-columns:repeat(auto-fill,minmax(min(100%,230px),1fr))}.header-actions .button,.header-actions button{font-size:.875rem}.page-header .subtitle{font-size:1rem}.clip-title{font-size:.875rem}.clip-card .badge{font-size:.75rem}.clip-preview video{min-height:180px}.workspace-indicator{font-size:.75rem}.split{grid-template-columns:minmax(0,1fr)}}
/* Primary information uses control/body sizes; metadata remains secondary. */
.video-table td,.video-table .cell-primary,.filter-button,.connection-banner strong,.connection-banner .button,.empty-state .button,.workflow-step strong,.activity-copy a{font-size:.875rem}
.empty-state p,.connection-banner p{font-size:1rem}
.card h2,.card h3,.card p,.card a{overflow-wrap:anywhere}
.page-header:has(>h1){display:block}.page-header:has(>h1)>.eyebrow{margin-bottom:10px}.page-header:has(>h1)>.subtitle{margin-top:8px}
.approval-review-layout>*{min-width:0}.approval-review-layout .u-display-flex{flex-wrap:wrap}.approval-review-layout .u-display-flex>div{min-width:0;flex:1 1 220px}
@media(max-width:540px){.topbar-meta{display:none}.topbar-location{min-width:0;width:100%}.topbar-location .mobile-menu{flex-shrink:0}.topbar-location>span:last-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}}

.project-workspace main { max-width: none; }
@media (min-width: 761px) {
  .project-workspace .clip-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 761px) and (max-width: 1200px) {
  .project-workspace .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Review the original recording alongside its selected clips. */
.project-review-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 2fr);
  align-items: start;
  gap: 32px;
}
.project-source-panel, .project-clips-panel { min-width: 0; }
.project-source-panel { position: sticky; top: 24px; }
.project-review-layout .section-header { margin-bottom: 18px; }
.project-source-player {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #191c22;
  border-radius: 6px;
}
.project-source-name { margin: 16px 0 4px; font-weight: 600; overflow-wrap: anywhere; }
.project-source-panel .project-controls { margin-top: 24px; }
.project-source-panel .card { padding: 18px; }
.project-source-unavailable { margin: 0; }
.project-workspace .project-clips-panel .clip-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-clips-panel .clip-preview video,
.project-clips-panel .clip-preview .empty-state { aspect-ratio: 9 / 16; }
.project-clips-panel > details { margin-top: 28px; }
@media (max-width: 1200px) {
  .project-review-layout { grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.4fr); gap: 24px; }
  .project-workspace .project-clips-panel .clip-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .project-review-layout { grid-template-columns: minmax(0, 1fr); }
  .project-source-panel { position: static; }
  .project-source-player { max-height: 400px; }
}
@media (max-width: 540px) {
  .project-workspace .project-clips-panel .clip-grid { grid-template-columns: minmax(0, 1fr); }
}

.project-generate-form { margin-top: 24px; }
.project-generate-row { display: flex; flex-wrap: wrap; gap: 10px; }
.project-generate-row input { flex: 1 1 220px; min-width: 0; max-width: none; width: 100%; }
.project-generate-row button { flex: 0 0 auto; }

/* Reserve the border space so starting generation never shifts the controls. */
@property --generation-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
.project-source-panel {
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 16px;
  /* Keep the generation frame outside the shared heading/content alignment. */
  margin: -18px;
}
.project-source-panel.is-generating {
  background: linear-gradient(var(--bg, #fff), var(--bg, #fff)) padding-box,
    conic-gradient(from var(--generation-angle), #8b5cf6, #38bdf8, #34d399, #f472b6, #8b5cf6) border-box;
  animation: generation-border 4s linear infinite;
}
@keyframes generation-border { to { --generation-angle: 360deg; } }
.project-generation-status {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--surface-2, #f3f4f6);
  font-size: .875rem;
  overflow-wrap: anywhere;
}
@media (prefers-reduced-motion: reduce) {
  .project-source-panel.is-generating { animation: none; }
}

/* Clip popup actions use a simple icon-and-label treatment. */
.clip-card .clip-menu-panel { gap: 4px; padding: 8px; }
.clip-card .clip-menu-section { border: 0; padding: 0; }
.clip-card .clip-menu-action { display: flex; align-items: center; justify-content: flex-start; gap: 9px; width: 100%; padding: 9px 8px; border: 0; border-radius: 4px; background: transparent; box-shadow: none; color: var(--text); font: inherit; font-size: .875rem; font-weight: 400; text-align: left; text-decoration: none; cursor: pointer; list-style: none; }
.clip-card .clip-menu-action::-webkit-details-marker { display: none; }
.clip-card .clip-menu-action:hover { background: var(--surface-2); box-shadow: none; }
.clip-card .clip-menu-action:focus-visible { outline: 2px solid var(--text); outline-offset: -2px; }
.clip-card .clip-menu-action .icon { width: 16px; height: 16px; flex-shrink: 0; }
.clip-card .clip-menu-action-danger { color: var(--danger); }
.clip-card .clip-actions, .clip-card .clip-actions form { width: 100%; margin: 0; }

.clip-settings-dialog { width: min(560px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); margin: auto; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--bg); color: var(--text); box-shadow: var(--shadow); overflow-y: auto; }
.clip-settings-dialog::backdrop { background: rgb(0 0 0 / .45); }
.clip-dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.clip-dialog-header h2 { margin: 0; font-size: 1.125rem; }
.clip-settings-dialog .clip-form-grid { grid-template-columns: 1fr; }

/* Workspace settings */
.preferences-page { max-width: 1200px; }
.preferences-nav { display: flex; flex-wrap: wrap; gap: 24px; border-bottom: 1px solid var(--border); padding-bottom: 16px; margin-bottom: 28px; }
.preferences-nav a { color: var(--muted); font-size: .875rem; font-weight: 500; }
.preferences-nav a:hover { color: var(--text); }
.preferences-columns { display: grid; grid-template-columns: minmax(0, 2fr) minmax(270px, 1fr); gap: 24px; align-items: start; }
.preferences-main, .preferences-aside { display: grid; gap: 24px; min-width: 0; }
.preferences-page .preferences-card { margin: 0; padding: 26px; scroll-margin-top: 24px; min-width: 0; }
.preferences-heading { margin-bottom: 20px; }
.preferences-heading h2 { margin: 0 0 6px; font-size: 1.125rem; }
.preferences-heading p, .preferences-aside p { color: var(--muted); font-size: .875rem; line-height: 1.6; overflow-wrap: anywhere; }
.preferences-heading p { margin: 0; }
.preferences-heading-row { display: flex; align-items: start; justify-content: space-between; gap: 12px; }
.preferences-heading-row .badge { white-space: nowrap; }
.preferences-format { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.preferences-format span { background: var(--surface-2); border-radius: 6px; padding: 5px 9px; color: var(--muted); font-size: .75rem; }
.preferences-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 20px; }
.preferences-field { min-width: 0; }
.preferences-wide { grid-column: 1 / -1; }
.preferences-page .preferences-field input, .preferences-page select, .preferences-page textarea { width: 100%; max-width: none; }
.preferences-page input[type="time"] { min-height: 42px; border: 1px solid var(--border); border-radius: 7px; padding: 10px 12px; background: var(--surface); color: var(--text); font: inherit; }
.preferences-page .helptext { display: block; margin: 8px 0 0; line-height: 1.5; font-size: .8125rem; }
.preferences-actions { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; display: flex; justify-content: flex-end; }
.preferences-notice { background: var(--surface-2); padding: 14px 16px; border-radius: 8px; margin-bottom: 20px; display: grid; gap: 6px; font-size: .875rem; }
.preferences-toggle { display: flex; align-items: start; flex-wrap: wrap; gap: 10px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--border); }
.preferences-toggle input { margin-top: 4px; width: 17px; height: 17px; }
.preferences-toggle label { margin: 0; flex: 1; }
.preferences-toggle label span { display: block; margin-top: 5px; color: var(--muted); font-weight: 400; font-size: .8125rem; }
.preferences-toggle .errorlist { flex-basis: 100%; }
.preferences-days { border: 0; padding: 0; margin: 0; min-width: 0; }
.preferences-days legend { font-size: .875rem; font-weight: 500; margin-bottom: 10px; }
.preferences-days > div { display: flex; flex-wrap: wrap; gap: 8px; }
.preferences-days label { display: flex; align-items: center; gap: 7px; padding: 8px 10px; margin: 0; border: 1px solid var(--border); border-radius: 7px; font-size: .8125rem; cursor: pointer; }
.preferences-days label:has(input:checked) { background: var(--surface-2); border-color: var(--muted); }
.preferences-page .preferences-days input { width: 15px; height: 15px; margin: 0; }
.preferences-details { margin-top: 24px; color: var(--muted); font-size: .8125rem; line-height: 1.6; }
.preferences-details summary { cursor: pointer; color: var(--text); font-weight: 500; }
.preferences-page .preferences-details p { margin: 12px 0 0; }
.preferences-page .preferences-note { margin-top: 16px; }
.preferences-account { margin: 0 0 18px; }
.preferences-account > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: .8125rem; }
.preferences-account dt, .preferences-account dd span { color: var(--muted); }
.preferences-account dd { margin: 0; font-weight: 500; }
.preferences-account-links { display: grid; justify-items: start; gap: 16px; margin-top: 22px; font-size: .8125rem; }
@media (max-width: 1100px) { .preferences-columns { grid-template-columns: minmax(0, 1fr); } .preferences-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .preferences-fields, .preferences-aside { grid-template-columns: minmax(0, 1fr); } .preferences-page .preferences-card { padding: 20px; } .preferences-nav { gap: 16px; } .preferences-heading-row { flex-wrap: wrap; } .preferences-actions button { width: 100%; } }


/* A compact alternative to uploading a file in the project library. */
.youtube-import { max-width: 760px; margin-top: 28px; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.youtube-import form { margin: 0; }
.youtube-import label { display: block; margin: 0 0 10px; font-size: .875rem; font-weight: 500; color: var(--text); }
.youtube-import-row { display: flex; align-items: stretch; gap: 10px; }
.youtube-import-field { position: relative; flex: 1; min-width: 0; }
.youtube-import-icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: #e53935; pointer-events: none; }
.youtube-import-field input { width: 100%; max-width: none; height: 46px; margin: 0; padding: 10px 14px 10px 46px; border-radius: 8px; background: var(--bg); font-size: .875rem; }
.youtube-import-row button { display: inline-flex; align-items: center; justify-content: center; gap: 12px; flex-shrink: 0; min-height: 46px; margin: 0; padding: 10px 18px; border-radius: 8px; font-size: .875rem; white-space: nowrap; }
.youtube-import .helptext { margin: 9px 0 0; color: var(--muted); }
.youtube-import [hidden] { display: none; }
#youtube-imports { list-style: none; margin: 16px 0 0; padding: 0; border-top: 1px solid var(--border); }
#youtube-imports li { padding-top: 12px; font-size: .75rem; color: var(--muted); overflow-wrap: anywhere; }
#youtube-imports [data-import-error]:not(:empty) { color: var(--danger); }
#youtube-imports a { margin-left: 6px; }
@media (max-width: 480px) {
  .youtube-import { padding: 14px; margin-top: 20px; }
  .youtube-import-row { gap: 8px; }
  .youtube-import-row button { padding-inline: 12px; }
  .youtube-import-row button span { display: none; }
}
