/* ===== Khu làm việc FARM / PORTAL / GOV / ADMIN theo prototype 10/11/13 ===== */
.ws{display:grid;grid-template-columns:260px 1fr;min-height:calc(100vh - 88px);background:#f3f7f5}
.ws-side{background:#fff;border-right:1px solid #e1ebe5;display:flex;flex-direction:column;}
.ws-title{display:flex;align-items:center;gap:12px;background:linear-gradient(120deg,#07613f,#0b8a5c);color:#fff;font-weight:800;font-size:15px;padding:18px 20px;border-radius:0 0 0 0}
.ws-title-ic{width:36px;height:36px;border:2px solid #fff;border-radius:50%;display:flex;align-items:center;justify-content:center}
.ws-side nav{padding:8px 10px}
.ws-side nav a{display:flex;align-items:center;gap:12px;padding:9px 12px;border-radius:9px;color:#26493b;font-size:12.5px;font-weight:500;margin:2px 0}
.ws-side nav a .icon{color:#0b8a5c;width:20px;height:20px}
.ws-side nav a small{display:block;font-size:9px;color:#8aa095;letter-spacing:.5px;line-height:1.1}
.ws-side nav a:hover{background:#eef7f2}
.ws-side nav a.active{background:#d9f0e3;color:#06573a;font-weight:700}
.ws-help{margin:10px 14px;padding:12px;border:1px solid #d9e8e0;border-radius:10px;font-size:11px;color:#4b6358}
.ws-help strong{display:block;margin-bottom:4px;color:#0b6a45}
.ws-help p{margin:0}
.ws-switch{padding:6px 14px 18px;margin-top:auto}
.ws-switch label{font-size:11px}
.ws-main{padding:22px 26px;min-width:0}
.ws-banner{border-radius:14px;min-height:190px;display:flex;align-items:center;padding:30px 40px;color:#fff;background-size:cover;background-position:center 45%;margin-bottom:20px}
.ws-banner h1{font-size:28px;margin:10px 0}
.ws-banner p{max-width:520px;font-size:14px}
.ws-head{display:flex;justify-content:space-between;align-items:flex-end;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.ws-head h1{font-size:24px;margin:4px 0 0;color:#0f3b2d}
.ws-head .eyebrow{color:#5f8a76}
.kpi5{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;margin-bottom:18px}
.kcard{display:flex;align-items:center;gap:14px;background:#fff;border:1px solid #e2ebed;border-radius:12px;padding:16px 18px;box-shadow:0 3px 12px #163c5510}
.kcard:hover{border-color:#8fd0b0}
.kic{width:44px;height:44px;border-radius:12px;background:#e3f4ea;color:#0b8a5c;display:flex;align-items:center;justify-content:center}
.kic .icon{width:24px;height:24px}
.kcard:nth-child(2) .kic{background:#e4eefc;color:#2478bd}
.kcard:nth-child(3) .kic{background:#fff1d9;color:#e08413}
.kcard:nth-child(4) .kic{background:#efe6fb;color:#8352d5}
.kcard:nth-child(5) .kic{background:#fde7e3;color:#d9503a}
.kcard b{display:block;font-size:26px;line-height:1.1;color:#0f3b2d}
.kcard small{font-size:11px;color:#587468}
.dash-grid{display:grid;grid-template-columns:1.6fr 1fr;gap:18px;margin-bottom:18px}
.dash-grid3{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:18px;margin-bottom:18px}
.dash-map{height:300px;border-radius:10px;overflow:hidden;background:#e6f2f4}
.section-heading .icon{width:18px;height:18px;color:#0b8a5c;margin-right:6px}
.act{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:9px 0;border-bottom:1px solid #edf2ef;font-size:12px}
.act span{color:#6a8177;font-size:11px}
.act small{color:#8aa095;grid-column:1/-1}
.donut-wrap{display:flex;gap:22px;align-items:center;flex-wrap:wrap}
.donut{width:150px;height:150px;border-radius:50%;display:flex;align-items:center;justify-content:center;position:relative;flex-shrink:0}
.donut:before{content:"";position:absolute;inset:26px;background:#fff;border-radius:50%}
.donut span{position:relative;text-align:center;font-size:11px;color:#587468;display:flex;flex-direction:column}
.donut b{font-size:24px;color:#0f3b2d}
.legend{list-style:none;padding:0;margin:0;font-size:12px}
.legend li{margin:6px 0}
.legend i{display:inline-block;width:10px;height:10px;border-radius:50%;margin-right:8px}
.quick-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.quick-grid a{display:flex;flex-direction:column;gap:2px;padding:12px;border:1px solid #d9eadf;border-radius:9px;background:#f6fbf8;font-size:12px;color:#14583f}
.quick-grid a b{font-size:9px;color:#7a9a8a;letter-spacing:.5px}
.toolbar{display:flex;gap:10px;margin-bottom:14px;flex-wrap:wrap;align-items:center}
.toolbar .search-box{flex:1 1 260px;display:flex;align-items:center;gap:8px;border:1px solid #d6e2e7;border-radius:8px;padding:0 12px;margin:0;background:#fff}
.toolbar .search-box input{border:0!important;margin:0!important;box-shadow:none!important}
.toolbar select{width:auto;margin:0;min-width:190px}
.toolbar .button{padding:9px 14px;font-size:12px}
.tabs3{display:flex;gap:6px;margin-bottom:14px;border-bottom:1px solid #e1ebe5}
.tabs3 button{border:0;background:none;padding:10px 16px;font-weight:600;color:#587468;border-bottom:3px solid transparent}
.tabs3 button.on{color:#0b6a45;border-bottom-color:#0b8a5c}
table.dt{font-size:12.5px}
table.dt th{background:#eef6f1;color:#26493b;font-size:11px;text-transform:none}
table.dt td:first-child{min-width:0}
table.dt tr:hover td{background:#fafdfb}
.st{display:inline-block;font-size:11px;font-weight:600;padding:4px 10px;border-radius:5px;white-space:nowrap;background:#edf1f3;color:#5a6b73}
.st.green{background:#dff3e6;color:#12803f}
.st.blue{background:#e1ecfb;color:#1b62b8}
.st.orange{background:#ffeccf;color:#b86a0d}
.st.red{background:#fde3df;color:#c0392b}
.st.gray{background:#eef1f2;color:#68797f}
.acts{white-space:nowrap}
.table-action{border:1px solid #bfded0;background:#f3faf7;color:#187448;border-radius:5px;padding:5px 9px;margin:2px;font-size:11px}
.table-action:hover{background:#dff3e6}
.table-action.ok{background:#12803f;border-color:#12803f;color:#fff}
.table-action.bad{background:#fff;border-color:#e0a39b;color:#c0392b}
.table-action.warn{background:#fff6e6;border-color:#e6c27a;color:#a5640a}
.pager{display:flex;justify-content:space-between;align-items:center;margin-top:12px;flex-wrap:wrap;gap:8px}
.pager button{width:30px;height:30px;border:1px solid #d6e2e7;background:#fff;border-radius:5px;margin-left:4px}
.pager button.on{background:#0b8a5c;color:#fff;border-color:#0b8a5c}
.stepper{list-style:none;display:flex;padding:0;margin:14px 0 4px;gap:0;overflow-x:auto}
.stepper li{flex:1;text-align:center;font-size:11px;color:#8aa095;position:relative;min-width:90px}
.stepper li b{display:flex;width:30px;height:30px;border-radius:50%;background:#dfe7e3;color:#fff;align-items:center;justify-content:center;margin:0 auto 6px;position:relative;z-index:1}
.stepper li:before{content:"";position:absolute;top:15px;left:-50%;right:50%;height:3px;background:#dfe7e3}
.stepper li:first-child:before{display:none}
.stepper li.done b,.stepper li.now b{background:#0b8a5c}
.stepper li.done:before,.stepper li.now:before{background:#0b8a5c}
.stepper li.now{color:#0b6a45;font-weight:700}
.stepper li.now b{box-shadow:0 0 0 4px #bfe6d1}
.qr-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:16px}
.qr-card{border:1px solid #e1ebe5;border-radius:12px;padding:14px;display:flex;flex-direction:column;gap:6px;align-items:flex-start}
.qr-card img{width:140px;height:140px;align-self:center}
.qr-card .button{font-size:11px;padding:7px 12px}
.bars{display:flex;flex-direction:column;gap:10px}
.bar{display:grid;grid-template-columns:200px 1fr 40px;gap:12px;align-items:center;font-size:12px}
.bar div{background:#e8f1ec;border-radius:20px;height:12px}
.bar i{display:block;height:100%;background:linear-gradient(90deg,#0b8a5c,#33b97f);border-radius:20px}
.thumb{width:48px;height:40px;object-fit:cover;border-radius:5px}
.news-row.unread{border-left:3px solid #0b8a5c;padding-left:12px;background:#f6fbf8}
.draw-map{height:260px;border-radius:8px;margin:6px 0}
.narrow-form{max-width:480px}
.chk{display:flex;gap:8px;align-items:center}
dialog .btn-pair{margin-top:16px}
@media(max-width:1300px){.kpi5{grid-template-columns:repeat(3,1fr)}
.dash-grid3{grid-template-columns:1fr 1fr}
}
@media(max-width:1000px){.ws{grid-template-columns:210px 1fr}
.dash-grid,.dash-grid3{grid-template-columns:1fr}
.kpi5{grid-template-columns:repeat(2,1fr)}
.ws-main{padding:16px}
}
@media(max-width:650px){.ws{display:block}
.ws-side{position:static;max-height:none}
.ws-side nav{display:flex;overflow:auto;padding:6px}
.ws-side nav a{flex-shrink:0;white-space:nowrap}
.ws-side nav a small,.ws-help{display:none}
.ws-banner{padding:22px}
.bar{grid-template-columns:100px 1fr 30px}
}
/* ADMIN theo prototype 13: sidebar xanh đậm + topbar riêng,không dùng header/footer công khai */
.ad-top{display:flex;align-items:center;gap:24px;background:#fff;border-bottom:1px solid #e1ebe5;padding:8px 24px;height:60px;position:sticky;top:0;z-index:20}
.ad-brand img{display:block;height:42px;width:auto}
.ad-search{flex:1;max-width:560px;display:flex;align-items:center;gap:8px;border:1px solid #d6e2e7;border-radius:8px;padding:0 12px;margin:0 auto 0 0;background:#f8fbfa}
.ad-search input{border:0!important;margin:0!important;background:transparent;box-shadow:none!important}
.ad-user{display:flex;align-items:center;gap:12px;margin-left:auto}
.ad-user strong{display:block;font-size:12px;line-height:1.2}
.ad-user small{display:block;font-size:10px;color:#6a8177}
.ad-user .bell{color:#0b6a45}
.ad-user .avatar{width:34px;height:34px;border-radius:50%;background:#d9f0e3;color:#0b6a45;display:flex;align-items:center;justify-content:center}
.ws-dark{min-height:calc(100vh - 60px)}
.ws-dark .ws-side{background:#07442f;border-right:0;color:#d6ebe0}
.ws-dark .ws-title{background:transparent;font-size:12px;letter-spacing:.5px;padding:16px 20px 6px;color:#9fd0b8}
.ws-dark .ws-title-ic{display:none}
.ws-dark .ws-side nav a{color:#d6ebe0}
.ws-dark .ws-side nav a .icon{color:#8fd0b0}
.ws-dark .ws-side nav a small{color:#78ab94}
.ws-dark .ws-side nav a:hover{background:#0b5a3e}
.ws-dark .ws-side nav a.active{background:#0f7a54;color:#fff}
.ws-dark .ws-side nav a.active .icon,.ws-dark .ws-side nav a.active small{color:#fff}
.ws-dark .ws-help{border-color:#17664a;color:#b6d8c7;background:#0a4f37}
.ws-dark .ws-help strong,.ws-dark .ws-help a{color:#fff}
.ws-dark .ws-switch label{color:#b6d8c7}
.ws-dark .ws-switch .button{background:transparent;color:#fff;border-color:#4a9a7b}
.ws-feats{list-style:none;display:flex;gap:18px;padding:0;margin:14px 0 0;flex-wrap:wrap}
.ws-feats li{display:flex;gap:8px;align-items:center;font-size:11.5px;max-width:190px;line-height:1.3}
.ws-feats span{width:34px;height:34px;border-radius:50%;background:#fff;color:#0b8a5c;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.ws-feats .icon{width:18px;height:18px}
/* Chuẩn hóa menu bên,bảng danh mục và hộp thoại theo prototype 11/13 */
.ws{grid-template-columns:270px 1fr}
.ws-side nav{padding:10px 12px}
.ws-side nav a{gap:14px;padding:10px 14px;font-size:14px;font-weight:500;border-radius:10px;margin:3px 0}
.ws-side nav a .icon{width:22px;height:22px;flex:0 0 22px}
.ws-side nav a small{font-size:9.5px;margin-top:1px}
.ws-title{font-size:16px;padding:20px 22px}
.ws-title-ic .icon{width:22px;height:22px}
.ws-main{padding:24px 28px}
.ws-head h1{font-size:26px}
.ws-help{font-size:12px}
.thumb.ph{display:inline-block;background:#eef4f0}
.acts{display:flex;gap:6px;align-items:center}
.table-action{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:30px;border:1px solid #d3e2dc;border-radius:7px;background:#fff;color:#0b6a45;font-size:12px;padding:0 8px}
.table-action .icon{width:15px;height:15px}
.table-action.bad{color:#c0392b;border-color:#f0cfc9}
.table-action.ok{color:#0b8a5c;border-color:#bfe3d1}
.table-action.warn{color:#b9610f;border-color:#f3dcc2}
.table-action:hover{background:#f0f8f4}
.dt th{background:#e9f4ee;color:#0f3b2d;font-size:12px;text-transform:none}
.dt td{font-size:13px;vertical-align:middle}
.cat-dialog{border:0;border-radius:14px;padding:24px;width:min(640px,92vw);box-shadow:0 24px 60px #0a2a3a55}
.cat-dialog::backdrop{background:#0a2a3a80}
.cat-dialog label{display:block;font-weight:600;font-size:13px;margin-bottom:12px}
.cat-dialog input,.cat-dialog select,.cat-dialog textarea{width:100%;margin-top:5px;padding:9px 12px}
.btn-pair{display:flex;gap:12px;justify-content:flex-end}
.st{display:inline-block;border-radius:999px;padding:3px 11px;font-size:11.5px;font-weight:600;white-space:nowrap}
.st.green{background:#dff3e8;color:#0a6a45}
.st.orange{background:#ffefd6;color:#b9610f}
.st.blue{background:#e1ecfb;color:#1b62b8}
.st.red{background:#fde3df;color:#b83a2b}
.st.gray{background:#edf1f2;color:#5b7079}
.toolbar select{min-width:150px;flex:0 1 190px}
.toolbar .search-box{flex:1 1 200px}
/* Biểu mẫu nhiều bước (PORTAL-04) */
.step-bar{display:flex;gap:10px;list-style:none;margin:0 0 18px;padding:0}
.step-bar li{flex:1;display:flex;align-items:center;gap:8px;font-size:12px;color:#7a8f86;font-weight:600}
.step-bar b{width:28px;height:28px;border-radius:50%;background:#e1e8e5;color:#587468;display:inline-flex;align-items:center;justify-content:center;flex:0 0 28px}
.step-bar li.on{color:#0b6a45}
.step-bar li.on b,.step-bar li.done b{background:#0b8a5c;color:#fff}
fieldset.wiz-step{border:0;padding:0;margin:0}
fieldset.wiz-step legend{font-weight:700;font-size:15px;margin-bottom:12px;color:#0f3b2d}
#coord-input{width:100%;margin-top:6px;padding:9px 12px;font-family:monospace}
.empty{text-align:center;padding:42px 20px}
.empty .empty-ic{display:inline-flex;width:72px;height:72px;border-radius:50%;background:#e3f4ea;color:#0b8a5c;align-items:center;justify-content:center;margin-bottom:10px}
.empty .empty-ic .icon{width:34px;height:34px}
.empty h3{margin:6px 0 4px;font-size:17px}
.empty p{margin:0 0 14px;color:#587468}
.dash-news-row{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.dn{display:grid;grid-template-columns:110px 1fr;gap:12px;align-items:center;border:1px solid #e2ebed;border-radius:10px;padding:8px}
.dn:hover{border-color:#8fd0b0}
.dn img{width:110px;height:76px;object-fit:cover;border-radius:7px}
.dn strong{display:block;font-size:12.5px;line-height:1.35}
.dn small{color:#6a8177;font-size:11px}
@media(max-width:1000px){.dash-news-row{grid-template-columns:1fr}
}
.chips{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.chip2{border:1px solid #d3e2dc;background:#fff;border-radius:999px;padding:5px 14px;font-size:12.5px;font-weight:600;color:#26493b}
.chip2 b{background:#e3f4ea;color:#0b6a45;border-radius:999px;padding:0 7px;margin-left:4px;font-size:11px}
.chip2.on{background:#0b8a5c;border-color:#0b8a5c;color:#fff}
.chip2.on b{background:#ffffff33;color:#fff}
.act{display:grid;grid-template-columns:1fr auto;gap:2px 10px;align-items:center}
.act strong{font-size:13px}
.act small{grid-column:1/-1}
.qr-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:8px}
.qr-actions .button{padding:6px 10px;font-size:12px}


/* Bộ lọc tự áp dụng: không cần nút Tìm kiếm */
.toolbar#cat-filter>button.button{display:none}

/* Vẽ vùng sản xuất */
.draw-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap;margin:4px 0 6px}
.draw-tools .table-action{margin-left:4px}
#draw-info{color:#0b6a45;font-weight:600}
/* Giám sát vệ tinh một chạm */
.mon-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(320px,1fr));gap:14px}
.mon-card h2{font-size:17px;margin:0}
.mon-acts{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}
.mon-btn{display:flex;flex-direction:column;align-items:flex-start;gap:2px;text-align:left;padding:10px 12px;border:1px solid #cfe5da;border-radius:12px;background:#f4fbf7;cursor:pointer;font:inherit;color:#264136}
.mon-btn strong{color:#0b6a45;font-size:14px}.mon-btn small{color:#6a8177;font-size:12px;line-height:1.3}
.mon-btn:hover{background:#e1f3ea;border-color:#169168}.mon-btn:disabled{opacity:.6;cursor:wait}
.table-action.ok{background:#169168!important;border-color:#169168!important;color:#fff!important}.table-action.ok:hover{background:#0b6a45!important}

/* Việc cần làm trên trang tổng quan */
.todo-box{margin-bottom:14px}
.todo-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) auto;gap:12px;align-items:center;padding:9px 12px;border-radius:10px;background:#f6f9f7;margin-top:6px;text-decoration:none;color:inherit}
.todo-row:hover{background:#e7f4ed}.todo-row strong{color:#0b6a45;font-size:14px}.todo-row span{color:#5d7268;font-size:13px}.todo-row em{font-style:normal;font-weight:700;color:#169168;font-size:13px}
@media(max-width:700px){.todo-row{grid-template-columns:1fr}}
