#twp-section-tabs{flex-wrap:wrap}
/* style.css dagi umumiy .modal-content{max-height:90vh} ish rejasi oynasini
   ekran pastigacha cho'zilishiga qo'ymayotgan edi (pastda bo'sh oq joy). */
#teacher-work-plan-modal>.modal-content{max-height:none!important;height:100vh!important}
/* Ekran ikkiga bo'linganda jadval va forma panel pastigacha cho'ziladi,
   har biri o'zi alohida aylanadi. */
#twp-extra-content.wpe-has-split:not([style*="display: none"]):not([style*="display:none"]){display:flex!important}
#twp-extra-content.wpe-has-split{flex-direction:column;overflow:hidden}
#twp-extra-content.wpe-has-split>*{flex-shrink:0}
#twp-extra-content.wpe-has-split>.wpe-split{flex:1 1 auto;min-height:0;grid-template-rows:minmax(0,1fr);align-items:stretch}
#twp-extra-content.wpe-has-split .wpe-split-list{min-height:0;overflow:auto;padding-right:4px}
#twp-extra-content.wpe-has-split .wpe-split-editor{position:static;max-height:none;min-height:0;overflow:auto}
#twp-extra-content{flex:1 1 auto;min-height:0;overflow:auto;background:#f8fafc;padding:22px 28px;color:#17243b;box-sizing:border-box}
#twp-extra-content *{box-sizing:border-box}
#twp-extra-content button{border:1px solid #cbd5e1;border-radius:7px;background:white;color:#1e40af;padding:8px 12px;cursor:pointer;font-weight:700}
#twp-extra-content button:disabled{opacity:.5;cursor:wait}
#twp-extra-content .wpe-primary{background:#2563eb;color:white;border-color:#2563eb}
#twp-extra-content .wpe-toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin-bottom:14px}
#twp-extra-content .wpe-toolbar strong{margin-right:auto}
#twp-extra-content .wpe-scroll{overflow:auto}
#twp-extra-content table{border-collapse:collapse;width:100%;background:white;font-size:13px}
#twp-extra-content td,#twp-extra-content th{border:1px solid #cbd5e1;padding:10px;text-align:left;vertical-align:top}
#twp-extra-content th{background:#eef2ff;color:#1e3a8a}
#twp-extra-content .wpe-actions{display:flex;gap:5px;flex-wrap:wrap;min-width:150px}
#twp-extra-content .wpe-actions button{font-size:12px;padding:5px 7px}
#twp-extra-content .wpe-editor{background:white;border:1px solid #cbd5e1;border-radius:10px;padding:18px;margin-bottom:18px}
#twp-extra-content .wpe-grid{display:grid;grid-template-columns:repeat(3,minmax(170px,1fr));gap:14px}
#twp-extra-content label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700}
#twp-extra-content input,#twp-extra-content textarea,#twp-extra-content select{width:100%;padding:9px;border:1px solid #b9c7da;border-radius:6px;font:normal 14px Arial;background:white;color:#17243b}
#twp-extra-content textarea{min-height:80px;resize:vertical}
#twp-extra-content .wpe-wide{grid-column:1/-1}
#twp-extra-content .wpe-muted{color:#64748b;font-size:13px;margin:8px 0 14px}
#twp-extra-content .wpe-error{color:#b91c1c}
#twp-extra-content [data-wpe-message]:empty{display:none}
#twp-extra-content .wpe-ok{color:#047857}
#twp-extra-content .wpe-history{white-space:pre-wrap;line-height:1.6;background:white;padding:14px;max-height:300px;overflow:auto}
#twp-extra-content .wpe-status{font-weight:700;white-space:nowrap}
#twp-extra-content .wpe-split{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:18px;align-items:start}
#twp-extra-content .wpe-split-list{min-width:0}
#twp-extra-content .wpe-split-list>p:first-child{margin-top:0}
#twp-extra-content .wpe-split-editor{position:sticky;top:0;max-height:calc(100vh - 190px);overflow:auto;overscroll-behavior:contain;border-radius:10px}
#twp-extra-content .wpe-split-editor .wpe-editor{margin-bottom:0}
#twp-extra-content .wpe-split-editor h3{margin-top:0}
#twp-extra-content .wpe-split .wpe-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
#twp-extra-content .wpe-draft-row td{background:#fffbeb}
#twp-extra-content .wpe-research-form .wpe-group{margin:0 0 14px;padding:12px 14px 14px;border:1px solid #c7d2fe;border-left:4px solid #2563eb;border-radius:10px;background:#f8faff;min-width:0}
#twp-extra-content .wpe-research-form .wpe-group legend{padding:2px 10px;border-radius:999px;background:#2563eb;color:#fff;font-size:13px;font-weight:800}
#twp-extra-content .wpe-research-form .wpe-group-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
#twp-extra-content .wpe-research-form .wpe-group label{font-weight:600;color:#334155}
#twp-extra-content .wpe-research-form .wpe-save-bar{position:sticky;bottom:0;z-index:2;margin:4px -18px -18px;padding:12px 18px;background:#fff;border-top:1px solid #e2e8f0;border-radius:0 0 10px 10px;box-shadow:0 -6px 14px rgba(15,23,42,.06)}
#twp-extra-content .wpe-research-form .wpe-save-bar .wpe-primary{min-width:140px;padding:10px 18px}
#twp-extra-content .wpe-panel-idle{text-align:center;padding:36px 24px;border-style:dashed;border-color:#93c5fd;background:#f8faff}
#twp-extra-content .wpe-panel-idle h3{margin-top:0;color:#1e3a8a}
#twp-extra-content .wpe-panel-idle .wpe-idle-hint{margin:18px 0 0;font-size:12px}
#twp-extra-content .wpe-research tr[data-wpe-select]{cursor:pointer}
#twp-extra-content .wpe-research tr[data-wpe-select]:hover td{background:#f8faff}
#twp-extra-content .wpe-research tr[data-wpe-select]:focus-visible{outline:2px solid #2563eb;outline-offset:-2px}
#twp-extra-content .wpe-research tr.wpe-selected td{background:#eff6ff}
#twp-extra-content .wpe-research tr.wpe-selected td:first-child{box-shadow:inset 4px 0 0 #2563eb}
#twp-extra-content .wpe-detail-card h3{margin-top:0;color:#1e3a8a}
#twp-extra-content .wpe-detail-title{font-size:15px;font-weight:700;line-height:1.45;margin:0 0 8px}
#twp-extra-content .wpe-detail-list{display:grid;grid-template-columns:minmax(150px,auto) 1fr;gap:8px 14px;margin:14px 0;padding:12px 14px;border:1px solid #e2e8f0;border-radius:9px;background:#f8fafc;font-size:13px}
#twp-extra-content .wpe-detail-list dt{color:#64748b;font-weight:600}
#twp-extra-content .wpe-detail-list dd{margin:0;font-weight:700;white-space:pre-wrap;overflow-wrap:anywhere}
#twp-extra-content .wpe-detail-actions{min-width:0}
#twp-extra-content .wpe-panel-idle .wpe-primary{padding:11px 22px;font-size:15px}
#twp-extra-content .wpe-research th{text-align:center;vertical-align:middle}
#twp-extra-content .wpe-research td.wpe-num{text-align:center}
#twp-extra-content .wpe-research .wpe-total-row td{font-weight:700;background:#f8fafc}
#twp-extra-content .wpe-row-controls{display:flex;flex-wrap:wrap;align-items:center;gap:5px;margin-top:8px}
#twp-extra-content .wpe-row-controls button{font-size:11px;padding:3px 7px}
#twp-extra-content .wpe-row-controls .wpe-state{margin-bottom:0}
#twp-extra-content .wpe-state{display:inline-block;margin-bottom:6px;padding:2px 8px;border-radius:999px;font-size:11px;font-weight:700;white-space:nowrap;background:#f1f5f9;color:#475569}
#twp-extra-content .wpe-state-submitted{background:#dbeafe;color:#1d4ed8}
#twp-extra-content .wpe-state-approved{background:#dcfce7;color:#15803d}
#twp-extra-content .wpe-state-returned{background:#fee2e2;color:#b91c1c}
#twp-extra-content .wpe-draft-badge{display:inline-block;margin-top:6px;padding:2px 8px;border-radius:999px;background:#fef3c7;color:#92400e;font-size:11px;font-weight:700;white-space:nowrap}
@media(max-width:1100px){#twp-extra-content .wpe-split{grid-template-columns:1fr}#twp-extra-content .wpe-split-editor{position:static;max-height:none;order:-1}
    #twp-extra-content.wpe-has-split:not([style*="display: none"]):not([style*="display:none"]){display:block!important}
    #twp-extra-content.wpe-has-split{overflow:auto}
    #twp-extra-content.wpe-has-split>.wpe-split{grid-template-rows:none}
    #twp-extra-content.wpe-has-split .wpe-split-list,#twp-extra-content.wpe-has-split .wpe-split-editor{overflow:visible}}
@media(max-width:850px){#twp-extra-content{padding:14px}#twp-extra-content .wpe-grid,#twp-extra-content .wpe-split .wpe-grid{grid-template-columns:1fr}}
@media(max-width:560px){#twp-extra-content .wpe-research-form .wpe-group-grid{grid-template-columns:1fr}}
.wpe-catalog-overlay{position:fixed;inset:0;z-index:10070;background:rgba(15,23,42,.55);display:flex;align-items:center;justify-content:center;padding:16px}
.wpe-catalog{width:min(980px,100%);height:min(680px,calc(100vh - 32px));display:flex;flex-direction:column;background:#fff;border-radius:14px;box-shadow:0 24px 70px rgba(15,23,42,.35);overflow:hidden;color:#17243b;font-family:inherit}
.wpe-catalog *{box-sizing:border-box}
.wpe-catalog header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;border-bottom:1px solid #e2e8f0;background:#eff6ff;flex-shrink:0}
.wpe-catalog header strong{font-size:16px;color:#1e3a8a}
.wpe-catalog header button{font-size:20px;line-height:1;padding:4px 11px}
.wpe-catalog button{border:1px solid #cbd5e1;border-radius:8px;background:#fff;color:#1e40af;padding:8px 12px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}
.wpe-catalog button:disabled{opacity:.5;cursor:wait}
.wpe-catalog .wpc-primary{background:#2563eb;border-color:#2563eb;color:#fff}
.wpe-catalog .wpc-danger{color:#b91c1c;border-color:#fecaca;background:#fff5f5}
.wpe-catalog-body{display:grid;grid-template-columns:240px minmax(0,1fr);flex:1;min-height:0}
.wpe-catalog-nav{display:flex;flex-direction:column;gap:6px;padding:14px;border-right:1px solid #e2e8f0;background:#f8fafc;overflow:auto}
.wpe-catalog-nav button{text-align:left;color:#334155}
.wpe-catalog-nav button[aria-current="true"]{background:#2563eb;border-color:#2563eb;color:#fff}
.wpe-catalog-main{padding:18px 20px;overflow:auto;min-height:0}
.wpe-catalog-main h3{margin:0 0 8px;font-size:16px;color:#1e3a8a}
.wpe-catalog-list{list-style:none;margin:12px 0;padding:0;display:flex;flex-direction:column;gap:8px;counter-reset:wpc}
.wpe-catalog-list li{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border:1px solid #e2e8f0;border-radius:9px;background:#fff;font-size:14px}
.wpe-catalog-list li::before{counter-increment:wpc;content:counter(wpc) ".";font-weight:700;color:#64748b;min-width:22px;line-height:1.45}
.wpe-catalog-list li.wpc-empty{color:#64748b;border-style:dashed}
.wpe-catalog-list li.wpc-empty::before{content:none}
.wpe-catalog-list .wpc-title{flex:1;min-width:0;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}
.wpe-catalog-list .wpc-buttons{display:flex;gap:6px;flex-shrink:0}
.wpe-catalog-list .wpc-buttons button{padding:5px 9px;font-size:12px}
.wpe-catalog .wpc-label{display:flex;flex-direction:column;gap:6px;font-size:13px;font-weight:700}
.wpe-catalog textarea{width:100%;min-height:90px;padding:9px;border:1px solid #b9c7da;border-radius:7px;font:14px Arial;color:#17243b;resize:vertical}
.wpe-catalog .wpc-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.wpe-catalog .wpc-muted{color:#64748b;font-size:13px;line-height:1.5;margin:0 0 8px}
.wpe-catalog .wpc-error{color:#b91c1c}
.wpe-catalog .wpc-ok{color:#047857}
.wpe-catalog p[role="status"]{min-height:18px;margin:6px 0;font-size:13px;font-weight:700}
@media(max-width:700px){.wpe-catalog{height:calc(100vh - 32px)}.wpe-catalog-body{grid-template-columns:1fr;grid-template-rows:auto minmax(0,1fr)}.wpe-catalog-nav{flex-direction:row;flex-wrap:wrap;border-right:0;border-bottom:1px solid #e2e8f0}.wpe-catalog-list li{flex-wrap:wrap}}
