/* Redcape UI foundation. Components are scoped to .rc-app; legacy pages are isolated. */
:root {
  --rc-sidebar:#151d2b; --rc-sidebar-hover:#202c3e;
  --rc-bg:#f5f6f8; --rc-surface:#fff; --rc-ink:#202938; --rc-muted:#5e6b7e;
  --rc-border:#dde3eb; --rc-red:#b8203a; --rc-red-hover:#981b30; --rc-focus:#2563eb;
  --rc-success:#236044; --rc-warning:#80560b; --rc-danger:#a21e35; --rc-info:#2057a5; --rc-review:#67449b;
  --rc-space-1:4px; --rc-space-2:8px; --rc-space-3:12px; --rc-space-4:16px; --rc-space-6:24px; --rc-space-8:32px; --rc-space-12:48px;
  --rc-radius:8px; --rc-control-radius:6px; --rc-shadow:0 2px 5px #16223704,0 1px 2px #16223703;
  --rc-font:"Segoe UI",system-ui,-apple-system,sans-serif;
}
.rc-app,.rc-app * { box-sizing:border-box; }
.rc-app { margin:0; font:14px/1.5 var(--rc-font); background:var(--rc-bg); color:var(--rc-ink); }
.rc-app h1,.rc-app h2,.rc-app h3,.rc-app p { margin-top:0; }
.rc-app h1 { font-size:28px; line-height:1.25; letter-spacing:-.7px; font-weight:650; margin-bottom:0; }
.rc-app h2 { font-size:17px; line-height:1.4; font-weight:650; margin-bottom:16px; letter-spacing:-.2px; }
.rc-app h3 { font-size:14px; font-weight:650; margin:24px 0 12px; }
.rc-app small { display:block; font-size:12px; color:var(--rc-muted); line-height:1.6; }
.rc-app a { color:var(--rc-red); text-underline-offset:3px; }
.rc-app :focus-visible { outline:3px solid var(--rc-focus); outline-offset:3px; }
.rc-app [hidden] { display:none !important; }
.rc-icon { width:19px; height:19px; flex-shrink:0; vertical-align:middle; }
.rc-skip { position:fixed; top:-100px; left:16px; z-index:100; padding:12px 20px; background:white; border-radius:6px; }
.rc-skip:focus { top:12px; }
.rc-shell { min-height:100vh; }
.rc-sidebar { position:fixed; inset:0 auto 0 0; width:240px; padding:30px 16px 18px; color:#d2d9e5; background:var(--rc-sidebar); display:flex; flex-direction:column; z-index:30; overflow-y:auto; }
.rc-sidebar-top { display:flex; align-items:center; justify-content:space-between; }
.rc-brand { display:flex; align-items:center; gap:11px; color:#fff !important; text-decoration:none; }
.rc-sidebar .rc-brand { margin-left:10px; }
.rc-brand-mark { display:grid; place-items:center; width:36px; height:40px; color:white; background:var(--rc-red); font-size:26px; font-weight:750; line-height:1; border-radius:6px 6px 12px 6px; position:relative; }
.rc-brand-mark>span { position:absolute; width:10px; height:3px; background:#f3a7b4; bottom:5px; right:5px; transform:rotate(-28deg); }
.rc-brand-word { font-size:18px; letter-spacing:2px; font-weight:750; }
.rc-brand-word small { font-size:8px; color:#9caac0; letter-spacing:1.8px; margin-top:3px; }
.rc-studio-label { margin:30px 10px 28px; font-size:12px; padding-bottom:22px; border-bottom:1px solid #293243; display:flex; gap:8px; align-items:center; color:#adb9cd; }
.rc-studio-dot { width:6px; height:6px; background:#6ca78c; border-radius:50%; }
.rc-nav-label { margin:0 12px 10px !important; text-transform:uppercase; color:#8f9db4; letter-spacing:1.4px; font-size:10px; font-weight:650; }
.rc-sidebar nav { display:grid; gap:5px; }
.rc-nav-item { display:flex; align-items:center; gap:12px; min-height:43px; padding:10px 13px; border-radius:6px; color:#b7c3d7 !important; text-decoration:none; font-size:13px; position:relative; }
.rc-nav-item:hover { background:var(--rc-sidebar-hover); color:#fff !important; }
.rc-nav-item[aria-current] { background:#352332; color:#fff !important; font-weight:600; }
.rc-nav-item[aria-current]::before { content:""; position:absolute; inset:10px auto 10px 0; width:3px; background:#e04460; border-radius:2px; }
.rc-nav-item[aria-current]>.rc-icon { color:#f0758b; }
.rc-sidebar-footer { margin-top:auto; padding:24px 8px 0; }
.rc-account { display:flex; gap:10px; align-items:center; padding-top:20px; border-top:1px solid #293243; margin-bottom:16px; }
.rc-avatar { width:33px; height:33px; display:grid; place-items:center; background:#2d384d; border:1px solid #414b5e; border-radius:50%; color:#ecf0f7; flex-shrink:0; font-size:12px; font-weight:600; }
.rc-account>div { min-width:0; }
.rc-account strong { font-size:12px; font-weight:600; color:#e6ecf6; }
.rc-account small { font-size:10px; color:#9baac0; overflow-wrap:anywhere; }
.rc-sidebar-footer .rc-btn { width:100%; color:#b9c6d9; border-color:#344055; background:transparent; justify-content:center; min-height:34px; font-size:12px; }
.rc-sidebar-footer .rc-btn:hover { background:#273248; color:white; }
.rc-workspace { margin-left:240px; min-width:0; }
.rc-topbar { height:64px; display:flex; align-items:center; justify-content:space-between; padding:0 36px; background:#fff; border-bottom:1px solid var(--rc-border); }
.rc-topbar-context { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--rc-muted); }
.rc-topbar-context strong { color:#344155; font-weight:500; }
.rc-breadcrumb-separator { color:#acb4c1; }
.rc-topbar-role { display:flex; align-items:center; gap:7px; font-size:11px; color:var(--rc-muted); }
.rc-topbar-role .rc-icon { width:15px; height:15px; }
.rc-content { max-width:1680px; margin:0 auto; padding:32px 36px 20px; }
.rc-page-header { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:12px; }
.rc-eyebrow { font-size:9px; letter-spacing:1.6px; color:var(--rc-muted); font-weight:650; margin-bottom:8px; }
.rc-intro { color:var(--rc-muted); margin-bottom:28px; max-width:760px; font-size:13px; }
.rc-workspace-footer { display:flex; justify-content:space-between; border-top:1px solid var(--rc-border); margin-top:36px; padding-top:16px; gap:12px; color:#697589; font-size:10px; }
.rc-btn { display:inline-flex; align-items:center; justify-content:center; gap:8px; min-height:40px; padding:9px 15px; border:1px solid #cdd5e0; border-radius:var(--rc-control-radius); background:var(--rc-surface); color:#344155 !important; font:600 12px/1.4 var(--rc-font); cursor:pointer; text-decoration:none; white-space:nowrap; transition:background .15s,border-color .15s; }
.rc-btn:hover { background:#f3f5f8; border-color:#aab6c7; }
.rc-btn--primary { background:var(--rc-red); border-color:var(--rc-red); color:#fff !important; box-shadow:0 1px 2px #721a2520; }
.rc-btn--primary:hover { background:var(--rc-red-hover); border-color:var(--rc-red-hover); }
.rc-btn--ghost { border-color:transparent; background:transparent; box-shadow:none; }
.rc-btn--danger { border-color:#efc4ce; background:#fff6f7; color:var(--rc-danger) !important; }
.rc-btn--danger:hover { background:#ffe8ed; border-color:#d49ca9; }
.rc-btn--small { min-height:30px; padding:5px 10px; font-size:11px; }
.rc-btn:disabled { opacity:.5; cursor:not-allowed; }
.rc-icon-button { padding:8px; min-width:36px; }
.rc-card { background:var(--rc-surface); border:1px solid var(--rc-border); border-radius:var(--rc-radius); padding:24px; margin-bottom:24px; box-shadow:var(--rc-shadow); }
.rc-card-header { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:16px; }
.rc-card-header h2 { margin-bottom:0; }
.rc-card-body { padding-top:8px; }
.rc-stat-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin-bottom:28px; }
.rc-stat-card { display:flex; flex-direction:column; text-decoration:none; color:var(--rc-ink) !important; padding:20px 22px; margin:0; min-width:0; }
.rc-stat-card:hover { border-color:#bd98a2; box-shadow:0 3px 10px #20293808; }
.rc-stat-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; font-size:12px; font-weight:600; color:#526075; }
.rc-icon-tile { display:inline-flex; align-items:center; justify-content:center; width:34px; height:34px; border-radius:7px; background:#f3f5f8; color:#69788f; flex-shrink:0; }
.rc-stat-value { font-size:32px; line-height:1.15; letter-spacing:-1px; font-weight:650; font-variant-numeric:tabular-nums; margin:10px 0; }
.rc-stat-card small { font-size:11px; max-width:270px; margin-bottom:18px; }
.rc-stat-footer { display:flex; align-items:center; justify-content:space-between; margin-top:auto; padding-top:12px; border-top:1px solid #edf0f5; color:#7c3445; font-size:11px; font-weight:600; }
.rc-stat-footer .rc-icon { width:15px; height:15px; }
.rc-toolbar { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 24px; }
.rc-toolbar p { margin:0; color:var(--rc-muted); font-size:13px; }
.rc-filters { display:flex; align-items:end; gap:12px; margin-bottom:20px; padding:16px; border:1px solid var(--rc-border); background:#fff; border-radius:8px; }
.rc-filters .rc-field:first-of-type { flex:1; }
.rc-filters .rc-field { min-width:160px; margin:0; }
.rc-table-wrap { width:100%; overflow:auto; }
.rc-table { width:100%; border-collapse:collapse; text-align:left; font-variant-numeric:tabular-nums; }
.rc-table th { font-size:10px; font-weight:650; letter-spacing:.7px; text-transform:uppercase; color:#66748a; background:#f7f9fb; padding:12px 14px; border-bottom:1px solid var(--rc-border); white-space:nowrap; }
.rc-table td { padding:13px 14px; border-bottom:1px solid #e9edf3; font-size:13px; vertical-align:middle; }
.rc-table tbody tr:hover { background:#fbfcfe; }
.rc-table td strong { font-weight:600; }
.rc-table td small { font-size:11px; margin-top:3px; }
.rc-table td:last-child a { white-space:nowrap; font-size:12px; font-weight:600; }
.rc-table td .rc-badge { margin:2px 0; }
.rc-empty-state { text-align:center; padding:40px 24px !important; color:var(--rc-muted); line-height:1.7; }
.rc-pagination { display:flex; gap:20px; justify-content:flex-end; align-items:center; font-size:12px; padding-top:18px; color:var(--rc-muted); }
.rc-badge { display:inline-flex; align-items:center; gap:6px; border-radius:5px; padding:4px 8px; font-size:10px; font-weight:600; background:#edf0f5; color:#526075; line-height:1.4; }
.rc-badge-dot { width:5px; height:5px; background:currentColor; border-radius:50%; flex-shrink:0; }
.rc-badge--success { background:#e9f4ee; color:var(--rc-success); }
.rc-badge--info { background:#eaf1fd; color:var(--rc-info); }
.rc-badge--review { background:#f0ebf9; color:var(--rc-review); }
.rc-badge--warning { background:#fbf2dd; color:var(--rc-warning); }
.rc-badge--danger { background:#fbe9ed; color:var(--rc-danger); }
.rc-form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 24px; margin-bottom:24px; }
.rc-field { display:block; font-size:12px; font-weight:600; color:#415067; }
.rc-input,.rc-select,.rc-textarea { display:block; width:100%; min-height:40px; border:1px solid #cbd4e0; border-radius:var(--rc-control-radius); background:white; color:var(--rc-ink); font:400 14px/1.5 var(--rc-font); padding:8px 11px; margin-top:7px; }
.rc-input:hover,.rc-select:hover,.rc-textarea:hover { border-color:#9eabc0; }
.rc-input:focus,.rc-select:focus,.rc-textarea:focus { border-color:var(--rc-focus); }
.rc-input[aria-invalid=true],.rc-select[aria-invalid=true] { border-color:var(--rc-danger); }
.rc-input:disabled,.rc-select:disabled { color:#788396; background:#f3f5f8; }
.rc-input[type=color] { height:40px; padding:4px; max-width:120px; }
.rc-field small { font-weight:400; margin-top:6px; font-size:11px; }
.rc-field-error { color:var(--rc-danger); font-size:12px; margin-top:5px; }
.rc-textarea { resize:vertical; min-height:104px; }
.rc-check { display:flex; align-items:center; gap:9px; color:#47556b; font-size:12px; font-weight:500; margin:12px 0; }
.rc-check input { width:16px; height:16px; margin:0; accent-color:var(--rc-red); flex-shrink:0; }
.rc-checks { align-self:center; }
.rc-full { grid-column:1/-1; }
.rc-form-actions { display:flex; align-items:center; gap:12px; padding-top:20px; border-top:1px solid #edf0f5; }
.rc-muted { color:var(--rc-muted); font-size:12px; line-height:1.7; }
.rc-alert { display:flex; align-items:flex-start; gap:10px; border:1px solid var(--rc-border); padding:12px 16px; border-radius:6px; margin-bottom:22px; font-size:13px; }
.rc-alert--success { color:var(--rc-success); background:#eef8f2; border-color:#cde7d8; }
.rc-alert--danger { color:var(--rc-danger); background:#fff1f3; border-color:#edc6ce; }
.rc-danger-panel { border-color:#e9cbd2; }
.rc-danger-panel h2 { color:#8e2a3e; }
.rc-danger-panel p { color:var(--rc-muted); font-size:13px; }
.rc-danger-panel button { margin-top:10px; }
.rc-facts { display:grid; grid-template-columns:140px 1fr; gap:14px 20px; font-size:13px; margin:0; }
.rc-facts dt { color:var(--rc-muted); }
.rc-facts dd { margin:0; overflow-wrap:anywhere; }
.rc-dialog { width:min(460px,calc(100% - 32px)); padding:28px; border:1px solid var(--rc-border); border-radius:12px; color:var(--rc-ink); box-shadow:0 24px 80px #10182740; }
.rc-dialog::backdrop { background:#111b2a80; }
.rc-dialog-heading { display:flex; justify-content:space-between; align-items:center; margin-bottom:20px; }
.rc-icon-tile--danger { color:var(--rc-danger); background:#fbe9ed; }
.rc-dialog p { font-size:13px; line-height:1.7; color:var(--rc-muted); }
.rc-dialog-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:28px; padding-top:20px; border-top:1px solid var(--rc-border); }
.rc-nav-toggle,.rc-nav-close,.rc-nav-backdrop { display:none; }
@media(min-width:1500px) { .rc-content { padding:40px 48px 24px; } .rc-topbar { padding:0 48px; } }
@media(max-width:1100px) { .rc-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .rc-content { padding:28px 24px 20px; } .rc-topbar { padding:0 24px; } }
@media(max-width:800px) {
  .rc-sidebar { position:static; width:auto; padding:20px; }
  .rc-workspace { margin-left:0; }
  .rc-content { padding:24px 20px; }
  .rc-topbar { padding:0 20px; height:56px; }
  .rc-sidebar nav { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .rc-has-js .rc-sidebar { position:fixed; width:270px; transform:translateX(-100%); transition:transform .2s ease; }
  .rc-has-js .rc-sidebar nav { grid-template-columns:1fr; }
  .rc-has-js .rc-nav-toggle,.rc-has-js .rc-nav-close { display:inline-flex; }
  .rc-nav-close { color:#fff !important; padding:7px; }
  .rc-nav-open { overflow:hidden; }
  .rc-nav-open .rc-sidebar { transform:translateX(0); }
  .rc-nav-open .rc-nav-backdrop { display:block; position:fixed; inset:0; z-index:25; border:0; background:#111b2a80; }
  .rc-page-header>.rc-badge { display:none; }
  .rc-app h1 { font-size:25px; }
  .rc-toolbar { align-items:flex-start; flex-direction:column; gap:14px; }
  .rc-form-grid { grid-template-columns:1fr; }
  .rc-filters { flex-wrap:wrap; }
  .rc-filters .rc-field:first-of-type { flex-basis:100%; }
  .rc-card { padding:20px; }
  .rc-stat-card { padding:16px; }
  .rc-workspace-footer { flex-direction:column; gap:4px; }
}
@media(max-width:460px) { .rc-stat-grid { grid-template-columns:1fr; } .rc-topbar-role { display:none; } .rc-facts { grid-template-columns:1fr; gap:5px; } .rc-facts dd { margin-bottom:12px; } .rc-card-header { align-items:flex-start; } }
@media(prefers-reduced-motion:reduce) { .rc-app * { transition:none !important; scroll-behavior:auto !important; } }
.rc-status-swatch{width:18px;height:18px;padding:0;border:0;background:transparent;vertical-align:middle;margin-right:8px;opacity:1}.rc-status-swatch::-webkit-color-swatch-wrapper{padding:2px}.rc-status-swatch::-webkit-color-swatch{border:0;border-radius:3px}

.rc-image-viewer { width:96vw; max-width:1600px; height:92vh; max-height:96vh; padding:0; border:1px solid #394456; border-radius:12px; background:#111827; color:#eef2f7; overflow:hidden; }
.rc-image-viewer[open] { display:flex; flex-direction:column; }
.rc-image-viewer::backdrop { background:rgba(5,10,20,.85); }
.rc-image-toolbar,.rc-image-controls { display:flex; align-items:center; gap:12px; padding:12px 18px; flex-wrap:wrap; border-bottom:1px solid #394456; }
.rc-image-toolbar strong { flex:1; overflow-wrap:anywhere; }
.rc-image-controls { justify-content:center; }
.rc-image-viewer button { border:1px solid #536077; border-radius:6px; background:#243044; color:#fff; padding:8px 14px; cursor:pointer; font:inherit; }
.rc-image-viewer button:disabled { opacity:.4; cursor:default; }
.rc-image-viewer button:focus-visible { outline:2px solid #fff; outline-offset:3px; }
.rc-image-viewport { flex:1; min-height:0; overflow:auto; padding:16px; }
.rc-image-viewport img { display:block; max-width:none; max-height:none; margin:auto; object-fit:contain; }
.rc-image-viewport img[hidden],.rc-image-viewport [hidden] { display:none; }
.rc-image-viewer footer { padding:10px 18px; font-size:12px; color:#b7c3d5; }
.rc-image-viewer output { min-width:100px; text-align:center; }
.rc-header-actions { display:flex; align-items:center; gap:20px; }
.rc-header-search { display:flex; align-items:center; border:1px solid #dce3ec; border-radius:8px; background:#f6f8fb; overflow:hidden; }
.rc-header-search input { width:180px; min-width:0; padding:9px 12px; border:0; background:transparent; font:inherit; font-size:12px; }
.rc-header-search button { display:flex; padding:8px; background:transparent; border:0; cursor:pointer; color:#607086; }
@media(max-width:700px) { .rc-header-search { display:none; } }
.rc-notification-bell { position:relative; }
.rc-notification-bell > summary { display:flex; align-items:center; cursor:pointer; position:relative; padding:9px; list-style:none; border-radius:8px; }
.rc-notification-bell > summary::-webkit-details-marker { display:none; }
.rc-notification-bell > summary:focus-visible { outline:2px solid #bc1735; }
.rc-notification-count { position:absolute; right:-3px; top:-2px; background:#bc1735; color:white; border-radius:12px; padding:2px 5px; font-size:11px; min-width:18px; text-align:center; }
.rc-notification-count[hidden] { display:none; }
.rc-notification-dropdown { position:absolute; right:0; top:48px; width:min(390px,85vw); max-height:70vh; overflow:auto; padding:16px; border:1px solid #dce3ec; border-radius:12px; background:white; box-shadow:0 12px 36px #11182726; z-index:100; }
.rc-notification-item { display:flex; flex-direction:column; gap:6px; text-align:left; width:100%; background:white; border:0; border-bottom:1px solid #e6ebf2; padding:14px 10px; cursor:pointer; font:inherit; color:#172337; }
.rc-notification-item--unread { border-left:3px solid #bc1735; background:#fff6f7; }
.rc-notification-item span,.rc-notification-item small { font-size:12px; color:#586780; }
.rc-design-pdf { width:100%; flex:1; min-height:0; border:0; background:white; }
.rc-audit-timeline { list-style:none; padding:0; margin:24px 0; }
.rc-audit-timeline li { display:grid; grid-template-columns:160px minmax(0,1fr); gap:24px; padding:0 0 28px; }
.rc-audit-timeline time { color:#617089; font-size:13px; padding-top:4px; }
.rc-audit-timeline li > div { position:relative; border-left:2px solid #dce3ec; padding-left:24px; }
.rc-audit-timeline li > div::before { content:''; position:absolute; left:-6px; top:5px; width:10px; height:10px; border-radius:50%; background:#ba1735; }
.rc-audit-timeline p { margin:7px 0; }
@media(max-width:650px) { .rc-audit-timeline li { grid-template-columns:1fr; gap:8px; } }
.rc-image-toolbar [data-image-close] { margin-left:auto; font-size:20px; }
.rc-review-workspace { display:grid; grid-template-columns:minmax(0,2fr) minmax(300px,1fr); gap:24px; align-items:start; margin-top:24px; }
.rc-review-decision { position:sticky; top:20px; }
.rc-review-decision form { padding:16px 0; border-top:1px solid #dce3ec; }
.rc-review-decision textarea { min-height:110px; }
.rc-review-decision button { width:100%; margin-top:12px; }
.rc-submission-files { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:20px; }
.rc-submission-files > div { min-width:0; overflow-wrap:anywhere; }
.rc-submission-files .rc-work-preview { width:100%; height:180px; object-fit:contain; background:#eef2f6; }
@media(max-width:900px) { .rc-review-workspace { grid-template-columns:1fr; } .rc-review-decision { position:static; grid-row:1; } }
