/* Scoped to the independent internal-control module. */
.side-nav .side-group:has(.menu-internal) {order:3;}
.ic-section .ic-header{display:flex;gap:18px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;margin-bottom:14px}
.ic-section .ic-header h2{margin-bottom:6px;color:#173b73}
.ic-section .ic-year-wrap{display:flex;align-items:center;gap:8px;font-weight:850;color:#26436b}
.ic-section .ic-year-wrap input{width:110px;min-height:36px}
.ic-section .ic-info-grid{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:13px;margin:13px 0}
.ic-section .ic-info-grid label,.ic-section .ic-full-label{display:flex;flex-direction:column;gap:6px;color:#334155;font-size:13px;font-weight:800}
.ic-section .ic-info-grid input,.ic-section .ic-full-label textarea{width:100%;font-size:14px;min-height:40px}
.ic-section .ic-info-grid input[readonly]{background:#f1f5f9;color:#475569}
.ic-section .ic-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}
.ic-section .ic-status{font-size:12px;color:#2563eb;min-height:18px}
.ic-section .ic-note{font-size:12px;color:#64748b;margin:13px 0 2px;line-height:1.7}
.ic-section .ic-tabs{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin:12px 0}
.ic-section .ic-tabs button{font-size:12px;padding:9px 12px;border:1px solid #cbd5e1;background:#fff;color:#334155;font-weight:750}
.ic-section .ic-tabs button.active{color:#fff;background:#1c4b83;border-color:#1c4b83}
.ic-section .ic-category-tabs{margin-top:0;padding:7px 0;border-bottom:1px solid #e2e8f0}
.ic-section .ic-table-info{font-size:12px;color:#425c78;margin:8px 0 10px}
.ic-section .ic-grid-scroll{max-height:70vh;overflow:auto;border:1px solid #cbd5e1}
.ic-section table.ic-table{width:max-content;min-width:100%;border-collapse:separate;border-spacing:0;font-size:12px}
.ic-section table.ic-table th{position:sticky;top:0;z-index:3;border-right:1px solid #cbd5e1;border-bottom:2px solid #bfd3e4;background:#eaf1fb!important;color:#244266!important;padding:11px 9px;white-space:nowrap;text-align:center}
.ic-section table.ic-table td{border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;padding:4px;vertical-align:top;background:#fff}
.ic-section table.ic-table td:first-child{min-width:46px;text-align:center;vertical-align:middle;background:#f8fafc}
.ic-section table.ic-table td .ic-input{width:100%;min-height:64px;min-width:100px;box-sizing:border-box;resize:vertical;line-height:1.5;border:1px solid #e2e8f0;background:#fff;padding:7px;font-size:12px}
.ic-section table.ic-table td .ic-input:focus{outline:2px solid #9bc4f4}
.ic-section table.ic-table td .ic-input[data-ic-field="work"]{min-width:95px}
.ic-section table.ic-table td .ic-input[data-ic-field="process"]{min-width:165px}
.ic-section table.ic-table td .ic-input[data-ic-field="task"]{min-width:230px}
.ic-section table.ic-table td .ic-input[data-ic-field="regulation"]{min-width:170px}
.ic-section table.ic-table td .ic-input[data-ic-field="interviewee"]{min-width:125px}
.ic-section table.ic-table td .ic-input[data-ic-field="control"]{min-width:330px}
.ic-section table.ic-table td .ic-input[data-ic-field="goal"]{min-width:200px}
.ic-section table.ic-table td .ic-input[data-ic-field="method"]{min-width:260px}
.ic-section table.ic-table td .ic-input[data-ic-field="evidence"]{min-width:330px}
.ic-section table.ic-table td .ic-input[data-ic-field="evaluator"]{min-width:130px}
.ic-section table.ic-table td .ic-input[data-ic-field="managementNumber"]{min-width:150px}
.ic-section table.ic-table td .ic-result{min-width:94px;padding:6px;border:1px solid #cbd5e1;min-height:36px}
.ic-section .ic-row-status{display:block;min-height:15px;font-size:10px;color:#547aa5}
.ic-section .ic-document textarea{width:100%;min-height:320px;margin-top:12px;resize:vertical;font-size:14px;line-height:1.65}
.ic-section .ic-doc-context{font-size:12px;color:#52677f;font-weight:800}
@media(max-width:900px){.ic-section .ic-info-grid{grid-template-columns:1fr}}
/* Optional, isolated historical-opinion and AI-writing assistance (400). */
.ic-section .ic-opinion-toolbar{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;margin:12px 0 6px;padding:13px 16px;background:linear-gradient(115deg,#eff6ff,#f8fafc);border:1px solid #cdddf2;border-radius:12px}
.ic-section .ic-opinion-toolbar-title{display:flex;flex-direction:column;gap:4px;min-width:240px;flex:1}
.ic-section .ic-opinion-toolbar-title strong{color:#173b73;font-size:14px}
.ic-section .ic-opinion-toolbar-title small{font-size:12px;color:#506785;line-height:1.5}
.ic-section .ic-opinion-toolbar-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.ic-section .ic-action-btn{font-weight:800;font-size:12px;padding:9px 12px;border:1px solid #1c4b83;background:#1c4b83;color:#fff;border-radius:8px;cursor:pointer;white-space:nowrap}
.ic-section .ic-action-btn.ic-action-subtle{background:#fff;border-color:#aac1de;color:#1c4b83}
.ic-section .ic-opinion-warning{margin:6px 0 11px;padding:8px 11px;border-left:3px solid #dbab43;background:#fffaf0;color:#6a5430}
.ic-section table.ic-table .ic-evidence-cell{min-width:355px}
.ic-section table.ic-table .ic-row-opinion-tools{display:flex;justify-content:flex-end;gap:5px;margin:4px 0 1px;white-space:nowrap}
.ic-section table.ic-table .ic-row-opinion-tools button{border:1px solid #c8d9ed;color:#204b7e;background:#f0f6fd;border-radius:5px;padding:5px 8px;font-size:11px;font-weight:800;cursor:pointer}
.ic-section table.ic-table .ic-row-opinion-tools button:hover{background:#daeafc}
.ic-opinion-backdrop[hidden]{display:none!important}
.ic-opinion-backdrop{position:fixed;inset:0;z-index:18050;background:rgba(15,23,42,.60);display:flex;justify-content:center;align-items:center;padding:18px;box-sizing:border-box}
.ic-opinion-dialog{width:min(1080px,100%);max-height:calc(100vh - 36px);background:#fff;border:1px solid #d6e5f4;border-radius:16px;box-shadow:0 25px 85px rgba(5,28,56,.28);display:flex;flex-direction:column;overflow:hidden;color:#1e293b}
.ic-opinion-modal-head{padding:19px 24px 13px;background:linear-gradient(105deg,#173b73,#22558c);display:flex;align-items:flex-start;justify-content:space-between;gap:12px;color:#fff}
.ic-opinion-modal-head h3{font-size:19px;color:#fff;margin:0;font-weight:900}
.ic-opinion-subtitle{font-size:12px;color:#e1ebf9;margin:7px 0 0;line-height:1.55}
.ic-close-btn{background:rgba(255,255,255,.15);border:1px solid rgba(255,255,255,.25);border-radius:9px;color:#fff;font-size:23px;min-width:36px;min-height:36px;cursor:pointer}
.ic-opinion-modal-body{overflow:auto;padding:17px 24px 10px}
.ic-opinion-source-tabs{display:flex;gap:8px;flex-wrap:wrap}
.ic-opinion-source-tabs button{background:#fff;border:1px solid #bdcfe6;color:#355374;border-radius:8px;padding:9px 13px;font-size:12px;font-weight:800;cursor:pointer}
.ic-opinion-source-tabs button.active{background:#e9f3ff;border-color:#477fb5;color:#173b73}
.ic-opinion-source-notice{margin:10px 0;background:#fffbeb;border-left:3px solid #e0af50;padding:10px 12px;font-size:12px;color:#735521;line-height:1.65}
.ic-opinion-compare{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:10px}
.ic-opinion-compare label{display:flex;flex-direction:column;gap:7px;color:#334155;font-size:13px;font-weight:850}
.ic-opinion-compare textarea{width:100%;box-sizing:border-box;min-height:192px;height:220px;padding:13px;resize:vertical;background:#fff;border:1px solid #bed0e2;border-radius:9px;line-height:1.6;color:#1e293b;font-size:13px}
.ic-opinion-compare #icOpinionBefore{background:#f5f8fc;color:#41516a}
.ic-opinion-compare #icOpinionAfter:focus{outline:2px solid #a9cdec}
.ic-opinion-ai-box[hidden],.ic-opinion-checks[hidden]{display:none}
.ic-opinion-ai-box{background:#f6f9fe;border:1px solid #dbe7f8;padding:13px;border-radius:10px;margin-top:15px}
.ic-opinion-ai-box label{display:block;font-size:12px;font-weight:850;color:#334f70;margin-bottom:7px}
.ic-opinion-ai-box textarea{min-height:74px;width:100%;box-sizing:border-box;resize:vertical;border:1px solid #cbd5e1;border-radius:8px;padding:10px;font-size:12px;line-height:1.5}
.ic-opinion-ai-toolbar{display:flex;align-items:center;gap:12px;margin-top:10px;flex-wrap:wrap}
.ic-ai-btn{border:1px solid #2362a5;border-radius:8px;background:#2362a5;color:white;padding:8px 15px;cursor:pointer;font-weight:850}
.ic-ai-btn:disabled{background:#9baec3;border-color:#9baec3;cursor:not-allowed}
#icOpinionAiAvailability{font-size:12px;color:#597089}
.ic-opinion-ai-notice{font-size:11px;line-height:1.6;color:#64748b;margin:10px 0 0}
.ic-opinion-checks{background:#fef3c7;color:#765523;font-size:12px;padding:11px;margin:12px 0 0;border-radius:7px;line-height:1.55}
.ic-opinion-message{min-height:18px;margin:9px 0 4px;font-size:12px}
.ic-opinion-modal-foot{padding:12px 24px 17px;border-top:1px solid #e2e8f0;display:flex;justify-content:flex-end;align-items:center;gap:8px;background:#f8fafc}
.ic-opinion-modal-foot button{font-size:13px;font-weight:850;border-radius:8px;padding:11px 16px;cursor:pointer}
@media(max-width:750px){
 .ic-opinion-backdrop{padding:9px}
 .ic-opinion-dialog{max-height:calc(100vh - 18px)}
 .ic-opinion-modal-head,.ic-opinion-modal-body{padding-left:14px;padding-right:14px}
 .ic-opinion-compare{grid-template-columns:1fr}
 .ic-opinion-compare textarea{min-height:120px;height:140px}
 .ic-opinion-toolbar-actions{width:100%}
 .ic-section .ic-opinion-toolbar-actions .ic-action-btn{flex:1;white-space:normal}
}

/* 406: evaluation schedule table, only in internal-control basic section. */
.ic-section .ic-schedule-block{margin:22px 0 10px;padding:16px;border:1px solid #d8e3f1;border-radius:8px;background:#f9fbff}
.ic-section .ic-schedule-block h3{margin:0 0 9px;color:#173b73;font-size:16px}
.ic-section .ic-schedule-block .help{font-size:12px;line-height:1.6;margin:0 0 10px}
.ic-section .ic-schedule-scroll{max-width:100%;overflow-x:auto;border:1px solid #d6e1ed;background:#fff}
.ic-section table.ic-schedule-table{width:100%;min-width:570px;border-collapse:collapse;font-size:13px}
.ic-section .ic-schedule-table th{padding:11px 12px;border-bottom:2px solid #d4e2f0;background:#eaf1fb;color:#26436b;text-align:center}
.ic-section .ic-schedule-table td{padding:7px 10px;border-bottom:1px solid #e5edf5;border-right:1px solid #e5edf5}
.ic-section .ic-schedule-table tr:last-child td{border-bottom:0}
.ic-section .ic-schedule-table td:nth-child(2){width:42%;font-weight:650;color:#2d4665}
.ic-section .ic-schedule-table input{width:100%;min-height:37px;box-sizing:border-box;padding:7px 10px;border:1px solid #cad8e7;border-radius:5px;font-size:13px;background:white;color:#1e293b}
.ic-section .ic-schedule-table input[aria-invalid="true"]{border:2px solid #dc2626;background:#fff7f7}
.ic-section .ic-schedule-notice{color:#64748b;font-size:12px;line-height:1.6;margin:10px 0 0}

/* 407: isolated per-company internal-control template modal. */
.ic-basic-actions{display:flex;align-items:center;gap:15px;flex-wrap:wrap}
.ic-template-backdrop[hidden]{display:none!important}
.ic-template-backdrop{position:fixed;inset:0;z-index:11000;display:flex;align-items:center;justify-content:center;background:rgba(9,26,47,.62);padding:18px}
.ic-template-dialog{width:min(890px,98vw);max-height:94vh;background:#fff;border-radius:15px;box-shadow:0 20px 70px #0b254650;display:flex;flex-direction:column;overflow:hidden;color:#233450}
.ic-template-head{padding:18px 23px;background:linear-gradient(100deg,#173b73,#215588);color:white;display:flex;justify-content:space-between;gap:18px;align-items:flex-start}
.ic-template-head h2{margin:0;font-size:20px;color:white}.ic-template-head p{font-size:12px;color:#e4edff;margin:8px 0 0}
.ic-template-body{overflow-y:auto;padding:18px 22px}.ic-template-body fieldset{border:1px solid #cedceb;border-radius:12px;padding:16px;margin:0}
.ic-template-body legend{color:#24466e;font-size:16px;font-weight:850;padding:0 9px}
.ic-template-help{font-size:12px;line-height:1.7;color:#64748b;margin:4px 0 14px}
.ic-template-slots{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.ic-template-slot{border:1px dashed #a6bfd9;border-radius:10px;background:#f8fbff;padding:13px;min-height:124px;box-sizing:border-box}
.ic-template-slot.drag-over{background:#e2f1ff;border:2px solid #337abb}
.ic-template-name{font-weight:800;color:#203c64;font-size:13px;margin-bottom:8px}
.ic-template-file{font-size:12px;min-height:20px;color:#516a89;word-break:break-all}
.ic-template-buttons{display:flex;gap:7px;flex-wrap:wrap;margin-top:10px}
.ic-template-buttons button{padding:7px 12px;border:1px solid #9bb5d1;border-radius:7px;background:#fff;font-size:12px;font-weight:800;color:#21507e;cursor:pointer}
.ic-template-buttons button:first-child{background:#245a94;color:#fff;border-color:#245a94}
.ic-template-buttons button:disabled{opacity:.4;cursor:not-allowed}
.ic-template-drop-note{font-size:11px;color:#768aa3;margin-top:8px}
.ic-template-message{font-size:12px;min-height:18px;color:#2563eb;margin:12px 0}
.ic-template-foot{border-top:1px solid #dce5ef;padding:12px 22px;display:flex;justify-content:flex-end}
.ic-template-foot button{padding:9px 21px;border:1px solid #b5c7d8;border-radius:7px;background:#fff;color:#274766;cursor:pointer}
.ic-no-form{padding:35px!important;background:#f8fafc!important;color:#52667e;text-align:center!important;font-size:14px}
@media(max-width:670px){.ic-template-backdrop{padding:7px}.ic-template-dialog{max-height:98vh}.ic-template-slots{grid-template-columns:1fr}.ic-template-head,.ic-template-body{padding:13px}}
