:root{
  --bg:#eaf4fb;
  --card:#ffffff;
  --line:#d8e5f1;
  --text:#0f172a;
  --muted:#5f7188;
  --primary:#0b63ce;
  --primary-strong:#0a4f9f;
  --secondary:#0c8aa8;
  --soft:#eef8ff;
  --header-a:#0a57c6;
  --header-b:#0d839f;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  color:var(--text);
  background:
    radial-gradient(circle at top left, rgba(14,165,233,.16), transparent 28%),
    linear-gradient(180deg, #e7f4fb 0%, #eef5fb 220px, var(--bg) 100%);
}

.re-page{min-height:100vh; display:flex; flex-direction:column;}
.re-topbar{
  position:sticky; top:0; z-index:20;
  background:linear-gradient(90deg, var(--header-a) 0%, var(--header-b) 100%);
  border-bottom:none;
  box-shadow:0 8px 22px rgba(10,87,198,.18);
  padding:8px 14px;
  min-height:48px;
  display:flex; align-items:center; gap:10px; flex-wrap:wrap;
}
.re-title{display:flex; align-items:center; gap:10px; font-weight:800; color:#fff;}
.re-title > i{width:34px; height:34px; border-radius:12px; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.16); box-shadow:inset 0 1px 0 rgba(255,255,255,.14);}
.re-title span:first-of-type{font-size:16px; letter-spacing:.01em;}
.re-badge{font-weight:800; font-size:11px; padding:3px 8px; border-radius:999px; background:rgba(255,255,255,.16); color:#fff; border:1px solid rgba(255,255,255,.28);}
.re-actions{margin-left:auto; display:flex; align-items:center; gap:6px; flex-wrap:wrap;}
.sep{width:1px; height:22px; background:rgba(255,255,255,.24); margin:0 2px;}
.re-topbar .btn,
.re-topbar .select{
  min-height:32px;
  padding:0 12px;
  border-radius:10px;
  font-size:14px;
}

.btn{border:1px solid #cadced; background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%); padding:8px 12px; border-radius:12px; cursor:pointer; display:inline-flex; align-items:center; gap:8px; font-family:inherit; font-size:14px; font-weight:800; line-height:1.15; color:#12304d; box-shadow:0 4px 12px rgba(15,23,42,.05); transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, color .16s ease}
.btn:hover{border-color:#94bfe0; background:#fff; transform:translateY(-1px)}
.btn.primary{background:linear-gradient(135deg,var(--primary) 0%, var(--secondary) 100%); border-color:transparent; color:#fff; box-shadow:0 12px 24px rgba(10,87,198,.18);}
.btn.danger{background:rgba(220,38,38,.08); border-color:rgba(220,38,38,.35); color:#b91c1c;}
.btn:disabled{opacity:.55; cursor:not-allowed;}
.source-default-btn{width:40px; min-width:40px; height:40px; padding:0; gap:0; justify-content:center; flex:0 0 40px}
.source-default-btn i{margin:0}
.source-default-btn.is-active,
.source-default-btn[aria-pressed="true"]{border-color:#f5b301; background:linear-gradient(180deg,#fff8db 0%,#ffe78a 100%); color:#b45309; box-shadow:0 10px 22px rgba(245,179,1,.24)}
.source-default-btn.is-active i,
.source-default-btn[aria-pressed="true"] i{color:#f59e0b; filter:drop-shadow(0 0 10px rgba(245,158,11,.38))}
.select{border:1px solid #cadced; background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%); padding:8px 12px; border-radius:12px; font-family:inherit; font-size:14px; font-weight:800; line-height:1.15; color:#12304d; max-width:100%; min-width:0;}

.re-grid{display:grid; grid-template-columns: 330px 1fr; gap:12px; padding:12px; align-items:start; min-width:0;}
.re-grid.has-history-side{grid-template-columns:minmax(340px,400px) minmax(0,1fr) minmax(230px,260px);}
.re-side{display:flex; flex-direction:column; gap:12px; min-width:0; overflow:visible;}
.re-side-info{gap:10px}
.re-history-side{min-width:0}
.re-main{min-width:0; overflow:visible; display:flex; flex-direction:column;}
.card{background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%); border:1px solid var(--line); border-radius:18px; padding:12px; box-shadow:0 10px 28px rgba(15,23,42,.05); min-width:0; overflow:visible;}
.card-h{display:flex; align-items:center; gap:8px; font-weight:900; font-size:15px; color:#0b5b7e; margin:-12px -12px 12px; padding:12px 14px; border-bottom:1px solid var(--line); border-radius:18px 18px 0 0; background:linear-gradient(180deg,#f8fcff 0%,#edf7fb 100%);}
.re-side-info .card{padding:10px}
.re-side-info .card-h{margin:-10px -10px 10px; padding:10px 12px; font-size:14px}

.re-report-menu{display:grid; grid-template-columns:auto minmax(0,1fr); align-items:center; justify-content:space-between; gap:8px; padding:8px 10px; margin-bottom:10px; flex-wrap:wrap; border-color:#cfe0ef; background:linear-gradient(180deg,#fbfdff 0%,#f3f9fd 100%);}
.re-report-menu-group{display:flex; align-items:center; gap:7px; flex-wrap:wrap; min-width:0;}
.re-report-menu-group-right{margin-left:auto; justify-content:flex-end; flex:1 1 auto;}
.re-report-menu .select{min-width:200px;}
#reportActionBarLeft{flex:0 1 auto; align-items:stretch; min-width:0;}
#reportActionBarRight{flex:1 1 360px; min-width:0; align-items:center; justify-content:flex-end; flex-wrap:nowrap;}
#reportActionBarRight .btn{flex:0 0 auto; min-height:36px; padding:0 11px; border-radius:11px; font-size:12px; white-space:nowrap; gap:6px;}
#reportActionBarRight .btn i{font-size:14px;margin:0}
.report-quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;align-items:stretch}
.report-quick-actions[hidden]{display:none !important}
.report-quick-actions .btn{min-width:0;min-height:34px;height:34px;padding:0 8px;border-radius:10px;font-size:11.5px;justify-content:center;gap:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-quick-actions .btn i{font-size:13px;margin:0;flex:0 0 auto}
.btn-final-accent{min-height:40px; padding:0 14px; border-radius:12px; font-size:13px; font-weight:800; letter-spacing:0; white-space:nowrap; background:linear-gradient(135deg,#1663d8 0%,#38a7ef 100%) !important; border-color:transparent !important; color:#fff !important; box-shadow:0 12px 22px rgba(22,99,216,.20) !important; gap:7px;}
.btn-final-accent:hover{background:linear-gradient(135deg,#0f55bc 0%,#2397dd 100%) !important; box-shadow:0 16px 26px rgba(22,99,216,.26) !important;}
.btn-final-accent i{width:22px; height:22px; border-radius:999px; display:inline-flex; align-items:center; justify-content:center; background:rgba(255,255,255,.18); box-shadow:inset 0 1px 0 rgba(255,255,255,.16);font-size:12px;}
.btn-final-print{background:linear-gradient(135deg,#0f5fcf 0%,#7aacff 100%) !important; box-shadow:0 14px 24px rgba(15,95,207,.22) !important;}
.btn-final-print:hover{background:linear-gradient(135deg,#094fae 0%,#5f94ef 100%) !important; box-shadow:0 18px 28px rgba(15,95,207,.28) !important;}
.btn-sign-accent{background:linear-gradient(135deg,#0f766e 0%,#22c55e 100%) !important; box-shadow:0 14px 24px rgba(15,118,110,.22) !important;}
.btn-sign-accent:hover{background:linear-gradient(135deg,#0b615a 0%,#16a34a 100%) !important; box-shadow:0 18px 28px rgba(15,118,110,.28) !important;}

.kv{display:grid; grid-template-columns: 104px 1fr; gap:7px 9px; font-size:12px; line-height:1.4;}
.kv .k{display:flex; align-items:center; min-height:34px; padding:5px 9px; border-radius:10px; background:linear-gradient(180deg,#eefbff 0%,#eaf4fb 100%); border:1px solid #d7e8f3; color:#0d607d; font-weight:800}
.kv .v{display:flex; align-items:center; min-height:34px; padding:4px 2px; word-break:break-word}
.re-side-info .kv{grid-template-columns:116px 1fr}
.row{display:flex; align-items:center; min-width:0;}
.gap8{gap:8px}
.flex1{flex:1 1 auto; min-width:0;}
.hint,.editor-hint{color:var(--muted); font-size:12px; line-height:1.45}
.editor-hint{margin:10px 14px 0}
.sign-status-tip{margin:8px 14px 0;padding:8px 10px;border-radius:10px;border:1px solid #d5e3f0;background:#f8fafc;color:#475569;font-size:12px;font-weight:800;line-height:1.45}
.re-sign-status-below{display:block;width:fit-content;max-width:100%;margin:-4px 0 10px 10px;padding:4px 8px;border-radius:8px;font-size:11px;font-weight:800;line-height:1.25;min-height:22px;box-shadow:none}
.re-sign-status-below[hidden]{display:none!important}
.re-history-side .card > .sign-status-tip{width:100%;margin:8px 0 0;padding:6px 9px;border-radius:10px;font-size:11.5px;line-height:1.3}
.sign-status-tip.is-pending{border-color:#fdba74;background:#fff7ed;color:#9a3412}
.sign-status-tip.is-signed{border-color:#86efac;background:#dcfce7;color:#166534}
.sign-status-tip.is-error{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
.editor-lock-note{margin:10px 14px 0;padding:12px 14px;border-radius:12px;border:1px solid #f5c2c7;background:#fff5f5;color:#b91c1c;font-size:13px;font-weight:700;line-height:1.5;flex:0 0 auto}
.editor-lock-note.is-unlocked{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}


/* AutoText layout + full text visibility */
.autotext-card{overflow:visible;padding-top:10px}
.autotext-template-row{display:grid;grid-template-columns:1fr;gap:5px;margin-bottom:9px;padding-bottom:8px;border-bottom:1px solid #e2edf6}
.autotext-field-label{font-size:11px;color:var(--muted);font-weight:900;line-height:1.2}
.autotext-template-host{min-width:0}
.autotext-template-host .select{width:100%;min-width:0;min-height:34px;padding:0 10px;border-radius:10px;font-size:12px}
.autotext-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;overflow:visible;margin-top:5px;}
.autotext-select-wrap{min-width:0;overflow:visible;}
.autotext-select{width:100%;min-width:0;max-width:100%;}
.autotext-apply-btn{width:44px;min-width:44px;height:42px;padding:0;justify-content:center;flex:0 0 44px;}
.re-side-info .report-quick-actions{gap:6px}
.re-side-info .autotext-card .autotext-row{gap:6px}
.re-side-info .autotext-card .autotext-select{min-height:34px;padding:0 10px;font-size:12px}
.re-side-info .autotext-card .autotext-apply-btn{width:34px;min-width:34px;height:34px;flex:0 0 34px;border-radius:10px}
.re-side-info .autotext-card .hint{font-size:11px;line-height:1.4}

/* Let native select dropdown / tooltip render outside containers */
.re-page,.re-grid,.re-side,.re-main,.card,.autotext-row,.autotext-select-wrap{overflow:visible;}

/* Improve readability for truncated select text in supported browsers */
.autotext-select option{white-space:normal;}

/* Ensure hints can wrap fully */
.hint{white-space:normal;word-break:break-word;}

.editor{--editor-card-height:calc(100vh - 130px); --editor-conclusion-height:220px; padding:0; overflow:hidden; min-height:560px; height:var(--editor-card-height); resize:vertical; display:flex; flex-direction:column}
.toolbar{display:flex; gap:3px; row-gap:5px; align-items:center; padding:6px 8px; border-bottom:1px solid var(--line); flex-wrap:wrap; background:linear-gradient(180deg,#f8fcff 0%,#f2f8fc 100%)}
.tb{border:1px solid #d5e3f0; background:#fff; width:30px; height:28px; border-radius:8px; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:12px; color:#12304d;}
.tb:hover{border-color:#8fb7d3; box-shadow:0 4px 12px rgba(10,87,198,.08)}
.speech-toolbar-row{display:flex;align-items:center;gap:7px;min-height:36px;padding:5px 8px;border-bottom:1px solid var(--line);background:linear-gradient(180deg,#f7fbff 0%,#f1f7fb 100%)}
.speech-toolbar-row .stt-btn{width:30px;height:28px;border-radius:8px;flex:0 0 30px}
.stt-btn.is-active{border-color:#ef4444;background:#fff5f5;color:#b91c1c;box-shadow:0 0 0 3px rgba(239,68,68,.12)}
.stt-btn.is-active i{animation:sttPulse 1s ease-in-out infinite}
.speech-status{display:inline-flex;align-items:center;min-height:26px;max-width:260px;padding:0 9px;border:1px solid #d5e3f0;border-radius:999px;background:#fff;color:#475569;font-size:11.5px;font-weight:800;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.speech-status[hidden]{display:none}
.speech-status.is-active{border-color:#fecaca;background:#fff5f5;color:#b91c1c}
.speech-status.is-ready{border-color:#bfdbfe;background:#eff6ff;color:#1d4ed8}
.speech-status.is-error{border-color:#fecaca;background:#fef2f2;color:#b91c1c}
@keyframes sttPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.12)}}
.tb-sep{width:1px; height:18px; background:var(--line); margin:0 1px;}
.tb-select{border:1px solid #d5e3f0; border-radius:9px; padding:3px 8px; font-weight:800; background:#fff; min-height:28px; color:#12304d;font-size:12px;}
#formatBlock{width:112px}
#fontSize{width:104px}
#fontName{width:180px}
.tb-color{width:28px; height:28px; border:1px solid #d5e3f0; border-radius:8px; padding:0; background:#fff;}

.editor-body{padding:14px; display:flex; flex-direction:column; flex:1; min-height:0; overflow:hidden;}
.editor-section{border:1px solid var(--line); border-radius:14px; overflow:hidden; display:flex; flex-direction:column; min-height:0; background:#fff;}
.editor-section-report{flex:0 0 auto; min-height:220px;}
.editor-section-conclusion{flex:0 0 auto; min-height:150px;}
.editor-section-h{padding:12px 14px; font-size:15px; font-weight:900; color:#0b5b7e; border-bottom:1px solid var(--line); background:linear-gradient(180deg,#f8fcff 0%,#edf7fb 100%);}
.editor-cell{
  min-height:0;
  height:100%;
  padding:14px;
  outline:none;
  font-size:14px;
  line-height:1.6;
  overflow:auto;
}
.report-cell{min-height:260px;}
.conclusion-cell{min-height:150px; background:#fcfcff}
.editor-cell:empty:before{content:attr(data-placeholder); color:#94a3b8}
.editor-cell.is-active{box-shadow: inset 0 0 0 2px rgba(12,138,168,.18); background:var(--soft)}
.editor-cell img{max-width:100%; height:auto}
.editor-cell.is-readonly{background:#f8fafc;color:#64748b}
.re-page.is-final-locked .toolbar{background:#f8fafc}
.re-page.is-final-locked .editor-section{border-color:#dbe4f0}

.vtyt-section{margin-top:10px; flex:0 0 auto; max-height:190px; min-height:120px;}
.vtyt-panel-head{justify-content:space-between; gap:10px; padding-top:9px; padding-bottom:9px; font-size:13px;}
.vtyt-total{font-size:12px; color:#0f766e; font-weight:900; white-space:nowrap;}
.vtyt-mini-wrap{overflow:auto; max-height:142px; background:#fff;}
.vtyt-mini-table{width:100%; border-collapse:collapse; min-width:840px; font-size:12px;}
.vtyt-mini-table th,
.vtyt-mini-table td{border-bottom:1px solid #e2edf6; padding:7px 8px; text-align:left; vertical-align:top;}
.vtyt-mini-table th{position:sticky; top:0; z-index:1; background:#f3f9fd; color:#0b5b7e; font-weight:900; white-space:nowrap;}
.vtyt-mini-table td:nth-child(4),
.vtyt-mini-table td:nth-child(6),
.vtyt-mini-table td:nth-child(7){text-align:right; font-variant-numeric:tabular-nums; white-space:nowrap;}
.vtyt-mini-table td:nth-child(5){text-align:center; white-space:nowrap;}
.vtyt-empty{text-align:center !important; color:var(--muted); padding:16px 8px !important;}
.vtyt-name{font-weight:800; color:#12304d;}
.vtyt-meta{margin-top:2px; color:var(--muted); font-size:11px; line-height:1.35;}
.vtyt-row-actions{display:flex; justify-content:center;}
.vtyt-row-actions .btn{width:30px; height:28px; padding:0; justify-content:center; border-radius:9px;}
.vtyt-badge-warn{display:inline-flex; align-items:center; justify-content:center; min-height:22px; padding:2px 7px; border-radius:9px; background:#fff7ed; border:1px solid #fed7aa; color:#9a3412; font-size:11px; font-weight:900; white-space:nowrap;}

.editor-splitter{position:relative; flex:0 0 14px; margin:8px 0; border-radius:999px; cursor:row-resize; display:flex; align-items:center; justify-content:center; user-select:none; touch-action:none;}
.editor-splitter::before{content:""; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--line); transform:translateY(-50%);}
.editor-splitter span{position:relative; display:block; width:64px; height:6px; border-radius:999px; background:#cbd5e1; box-shadow:0 0 0 4px #fff;}
.editor-splitter:hover span,.editor-splitter.is-resizing span{background:#94a3b8;}
.time-input-inline{display:grid; grid-template-columns:minmax(0,1fr) auto; gap:4px; align-items:center; min-width:0;}
.time-input-inline .input{flex:1; min-width:0;}
.auto-check{display:inline-flex !important; align-items:center; justify-content:center; gap:4px !important; white-space:nowrap; border:1px solid var(--line); background:#fff; padding:0 6px; border-radius:11px; min-width:54px; height:34px; color:var(--text) !important; font-size:10px !important; font-weight:800 !important; cursor:pointer;}
.auto-check input{margin:0;}
.auto-check.is-disabled{background:#f8fafc; color:var(--muted) !important; cursor:not-allowed; opacity:.72;}
.input.is-auto{background:#f8fafc; color:#1e293b; font-weight:800; pointer-events:none;}
.input.is-grayed,.input:disabled{background:#f8fafc; color:#64748b; cursor:not-allowed; opacity:.9;}

.result-meta-editor{margin-top:6px; border-top:1px solid var(--line); padding-top:6px; display:grid; gap:6px; grid-template-columns:repeat(2,minmax(0,1fr));}
.result-meta-editor label{display:flex; flex-direction:column; gap:4px; font-size:11px; color:var(--muted); font-weight:800; letter-spacing:.01em;}
.result-meta-editor .session-default{display:flex; flex-direction:row; align-items:center; gap:7px; min-height:36px; padding:0 10px; border-radius:11px; border:1px solid #dfe9f3; background:#f7fbff; color:#475569; font-weight:700; grid-column:1 / -1;}
.result-meta-editor .session-default input{margin:0;}
.result-meta-editor .is-dimmed{opacity:.52; background:#f8fafc; cursor:not-allowed;}
.technician-combo{position:relative;display:block;min-width:0;width:100%;overflow:visible;font-weight:700;color:var(--text);letter-spacing:0}
.technician-combo-input{padding-right:34px}
.technician-combo-toggle{position:absolute;right:2px;top:2px;bottom:2px;width:30px;border:0;border-radius:9px;background:transparent;color:#0f172a;display:flex;align-items:center;justify-content:center;cursor:pointer}
.technician-combo-toggle:hover{background:#eef6ff;color:#0b5ed7}
.technician-combo-toggle:disabled{cursor:not-allowed;color:#94a3b8;background:transparent}
.technician-combo-menu{position:absolute;left:0;top:calc(100% + 4px);z-index:80;width:max(100%,360px);max-width:calc(100vw - 40px);max-height:280px;overflow:auto;border:1px solid #64748b;border-radius:2px;background:#fff;box-shadow:0 14px 28px rgba(15,23,42,.18);padding:0;font-size:13px;font-weight:400;color:#0f172a}
.technician-combo-menu[hidden]{display:none}
.technician-combo-option{display:block;width:100%;border:0;background:#fff;color:#0f172a;text-align:left;padding:6px 10px;line-height:1.35;cursor:pointer;font-family:inherit;font-size:13px;font-weight:400}
.technician-combo-option:hover,
.technician-combo-option.is-active{background:#3f6ed3;color:#fff}
.technician-combo-option-main{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:400}
.technician-combo-empty{padding:8px 10px;color:#64748b;background:#fff;font-size:13px}
.re-execution-card{display:flex; flex-direction:column; gap:8px}
.re-execution-card .card-h{margin-bottom:8px}
.re-execution-card .result-meta-editor{margin-top:0; padding:7px 8px; gap:5px 8px; border:1px solid #deebf4; border-radius:14px; background:linear-gradient(180deg,#fcfeff 0%,#f6fbff 100%)}
.re-execution-card .result-meta-editor label{gap:3px; font-size:10.5px}
.re-execution-card .result-meta-editor .session-default{min-height:32px; padding:0 9px; font-size:11px}

.order-time-editor{margin-top:6px; border-top:1px solid var(--line); padding-top:6px;}
.order-time-head{display:flex; align-items:flex-start; justify-content:space-between; gap:8px; margin-bottom:5px;}
.order-time-title{font-weight:900; font-size:12px; color:#12304d; margin-bottom:5px;}
.order-time-head .order-time-title{margin-bottom:0;}
.order-time-toggle-group{display:flex; align-items:center; gap:6px; flex-wrap:wrap; justify-content:flex-end;}
.order-time-hint{margin:0 0 8px;}
.time-grid{display:grid; gap:6px 8px; grid-template-columns:repeat(2,minmax(0,1fr));}
.re-execution-card .time-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
.time-grid label{display:flex; flex-direction:column; gap:4px; min-width:0; font-size:11px; color:var(--muted); font-weight:800; letter-spacing:.01em;}
.input{border:1px solid var(--line); background:#fff; padding:6px 10px; border-radius:11px; font:inherit; color:var(--text); outline:none; min-width:0; width:100%;}
.time-grid .input{padding:5px 8px; font-size:12px; font-weight:700;}
.input:focus{border-color:rgba(11,94,215,.45); box-shadow:0 0 0 3px rgba(11,94,215,.08)}
.order-time-actions{margin-top:6px; flex-wrap:wrap;}
.order-time-actions.has-auto{display:grid!important;grid-template-columns:minmax(0,112px) minmax(0,86px) max-content;gap:5px;align-items:stretch;justify-content:start;flex-wrap:nowrap}
.order-time-actions .btn{flex:1 1 calc(50% - 4px);}
.order-time-actions.has-auto .btn{flex:0 0 auto;width:100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-left:5px;padding-right:5px;gap:4px}
.order-time-actions.has-auto .auto-check{justify-self:end;align-self:stretch;min-width:58px;width:max-content;white-space:nowrap;flex:0 0 auto}
.re-execution-card .order-time-editor{margin-top:0; padding:7px 8px; border:1px solid #deebf4; border-radius:14px; background:linear-gradient(180deg,#fcfeff 0%,#f6fbff 100%)}
.re-execution-card .order-time-head{margin-bottom:4px}
.re-execution-card .order-time-title{font-size:11px}
.re-execution-card .order-time-hint{margin-bottom:6px; font-size:11px}
.re-execution-card .time-grid label{gap:3px; font-size:10.5px}
.re-execution-card .time-grid .input{padding:6px 9px; font-size:11px; line-height:1.2}
.re-execution-card .dt24-field{min-width:0}
.re-execution-card .dt24-display{background-image:none; padding-right:10px !important; font-variant-numeric:tabular-nums; letter-spacing:-.01em}
.re-execution-card .order-time-actions{display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:6px; align-items:stretch; margin-top:5px}
.re-execution-card .order-time-actions.has-auto{display:grid!important;grid-template-columns:minmax(0,112px) minmax(0,84px) max-content;gap:5px;justify-content:start}
.re-execution-card .order-time-actions .btn{flex:0 0 auto; width:100%; min-height:34px; padding:0 5px; font-size:10px; gap:4px}
.re-execution-card .order-time-actions .auto-check{justify-self:end; align-self:stretch; min-width:58px; min-height:34px; padding:0 7px; font-size:10px !important; gap:4px !important}
.re-execution-card .auto-check{height:auto}

.history-list{display:flex; flex-direction:column; gap:8px; max-height:340px; overflow-y:auto; overflow-x:hidden}
.history-empty{padding:8px 0; color:var(--muted); font-size:13px}
.history-item{border:1px solid var(--line); border-radius:12px; padding:8px; background:linear-gradient(180deg,#ffffff 0%,#f8fbff 100%)}
.history-top{display:flex; justify-content:space-between; gap:8px; align-items:center}
.history-title{font-weight:800; font-size:12px}
.history-title,.history-meta,.history-preview{overflow-wrap:anywhere}
.history-meta{font-size:11px; color:var(--muted); margin-top:4px; line-height:1.45}
.history-actions{display:flex; gap:5px; margin-top:8px; flex-wrap:nowrap; min-width:0}
.history-actions .btn{padding:4px 6px; font-size:11px; border-radius:9px; flex:0 0 auto; min-width:0}
.history-preview{margin-top:8px; border-top:1px dashed var(--line); padding-top:8px; font-size:12px; color:#334155; display:none}
.history-preview.show{display:block}
.re-history-side .card{position:sticky;top:92px;display:flex;flex-direction:column;max-height:calc(100vh - 108px)}
.re-history-side .history-list{flex:1;max-height:none;min-height:0}

.re-modal{position:fixed; inset:0; background:rgba(0,0,0,.45); display:none; z-index:99999;}
.re-modal[aria-hidden="false"]{display:block;}
.re-modal-box{position:absolute; inset:18px; background:#fff; border-radius:16px; overflow:hidden; display:flex; flex-direction:column; box-shadow:0 10px 30px rgba(0,0,0,.22);}
.re-modal-h{display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border-bottom:1px solid var(--line);}
.re-modal-title{font-weight:900; display:flex; gap:8px; align-items:center;}
.re-modal-actions{display:flex; gap:8px; align-items:center;}
.re-modal-frame{flex:1; width:100%; border:0; background:#f8fafc;}

@media (max-width: 1480px){
  .re-grid{grid-template-columns:minmax(300px,320px) minmax(0,1fr)}
  .re-grid.has-history-side{grid-template-columns:minmax(300px,340px) minmax(0,1fr) minmax(210px,250px)}
}

@media (max-width: 1360px){
  .re-grid,
  .re-grid.has-history-side{grid-template-columns:minmax(280px,320px) minmax(0,1fr)}
  .re-history-side{grid-column:1 / -1}
  .re-history-side .card{position:static;max-height:none}
  .editor{--editor-card-height:calc(100vh - 122px); min-height:520px}
}

@media (max-width: 1180px){
  .re-topbar{padding:8px 12px}
  .re-title{min-width:0}
  .re-actions{width:100%; margin-left:0; justify-content:flex-end}
}

@media (max-width: 1100px){
  .re-grid,
  .re-grid.has-history-side{grid-template-columns:1fr}
  .re-history-side{grid-column:auto}
  .toolbar{top:0}
  .re-history-side .card{position:static;max-height:none}
}

@media (max-height: 820px){
  .editor{--editor-card-height:calc(100vh - 118px); min-height:480px}
}


.nd-panel{margin-bottom:12px;padding:12px;border-color:#cfe0ef;background:linear-gradient(180deg,#ffffff 0%,#f7fbff 100%);box-shadow:0 12px 28px rgba(15,23,42,.05);--nd-source-aspect:16 / 9;--nd-source-ratio-decimal:1.7778}
.nd-title{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.nd-title-label{display:inline-flex;align-items:center;min-width:0}
.nd-title-action{margin-left:auto;min-height:36px;padding:0 12px;border-radius:11px;font-size:12px;gap:6px;white-space:nowrap}
.nd-title-action.btn-final-accent i{width:24px;height:24px}
.nd-toolbar{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.nd-toolbar .btn{min-height:34px;padding:0 8px;white-space:nowrap;flex:0 0 auto;font-size:12px;gap:5px;border-radius:10px}
.nd-toolbar .btn i{font-size:13px}
.nd-toolbar-spacer{flex:1 1 auto;min-width:12px}
.nd-toolbar .nd-icon-btn{width:34px;min-width:34px;height:34px;padding:0;justify-content:center;gap:0}
.nd-toolbar .nd-icon-btn i{margin:0;font-size:14px}
.nd-source-picker{display:flex;align-items:center;gap:6px;min-width:0;padding:4px;border:1px solid #cfe0ef;border-radius:14px;background:linear-gradient(180deg,#f8fcff 0%,#f2f8fd 100%);box-shadow:inset 0 0 0 1px rgba(255,255,255,.75)}
.nd-device{min-width:180px;flex:0 1 220px;max-width:240px;min-height:34px;height:34px;padding:0 30px 0 10px;font-size:12px}
.nd-source-picker .source-default-btn{width:34px;min-width:34px;height:34px;flex:0 0 34px;border-radius:10px}
.nd-capture-btn{border-color:#64b5f6;background:linear-gradient(180deg,#e0f2fe 0%,#bae6fd 100%);color:#075985;box-shadow:0 10px 22px rgba(14,116,144,.16)}
.nd-capture-btn:hover:not(:disabled){border-color:#0284c7;background:linear-gradient(180deg,#d8efff 0%,#a7dffc 100%);color:#064e7a}
.nd-action-btn{min-height:34px;padding:0 9px;border-radius:10px;white-space:nowrap;flex:0 0 auto;font-size:12px;gap:5px}
.nd-toolbar .btn-final-accent i{width:24px;height:24px}
.nd-toolbar-hint{display:none}
.nd-count{color:var(--muted);font-size:11px;font-weight:800;white-space:nowrap;flex:0 0 auto;min-width:52px;text-align:right}
.nd-stage-wrap{display:grid;grid-template-columns:minmax(250px,340px) minmax(0,1fr);gap:12px;margin-top:10px;align-items:start}
.nd-stage{position:relative;width:min(100%,340px,calc(240px * var(--nd-source-ratio-decimal)));aspect-ratio:var(--nd-source-aspect);border:1px solid var(--line);border-radius:16px;background:#0f172a;overflow:hidden;display:flex;align-items:center;justify-content:center;justify-self:center;box-shadow:inset 0 0 0 1px rgba(255,255,255,.05)}
.nd-stage video{width:100%;height:100%;object-fit:contain;background:#000}
.nd-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;text-align:center;padding:20px;color:#cbd5e1;font-size:13px;line-height:1.5}
.nd-gallery-box{border:1px solid var(--line);border-radius:16px;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);display:flex;flex-direction:column;min-height:0;max-height:none}
.nd-gallery-title{padding:12px 14px;border-bottom:1px solid var(--line);font-weight:900;color:#0b5b7e;background:linear-gradient(180deg,#f8fcff 0%,#edf7fb 100%);display:flex;align-items:center;justify-content:space-between;gap:10px}
.nd-gallery{padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;align-content:start;overflow:auto}
.nd-thumb{position:relative;border:1px solid var(--line);border-radius:14px;overflow:hidden;background:linear-gradient(180deg,#ffffff 0%,#fbfdff 100%);display:flex;flex-direction:column}
.nd-thumb-media{position:relative;width:min(100%,240px,calc(132px * var(--nd-source-ratio-decimal)));max-width:100%;aspect-ratio:var(--nd-source-aspect);margin:0 auto;background:linear-gradient(180deg,#f8fcff 0%,#edf4fa 100%)}
.nd-thumb img,.nd-thumb video{display:block;width:100%;height:100%;object-fit:contain;background:transparent}
.nd-toolbar .btn.is-recording{background:linear-gradient(180deg,#fee2e2 0%,#fecaca 100%);border-color:#fca5a5;color:#991b1b}
.nd-thumb-meta{padding:6px 8px;font-size:11px;color:#475569;text-align:center}
.nd-thumb-remove{position:absolute;top:6px;left:6px;border:none;background:rgba(220,38,38,.92);color:#fff;width:24px;height:24px;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer}
.nd-thumb-open{position:absolute;top:6px;right:6px;border:none;background:rgba(15,23,42,.82);color:#fff;width:24px;height:24px;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;text-decoration:none}
.nd-thumb-check{position:absolute;left:6px;bottom:6px;width:26px;height:26px;border-radius:9px;background:rgba(255,255,255,.9);border:1px solid #b7d4ef;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 6px 14px rgba(15,23,42,.14);z-index:2}
.nd-thumb-check input{position:absolute;opacity:0;pointer-events:none}
.nd-thumb-check span{width:18px;height:18px;border-radius:6px;border:1px solid #94a3b8;background:#fff;color:transparent;display:flex;align-items:center;justify-content:center;font-size:11px}
.nd-thumb-check input:checked + span{background:#0b5ed7;border-color:#0b5ed7;color:#fff}
.nd-thumb-remove:hover,.nd-thumb-open:hover{transform:translateY(-1px)}
.re-page.is-nondicom .editor{min-height:calc(100vh - 440px)}
@media (max-width: 1280px){.nd-stage-wrap{grid-template-columns:1fr}.nd-stage{width:min(100%,320px,calc(240px * var(--nd-source-ratio-decimal)))}.nd-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width: 1240px){.nd-toolbar{flex-wrap:wrap}.nd-device{min-width:180px;flex-basis:220px;max-width:240px}}
@media (max-width: 840px){.nd-title{align-items:stretch}.nd-title-action{width:100%;justify-content:center;margin-left:0}.nd-source-picker{width:100%}.nd-source-picker .nd-device{flex:1 1 0;max-width:none;min-width:0}.nd-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width: 840px){.vtyt-section{max-height:220px}.vtyt-mini-wrap{max-height:170px}}
@media (max-width: 960px){
  .re-report-menu-group,.re-report-menu-group-right{width:100%;margin-left:0;justify-content:flex-start}
  #reportActionBarLeft .btn-final-accent{flex:1 1 calc(50% - 4px);}
  #reportActionBarRight{flex:1 1 100%; flex-wrap:wrap}
  .re-report-menu .select{flex:1 1 auto;min-width:0}
  .re-execution-card .time-grid{grid-template-columns:1fr}
}

@media (max-width: 640px){
  .result-meta-editor,
  .time-grid{grid-template-columns:1fr}
  .re-execution-card .order-time-actions{grid-template-columns:repeat(2,minmax(0,1fr))}
  .re-execution-card .order-time-actions.has-auto,
  .order-time-actions.has-auto{grid-template-columns:minmax(0,104px) minmax(0,78px) max-content}
  .re-execution-card .order-time-actions .btn{font-size:9.5px;padding:0 4px}
  .re-execution-card .order-time-actions .auto-check{justify-self:end; min-width:56px; padding:0 7px; font-size:10px !important}
  .order-time-head{flex-direction:column; align-items:stretch}
  .order-time-toggle-group{justify-content:flex-start}
  .order-time-actions:not(.has-auto) .btn{flex:1 1 100%}
  .order-time-actions.has-auto .btn{flex:0 0 auto}
  .kv,
  .re-side-info .kv{grid-template-columns:1fr}
  .kv .k,
  .kv .v{min-height:auto}
}
