:root {
  --navy: #25313a;
  --blue: #347fbd;
  --sky: #eef3f6;
  --accent: #e9794e;
  --paper: #f4f7fa;
  --ink: #182634;
  --muted: #667788;
  --line: #d9e1e8;
  --white: #ffffff;
  --red: #9b1c1c;
  --gold: #7a5a00;
  --green: #176b4d;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); line-height: 1.45; }
a { color: var(--blue); }
.topbar { height: 78px; padding: 0 max(24px, calc((100vw - 1240px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--white); color: var(--navy); border-bottom: 1px solid var(--line); box-shadow: 0 4px 18px rgba(37,49,58,.06); }
.brand { color: inherit; text-decoration: none; display: flex; gap: 12px; align-items: center; }
.brand-mark { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; gap: 2px; flex: 0 0 auto; padding: 4px 7px; background: #1f2530; }
.brand-mark i { display: block; width: 3px; border-radius: 1px; height: 27px; }
.brand-mark i:nth-child(1) { height: 15px; background: #e54186; }
.brand-mark i:nth-child(2) { height: 25px; background: #ec3d46; }
.brand-mark i:nth-child(3) { height: 31px; background: #f28a32; }
.brand-mark i:nth-child(4) { height: 34px; background: #f4c52d; }
.brand-mark i:nth-child(5) { height: 30px; background: #5ac26d; }
.brand-mark i:nth-child(6) { height: 34px; background: #27a9d6; }
.brand-mark i:nth-child(7) { height: 27px; background: #3874c9; }
.brand-mark i:nth-child(8) { height: 19px; background: #6d59bb; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 15px; letter-spacing: .04em; font-weight: 900; }
.brand strong b { font-weight: 900; }
.brand strong em { font-style: normal; font-weight: 350; letter-spacing: -.05em; }
.brand small { color: var(--muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; }
.local-pill { font-size: 12px; border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px; color: var(--green); font-weight: 800; }
.main-nav { display: flex; gap: 4px; align-items: center; margin-left: auto; margin-right: 22px; }
.main-nav a { color: var(--navy); text-decoration: none; font-size: 13px; padding: 9px 11px; border-radius: 7px; white-space: nowrap; font-weight: 850; border: 1px solid transparent; transition: filter .15s, transform .15s; }
.main-nav a:hover { filter: brightness(.95); transform: translateY(-1px); }
.main-nav .nav-productions { background: #fff0e8; border-color: #f4c4ad; }
.main-nav .nav-new { background: #eaf3fb; border-color: #b9d8ee; }
.main-nav .nav-talents { background: #eaf7f0; border-color: #b9dfca; }
.main-nav .nav-profiles { background: #fff8dc; border-color: #ead68a; }
.main-nav .nav-liquidations { background: #f2ebfb; border-color: #d6c2ee; }
.main-nav .nav-users { background: #fdeaf1; border-color: #efbfd0; }
.main-nav .nav-settings { background: #e8f6f4; border-color: #b8ddd8; }
.main-nav .nav-subtitles { background: #f1edff; border-color: #cfc4ef; }
.user-box { display: flex; gap: 12px; align-items: center; font-size: 12px; }
.user-box span, .user-box small { display: block; }
.user-box { font-weight: 800; }
.user-box small { color: var(--muted); font-weight: 700; }
.user-box form { margin: 0; }
.user-box button { border: 1px solid var(--line); background: transparent; color: var(--navy); padding: 6px 9px; cursor: pointer; font-weight: 800; }
main { max-width: 1240px; margin: 0 auto; padding: 48px 24px 80px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 56px; align-items: center; padding: 28px 0 38px; }
.eyebrow { margin: 0 0 8px; color: var(--blue); font-weight: 800; font-size: 12px; letter-spacing: .14em; }
h1 { margin: 0; color: var(--navy); font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -.035em; }
h2 { margin: 0; color: var(--navy); font-size: 25px; }
h3 { color: var(--navy); }
.lead { color: var(--muted); font-size: 18px; max-width: 810px; }
.privacy-card { background: var(--white); color: var(--navy); padding: 26px; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; border-left: 5px solid var(--accent); box-shadow: 0 14px 36px rgba(37,49,58,.08); }
.privacy-card span { color: var(--muted); }
.panel { background: var(--white); padding: 30px; margin: 24px 0; border: 1px solid var(--line); box-shadow: 0 8px 30px rgba(34,55,77,.06); }
.upload-panel { max-width: 820px; margin-inline: auto; }
.dropzone { margin: 22px 0 18px; min-height: 190px; border: 2px dashed #93abc0; background: #f8fbfd; display: grid; place-content: center; text-align: center; padding: 30px; cursor: pointer; transition: .18s; }
.dropzone:hover, .dropzone.drag { border-color: var(--blue); background: #eef6fc; transform: translateY(-1px); }
.dropzone input { position: absolute; opacity: 0; pointer-events: none; }
.drop-title { color: var(--navy); font-size: 17px; font-weight: 750; }
.drop-help { color: var(--muted); font-size: 13px; margin-top: 8px; }
.button { display: inline-flex; justify-content: center; border: 0; padding: 12px 20px; font-weight: 750; text-decoration: none; cursor: pointer; }
.button.primary { background: var(--blue); color: var(--white); }
.button:hover { filter: brightness(.94); }
.text-link { display: inline-block; margin: 12px 0 0 18px; font-weight: 650; }
.rules-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.rules-grid article { background: var(--white); border-top: 4px solid var(--blue); padding: 22px; }
.rules-grid article > span { color: #91a5b6; font-weight: 800; }
.rules-grid h3 { margin-bottom: 4px; }
.rules-grid p { margin: 0; color: var(--muted); }
.crumbs { display: flex; gap: 10px; font-size: 13px; color: var(--muted); margin-bottom: 28px; }
.result-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; }
.result-head h1 { font-size: 39px; overflow-wrap: anywhere; }
.hash { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.status { padding: 9px 14px; border-radius: 999px; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.status.ok { background: #dff3e9; color: var(--green); }
.status.warn { background: #fff2c9; color: var(--gold); }
.status.error { background: #fde4e4; color: var(--red); }
.kpi-grid { margin: 28px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.kpi-grid article { background: var(--white); color: var(--navy); padding: 18px; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; border-top: 4px solid var(--accent); border-left: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.kpi-grid span { color: var(--muted); font-size: 12px; font-weight: 700; }
.kpi-grid strong { font-size: 28px; }
.section-title { display: flex; justify-content: space-between; align-items: end; gap: 30px; margin-bottom: 22px; }
.section-title > p { max-width: 560px; color: var(--muted); margin: 0; }
.process-form { display: grid; gap: 16px; }
.config-box { border: 1px solid var(--line); padding: 20px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.config-box legend { padding: 0 8px; color: var(--navy); font-weight: 800; }
.config-box label { display: grid; gap: 6px; font-weight: 700; color: var(--navy); }
.config-box label.wide { grid-column: 1 / -1; }
.config-box small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid #aebdca; padding: 10px 12px; font: inherit; color: var(--ink); background: var(--white); }
textarea { resize: vertical; }
.download-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.download-card { border: 1px solid var(--line); text-decoration: none; color: var(--navy); padding: 17px; min-height: 82px; display: flex; flex-direction: column; justify-content: space-between; }
.download-card:hover { border-color: var(--blue); background: #f5faff; }
.download-card strong { color: var(--blue); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.table-wrap { overflow: auto; border: 1px solid var(--line); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #f0f3f5; color: var(--navy); text-align: left; padding: 11px; position: sticky; top: 0; border-bottom: 2px solid var(--accent); font-weight: 900; }
td { border-bottom: 1px solid var(--line); padding: 11px; vertical-align: top; min-width: 90px; }
tbody tr:nth-child(even) { background: #f8fafc; }
.severity { white-space: nowrap; border-radius: 999px; padding: 4px 8px; font-size: 11px; font-weight: 750; }
.sev-error { background: #fde4e4; color: var(--red); }
.sev-warn { background: #fff2c9; color: var(--gold); }
.sev-info { background: #e5f1fb; color: #1f5d8d; }
.empty-state { color: var(--muted); text-align: center; padding: 28px; }
.alert { padding: 14px 18px; margin: 18px 0; border-left: 4px solid; }
.alert.error { color: var(--red); background: #fdecec; border-color: var(--red); }
.alert.info { color: var(--navy); background: #eaf3fa; border-color: var(--blue); }
.alert.warn { color: var(--gold); background: #fff5d6; border-color: #d8a51b; }
.alert.success { color: var(--green); background: #e7f6ee; border-color: var(--green); }
.auth-card { max-width: 580px; margin: 40px auto; }
.auth-card h1 { font-size: 44px; }
.stack-form { display: grid; gap: 16px; margin: 24px 0; }
.stack-form label, .inline-form label, .month-picker label { color: var(--navy); font-weight: 700; display: grid; gap: 6px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; margin-bottom: 30px; }
.page-head h1 { font-size: 48px; }
.muted { color: var(--muted); }
.production-search { display: flex; align-items: end; gap: 10px; padding: 18px; margin-bottom: 30px; background: white; border: 1px solid var(--line); }
.production-search label { flex: 1; display: grid; gap: 6px; color: var(--navy); font-weight: 700; }
.production-group { margin: 34px 0 48px; }
.group-title { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.group-title span { min-width: 28px; height: 28px; padding: 4px 8px; border-radius: 999px; background: var(--sky); color: var(--navy); text-align: center; font-size: 13px; font-weight: 800; }
.production-list { display: grid; gap: 20px; }
.production-card { background: white; border: 1px solid var(--line); padding: 28px; box-shadow: 0 8px 30px rgba(34,55,77,.05); display: grid; grid-template-columns: 1.25fr 1fr auto; gap: 24px; align-items: center; }
.production-main { display: flex; align-items: center; gap: 18px; min-width: 0; }
.production-main h2 { overflow-wrap: anywhere; }
.progress-ring { --progress: 0; position: relative; width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--blue) calc(var(--progress) * 1%), #e0e8ef 0); color: var(--blue); font-weight: 800; flex: 0 0 auto; }
.progress-ring::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: white; }
.progress-ring > span { position: relative; z-index: 1; text-align: center; line-height: 1.05; }
.progress-ring small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .04em; }
.production-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; font-size: 12px; color: var(--muted); }
.production-stats strong { display: block; color: var(--navy); font-size: 16px; }
.production-actions { display: grid; gap: 8px; }
.production-delete-form { margin-top: 8px; }
.production-delete-form .button.danger { width: 100%; background: #fff1f0; color: #b42318; border: 1px solid #f3b3ad; }
.production-delete-form .button.danger:hover { background: #fee4e2; }
.card-warning { grid-column: 1 / -1; margin: 0; padding: 12px 14px; border: 1px solid #f0b8b8; border-radius: 10px; background: #fff4f4; color: #8b1f1f; font-weight: 700; }
.inline-form { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.inline-form label { flex: 1 1 150px; }
.inline-form .button { margin-bottom: 0; }
.cell-form { display: flex; gap: 7px; min-width: 330px; }
.cell-form button, .assign-form button, .row-menu button { border: 0; background: #e6f1fa; color: var(--blue); font-weight: 700; cursor: pointer; padding: 8px 10px; }
.block { display: block; color: var(--muted); margin-top: 3px; }
.secret-box code { display: block; padding: 14px; margin: 18px 0; background: #132b42; color: #cde7d9; overflow-wrap: anywhere; }
.callout { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-left: 5px solid var(--blue); }
.summary-strip { background: white; border: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, 1fr); margin: 24px 0; }
.summary-strip article { padding: 20px; border-right: 1px solid var(--line); }
.summary-strip article:last-child { border-right: 0; }
.summary-strip strong, .summary-strip span { display: block; }
.summary-strip strong { color: var(--navy); font-size: 24px; }
.summary-strip span { color: var(--muted); font-size: 12px; }
.finance-form { margin: 0; min-width: 440px; }
.metadata-editor summary { display: flex; justify-content: space-between; gap: 20px; color: var(--navy); cursor: pointer; }
.metadata-editor summary span { color: var(--muted); font-size: 13px; }
.metadata-editor[open] summary { margin-bottom: 20px; }
.breakdown-head, .breakdown-row { display: grid; grid-template-columns: 34px minmax(220px, 1.3fr) minmax(190px, 1fr) 110px 170px 44px; gap: 14px; align-items: center; }
.breakdown-head { padding: 17px 20px; color: var(--muted); font-size: 12px; }
.breakdown-row { background: white; border: 1px solid var(--line); border-left: 4px solid #e7aa00; padding: 14px 16px; margin: 7px 0; min-height: 86px; }
.breakdown-row:has(.state-dot.assigned) { border-left-color: #4a9ff0; }
.breakdown-row:has(.state-dot.sent) { border-left-color: #f1ad00; }
.breakdown-row:has(.state-dot.accepted) { border-left-color: #7a5ce6; }
.breakdown-row:has(.state-dot.liquidated) { border-left-color: #1a8a61; }
.state-dot, .signature-dot { display: inline-block; width: 24px; height: 24px; border-radius: 50%; background: #ef8a2f; border: 3px solid #fff; box-shadow: 0 0 0 1px #d0dae3; }
.state-dot.pending { background: #ef8a2f; }
.state-dot.assigned { background: #4a9ff0; }
.state-dot.sent { background: #7a4bd4; }
.state-dot.accepted { background: #2bb673; }
.state-dot.liquidated { background: #1a8a61; }
.state-menu { position: relative; }
.state-menu summary { list-style: none; cursor: pointer; }
.state-menu summary::-webkit-details-marker { display: none; }
.state-menu > div { position: absolute; left: 0; top: 34px; z-index: 12; width: 330px; max-height: 70vh; overflow: auto; padding: 14px; background: white; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(23,50,77,.2); }
.state-menu form { display: grid; gap: 7px; margin: 10px 0; padding-top: 10px; border-top: 1px solid var(--line); }
.state-menu label { display: grid; gap: 5px; font-size: 12px; color: var(--navy); font-weight: 700; }
.state-menu button, .talent-editor button, #nuevo-talento button { border: 0; background: #e6f1fa; color: var(--blue); font-weight: 750; cursor: pointer; padding: 9px 10px; }
.state-menu button:disabled { opacity: .5; cursor: default; }
.state-menu a { color: var(--blue); font-size: 12px; font-weight: 700; }
.talent-editor summary { color: var(--blue); cursor: pointer; font-weight: 700; }
.talent-editor form { min-width: 290px; margin: 10px 0 0; }
.replace-script { display: flex; align-items: end; justify-content: space-between; gap: 24px; border-left: 5px solid #e7aa00; }
.replace-script > div { max-width: 700px; }
.replace-script form { min-width: 330px; display: grid; gap: 10px; }
.assign-form { display: flex; gap: 7px; }
.assign-form select { min-width: 0; }
.number strong, .number small { display: block; }
.number { text-align: right; }
.number small { color: var(--muted); font-size: 10px; }
.row-menu { position: relative; }
.row-menu summary { list-style: none; cursor: pointer; font-size: 18px; color: var(--muted); text-align: center; }
.row-menu > div { position: absolute; right: 0; top: 30px; z-index: 5; width: 270px; padding: 14px; background: white; border: 1px solid var(--line); box-shadow: 0 12px 30px rgba(23,50,77,.18); }
.row-menu form { display: grid; gap: 8px; margin: 8px 0; }
.row-menu .danger { background: #fde7e7; color: var(--red); }
.table-wrap .inline-form { display: block; margin: 8px 0 0; }
.table-wrap .danger { border: 1px solid #e7b5b5; background: #fde7e7; color: var(--red); padding: 7px 10px; font-weight: 800; cursor: pointer; }
.rule-note { border-left: 4px solid var(--blue); background: #eaf3fa; color: var(--navy); padding: 16px 18px; margin: 24px 0; }
.month-picker { display: flex; align-items: end; gap: 10px; }
.action-bar { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0; }
.action-bar form { margin: 0; }
.subtabs { display: flex; gap: 8px; margin: 18px 0; }
.subtabs a { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); background: #fff; font-weight: 700; text-decoration: none; }
.subtabs a.active { color: #fff; background: var(--blue); border-color: var(--blue); }
.select-all-control { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; padding: 9px 4px; }
.signature-dot { width: 18px; height: 18px; background: #9aa8b5; border: 0; box-shadow: none; }
.signature-dot.status-sent { background: #7a4bd4; }
.signature-dot.status-accepted_explicit, .signature-dot.status-accepted_automatic { background: #2bb673; }
.signature-dot.status-liquidated { background: #1a8a61; }
.subtitle-list { display: grid; gap: 16px; }
.subtitle-card { display: flex; align-items: center; justify-content: space-between; gap: 24px; background: var(--white); border: 1px solid var(--line); padding: 24px; box-shadow: 0 8px 30px rgba(34,55,77,.05); }
.subtitle-card h2 { overflow-wrap: anywhere; }
.subtitle-card .production-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subtitle-create-form { max-width: 780px; }
.subtitle-workspace { display: grid; gap: 18px; }
.subtitle-video { position: relative; overflow: hidden; background: #17212b; color: #dbe8ef; }
.subtitle-video video { display: block; width: 100%; max-height: 66vh; background: #000; }
.subtitle-overlay { display: none; position: absolute; z-index: 2; transform: translate(-50%, -50%); max-width: 80%; padding: 7px 12px; color: #fff; background: rgba(0,0,0,.78); border-radius: 3px; text-align: center; white-space: pre-line; font-size: clamp(14px, 2vw, 24px); line-height: 1.2; pointer-events: none; }
.waveform-panel { margin-top: 16px; padding: 16px; border: 1px solid rgba(190, 207, 220, .55); border-radius: 8px; background: #f7fafc; color: var(--navy); }
.waveform-panel .section-title { margin-bottom: 10px; }
#subtitle-waveform { display: block; width: 100%; height: 150px; border: 1px solid #c8d7e3; border-radius: 6px; background: #12202c; cursor: crosshair; }
.waveform-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 7px; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.video-placeholder { min-height: 230px; display: grid; place-items: center; text-align: center; color: #aebdca; background: #17212b; padding: 30px; }
.cue-row { display: grid; grid-template-columns: 34px 165px 165px minmax(230px, 1fr) 110px 120px auto auto; gap: 8px; align-items: end; border: 1px solid var(--line); border-left: 4px solid var(--blue); padding: 12px; margin: 8px 0; background: #fbfcfd; }
.cue-row label, .cue-add label { display: grid; gap: 5px; color: var(--navy); font-size: 12px; font-weight: 800; }
.cue-row textarea { min-height: 54px; }
.cue-number { color: var(--muted); font-weight: 900; padding: 10px 0; text-align: center; }
.cue-row .small { padding: 9px 11px; font-size: 12px; }
.cue-row .danger { border: 1px solid #e7b5b5; background: #fde7e7; color: var(--red); }
.cue-add { display: grid; grid-template-columns: 165px 165px minmax(230px, 1fr) 110px 120px auto; gap: 8px; align-items: end; border-top: 2px solid var(--line); padding-top: 18px; margin-top: 18px; }
.cue-add h3 { grid-column: 1 / -1; margin: 0; }
.qc-list { margin: 12px 0; padding: 12px 12px 12px 30px; background: #fff8e6; border-left: 4px solid #d8a51b; color: var(--gold); }
.spec-profile summary { cursor: pointer; color: var(--navy); font-size: 18px; }
.spec-profile[open] summary { margin-bottom: 16px; }
.project-settings summary { cursor: pointer; display: flex; justify-content: space-between; gap: 16px; color: var(--navy); }
.project-settings summary span { color: var(--muted); font-size: 13px; }
.project-settings[open] summary { margin-bottom: 14px; }
.processing-overlay { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(20,36,52,.35); align-items: center; justify-content: center; }
.processing-overlay.visible { display: flex; }
.processing-card { display: grid; gap: 8px; padding: 24px 30px; border-radius: 10px; background: #fff; box-shadow: 0 18px 50px rgba(23,50,77,.25); color: var(--navy); text-align: center; }
.processing-card strong { color: var(--blue); font-size: 20px; letter-spacing: .08em; }
.processing-card span { color: var(--muted); }
.line-break { margin-top: 4px; }
.timeline-track { position: relative; min-height: 58px; margin-top: 12px; border-radius: 7px; background: repeating-linear-gradient(90deg, #eef3f7 0, #eef3f7 9.9%, #dbe5ec 10%, #dbe5ec 10.1%); overflow: hidden; }
.timeline-cue { position: absolute; top: 10px; min-width: 4px; height: 38px; padding: 10px 5px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; border-radius: 4px; background: #6da9e3; color: #fff; font-size: 11px; font-weight: 700; box-sizing: border-box; }
.timeline-cue.graphic { background: #d178c7; }
.video-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #101a26; border-radius: 8px; overflow: hidden; }
.video-stage video { width: 100%; height: 100%; max-height: none; object-fit: contain; background: #000; }
.video-stage .subtitle-overlay { display: none; position: absolute; inset: 0; transform: none; max-width: none; padding: 0; background: transparent; border-radius: 0; font-size: clamp(14px, 2.2vw, 26px); line-height: 1.2; }
.transport-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 0; color: var(--muted); font-variant-numeric: tabular-nums; }
.transport-controls button { min-width: 70px; }
.timeline-track { cursor: crosshair; }
.timeline-playhead { position: absolute; z-index: 4; top: 0; bottom: 0; left: 0%; width: 2px; background: #e35d6a; box-shadow: 0 0 0 1px rgba(255,255,255,.5); pointer-events: none; }
.timeline-cue { z-index: 3; cursor: grab; user-select: none; touch-action: none; transition: outline .12s ease, filter .12s ease; }
.timeline-cue:focus, .timeline-cue.selected { outline: 3px solid #f3b640; outline-offset: 1px; filter: brightness(1.08); }
.timeline-cue.dragging { cursor: grabbing; opacity: .82; }
.cue-row.qc-error { border-left-color: #c83d4a; background: #fff1f2; }
.cue-row.qc-warning { border-left-color: #d8a51b; background: #fff9e8; }
.cue-qc-error, .cue-qc-warning { display: block; margin-top: 5px; font-size: 11px; }
.cue-qc-error { color: #b32638; font-weight: 800; }
.cue-qc-warning { color: #8a6500; font-weight: 800; }
.export-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 8px; margin-top: 8px; }
.export-grid form { margin: 0; }
.export-grid .button { width: 100%; }
@media (max-width: 1000px) { .cue-row, .cue-add { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cue-number { display: none; } .cue-text { grid-column: 1 / -1; } .subtitle-card { align-items: flex-start; flex-direction: column; } }
footer { color: #8393a2; text-align: center; padding: 28px; font-size: 12px; }
@media (max-width: 1150px) {
  .topbar { height: auto; min-height: 72px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 8px; }
  .main-nav { order: 3; width: 100%; margin: 7px 0 0; overflow-x: auto; border-top: 1px solid var(--line); padding-top: 5px; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 20px; }
  .rules-grid { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(3, 1fr); }
  .download-grid { grid-template-columns: repeat(2, 1fr); }
  .production-card { grid-template-columns: 1fr; }
  .breakdown-head { display: none; }
  .breakdown-row { grid-template-columns: 28px 1fr; }
  .breakdown-row > *:not(.state-dot):not(.state-menu) { grid-column: 2; }
  .number { text-align: left; }
}
@media (max-width: 620px) {
  main { padding: 30px 14px 60px; }
  .topbar { padding-inline: 14px; }
  .local-pill { display: none; }
  .rules-grid, .kpi-grid, .download-grid, .config-box { grid-template-columns: 1fr; }
  .section-title, .result-head { display: grid; }
  .page-head, .callout { display: grid; }
  .replace-script { display: grid; }
  .production-search { display: grid; }
  .summary-strip { grid-template-columns: repeat(2, 1fr); }
  .finance-form { min-width: 0; }
  .panel { padding: 20px; }
}
