:root{--primary:#0F766E;--secondary:#12343B;--accent:#D6A84F;--bg:#f4f7f8;--card:#fff;--text:#17333a;--muted:#6b7b80;--border:#e4eaec;--danger:#c0392b;--shadow:0 8px 28px rgba(18,52,59,.08)}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}.login{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,var(--secondary),var(--primary));padding:24px}.login-card{width:min(430px,100%);background:#fff;border-radius:22px;padding:34px;box-shadow:0 20px 60px rgba(0,0,0,.2)}.login-brand{text-align:center;margin:2px 0 28px}.login-logo{width:92px;height:92px;object-fit:contain;border-radius:14px;margin:0 auto 14px;display:block}.login-logo-fallback{width:92px;height:92px;border-radius:18px;background:var(--primary);color:#fff;display:grid;place-items:center;font-size:30px;font-weight:800;margin:0 auto 14px}.login-brand h1{font-size:22px;line-height:1.25;margin:0}.login-brand p{font-size:12px;color:var(--muted);margin:7px 0 0}.login-powered{text-align:center;color:#a0abad;font-size:9px;margin-top:22px}.brand{display:flex;align-items:center;gap:12px;margin-bottom:26px}.brand-mark,.mini{width:52px;height:52px;border-radius:12px;background:var(--primary);color:#fff;display:grid;place-items:center;font-weight:800}.brand img,.top-brand img{object-fit:contain;border-radius:10px}.brand h1{font-size:20px;margin:0}.brand p{font-size:12px;color:var(--muted);margin:4px 0}.field{margin:14px 0}.field label{display:block;font-size:12px;font-weight:700;margin-bottom:7px;color:var(--muted)}.field input,.field select,.field textarea{width:100%;border:1px solid var(--border);border-radius:10px;padding:11px 12px;outline:none;background:#fff}.field select[multiple]{min-height:110px}.field input:focus,.field select:focus,.field textarea:focus{border-color:var(--primary)}.btn{padding:10px 14px;border-radius:10px;font-weight:700}.btn-primary{background:var(--primary);color:#fff}.btn-secondary{background:#edf4f4;color:var(--secondary)}.btn-danger{background:#fff0ee;color:var(--danger)}.app{min-height:100vh}.topbar{height:70px;background:#fff;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;padding:0 24px;position:sticky;top:0;z-index:10}.top-brand{display:flex;align-items:center;gap:10px;font-weight:800}.top-brand img,.top-brand .mini{height:38px;width:38px}.top-actions{display:flex;align-items:center;gap:10px}.user-pill{background:#f1f5f6;border-radius:999px;padding:8px 12px;font-size:13px}.layout{display:grid;grid-template-columns:235px 1fr;min-height:calc(100vh - 70px)}.sidebar{background:var(--secondary);color:#fff;padding:18px 12px}.nav button{width:100%;text-align:left;background:transparent;color:#dfe9ea;padding:11px 12px;border-radius:9px;margin:2px 0}.nav button:hover,.nav button.active{background:rgba(255,255,255,.1);color:#fff}.content{padding:24px;max-width:1800px;width:100%;margin:auto}.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:20px}.page-head h2{margin:0;font-size:26px}.page-head p{margin:5px 0;color:var(--muted);font-size:13px}.grid{display:grid;gap:16px}.kpis{grid-template-columns:repeat(5,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow);padding:18px}.cards{display:grid;gap:14px;margin-bottom:16px}.metric{background:#fff;border:1px solid var(--border);border-radius:14px;padding:17px}.metric span{font-size:12px;color:var(--muted)}.metric b{display:block;font-size:25px;margin-top:7px}.metric b small{font-size:13px;color:var(--muted)}.metric.danger b{color:#b43a32}.dashboard-grid{grid-template-columns:1.2fr .8fr}.chart-title{font-weight:800;margin-bottom:15px}.donut-wrap{display:flex;align-items:center;gap:25px}.donut{width:150px;height:150px;border-radius:50%;position:relative}.donut:after{content:'';position:absolute;inset:28px;background:#fff;border-radius:50%}.legend div{display:flex;align-items:center;gap:8px;margin:9px 0;font-size:12px}.dot{width:10px;height:10px;border-radius:50%;display:inline-block}.greenbg{background:#3b9b6b}.yellowbg{background:#d9a72f}.redbg{background:#c94b43}.green{color:#21814e}.yellow{color:#9a7008}.red{color:#b93b34}.dept-row{display:grid;grid-template-columns:220px 1fr 160px;gap:12px;align-items:center;margin:15px 0}.dept-label span{display:block;font-size:11px;color:var(--muted);margin-top:4px}.stack{height:10px;display:flex;background:#eef1f2;border-radius:99px;overflow:hidden}.stack.big{height:13px}.stack .g{background:#3b9b6b}.stack .y{background:#d9a72f}.stack .r{background:#c94b43}.dept-nums{display:flex;gap:10px;font-size:11px;justify-content:flex-end}.table-wrap{overflow:auto}.filters{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:14px}.filters input{flex:1;min-width:240px}.filters input,.filters select{border:1px solid var(--border);border-radius:10px;padding:9px 10px;background:#fff}.data-table{width:100%;border-collapse:collapse;font-size:12px}.data-table th{text-align:left;background:#f7f9fa;color:#6a7b80;font-size:11px;padding:11px;border-bottom:1px solid var(--border);white-space:nowrap;cursor:pointer}.data-table td{padding:9px 11px;border-bottom:1px solid var(--border);vertical-align:middle}.data-table tr:hover td{background:#fbfcfc}.status{display:inline-flex;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:700;white-space:nowrap}.status-btn{border:0}.s-done{background:#e6f5ef;color:#14734f}.s-progress{background:#fff4db;color:#9a6a00}.s-not{background:#eef1f3;color:#647277}.actions{display:flex;gap:4px}.icon-btn{width:30px;height:30px;border-radius:8px;background:#edf4f4;color:var(--secondary)}.danger-icon{background:#fff0ee;color:var(--danger)}.priority,.approval{display:inline-grid;place-items:center;width:20px;height:20px;border-radius:50%;font-weight:900;margin-right:4px}.priority.high{background:#dbeafe;color:#1d4ed8}.priority.critical{background:#fee2e2;color:#b91c1c}.approval-icon{display:inline-grid;place-items:center;width:22px;height:22px;border-radius:6px;font-weight:900;margin-left:5px}.approval-icon.pending{background:#dc2626;color:#fff}.approval-icon.approved{background:#16a34a;color:#fff}.small{font-size:11px;color:var(--muted);margin-top:3px}.modal-bg{position:fixed;inset:0;background:rgba(10,30,34,.5);display:none;align-items:center;justify-content:center;padding:20px;z-index:30}.modal-bg.show{display:flex}.modal{width:min(760px,100%);max-height:92vh;overflow:auto;background:#fff;border-radius:18px;padding:22px}.modal-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:15px}.modal-head h3{margin:0}.two{display:grid;grid-template-columns:1fr 1fr;gap:12px}.modal-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}.setting-logo{max-width:180px;max-height:90px;object-fit:contain;border:1px dashed var(--border);padding:8px;border-radius:10px;margin-top:8px}.empty{padding:35px;text-align:center;color:var(--muted)}.opening{display:flex;flex-direction:column;text-align:center;padding:10px 18px;border-radius:10px;background:#f7f8f9}.opening b{font-size:25px;color:var(--primary)}.opening small{color:var(--muted);margin-top:3px}.alert{padding:12px 14px;border-radius:10px;background:#fff6df;color:#805b00;font-size:12px}.calendar-head{display:flex;justify-content:space-between;margin-bottom:15px}.calendar-head span{color:var(--muted);font-size:12px}.weekdays,.calendar-month{display:grid;grid-template-columns:repeat(7,1fr);gap:5px}.weekdays b{font-size:11px;color:var(--muted);padding:8px}.cal-day{min-height:125px;background:#fafbfb;border:1px solid var(--border);border-radius:8px;padding:6px}.cal-day.muted{background:#f2f4f4}.cal-date{font-size:12px;font-weight:800;margin-bottom:5px}.cal-task{font-size:10px;padding:5px 6px;border-radius:6px;margin:3px 0;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cal-task.s-done{background:#e6f5ef}.cal-task.s-progress{background:#fff4db}.cal-task.s-not{background:#eef1f3}.gantt{overflow:auto}.g-months{display:grid;grid-template-columns:280px 1fr;min-width:1000px;margin-bottom:8px}.g-label{font-weight:800}.g-month-grid{display:grid;grid-auto-flow:column;grid-auto-columns:minmax(120px,1fr)}.g-month-grid div{font-size:11px;font-weight:800;border-left:1px solid #ddd;padding-left:7px}.g-row{display:grid;grid-template-columns:280px 1fr;gap:10px;min-width:1000px;padding:8px 0;border-top:1px solid #eee}.g-name small{display:block;font-size:10px;color:var(--muted);margin-top:3px}.g-track{height:24px;background:repeating-linear-gradient(90deg,#f1f3f4 0,#f1f3f4 3.1%,#e4e7e9 3.2%,#e4e7e9 3.3%);border-radius:6px;position:relative}.g-track span{position:absolute;top:3px;height:18px;border-radius:5px;background:var(--primary)}.g-track span.done{background:#3b7d55}.g-track span.progress{background:var(--accent)}.dept-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.dept-card h3{font-size:14px;margin:0 0 14px}.dept-card>.btn{padding:6px 10px;font-size:11px;line-height:1.1;border-radius:8px}.admin-row{display:flex;justify-content:space-between;align-items:center;padding:10px 0;border-bottom:1px solid var(--border)}.notice{display:flex;align-items:center;gap:12px;padding:14px;border-bottom:1px solid #eee}.notice span{flex:1}.notice.unread{background:#fff8e6}.notice small,.message small{color:#777}.message{padding:12px 0;border-bottom:1px solid var(--border)}.message b{margin-right:8px}.comment{padding:10px;background:#f7f8f9;border-radius:8px;margin:8px 0}.attachment{padding:7px 0}.mobile-nav{display:none}@media(max-width:1100px){.layout{grid-template-columns:1fr}.sidebar{display:none}.mobile-nav{display:flex;overflow:auto;background:var(--secondary);padding:8px}.mobile-nav button{flex:0 0 auto;background:transparent;color:#fff;padding:8px 12px}.kpis{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.dept-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:650px){.content{padding:14px}.topbar{padding:0 14px}.two{grid-template-columns:1fr}.dept-grid{grid-template-columns:1fr}.dept-row{grid-template-columns:1fr}.dept-nums{justify-content:flex-start}.calendar-month{gap:2px}.cal-day{min-height:90px}.top-actions .user-pill{display:none}}
@media print{.sidebar,.mobile-nav,.topbar,.page-head button,.filters,.btn,.actions,.modal-bg{display:none!important}.layout{display:block}.content{padding:0}.card{box-shadow:none;border:1px solid #ddd}}
.dashboard-top{grid-template-columns:minmax(0,1.55fr) minmax(300px,.65fr);align-items:stretch;margin-bottom:16px}.dashboard-top .kpis{margin:0}.g-month-grid{display:flex;align-items:stretch}.g-month-grid div{flex:0 0 auto;min-height:28px}.reply-btn{margin-top:8px;padding:6px 9px;font-size:11px}
@media(max-width:1100px){.dashboard-top{grid-template-columns:1fr}.dashboard-top .kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.dashboard-top .kpis{grid-template-columns:1fr}}
/* v0.7 interface refinements */
.tasks-table th,.tasks-table td{vertical-align:top}.tasks-table .note-cell{min-width:220px;max-width:360px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}.file-mark{margin-right:5px}.muted-note{color:#9aa5a8}.deadline-ok{color:#21814e;white-space:nowrap}.deadline-overdue{color:#c62828;white-space:nowrap}.field-hint{font-size:11px;color:var(--primary);margin-top:6px;font-weight:700}.calendar-page-head{margin-bottom:8px}.calendar-card{padding:12px}.calendar-toolbar{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:10px;position:relative}.calendar-toolbar b{min-width:150px;text-align:center}.weekdays b{text-align:center}.cal-day{min-height:105px;overflow:hidden}.cal-task{white-space:normal;line-height:1.2}.cal-dept{font-size:8px;color:#6d7b80;font-weight:700;display:inline-block}.gantt{overflow:auto;max-height:calc(100vh - 170px);position:relative}.g-sticky{position:sticky;top:0;z-index:5;background:#fff;padding-bottom:6px}.g-months,.g-row{min-width:980px}.g-month-grid{overflow:hidden}.g-month-grid div{font-size:9px;text-align:center;padding:5px 2px}.g-track{background:repeating-linear-gradient(90deg,#f1f3f4 0,#f1f3f4 calc(14.285% - 1px),#dfe4e6 calc(14.285% - 1px),#dfe4e6 14.285%)}.recipient-picker{width:100%;text-align:left;background:#fff;border:1px solid var(--border);border-radius:10px;padding:11px 12px;color:#5f6f74;cursor:pointer}.recipient-modal{width:min(900px,100%)}.recipient-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.recipient-grid>div{border:1px solid var(--border);border-radius:12px;padding:14px}.recipient-list{max-height:360px;overflow:auto;display:flex;flex-direction:column;gap:8px}.recipient-list label{display:block;padding:8px;border-radius:8px;background:#f7f9fa;cursor:pointer}.recipient-list label:hover{background:#eef4f4}.recipient-list input{margin-right:8px}.message{position:relative;padding:14px 42px 14px 0}.message-meta{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px}.message-meta small{white-space:nowrap}.reply-btn{position:absolute;right:4px;top:14px}.notifications-card{padding:0}.notice{display:grid;grid-template-columns:155px 1fr auto;gap:15px;align-items:center;padding:14px 16px}.notice-date{color:#6d7b80;white-space:nowrap}.notice-body{display:flex;flex-direction:column;gap:4px}.notice-body span{font-size:12px;color:#4e5d61}.notice-actions{display:flex;gap:5px}.notice-actions .icon-btn{font-size:13px}.notice.unread{border-left:4px solid var(--accent)}
@media(max-width:850px){.calendar-month{grid-template-columns:repeat(7,minmax(0,1fr))}.cal-day{min-height:82px}.cal-task{font-size:9px}.cal-dept{display:block}.recipient-grid{grid-template-columns:1fr}.notice{grid-template-columns:1fr auto}.notice-date{grid-column:1/-1}.notice-body{grid-column:1}.notice-actions{grid-column:2;grid-row:2}}
@media(max-width:650px){.calendar-toolbar{justify-content:space-between;flex-wrap:wrap}.calendar-toolbar b{order:-1;flex:1 0 100%}.calendar-toolbar .btn{padding:7px 8px;font-size:11px}.cal-day{min-height:72px;padding:4px}.cal-task{padding:3px;font-size:8px}.cal-dept{font-size:7px}.tasks-table .note-cell{min-width:160px}}

/* v0.8 finalization */
.readiness-card{min-height:340px}.monthly-pf-card{margin-top:16px}.monthly-pf{min-width:max-content}.monthly-pf th,.monthly-pf td{border-right:1px solid var(--border);text-align:center}.monthly-pf .dept-header{text-align:left;min-width:170px}.monthly-pf .month-group{background:#eef4f4;color:var(--secondary);font-size:12px;text-align:center;border-left:1px solid #cfdadc;border-right:1px solid #cfdadc}.monthly-pf thead tr:nth-child(2) th{background:#f8fafb;text-align:center}.monthly-pf tbody td{min-width:92px}.monthly-pf tbody td:first-child{text-align:left;font-weight:700}.pf-good{color:#21814e!important;font-weight:800}.pf-bad{color:#c62828!important;font-weight:800}.pf-note{margin-top:10px}.cal-task{display:flex;align-items:flex-start;gap:4px}.cal-task-main{display:flex;align-items:flex-start;gap:2px;min-width:0;flex:1}.cal-task-name{overflow-wrap:anywhere;min-width:0}.cal-dept{font-size:8px;color:#8a969a;font-weight:600;flex:0 0 auto;margin-left:auto;white-space:nowrap;padding-top:1px}.report-actions{display:flex;gap:8px}.report-filter-card{margin-bottom:16px}.report-types{display:flex;gap:7px;flex-wrap:wrap;margin-bottom:14px}.report-types button{padding:8px 11px;border:1px solid var(--border);background:#f7f9fa;color:#526267;border-radius:9px;font-size:12px;font-weight:700}.report-types button.active{background:var(--primary);color:#fff;border-color:var(--primary)}.report-filters{margin:0}.report-result-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.report-result-head span{font-size:11px;color:var(--muted)}.report-table th,.report-table td{border-right:1px solid var(--border)}.report-table .month-group{background:#eef4f4;text-align:center;border-left:1px solid #cfdadc}.monthly-report{min-width:max-content}.monthly-report td,.monthly-report th{text-align:center}.monthly-report td:first-child,.monthly-report th:first-child{text-align:left}
@media(max-width:850px){.monthly-pf,.monthly-report{min-width:720px}.report-actions{flex-wrap:wrap}.cal-task{font-size:9px}.cal-dept{font-size:7px}}

.reply-quote{margin:10px 0;padding:11px 13px;border-left:3px solid var(--accent);background:#f7f9fa;border-radius:8px;font-size:12px;color:#4e5d61;white-space:pre-wrap}
.lang-switch{display:inline-flex;border:1px solid #d5dbe0;border-radius:8px;overflow:hidden;background:#fff}.lang-switch button{border:0;background:transparent;padding:6px 9px;font-weight:700;cursor:pointer}.lang-switch button.active{background:var(--secondary);color:#fff}.import-errors{margin:10px 0;padding:10px;border:1px solid #efb3b3;border-radius:8px;background:#fff5f5;color:#a33}.import-errors div{margin:3px 0}.modal .table-wrap{max-height:280px;overflow:auto;margin:12px 0}

/* v0.9.1 minimal productivity refinements */
.quick-actions{display:flex;gap:8px;flex-wrap:wrap;margin:-4px 0 16px}.quick-action{border:1px solid var(--border);background:#fff;border-radius:10px;padding:9px 13px;color:var(--secondary);font-size:12px;font-weight:800;cursor:pointer;box-shadow:0 1px 2px rgba(0,0,0,.03)}.quick-action:hover{border-color:var(--primary);transform:translateY(-1px)}.quick-action.primary{background:var(--primary);border-color:var(--primary);color:#fff}.notification-bell{position:relative;border:1px solid var(--border);background:#fff;border-radius:9px;width:38px;height:34px;cursor:pointer;font-size:15px}.notification-bell span{position:absolute;right:-5px;top:-6px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#c62828;color:#fff;font-size:9px;line-height:17px;font-weight:800}.notice-type{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:50%;background:#edf6f2;color:#21814e;font-weight:800;font-size:11px}.notice-actions{align-items:center}
@media(max-width:650px){.quick-action{flex:1 1 calc(50% - 8px);text-align:center}.notification-bell{width:34px}}
.cal-more{border:0;background:transparent;cursor:pointer;font-size:12px;padding:3px 0;text-decoration:underline;color:var(--primary)}
.day-task-list{display:grid;gap:8px;max-height:60vh;overflow:auto}
.day-task-item{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:10px;align-items:center;text-align:left;border:1px solid #e5e7eb;background:#fff;border-radius:8px;padding:9px 10px;cursor:pointer}
.day-task-item:hover{background:#f8fafc}.day-task-name{min-width:0}.day-task-dept{font-size:12px;color:#8a8f98;white-space:nowrap}.task-note-view{padding:9px 10px;border:1px solid #e5e7eb;border-radius:8px;background:#fafafa;white-space:pre-wrap}
@media(max-width:900px){.day-task-item{grid-template-columns:1fr auto}.day-task-item .status{grid-column:1/-1;justify-self:start}}
/* v1.0.2 admin refinements */
.admin-section-head{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:4px}
.admin-section-head .btn{flex:0 0 auto;padding:8px 12px;font-size:12px}
.admin-row{min-height:48px;padding:9px 0;display:flex;align-items:center}
.admin-row>span{display:block;line-height:1.35;flex:1;min-width:0}
.color-grid{align-items:start}
.color-field{display:flex;align-items:center;gap:10px;width:100%}
.color-field input[type=color]{width:48px;height:40px;padding:3px;border:1px solid var(--border);border-radius:8px;background:#fff;cursor:pointer;flex:0 0 48px}
.color-field .color-hex{flex:1;min-width:0}
.dept-modal{width:min(650px,100%)}
/* v1.0.5 security & stability release */
.page-head-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.multi-select-wrap{position:relative;min-width:240px;z-index:20}
.multi-select-btn{width:100%;min-height:40px;text-align:left;background:#fff;border:1px solid var(--border);border-radius:9px;padding:9px 12px;color:#26383d;cursor:pointer;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.multi-select-menu{display:none;position:absolute;left:0;top:calc(100% + 6px);width:min(360px,calc(100vw - 40px));background:#fff;border:1px solid var(--border);border-radius:12px;box-shadow:0 12px 30px rgba(20,40,45,.14);padding:12px}
.multi-select-menu.show{display:block}
.multi-select-title{font-weight:800;color:var(--secondary);padding:2px 2px 9px;border-bottom:1px solid #edf0f1}
.multi-select-options{max-height:300px;overflow:auto;padding:8px 0;display:grid;grid-template-columns:1fr 1fr;gap:4px 8px}
.multi-select-options label{display:flex;align-items:center;gap:8px;padding:8px 7px;border-radius:7px;cursor:pointer;font-size:12px;min-width:0}
.multi-select-options label:hover{background:#f5f8f8}
.multi-select-options input{margin:0;flex:0 0 auto}
.multi-select-options span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.multi-select-actions{display:flex;justify-content:flex-end;gap:6px;border-top:1px solid #edf0f1;padding-top:9px;margin-top:4px}
.multi-select-actions .btn{padding:7px 10px;font-size:11px}
.calendar-month{grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.cal-day{min-width:0;padding:7px;overflow:hidden}
.cal-items{display:flex;flex-direction:column;gap:4px;min-width:0}
.cal-task{display:flex;width:100%;min-width:0;align-items:center;gap:5px;text-align:left;border:0;border-radius:6px;padding:5px 6px;cursor:pointer;overflow:hidden;white-space:nowrap}
.cal-task-name{display:block;min-width:0;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cal-task .priority{flex:0 0 auto}
.cal-dept{display:block;flex:0 0 auto;max-width:42%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:8px;color:#8a969a;font-weight:600}
.cal-more{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}
.gantt-shell{padding:0;overflow:hidden}
.gantt-scroll{overflow-x:auto;overflow-y:auto;max-height:calc(100vh - 170px);position:relative}
.gantt-inner{min-width:1230px}
.g-sticky{position:sticky;top:0;z-index:5;background:#fff;padding:12px 12px 0;border-bottom:1px solid var(--border)}
.g-month-row,.g-week-row,.g-row{display:grid;grid-template-columns:330px 1fr}
.g-month-row{border-bottom:1px solid #dfe5e7}
.g-label{font-weight:800;color:var(--secondary);padding:7px 10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.g-month-grid,.g-week-grid{display:flex;min-width:0}
.g-month-grid>div{font-weight:800;text-align:center;background:#eef4f4;border-right:1px solid #cfdadc;padding:8px 3px;white-space:nowrap;font-size:11px}
.g-week-grid>div{flex:0 0 64px;text-align:center;padding:6px 2px;border-right:1px solid #e1e6e8;color:#65757a;font-size:10px}
.g-row{min-height:58px;border-bottom:1px solid #edf0f1}
.g-name{padding:9px 10px;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:2px}
.g-name b{overflow-wrap:break-word;line-height:1.25}
.g-name small{font-size:10px;color:#8a969a}
.g-track{position:relative;margin:10px 0;background:repeating-linear-gradient(90deg,#f1f3f4 0,#f1f3f4 63px,#dfe4e6 63px,#dfe4e6 64px);border-radius:6px;min-height:34px}
.g-track span{position:absolute;top:5px;height:24px;border-radius:6px;background:#9aa8ac}
.g-track span.done{background:#3b9b6b}.g-track span.progress{background:#d2a83a}
@media(max-width:850px){.page-head-actions{width:100%;justify-content:flex-end}.multi-select-options{grid-template-columns:1fr}.calendar-month{gap:3px}.cal-day{min-height:90px;padding:5px}.cal-task{padding:4px;font-size:9px}.cal-dept{max-width:38px;font-size:7px}.gantt-inner{min-width:1230px}}

/* v1.0.6 corrections */
.metric{position:relative;padding-bottom:42px}.metric-view{position:absolute;right:12px;bottom:10px;background:#edf4f4;color:var(--secondary);border-radius:7px;padding:5px 10px;font-size:11px;font-weight:800}.calendar-toolbar{justify-content:flex-start}.calendar-toolbar b{order:0}.calendar-print-btn{margin-left:18px}.gantt-shell{overflow:hidden}.gantt-scroll{width:100%;overflow-x:auto;overflow-y:auto;-webkit-overflow-scrolling:touch;padding-bottom:8px}.gantt-inner{display:block;min-width:max-content}.g-week-grid,.g-month-grid{min-width:calc(100% - 330px)}.print-header{display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:18px;font-size:18px}.print-header span{font-size:14px;font-weight:700}.report-types{display:flex;gap:6px;flex-wrap:wrap}
@media print{.report-types,.report-filter-card,.report-actions,.calendar-print-btn{display:none!important}.print-header{display:flex!important}.report-result{border:0!important;padding:0!important}}
/* v1.0.7 report & readability refinements */
.multi-select-options{grid-template-columns:1fr;overflow-x:hidden}
.multi-select-options label{width:100%;box-sizing:border-box}
.multi-select-options label span{display:block;min-width:0;flex:1;color:#26383d;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-task-cell{font-weight:600;min-width:240px;max-width:430px;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.report-note-cell{min-width:250px;max-width:430px;white-space:normal;overflow-wrap:anywhere;line-height:1.4}
.tasks-table .note-cell{min-width:230px;max-width:400px;white-space:normal;overflow-wrap:anywhere;line-height:1.45}
.tasks-table td:nth-child(2){font-weight:600;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
@media print{
  body.print-report .page-head{display:none!important}
  body.print-report .report-result-head{display:none!important}
  body.print-report .report-result{margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
  body.print-report .report-table{width:100%!important}
  body.print-report .print-header{display:flex!important;margin:0 0 14px!important;padding:0!important}
}
.notice-view-btn{white-space:nowrap;padding:8px 12px;font-size:13px}
.approval-modal{max-width:620px}
.approval-detail{padding:12px 0;border-top:1px solid var(--border);border-bottom:1px solid var(--border)}
.approval-detail p{margin:8px 0;line-height:1.45}

/* v1.0.9 visual refinements */
.metric>span{display:block;min-height:36px;line-height:18px}
.metric>b{display:flex;align-items:baseline;gap:8px;min-height:34px;margin-top:7px}
.metric b small{display:inline-block}
.metric-view{display:block;margin-left:auto;margin-top:18px;padding:7px 11px;border-radius:9px;background:#edf4f4;color:var(--secondary);font-weight:800}
.notice-title{font-weight:400;font-size:13px;color:var(--text)}
.notice-message{display:flex!important;align-items:baseline;gap:5px;line-height:1.45}
.notice-sender{font-weight:800;color:var(--text)}

/* v1.0.13 visual tuning */
.tasks-table th:nth-child(2),.tasks-table td:nth-child(2){min-width:260px;max-width:460px;}
.tasks-table th:nth-child(7),.tasks-table td:nth-child(7){min-width:230px;max-width:400px;}

/* v1.0.14 layout and readability corrections */
html,body{max-width:100%;overflow-x:hidden}
.content{min-width:0}
.multi-select-menu{width:min(520px,calc(100vw - 24px));overflow:hidden}
.multi-select-options{display:flex;flex-direction:column;gap:2px;overflow-y:auto;overflow-x:auto;padding-right:4px}
.multi-select-options label{display:flex;align-items:flex-start;gap:8px;padding:6px 7px;line-height:1.3;width:max-content;min-width:100%;}
.multi-select-options label input{margin-top:2px;flex:0 0 auto}
.multi-select-options label span{flex:0 1 auto;min-width:0;max-width:100%;overflow:visible;text-overflow:clip;white-space:normal;word-break:break-word}
.dept-card>.btn{padding:5px 8px;font-size:10px;border-radius:7px}
.tasks-table td:nth-child(2),.report-task-cell{font-weight:600}
.tasks-table th:nth-child(7),.tasks-table td:nth-child(7){min-width:205px;max-width:355px}
.tasks-table th:nth-child(2),.tasks-table td:nth-child(2){min-width:285px;max-width:500px}
.notice-message{gap:5px}
.notice-sender{font-style:italic;font-weight:800}
.notice-text{font-weight:800}
.notice-separator{flex:0 0 auto!important;font-weight:400!important}
.gantt-page-head{overflow:hidden}
.gantt-shell{width:100%;max-width:100%;min-width:0}
.gantt-scroll{width:100%;max-width:100%;overflow-x:auto!important;overflow-y:auto;overscroll-behavior-x:contain}
.gantt-inner{width:max-content!important;min-width:max-content!important}
@media(max-width:850px){.multi-select-menu{width:min(520px,calc(100vw - 24px));left:auto;right:0}.gantt-page-head{width:100%}}

.clickable-notice{cursor:pointer}.clickable-notice:hover{background:#fff4d8}

/* v1.0.16 branding / footer */
.top-brand{gap:12px}
.top-brand img,.top-brand .mini{height:46px;width:46px}
.top-brand-link{background:transparent;color:var(--secondary);font-weight:800;padding:0;border:0;font-size:15px;text-align:left}
.top-brand-link:hover{text-decoration:underline}
.app-footer{padding:10px 24px 16px;display:flex;justify-content:flex-end;align-items:center;color:#93a0a4;font-size:10px;line-height:1.2}
@media(max-width:650px){.app-footer{padding:10px 14px 14px;font-size:9px}.top-brand img,.top-brand .mini{height:42px;width:42px}.top-brand-link{font-size:14px}}

.user-pill{border:0;background:transparent;cursor:pointer;display:inline-flex;align-items:center;gap:8px;color:inherit;font:inherit}.user-avatar-mini,.avatar-fallback{width:30px;height:30px;border-radius:50%;object-fit:cover;display:inline-flex;align-items:center;justify-content:center;background:#e2e8f0;color:#12343B;font-weight:700}.profile-modal{max-width:620px}.profile-avatar-area{display:flex;align-items:center;gap:16px;margin:12px 0 20px}.profile-avatar{width:88px;height:88px;border-radius:50%;object-fit:cover}.profile-avatar-empty{display:flex;align-items:center;justify-content:center;background:#e2e8f0;font-size:32px;color:#12343B}.profile-readonly{padding:10px 12px;background:#f1f5f9;border-radius:8px;min-height:38px}.recipient-user{display:flex;align-items:center;gap:6px}.info-user-btn{width:19px;height:19px;border-radius:50%;border:1px solid #64748b;background:transparent;color:#334155;font-size:12px;font-weight:bold;cursor:pointer;padding:0}.trash-modal{max-width:680px;max-height:80vh;overflow:auto}

.profile-password{border-top:1px solid #e2e8f0;margin-top:18px;padding-top:14px}.profile-password h4{margin:0 0 10px;color:#12343B}

/* Hotel information shortcut and read-only information window */
.hotel-info-link{display:inline-flex;align-items:center;justify-content:center;background:transparent;color:var(--primary);border:1.5px solid var(--primary);border-radius:50%;width:22px;height:22px;padding:0;font-size:11px;font-weight:800;line-height:1;flex:0 0 22px}.hotel-info-link:hover{background:#e5f0ee}.hotel-info-link span:first-child{font-size:11px;line-height:1}.hotel-info-modal{width:min(760px,100%)}.hotel-info-description{font-size:13px;line-height:1.65;color:var(--muted);margin:0 0 16px}.hotel-info-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}.hotel-info-metric{padding:14px;border:1px solid var(--border);border-radius:12px;background:#f8fafb}.hotel-info-metric span{display:block;color:var(--muted);font-size:11px}.hotel-info-metric b{display:block;font-size:24px;margin-top:5px;color:var(--primary)}.hotel-info-section{margin-top:18px}.hotel-info-section h4{margin:0 0 10px;font-size:14px}.hotel-info-section ul{margin:0;padding-left:20px;color:var(--text);font-size:13px;line-height:1.8}.hotel-info-modal .modal-head p{margin:5px 0 0}@media(max-width:850px){.hotel-info-link{padding:0}.hotel-info-link span:last-child{display:none}.hotel-info-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:650px){.topbar{gap:8px}.top-brand{gap:7px;min-width:0}.top-brand-link{max-width:36vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.hotel-info-link{width:22px;height:22px;flex:0 0 22px;padding:0}.hotel-info-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}}
.hotel-admin-section{border-top:1px solid var(--border);padding-top:16px;margin-top:18px}.hotel-admin-section h4{font-size:14px;margin:0 0 12px;color:var(--primary)}.hotel-admin-card .small{line-height:1.55}.hotel-info-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.hotel-info-details>div{display:flex;flex-direction:column;gap:4px;padding:11px 12px;border:1px solid var(--border);border-radius:10px;background:#f8fafb}.hotel-info-details span{font-size:11px;color:var(--muted)}.hotel-info-details b{font-size:13px}.hotel-info-subhead{display:block;margin:8px 0 4px;font-size:12px;color:var(--muted)}@media(max-width:650px){.hotel-info-details{grid-template-columns:1fr}.hotel-info-modal .table-wrap{overflow-x:auto}}

/* v1.0.48: restore balanced branding proportions and center the info glyph */
.top-brand{display:flex;align-items:center;gap:12px;min-height:46px}
.top-brand img,.top-brand .mini{width:46px;height:46px;flex:0 0 46px;display:block;object-fit:contain;align-self:center}
.top-brand-link{font-size:15px!important;line-height:1.2;display:flex;align-items:center;align-self:center;min-height:46px;white-space:nowrap}
.hotel-info-link{width:20px;height:20px;flex:0 0 20px;display:inline-flex;align-items:center;justify-content:center;align-self:center;padding:0;line-height:1;border-radius:50%;font-size:10px}
.hotel-info-link span:first-child{display:block;font-size:10px;line-height:1;transform:none;margin:0;padding:0;text-align:center}
@media(max-width:650px){.top-brand{gap:7px}.top-brand img,.top-brand .mini{width:42px;height:42px;flex-basis:42px}.top-brand-link{font-size:14px!important;min-height:42px;max-width:36vw}.hotel-info-link{width:20px;height:20px;flex-basis:20px;font-size:10px}.hotel-info-link span:first-child{font-size:10px}}

/* v1.0.50 — Smart Task Generator */
.sg-premium-label{display:inline-flex;align-items:center;white-space:nowrap;border:1px solid #d6b76c;color:#8a6420;background:#fff9e9;border-radius:999px;padding:7px 11px;font-size:10px;font-weight:800;letter-spacing:.07em}
.sg-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px;border-bottom:1px solid var(--border);padding-bottom:10px}
.sg-tabs button{border:1px solid var(--border);background:var(--card);color:var(--text);padding:10px 13px;border-radius:9px;font-weight:700;cursor:pointer}
.sg-tabs button.active{background:var(--primary);border-color:var(--primary);color:#fff}
.sg-card{margin-bottom:16px;min-width:0}
.sg-section-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.sg-section-head h3,.sg-plan-head h3{margin:0 0 5px;font-size:17px;color:var(--secondary)}
.sg-section-head p{margin:0;line-height:1.5}
.sg-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 16px}
.sg-form-grid > .field > label{min-height:18px;display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.sg-form-grid > .field > label .icon-btn{flex:0 0 30px;vertical-align:middle}
.sg-form-grid .small{display:block;margin-top:5px;line-height:1.45}
.sg-service-block{border-top:1px solid var(--border);margin-top:8px;padding-top:16px}
.sg-service-block h4{margin:0 0 12px;color:var(--secondary);font-size:14px}
.sg-service-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.sg-service{display:flex;align-items:flex-start;gap:9px;border:1px solid var(--border);border-radius:10px;padding:11px 12px;line-height:1.4;font-size:13px;cursor:pointer}
.sg-service input{margin:2px 0 0;flex:0 0 auto}
.sg-actions{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:20px}
.sg-note{padding:13px 15px;margin-top:14px;border-radius:10px;background:#f2f7f6;color:var(--secondary);font-size:12px;line-height:1.6}
.sg-draft-picker{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0 18px}
.sg-plan-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin:20px 0 14px}
.sg-status{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;white-space:nowrap;background:#e6f5ec;color:#23613b}
.sg-status.draft{background:#fff3d8;color:#8a5b00}.sg-status.inactive{background:#eef0f2;color:#68727b}
.sg-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:14px 0}
.sg-kpis>div{border:1px solid var(--border);border-radius:11px;padding:12px;background:var(--card)}
.sg-kpis span{display:block;color:var(--muted);font-size:11px}.sg-kpis b{display:block;font-size:22px;color:var(--secondary);margin-top:4px}
.sg-warning{border:1px solid #f0d9a5;background:#fffaf0;padding:10px 13px;border-radius:9px;margin:10px 0;font-size:12px}.sg-warning summary{cursor:pointer;font-weight:800}.sg-warning ul{padding-left:20px;line-height:1.6}
.sg-table-wrap{max-width:100%;overflow-x:auto;margin-top:12px}
.sg-table{width:100%;border-collapse:collapse;font-size:12px;min-width:1050px}
.sg-table th,.sg-table td{border-bottom:1px solid var(--border);padding:9px 8px;text-align:left;vertical-align:top}
.sg-table th{background:#f5f8f8;color:var(--secondary);font-size:11px;white-space:nowrap;position:sticky;top:0;z-index:1}
.sg-table td input:not([type=checkbox]),.sg-table td select{min-width:88px;width:100%;padding:7px 8px;border:1px solid var(--border);border-radius:7px;background:var(--card);color:var(--text);font:inherit}
.sg-table td .sg-task-input{min-width:230px!important}
.sg-table td .sg-number{width:82px!important;min-width:72px!important}
.sg-table td input[type=checkbox]{width:16px;height:16px}
.sg-critical-row{background:#fffaf4}
.sg-row-flags{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}
.sg-flag{display:inline-flex;padding:3px 5px;border-radius:4px;font-size:9px;font-weight:900;letter-spacing:.03em}
.sg-flag.critical{background:#fde8e7;color:#a12e2a}.sg-flag.accelerate{background:#fff0cf;color:#8b5c00}
.sg-library-modal{max-width:760px;max-height:88vh;overflow-y:auto}
@media(max-width:850px){.sg-service-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sg-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sg-form-grid{grid-template-columns:1fr}.sg-section-head{flex-direction:column}.sg-plan-head{flex-direction:column}}
@media(max-width:560px){.sg-service-grid{grid-template-columns:1fr}.sg-tabs{gap:5px}.sg-tabs button{padding:8px 9px;font-size:11px}.sg-actions{justify-content:stretch}.sg-actions .btn{flex:1}.sg-premium-label{display:none}}

/* Master Library inline editing */
.sg-library-inline{min-width:1240px;table-layout:fixed}
.sg-library-inline th:nth-child(1){width:25%}.sg-library-inline th:nth-child(2){width:17%}.sg-library-inline th:nth-child(3){width:16%}.sg-library-inline th:nth-child(4){width:14%}.sg-library-inline th:nth-child(5){width:10%}.sg-library-inline th:nth-child(6){width:13%}.sg-library-inline th:nth-child(7){width:110px}
.sg-library-inline td input,.sg-library-inline td select{min-width:0!important;width:100%;box-sizing:border-box}
.sg-library-inline .sg-task-input{min-width:210px!important}
.sg-date-hint{font-size:10px;color:var(--muted,#667085);margin-top:4px;white-space:nowrap}
.sg-row-actions{display:flex;gap:5px;align-items:center}
.sg-icon-btn{border:1px solid var(--border);background:var(--card);color:var(--text);border-radius:7px;width:32px;height:32px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;font-size:15px}
.sg-icon-btn:hover{background:var(--surface,#f4f7f7);transform:translateY(-1px)}
.sg-row-save-status{display:block;font-size:10px;color:var(--muted,#667085);margin-top:3px}
.sg-library-search{max-width:420px;margin:10px 0}

.sg-row-editing{outline:2px solid var(--primary);outline-offset:-2px;background:rgba(15,118,110,.035)}


/* Master Library: compact, border-light inline editing and condition multi-select */
.sg-library-inline{min-width:1180px}
.sg-library-inline th,.sg-library-inline td{padding:6px 7px;border-bottom:1px solid color-mix(in srgb,var(--border) 55%,transparent)}
.sg-library-inline th{background:#f7f9f9;font-weight:700}
.sg-library-inline td input:not([type=checkbox]),.sg-library-inline td select{border:1px solid transparent!important;border-radius:5px!important;padding:6px 5px!important;background:transparent!important;box-shadow:none!important;min-height:32px}
.sg-library-inline td input:not([type=checkbox]):focus,.sg-library-inline td select:focus{border-color:var(--primary)!important;background:var(--card)!important;outline:none}
.sg-library-inline .sg-task-input{min-width:200px!important}
.sg-library-inline .sg-number{max-width:84px}
.sg-row-actions{gap:4px}
.sg-icon-btn{border:0!important;background:transparent!important;width:28px;height:28px;font-size:14px;padding:0}
.sg-icon-btn:hover{background:var(--surface,#f4f7f7)!important;transform:none}
.sg-condition-picker{position:relative;min-width:140px}
.sg-condition-picker summary{cursor:pointer;list-style:none;white-space:normal;min-height:30px;padding:7px 6px;border-radius:5px;color:var(--text);font-size:12px}
.sg-condition-picker summary::-webkit-details-marker{display:none}
.sg-condition-picker summary:after{content:'⌄';float:right;margin-left:6px;color:var(--muted)}
.sg-condition-options{position:absolute;z-index:30;top:100%;left:0;width:260px;max-height:300px;overflow:auto;padding:9px;background:var(--card);border:1px solid var(--border);border-radius:8px;box-shadow:0 8px 24px rgba(0,0,0,.12)}
.sg-condition-options label{display:flex;gap:8px;align-items:flex-start;padding:6px 2px;font-size:12px;cursor:pointer}
.sg-condition-options label input{margin-top:2px;flex:0 0 auto}
.sg-condition-options .sg-condition-custom{margin-top:8px;border:1px solid var(--border)!important;background:var(--card)!important}
.sg-library-inline .sg-row-save-status{font-size:9px}
.sg-library-inline tbody tr:hover{background:rgba(15,118,110,.025)}

/* Master Library task selection and deployment */
.sg-library-deploybar{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 0;margin:6px 0 10px;border-bottom:1px solid color-mix(in srgb,var(--border) 45%,transparent)}
.sg-library-deploybar label{display:flex;align-items:center;gap:7px;font-size:13px;cursor:pointer}
.sg-library-deploybar #sgLibrarySelectedCount{font-size:12px;color:var(--muted,#64748b);margin-right:auto}
.sg-library-inline .sg-select-col{width:42px;text-align:center}
.sg-library-inline td.sg-select-col input[type=checkbox],.sg-library-deploybar input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px!important;accent-color:var(--primary);cursor:pointer}


/* Master Library responsive layout: no horizontal scrolling, compact multi-line task names */
.sg-library-top-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.sg-library-top-actions .btn{padding:8px 11px;font-size:12px;white-space:nowrap}
.sg-table-wrap{overflow-x:hidden!important;max-width:100%;width:100%}
.sg-library-inline{width:100%!important;min-width:0!important;table-layout:fixed;font-size:11px}
.sg-library-inline th,.sg-library-inline td{padding:5px 4px!important;overflow-wrap:anywhere;word-break:normal}
.sg-library-inline th:nth-child(1){width:27px!important}
.sg-library-inline th:nth-child(2){width:25%!important}
.sg-library-inline th:nth-child(3){width:15%!important}
.sg-library-inline th:nth-child(4){width:10%!important}
.sg-library-inline th:nth-child(5){width:10%!important}
.sg-library-inline th:nth-child(6){width:9%!important}
.sg-library-inline th:nth-child(7){width:16%!important}
.sg-library-inline th:nth-child(8){width:70px!important}
.sg-library-inline .sg-task-input{display:block;width:100%!important;min-width:0!important;max-width:100%;box-sizing:border-box;resize:vertical;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.3;min-height:43px;padding:5px 4px!important;font:inherit}
.sg-library-inline td input:not([type=checkbox]),.sg-library-inline td select{font-size:11px!important;min-width:0!important;max-width:100%;padding:5px 3px!important;box-sizing:border-box}
.sg-library-inline .sg-number{max-width:100%!important;width:100%!important}
.sg-library-inline .sg-date-hint{font-size:9px;white-space:normal;line-height:1.2;overflow-wrap:anywhere}
.sg-library-inline .sg-select-col{text-align:center;width:27px!important;padding-left:2px!important;padding-right:2px!important}
.sg-library-inline .sg-actions-col{text-align:center}
.sg-th-label{display:flex;align-items:center;justify-content:space-between;gap:2px;white-space:normal;line-height:1.2}
.sg-sort-button{border:0;background:transparent;color:var(--primary);padding:0 2px;min-width:15px;line-height:1.2;font-size:13px;font-weight:700;cursor:pointer;flex:0 0 auto}
.sg-sort-button:hover{background:var(--surface,#eef5f4);border-radius:4px}
.sg-library-inline .sg-condition-picker{min-width:0;width:100%}
.sg-library-inline .sg-condition-picker summary{padding:5px 3px;font-size:10px;overflow-wrap:anywhere}
.sg-library-inline .sg-condition-options{width:245px;max-width:min(245px,75vw)}
.sg-library-inline .sg-row-actions{justify-content:center;gap:2px}
.sg-library-inline .sg-icon-btn{width:24px;height:25px;font-size:12px}
.sg-add-library-modal{max-width:680px;max-height:88vh;overflow-y:auto}
.sg-new-condition-picker{border:1px solid var(--border);border-radius:7px;min-height:38px}
.sg-new-condition-picker summary{padding:9px;font-size:13px}
@media(max-width:1050px){.sg-library-inline th:nth-child(2){width:23%!important}.sg-library-inline th:nth-child(3){width:14%!important}.sg-library-inline th:nth-child(7){width:15%!important}.sg-library-inline th:nth-child(8){width:60px!important}.sg-library-top-actions .btn{padding:7px 8px;font-size:11px}}
@media(max-width:760px){.sg-table-wrap{overflow-x:visible!important}.sg-library-inline,.sg-library-inline tbody,.sg-library-inline tr,.sg-library-inline td{display:block;width:100%!important}.sg-library-inline thead{display:none}.sg-library-inline tbody tr{display:grid;grid-template-columns:28px minmax(0,1fr) minmax(0,1fr);gap:5px;padding:8px 0;border-bottom:1px solid var(--border)}.sg-library-inline tbody td{border:0!important;padding:3px!important}.sg-library-inline td:nth-child(1){grid-column:1;grid-row:1}.sg-library-inline td:nth-child(2){grid-column:2/4;grid-row:1}.sg-library-inline td:nth-child(3){grid-column:2/4}.sg-library-inline td:nth-child(4),.sg-library-inline td:nth-child(5),.sg-library-inline td:nth-child(6),.sg-library-inline td:nth-child(7){grid-column:auto}.sg-library-inline td:nth-child(3):before{content:'Məsul şöbə';display:block;font-size:10px;color:var(--muted)}.sg-library-inline td:nth-child(4):before{content:'Açılışa həftə';display:block;font-size:10px;color:var(--muted)}.sg-library-inline td:nth-child(5):before{content:'Müddət (gün)';display:block;font-size:10px;color:var(--muted)}.sg-library-inline td:nth-child(6){grid-column:2/4}.sg-library-inline .sg-row-actions{justify-content:flex-start}.sg-library-top-actions{justify-content:flex-start}.sg-library-deploybar{gap:8px}}
/* v1.0.58: compact select-all control in the table header */
.sg-library-inline th.sg-select-col input[type=checkbox]{width:16px!important;height:16px!important;min-width:16px!important;accent-color:var(--primary);cursor:pointer;vertical-align:middle;margin:0}
.sg-library-inline th.sg-select-col{vertical-align:middle;text-align:center}


/* v1.0.59: bulk-save control and clearly visible delete action */
.sg-library-top-actions .sg-save-all-btn{border:1px solid var(--primary,#0f766e);background:#e8f5f3;color:#075e57;font-weight:700}
.sg-library-top-actions .sg-save-all-btn:hover{background:#d3eeea}
.sg-library-top-actions .sg-save-all-btn:disabled{opacity:.65;cursor:wait}
.sg-library-inline .sg-icon-btn.sg-delete-btn{width:27px;height:27px;color:#b42318;background:#fff1f0!important;border:1px solid #f3b5b0!important;border-radius:6px!important;display:inline-flex;align-items:center;justify-content:center}
.sg-library-inline .sg-icon-btn.sg-delete-btn svg{width:16px;height:16px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sg-library-inline .sg-icon-btn.sg-delete-btn:hover{background:#ffe2df!important;color:#8f1710;box-shadow:0 0 0 2px rgba(180,35,24,.08)}
@media(max-width:1050px){.sg-library-top-actions .sg-save-all-btn{padding:7px 8px;font-size:11px}}


/* v1.0.61: compact Master-Library-style plan review table */
.sg-plan-actions{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin:10px 0 12px}
.sg-plan-actions .btn{padding:8px 11px;font-size:12px}
.sg-plan-table-wrap{overflow-x:hidden!important}
.sg-plan-inline{width:100%!important;min-width:0!important;table-layout:fixed;font-size:11px}
.sg-plan-inline th,.sg-plan-inline td{padding:6px 5px!important;border-bottom:1px solid color-mix(in srgb,var(--border) 55%,transparent);overflow-wrap:anywhere;vertical-align:top}
.sg-plan-inline th{background:#f7f9f9;white-space:normal;line-height:1.2}
.sg-plan-inline th:nth-child(1){width:4%}.sg-plan-inline th:nth-child(2){width:24%}.sg-plan-inline th:nth-child(3){width:15%}.sg-plan-inline th:nth-child(4){width:10%}.sg-plan-inline th:nth-child(5){width:10%}.sg-plan-inline th:nth-child(6){width:9%}.sg-plan-inline th:nth-child(7){width:13%}.sg-plan-inline th:nth-child(8){width:15%}
.sg-plan-inline td input:not([type=checkbox]),.sg-plan-inline td select,.sg-plan-inline td textarea{min-width:0!important;width:100%;max-width:100%;box-sizing:border-box;border:1px solid transparent!important;border-radius:5px!important;padding:5px 4px!important;background:transparent!important;box-shadow:none!important;font:inherit;font-size:11px!important;color:var(--text);line-height:1.25}
.sg-plan-inline td input:focus,.sg-plan-inline td select:focus,.sg-plan-inline td textarea:focus{border-color:var(--primary)!important;background:var(--card)!important;outline:none}
.sg-plan-inline .sg-task-input,.sg-plan-inline .sg-plan-note{display:block;resize:vertical;white-space:pre-wrap;overflow-wrap:anywhere;min-height:42px}
.sg-plan-inline .sg-number{max-width:100%!important}
.sg-plan-inline .sg-date-hint{font-size:9px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;margin-top:3px;color:var(--muted)}
.sg-plan-inline .sg-plan-select{text-align:center;padding-left:2px!important;padding-right:2px!important}
.sg-plan-inline .sg-plan-select input[type=checkbox]{width:15px;height:15px;accent-color:var(--primary)}
.sg-plan-condition{display:block;padding:5px 3px;line-height:1.25;overflow-wrap:anywhere}
@media(max-width:760px){.sg-plan-inline,.sg-plan-inline tbody,.sg-plan-inline tr,.sg-plan-inline td{display:block;width:100%!important}.sg-plan-inline thead{display:none}.sg-plan-inline tbody tr{display:grid;grid-template-columns:26px minmax(0,1fr) minmax(0,1fr);gap:5px;padding:8px 0;border-bottom:1px solid var(--border)}.sg-plan-inline tbody td{border:0!important;padding:3px!important}.sg-plan-inline td:nth-child(1){grid-column:1;grid-row:1}.sg-plan-inline td:nth-child(2){grid-column:2/4;grid-row:1}.sg-plan-inline td:nth-child(3){grid-column:2/4}.sg-plan-inline td:nth-child(4),.sg-plan-inline td:nth-child(5),.sg-plan-inline td:nth-child(6),.sg-plan-inline td:nth-child(7),.sg-plan-inline td:nth-child(8){grid-column:auto}.sg-plan-inline td:nth-child(3):before{content:'Şöbə';display:block;font-size:10px;color:var(--muted)}.sg-plan-inline td:nth-child(4):before{content:'Açılışa həftə';display:block;font-size:10px;color:var(--muted)}.sg-plan-inline td:nth-child(5):before{content:'Müddət (gün)';display:block;font-size:10px;color:var(--muted)}.sg-plan-inline td:nth-child(6):before{content:'Prioritet';display:block;font-size:10px;color:var(--muted)}.sg-plan-inline td:nth-child(7):before{content:'Qeyd';display:block;font-size:10px;color:var(--muted)}.sg-plan-actions{justify-content:flex-start}.sg-plan-actions .btn{flex:1}}

/* v1.0.62: compact, explanatory Smart Task Generator date warnings */
.sg-flag.date-warning{font-size:9px;font-weight:500;letter-spacing:0;padding:2px 4px;margin-top:3px;background:#fff7e6;color:#8a5b16;border-radius:3px;line-height:1.2}

/* v1.0.64: repair condition multi-select text/checkbox layout and avoid horizontal scroll */
.sg-condition-picker{position:relative;min-width:0}
.sg-condition-options{position:absolute!important;z-index:1000!important;top:calc(100% + 3px)!important;left:0!important;right:auto!important;width:300px!important;min-width:240px!important;max-width:min(300px,calc(100vw - 36px))!important;max-height:300px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:9px 10px!important;background:#fff!important;color:#17333a!important;border:1px solid #dbe4e8!important;border-radius:9px!important;box-shadow:0 10px 28px rgba(0,0,0,.18)!important;box-sizing:border-box!important}
.sg-condition-options label{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:flex-start!important;gap:9px!important;width:100%!important;min-width:0!important;padding:7px 2px!important;margin:0!important;color:#17333a!important;text-align:left!important;white-space:normal!important;line-height:1.35!important;box-sizing:border-box!important}
.sg-condition-options label input[type=checkbox]{position:static!important;display:block!important;float:none!important;flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;margin:1px 0 0!important;accent-color:#0f766e!important;visibility:visible!important;opacity:1!important}
.sg-condition-options label span{display:block!important;position:static!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;margin:0!important;padding:0!important;color:#17333a!important;font-size:12px!important;font-weight:400!important;line-height:1.35!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;visibility:visible!important;opacity:1!important}
.sg-condition-options .sg-condition-custom{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;margin-top:8px!important;color:#17333a!important;background:#fff!important}
.sg-library-inline .sg-condition-options{width:300px!important;max-width:min(300px,calc(100vw - 36px))!important}
.sg-new-condition-picker .sg-condition-options{width:300px!important;max-width:min(300px,calc(100vw - 36px))!important}
.sg-library-inline .sg-row-actions .sg-delete-btn{color:#b42318!important}
.sg-library-inline .sg-row-actions .sg-delete-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}

/* v1.0.64: condition picker visibility and multi-select layout fix */
.sg-condition-picker{position:relative;min-width:0}
.sg-condition-options{position:absolute!important;z-index:1000!important;top:calc(100% + 3px)!important;left:0!important;right:auto!important;width:300px!important;min-width:240px!important;max-width:min(300px,calc(100vw - 36px))!important;max-height:300px!important;overflow-y:auto!important;overflow-x:hidden!important;padding:9px 10px!important;background:#fff!important;color:#17333a!important;border:1px solid #dbe4e8!important;border-radius:9px!important;box-shadow:0 10px 28px rgba(0,0,0,.18)!important;box-sizing:border-box!important}
.sg-condition-options label{display:flex!important;flex-direction:row!important;justify-content:flex-start!important;align-items:flex-start!important;gap:9px!important;width:100%!important;min-width:0!important;padding:7px 2px!important;margin:0!important;color:#17333a!important;text-align:left!important;white-space:normal!important;line-height:1.35!important;box-sizing:border-box!important}
.sg-condition-options label input[type=checkbox]{position:static!important;display:block!important;float:none!important;flex:0 0 16px!important;width:16px!important;height:16px!important;min-width:16px!important;margin:1px 0 0!important;accent-color:#0f766e!important;visibility:visible!important;opacity:1!important}
.sg-condition-options label span{display:block!important;position:static!important;flex:1 1 auto!important;width:auto!important;min-width:0!important;max-width:none!important;height:auto!important;margin:0!important;padding:0!important;color:#17333a!important;font-size:12px!important;font-weight:400!important;line-height:1.35!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;overflow-wrap:anywhere!important;visibility:visible!important;opacity:1!important}
.sg-condition-options .sg-condition-custom{display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;box-sizing:border-box!important;margin-top:8px!important;color:#17333a!important;background:#fff!important}
.sg-library-inline .sg-condition-options,.sg-new-condition-picker .sg-condition-options{width:300px!important;max-width:min(300px,calc(100vw - 36px))!important}
.sg-library-inline .sg-row-actions .sg-delete-btn{color:#b42318!important}
.sg-library-inline .sg-row-actions .sg-delete-btn svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.8}

/* v1.0.67 — Smart Task Generator user access settings */
.sg-access-user-list{max-height:55vh;overflow:auto;border:1px solid var(--border,#dbe4e8);border-radius:10px;padding:8px 12px;margin:14px 0}
.sg-access-user-list .admin-row{border-bottom:1px solid var(--border,#e5ecef);padding:10px 2px}
.sg-access-user-list .admin-row:last-child{border-bottom:0}
.sg-access-user-list input[type=checkbox]{flex:0 0 auto;width:17px;height:17px}
.sg-access-user-list small{color:var(--muted,#64748b)}

/* Smart Task Generator v1.0.71: visible and distinct row actions */
.sg-library-inline .sg-row-actions .sg-view-btn,.sg-library-inline .sg-row-actions .sg-edit-btn{width:30px;height:30px;border:1px solid var(--border)!important;border-radius:7px!important;background:var(--card)!important;display:inline-flex;align-items:center;justify-content:center;color:var(--primary);transition:background .15s,border-color .15s}
.sg-library-inline .sg-row-actions .sg-view-btn svg,.sg-library-inline .sg-row-actions .sg-edit-btn svg{width:17px;height:17px;display:block;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.sg-library-inline .sg-row-actions .sg-view-btn:hover,.sg-library-inline .sg-row-actions .sg-edit-btn:hover{background:var(--surface,#f4f7f7)!important;border-color:var(--primary)!important}

/* v1.0.72 layout and modal refinements */
.logo-fallback-center{display:flex!important;align-items:center!important;justify-content:center!important;text-align:center!important;padding:0!important;line-height:1!important;overflow:hidden}
.sg-plan-inline th:nth-child(1){width:5%!important}.sg-plan-inline th:nth-child(2){width:31%!important}.sg-plan-inline th:nth-child(3){width:15%!important}.sg-plan-inline th:nth-child(4){width:10%!important}.sg-plan-inline th:nth-child(5){width:10%!important}.sg-plan-inline th:nth-child(6){width:10%!important}.sg-plan-inline th:nth-child(7){width:19%!important}
.sg-plan-inline td:nth-child(1){text-align:center!important;padding-left:3px!important;padding-right:3px!important}.sg-plan-inline td:nth-child(2) .sg-task-input{font-size:12px!important;min-height:48px!important}.sg-library-edit-modal{width:min(920px,100%);max-height:90vh;overflow:auto}.sg-library-edit-modal h4{margin:20px 0 8px;border-bottom:1px solid var(--border);padding-bottom:7px}.sg-library-edit-modal .small{line-height:1.45}.sg-library-edit-modal .field{margin:10px 0}

/* Smart Task Generator v1.0.73 — cleaner library and view modal */
.sg-library-inline{width:100%;table-layout:fixed}
.sg-library-inline th:nth-child(1),.sg-library-inline td:nth-child(1){width:44px;min-width:44px;text-align:center;padding-left:5px;padding-right:5px}
.sg-library-inline th:nth-child(2),.sg-library-inline td:nth-child(2){width:35%;min-width:300px}
.sg-library-inline th:nth-child(3),.sg-library-inline td:nth-child(3){width:18%;min-width:150px}
.sg-library-inline th:nth-child(4),.sg-library-inline td:nth-child(4){width:12%;min-width:105px}
.sg-library-inline th:nth-child(5),.sg-library-inline td:nth-child(5){width:12%;min-width:105px}
.sg-library-inline th:nth-child(6),.sg-library-inline td:nth-child(6){width:150px;min-width:150px}
.sg-library-inline .sg-task-input{width:100%;min-height:54px;resize:vertical;box-sizing:border-box}
.sg-library-inline td select,.sg-library-inline td input.sg-number{width:100%;min-width:0;box-sizing:border-box}
.sg-library-inline .sg-row-actions{display:flex;justify-content:center;gap:5px;flex-wrap:nowrap}
.sg-library-view-modal{width:min(1080px,96vw);max-height:92vh;overflow:auto;padding:26px 30px}
.sg-library-view-modal .modal-head{position:sticky;top:-26px;background:var(--card);z-index:2;padding:8px 0 14px;border-bottom:1px solid var(--border);margin-bottom:18px}
.sg-library-view-modal .sg-view-section{border:1px solid var(--border);border-radius:12px;padding:16px;margin:14px 0;background:var(--surface, #fff)}
.sg-library-view-modal .sg-view-section h4{margin:0 0 13px;padding:0 0 10px;border-bottom:1px solid var(--border);font-size:16px}
.sg-library-view-modal .sg-view-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sg-library-view-modal .sg-view-field{min-width:0;border-radius:8px;background:var(--surface-muted,#f7f9fa);padding:11px 13px}
.sg-library-view-modal .sg-view-label{font-size:12px;font-weight:700;color:var(--muted,#61717a);margin-bottom:4px}
.sg-library-view-modal .sg-view-help{font-size:11px;color:var(--muted,#71818a);line-height:1.4;margin-bottom:7px}
.sg-library-view-modal .sg-view-value{font-size:14px;line-height:1.45;overflow-wrap:anywhere;color:var(--text,#173c4b)}
.sg-library-view-modal .modal-actions{position:sticky;bottom:-26px;background:var(--card);padding:14px 0 4px;border-top:1px solid var(--border);margin-top:18px}
@media(max-width:900px){.sg-library-inline{table-layout:auto;min-width:850px}.sg-library-inline th:nth-child(2),.sg-library-inline td:nth-child(2){min-width:260px}.sg-library-view-modal{padding:18px}.sg-library-view-modal .modal-head{top:-18px}.sg-library-view-modal .sg-view-grid{grid-template-columns:1fr}.sg-library-view-modal .modal-actions{bottom:-18px}}

/* v1.0.74 — Master Library is read-only; edits happen only in the edit modal. */
.sg-library-readonly{width:100%!important;min-width:1050px!important;table-layout:fixed!important;font-size:12px}
.sg-library-readonly th,.sg-library-readonly td{padding:10px 8px!important;vertical-align:middle;border-bottom:1px solid var(--border)!important;overflow-wrap:anywhere}
.sg-library-readonly th:nth-child(1),.sg-library-readonly td:nth-child(1){width:42px!important;min-width:42px!important;text-align:center}
.sg-library-readonly th:nth-child(2),.sg-library-readonly td:nth-child(2){width:31%!important;min-width:270px!important}
.sg-library-readonly th:nth-child(3),.sg-library-readonly td:nth-child(3){width:16%!important;min-width:140px!important}
.sg-library-readonly th:nth-child(4),.sg-library-readonly td:nth-child(4){width:8%!important;min-width:80px!important}
.sg-library-readonly th:nth-child(5),.sg-library-readonly td:nth-child(5){width:9%!important;min-width:85px!important}
.sg-library-readonly th:nth-child(6),.sg-library-readonly td:nth-child(6),.sg-library-readonly th:nth-child(7),.sg-library-readonly td:nth-child(7){width:11%!important;min-width:105px!important}
.sg-library-readonly th:nth-child(8),.sg-library-readonly td:nth-child(8){width:135px!important;min-width:135px!important}
.sg-library-readonly .sg-library-task-title{font-weight:500;line-height:1.45;white-space:normal}
.sg-library-readonly .sg-library-date{white-space:nowrap;font-variant-numeric:tabular-nums;color:var(--text,#173c4b)}
.sg-library-readonly .sg-row-actions{display:flex;justify-content:center;gap:5px;flex-wrap:nowrap}
.sg-library-readonly tbody tr:hover{background:rgba(15,118,110,.035)}
@media(max-width:760px){.sg-library-readonly{min-width:1050px!important}.sg-library-readonly th,.sg-library-readonly td{padding:8px 6px!important}}

/* v1.0.75: polished Smart Task Generator detail and edit dialogs */
.sg-library-view-modal .sg-view-help{display:none!important}
.sg-library-view-modal .sg-view-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.sg-library-view-modal .sg-view-field{display:flex;flex-direction:column;justify-content:center;min-height:72px;padding:13px 15px;border:1px solid var(--border);background:var(--surface-muted,#f7f9fa)}
.sg-library-view-modal .sg-view-value{font-size:15px;font-weight:600}
.sg-library-view-modal .sg-view-date-extra{font-size:12px;color:var(--muted,#61717a);margin-top:5px}
.sg-library-edit-modal{width:min(980px,96vw);max-height:92vh;overflow:auto;padding:28px 32px;background:var(--card);border-radius:18px;box-shadow:0 24px 80px rgba(12,39,49,.22)}
.sg-library-edit-modal .modal-head{position:sticky;top:-28px;z-index:4;background:var(--card);padding:8px 0 16px;margin-bottom:18px;border-bottom:1px solid var(--border)}
.sg-library-edit-modal .modal-head h3{font-size:23px;margin:0 0 4px}
.sg-library-edit-modal h4{margin:24px 0 14px;padding:0 0 10px;border-bottom:1px solid var(--border);font-size:17px;color:var(--text,#173c4b)}
.sg-library-edit-modal .field{padding:13px 15px;margin:10px 0 14px;border:1px solid var(--border);border-radius:12px;background:var(--surface-muted,#f8fafb)}
.sg-library-edit-modal .field>label,.sg-library-edit-modal h4+ .field label{font-weight:700}
.sg-library-edit-modal .field p.small,.sg-library-edit-modal>p.small{margin:5px 0 10px;line-height:1.5;color:var(--muted,#61717a)}
.sg-library-edit-modal input:not([type=checkbox]),.sg-library-edit-modal select,.sg-library-edit-modal textarea{width:100%;box-sizing:border-box;border:1px solid var(--border);border-radius:9px;background:var(--card);padding:11px 12px;font:inherit;color:var(--text,#173c4b)}
.sg-library-edit-modal textarea{min-height:68px;resize:vertical}
.sg-library-edit-modal .sg-form-grid{gap:4px 14px}
.sg-library-edit-modal .sg-service-grid{padding:12px;border:1px solid var(--border);border-radius:12px;background:var(--surface-muted,#f8fafb);margin:8px 0 18px}
.sg-library-edit-modal .sg-service{border:1px solid var(--border);border-radius:9px;background:var(--card);padding:10px 12px}
.sg-library-edit-modal .modal-actions{position:sticky;bottom:-28px;z-index:4;background:var(--card);padding:16px 0 4px;border-top:1px solid var(--border);margin-top:22px;display:flex;justify-content:flex-end;gap:10px}
@media(max-width:700px){.sg-library-view-modal .sg-view-grid{grid-template-columns:1fr}.sg-library-edit-modal{padding:18px}.sg-library-edit-modal .modal-head{top:-18px}.sg-library-edit-modal .modal-actions{bottom:-18px;flex-wrap:wrap}}

.admin-collapsible-head{width:100%;display:flex;align-items:center;justify-content:space-between;text-align:left;background:#f7f9fa;border:1px solid var(--border);border-radius:10px;padding:13px 15px;color:var(--secondary);font:inherit;font-weight:800;margin:0 0 4px}.admin-collapsible-head:hover{background:#eef5f5}.admin-collapsible-head span:last-child{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;background:#e5efef;color:var(--primary);font-size:20px}

/* Smart Generator management workspace */
.sg-manage-page{display:flex;flex-direction:column;gap:18px;min-width:0}
.sg-manage-hero{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:24px 26px;border:1px solid var(--border);border-radius:16px;background:linear-gradient(125deg,rgba(35,83,77,.09),rgba(255,255,255,.92));}
.sg-manage-hero h3{font-size:22px;margin:5px 0 7px;color:var(--secondary)}
.sg-manage-hero p,.sg-manage-card-head p,.sg-manage-section-head p{margin:0;color:var(--muted);font-size:13px;line-height:1.55;max-width:680px}
.sg-manage-eyebrow{font-size:10px;letter-spacing:.13em;font-weight:800;color:var(--primary)}
.sg-manage-hero-stat{display:grid;grid-template-columns:auto auto;align-items:baseline;column-gap:8px;row-gap:2px;padding:14px 16px;border:1px solid var(--border);border-radius:12px;background:rgba(255,255,255,.8);white-space:nowrap}
.sg-manage-hero-stat strong{font-size:21px;color:var(--secondary);text-align:right}.sg-manage-hero-stat span{font-size:11px;color:var(--muted)}
.sg-manage-departments{padding:20px;border:1px solid var(--border);border-radius:14px;background:var(--card,#fff)}
.sg-manage-section-head,.sg-manage-card-head{display:flex;align-items:center;justify-content:space-between;gap:14px}
.sg-manage-section-head h4,.sg-manage-card-head h4{margin:0 0 5px;font-size:15px;color:var(--secondary)}
.sg-department-chip-list{display:flex;flex-wrap:wrap;gap:8px;margin-top:16px}
.sg-department-chip{display:inline-flex;align-items:center;padding:7px 11px;border:1px solid var(--border);border-radius:999px;background:var(--surface,#f7f9f8);font-size:12px;font-weight:600;color:var(--text)}
.sg-count-pill{display:inline-flex;align-items:center;justify-content:center;min-width:30px;height:28px;padding:0 8px;border-radius:999px;background:rgba(35,83,77,.1);color:var(--primary);font-size:12px;font-weight:800}
.sg-manage-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
.sg-manage-card{min-width:0;padding:18px;border:1px solid var(--border);border-radius:14px;background:var(--card,#fff);box-shadow:0 2px 8px rgba(20,35,30,.025)}
.sg-manage-card-head{align-items:flex-start;padding-bottom:14px;border-bottom:1px solid var(--border)}
.sg-manage-list{display:flex;flex-direction:column;margin:4px 0 12px}
.sg-manage-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 2px;border-bottom:1px solid var(--border)}
.sg-manage-row:last-child{border-bottom:0}.sg-manage-item-name{font-size:13px;font-weight:600;overflow-wrap:anywhere}.sg-manage-item-name small{display:inline-block;margin-left:5px;color:var(--muted);font-weight:500}
.sg-manage-row.is-inactive .sg-manage-item-name{color:var(--muted)}.sg-manage-actions{display:flex;gap:5px;flex-shrink:0}.sg-add-wide{width:100%;justify-content:center}
.sg-empty{display:block;padding:12px 2px;color:var(--muted);font-size:12px}
.sg-manage-footer-note{display:flex;align-items:flex-start;gap:10px;padding:13px 15px;border-radius:10px;background:rgba(35,83,77,.06);color:var(--muted)}.sg-manage-footer-note>span{font-size:17px;color:var(--primary)}.sg-manage-footer-note p{margin:1px 0;font-size:12px;line-height:1.55}
@media(max-width:850px){.sg-manage-grid{grid-template-columns:1fr}.sg-manage-hero{align-items:flex-start;flex-direction:column}.sg-manage-section-head{align-items:flex-start;flex-direction:column}.sg-manage-hero-stat{width:100%;max-width:260px}}
/* v1.0.92: inline standard department management */
.sg-dept-name-input{min-width:0;width:100%;max-width:100%;font:inherit;color:inherit;background:transparent;border:1px solid transparent;border-radius:6px;padding:7px 8px;outline:none;}
.sg-dept-name-input:hover,.sg-dept-name-input:focus{border-color:var(--border,#d1d5db);background:var(--card,#fff);}
.sg-inline-add{display:flex;gap:8px;align-items:center;margin-top:12px;}
.sg-inline-add input{flex:1;min-width:0;border:1px solid var(--border,#d1d5db);border-radius:8px;padding:10px 12px;font:inherit;}
.sg-inline-save-status{grid-column:1/-1;font-size:12px;color:var(--muted,#64748b);padding-left:8px;}
/* v1.0.92: consistent inline catalog controls and in-app notices */
.sg-manage-row .sg-manage-item-name{box-sizing:border-box;min-width:0;width:100%;}
.sg-manage-row .sg-dept-name-input{flex:1;}
.sg-manage-row .sg-inline-save-status{min-height:14px;}
.app-notice-overlay{position:fixed;inset:0;z-index:10000;display:none;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.42);}
.app-notice-card{width:min(540px,100%);background:var(--card,#fff);color:var(--text,#172033);border:1px solid var(--border,#d8dee8);border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.22);overflow:hidden;}
.app-notice-head{font-size:19px;font-weight:700;padding:20px 24px 8px;}
.app-notice-body{font-size:15px;line-height:1.6;padding:8px 24px 20px;white-space:pre-wrap;overflow-wrap:anywhere;}
.app-notice-actions{display:flex;justify-content:flex-end;gap:10px;padding:0 24px 20px;}

/* Unified application-wide notification and confirmation system */
.app-notice-overlay{backdrop-filter:blur(2px);background:rgba(18,52,59,.48);padding:20px;z-index:10000}
.app-notice-card{width:min(500px,100%);border-radius:18px;border:1px solid var(--border);box-shadow:0 24px 70px rgba(18,52,59,.24)}
.app-notice-head{display:flex;align-items:center;gap:11px;font-size:18px;padding:22px 24px 8px;color:var(--secondary)}
.app-notice-icon{display:inline-grid;place-items:center;flex:0 0 30px;width:30px;height:30px;border-radius:50%;background:color-mix(in srgb,var(--primary) 13%,white);color:var(--primary);font-size:16px;font-weight:800}
.notice-warning .app-notice-icon{background:color-mix(in srgb,var(--accent) 22%,white);color:var(--secondary)}
.notice-error .app-notice-icon{background:#fff0ee;color:var(--danger)}
.notice-success .app-notice-icon{background:#e6f5ef;color:#14734f}
.app-notice-body{padding:10px 24px 22px;font-size:14px;line-height:1.65}
.app-notice-actions{gap:10px;padding:0 24px 22px;align-items:center}
.app-dialog-btn{min-width:112px;height:40px;padding:0 16px;display:inline-flex;align-items:center;justify-content:center;border-radius:10px;font-size:13px;line-height:1;white-space:nowrap}
.app-dialog-input{display:block;width:100%;height:42px;margin-top:14px;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:var(--card);color:var(--text);outline:none}
.app-dialog-input:focus{border-color:var(--primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--primary) 15%,transparent)}
@media(max-width:520px){.app-notice-overlay{padding:14px}.app-notice-head{padding:18px 18px 8px}.app-notice-body{padding:8px 18px 18px}.app-notice-actions{padding:0 18px 18px}.app-dialog-btn{min-width:0;flex:1}}

/* Master Library dependency selection: searchable, readable checkbox list */
.sg-dependency-field{min-width:0}
.sg-dependency-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:300px;overflow-y:auto;padding:10px;border:1px solid var(--border);border-radius:12px;background:var(--surface-muted,#f8fafb);margin-top:8px}
.sg-dependency-option{display:flex;align-items:flex-start;gap:10px;min-width:0;padding:10px;border:1px solid var(--border);border-radius:9px;background:var(--surface,#fff);cursor:pointer}
.sg-dependency-option[hidden]{display:none!important}
.sg-dependency-option input{flex:0 0 auto;margin-top:3px;width:16px;height:16px}
.sg-dependency-option span{display:flex;flex-direction:column;gap:3px;min-width:0;overflow-wrap:anywhere}
.sg-dependency-option strong{font-size:13px;font-weight:600;line-height:1.35}
.sg-dependency-option small{font-size:11px;color:var(--text-muted,#667085);line-height:1.3}
@media(max-width:700px){.sg-dependency-list{grid-template-columns:1fr;max-height:260px}}

/* v1.0.98: wider, single-row dependency picker in Master Library editor */
.sg-library-edit-modal .sg-dependency-field{grid-column:1 / -1;width:100%;}
.sg-library-edit-modal .sg-dependency-list{grid-template-columns:minmax(0,1fr);max-height:320px;width:100%;box-sizing:border-box;}
.sg-library-edit-modal .sg-dependency-option{display:flex;flex-direction:row;align-items:center;gap:12px;min-height:42px;padding:8px 12px;}
.sg-library-edit-modal .sg-dependency-option span{flex:1;display:flex;flex-direction:row;align-items:center;gap:10px;min-width:0;}
.sg-library-edit-modal .sg-dependency-option strong{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.sg-library-edit-modal .sg-dependency-option small{flex:0 0 auto;max-width:34%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}


/* v1.0.99: compact dependency rows; saved selections stay at the top */
.sg-library-edit-modal .sg-dependency-list{gap:4px;padding:6px;margin-top:6px;}
.sg-library-edit-modal .sg-dependency-option{gap:8px;min-height:30px;padding:5px 8px;border-radius:7px;}
.sg-library-edit-modal .sg-dependency-option input{margin-top:0;width:15px;height:15px;}
.sg-library-edit-modal .sg-dependency-option span{gap:8px;}
.sg-library-edit-modal .sg-dependency-option strong{font-size:12px;line-height:1.25;}
.sg-library-edit-modal .sg-dependency-option small{font-size:10px;line-height:1.2;}
.sg-library-edit-modal .sg-dependency-option.is-selected{border-color:var(--primary,#0f766e);background:var(--surface,#fff);}
.sg-library-filters{display:flex;align-items:flex-start;gap:12px;flex-wrap:wrap;margin:10px 0}.sg-library-filters .sg-library-search{flex:1 1 320px;max-width:520px;margin:0}.sg-library-department-filter{flex:0 1 260px;min-width:220px;margin:0}.sg-library-department-filter select{width:100%;min-height:44px}.sg-review-filters{margin:12px 0}

/* v1.1.2 compact Master Library task modals */
.sg-library-view-modal .sg-view-field:has(.sg-view-label){white-space:normal}
.sg-library-view-modal .sg-view-value{white-space:pre-line}
.sg-library-view-modal .sg-view-section:last-of-type .sg-view-grid{grid-template-columns:minmax(0,1fr)}
.sg-library-view-modal .sg-view-section:last-of-type .sg-view-field{min-height:unset}
.sg-library-edit-modal h4{margin:14px 0 8px;padding-bottom:6px;font-size:15px}
.sg-library-edit-modal .field{padding:9px 11px;margin:6px 0 8px}
.sg-library-edit-modal .field p.small{margin:3px 0 6px;line-height:1.3;font-size:11px}
.sg-library-edit-modal .sg-inline-help{font-size:11px;font-weight:400;color:var(--muted,#61717a)}
.sg-library-edit-modal input:not([type=checkbox]),.sg-library-edit-modal select,.sg-library-edit-modal textarea{padding:8px 10px}
.sg-library-edit-modal textarea{min-height:54px}
.sg-library-edit-modal .sg-service-grid{padding:8px;margin:6px 0 10px;gap:6px}
.sg-library-edit-modal .sg-service{padding:7px 9px}

/* v1.1.3 — Simplified suggested-task plan review */
.sg-section-head .sg-status{margin-left:auto;align-self:flex-start}
.sg-plan-actions{margin:0 0 10px}
.sg-kpis{gap:8px;margin:8px 0 10px}
.sg-kpis>div{padding:7px 10px;border-radius:8px}
.sg-kpis b{font-size:19px;margin-top:1px}
.sg-note{margin-top:8px;padding:9px 12px}
.sg-warning{margin:8px 0}

/* v1.1.4: compact draft tabs and review controls/table order */
.sg-draft-picker .sg-draft-tab{padding:6px 10px!important;font-size:12px!important;line-height:1.15;min-height:32px;border-radius:9px}
.sg-review-filters{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.sg-review-filters .sg-library-search{flex:1 1 280px;min-width:180px}
.sg-review-filters .sg-library-department-filter{flex:0 1 220px;min-width:170px}
.sg-review-filters .sg-plan-actions{flex:1 1 460px;display:flex;justify-content:flex-end;gap:6px;margin:0}
.sg-review-filters .sg-plan-actions .btn{padding:10px 12px;font-size:13px;min-height:44px;white-space:nowrap}
.sg-plan-inline th:nth-child(1){width:4%}
.sg-plan-inline th:nth-child(2){width:29%}
.sg-plan-inline th:nth-child(3){width:15%}
.sg-plan-inline th:nth-child(4){width:9%}
.sg-plan-inline th:nth-child(5){width:12%}
.sg-plan-inline th:nth-child(6){width:11%}
.sg-plan-inline th:nth-child(7){width:11%}
.sg-plan-inline th:nth-child(8){width:9%}
@media(max-width:1000px){.sg-review-filters .sg-plan-actions{flex-basis:100%;justify-content:flex-start}.sg-review-filters .sg-plan-actions .btn{white-space:normal}}

/* v1.1.6: compact auto-growing task title/note and inline criteria help */
.sg-library-edit-modal textarea.sg-auto-grow{min-height:44px;height:44px;overflow-y:hidden;resize:vertical;field-sizing:content;line-height:1.45;padding-top:9px;padding-bottom:9px}
.sg-library-edit-modal h4 .sg-inline-help{font-size:12px;font-weight:400;color:var(--muted,#61717a)}

/* v1.2.3: align category/type selects despite the add-type button */
.sg-form-grid > .field:has(#sgCategory) > label,
.sg-form-grid > .field:has(#sgType) > label{min-height:38px;align-items:flex-end}
/* v1.2.3: give task text more room while keeping other review columns stable */
.sg-plan-inline th:nth-child(2){width:32%!important}
.sg-plan-inline th:nth-child(8){width:6%!important}
.sg-plan-inline td:nth-child(2) .sg-task-input{min-height:34px!important;line-height:1.2!important;padding-top:3px!important;padding-bottom:3px!important}


/* v1.2.6: widen task and priority columns in review/approval table */
.sg-plan-table-wrap{overflow-x:auto!important}
.sg-plan-inline{width:106%!important;min-width:106%!important}
.sg-plan-inline th:nth-child(2){width:35%!important}
.sg-plan-inline th:nth-child(8){width:9%!important}
.sg-plan-inline td:nth-child(8) select{min-width:76px!important;width:100%!important;white-space:nowrap!important}

/* v1.2.8: keep review controls on one row and fit all plan columns in viewport */
@media (min-width: 1001px){
  .sg-review-filters{display:grid!important;grid-template-columns:minmax(180px, 1fr) 190px auto;align-items:center!important;gap:8px!important;width:100%;}
  .sg-review-filters .sg-library-search{width:100%;min-width:0!important;max-width:none!important;flex:none!important;}
  .sg-review-filters .sg-library-department-filter{width:100%;min-width:0!important;max-width:none!important;flex:none!important;}
  .sg-review-filters .sg-plan-actions{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-end!important;align-items:center!important;gap:6px!important;width:max-content;min-width:0;flex:none!important;}
  .sg-review-filters .sg-plan-actions .btn{flex:0 0 auto!important;min-height:44px;padding:10px 10px!important;font-size:12px!important;white-space:nowrap!important;}
  .sg-plan-table-wrap{overflow-x:hidden!important;width:100%!important;max-width:100%!important;}
  .sg-plan-inline{table-layout:fixed!important;width:100%!important;min-width:0!important;}
  .sg-plan-inline th:nth-child(1){width:4%!important}
  .sg-plan-inline th:nth-child(2){width:34%!important}
  .sg-plan-inline th:nth-child(3){width:13%!important}
  .sg-plan-inline th:nth-child(4){width:9%!important}
  .sg-plan-inline th:nth-child(5){width:10%!important}
  .sg-plan-inline th:nth-child(6){width:10%!important}
  .sg-plan-inline th:nth-child(7){width:10%!important}
  .sg-plan-inline th:nth-child(8){width:10%!important}
  .sg-plan-inline th,.sg-plan-inline td{min-width:0!important;overflow-wrap:anywhere;}
  .sg-plan-inline td:nth-child(8) select{min-width:0!important;width:100%!important;white-space:nowrap!important;}
}
@media (min-width:1001px) and (max-width:1350px){
  .sg-review-filters{grid-template-columns:minmax(130px,1fr) 165px auto;gap:5px!important}
  .sg-review-filters .sg-plan-actions{gap:4px!important}
  .sg-review-filters .sg-plan-actions .btn{padding:9px 7px!important;font-size:11px!important}
}


/* v1.2.9: compact review controls and keep all columns, including priority, inside the viewport */
@media (min-width: 1001px){
  .sg-review-filters{display:grid!important;grid-template-columns:minmax(150px,.8fr) 160px minmax(0,2fr)!important;align-items:center!important;gap:8px!important;width:100%!important;}
  .sg-review-filters .sg-library-search,.sg-review-filters .sg-library-department-filter{width:100%!important;min-width:0!important;max-width:none!important;margin:0!important;}
  .sg-review-filters .sg-plan-actions{display:flex!important;flex-wrap:nowrap!important;justify-content:stretch!important;align-items:stretch!important;gap:6px!important;width:100%!important;min-width:0!important;margin:0!important;}
  .sg-review-filters .sg-plan-actions .btn{flex:1 1 0!important;min-width:0!important;min-height:44px!important;padding:8px 7px!important;font-size:11px!important;line-height:1.2!important;white-space:normal!important;}
  .sg-plan-table-wrap{overflow-x:hidden!important;width:100%!important;max-width:100%!important;}
  .sg-plan-inline{table-layout:fixed!important;width:100%!important;min-width:0!important;max-width:100%!important;}
  .sg-plan-inline th:nth-child(1){width:4%!important}
  .sg-plan-inline th:nth-child(2){width:38%!important}
  .sg-plan-inline th:nth-child(3){width:12%!important}
  .sg-plan-inline th:nth-child(4){width:8%!important}
  .sg-plan-inline th:nth-child(5){width:9%!important}
  .sg-plan-inline th:nth-child(6){width:10%!important}
  .sg-plan-inline th:nth-child(7){width:10%!important}
  .sg-plan-inline th:nth-child(8){width:9%!important}
  .sg-plan-inline th,.sg-plan-inline td{min-width:0!important;overflow-wrap:anywhere;}
  .sg-plan-inline td:nth-child(8) select{width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
}


/* v1.2.10: keep review action buttons on one desktop row with readable, content-sized labels */
@media (min-width: 1001px){
  .sg-review-filters{display:grid!important;grid-template-columns:minmax(150px, 0.7fr) minmax(150px, 0.45fr) minmax(max-content, 1.85fr)!important;align-items:center!important;gap:8px!important;width:100%!important;}
  .sg-review-filters .sg-library-search{min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;}
  .sg-review-filters .sg-library-department-filter{min-width:0!important;width:100%!important;max-width:none!important;margin:0!important;}
  .sg-review-filters .sg-plan-actions{display:flex!important;flex-flow:row nowrap!important;justify-content:flex-end!important;align-items:center!important;gap:8px!important;width:auto!important;min-width:max-content!important;margin:0!important;}
  .sg-review-filters .sg-plan-actions .btn{flex:0 0 auto!important;width:auto!important;min-width:max-content!important;min-height:44px!important;padding:10px 14px!important;font-size:13px!important;line-height:1.25!important;white-space:nowrap!important;}
}
@media (min-width: 1001px) and (max-width: 1250px){
  .sg-review-filters{grid-template-columns:minmax(115px,.55fr) minmax(130px,.4fr) minmax(max-content,2fr)!important;gap:6px!important;}
  .sg-review-filters .sg-plan-actions{gap:5px!important;}
  .sg-review-filters .sg-plan-actions .btn{padding:9px 9px!important;font-size:12px!important;}
}

/* v1.2.14: consistent tablet-friendly date inputs across the platform */
.date-control{position:relative;display:flex;align-items:center;width:100%;min-width:0;border:1px solid var(--border);border-radius:10px;background:#fff;overflow:hidden;min-height:44px}
.date-control:focus-within{border-color:var(--primary);box-shadow:0 0 0 2px color-mix(in srgb,var(--primary) 12%,transparent)}
.date-control .date-control-text{width:100%;min-width:0;flex:1;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;padding:11px 12px!important;outline:none;font-variant-numeric:tabular-nums}
.date-control .date-control-text.date-invalid{background:#fff2f0!important;color:#b42318}
.date-control-picker{position:absolute;right:0;top:0;bottom:0;width:46px;display:grid;place-items:center;background:#edf4f4;color:var(--primary);font-size:21px;pointer-events:none;border-left:1px solid var(--border)}
.date-control input.date-control-native{position:absolute!important;right:0!important;top:0!important;width:46px!important;height:100%!important;min-height:44px!important;opacity:0!important;cursor:pointer!important;padding:0!important;margin:0!important;border:0!important;z-index:2!important}
.date-control input.date-control-native::-webkit-calendar-picker-indicator{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;cursor:pointer}
.date-control input.date-control-native::-webkit-date-and-time-value{opacity:0}
@media(max-width:1100px){.date-control{min-height:48px}.date-control .date-control-text{font-size:16px;padding:12px!important}.date-control input.date-control-native{min-height:48px!important;width:50px!important}.date-control-picker{width:50px;font-size:22px}}

/* v1.2.15: clearly label report date-range fields on tablets and desktop */
.report-filters .report-date-field{display:flex;flex-direction:column;gap:6px;flex:1 1 190px;min-width:170px;margin:0}
.report-filters .report-date-field>label{display:block;margin:0 0 1px;font-size:12px;font-weight:700;color:var(--muted)}
.report-filters .report-date-field .date-control{width:100%;min-width:0}
.report-filters .report-date-field .date-control-text{min-width:0}
.report-filters .report-apply-btn{align-self:flex-end;white-space:nowrap;min-height:48px}
@media(max-width:900px){.report-filters .report-date-field{flex:1 1 220px;min-width:180px}.report-filters .report-apply-btn{flex:0 0 auto}}

/* v1.2.16: tablet dashboard KPI proportions and aligned values */
@media (min-width: 1101px) and (max-width: 1500px){
  .dashboard-top{grid-template-columns:minmax(0,1fr);align-items:start;}
  .dashboard-top .kpis{grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;}
  .dashboard-top .metric{min-width:0;padding:13px 12px 40px;min-height:0;}
  .dashboard-top .metric>span{display:block;min-height:48px;line-height:1.35;overflow-wrap:normal;}
  .dashboard-top .metric>b{display:flex;align-items:baseline;gap:7px;min-height:32px;margin-top:6px;white-space:nowrap;}
  .dashboard-top .metric>b small{white-space:nowrap;}
  .dashboard-top .metric-view{right:10px;bottom:9px;margin:0;padding:6px 10px;}
  .dashboard-top>.card{width:100%;}
  .dashboard-top .donut-wrap{justify-content:center;gap:30px;}
}
@media (min-width:651px) and (max-width:1100px){
  .dashboard-top{grid-template-columns:minmax(0,1fr);align-items:start;}
  .dashboard-top .kpis{grid-template-columns:repeat(3,minmax(0,1fr));}
  .dashboard-top .metric{min-height:150px;padding-bottom:40px;}
  .dashboard-top .metric>span{min-height:42px;line-height:1.35;}
  .dashboard-top .metric>b{display:flex;align-items:baseline;gap:7px;min-height:32px;white-space:nowrap;}
  .dashboard-top .metric-view{right:10px;bottom:9px;margin:0;}
}

/* v1.2.17: collapsible icon navigation for desktop/tablet */
.sidebar{min-width:0;transition:width .18s ease,padding .18s ease;overflow:hidden}
.sidebar-toggle{display:flex;align-items:center;justify-content:flex-start;gap:12px;width:100%;min-height:42px;padding:9px 12px;margin:0 0 10px;border-radius:9px;background:rgba(255,255,255,.12);color:#fff;font-weight:700;text-align:left;white-space:nowrap}
.sidebar-toggle:hover{background:rgba(255,255,255,.18)}
.sidebar-toggle-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;font-size:20px;line-height:1}
.sidebar-toggle-label{font-size:12px}
.sidebar .nav button{display:flex;align-items:center;gap:12px;min-height:44px;white-space:nowrap;overflow:hidden}
.nav-icon{display:inline-flex;align-items:center;justify-content:center;flex:0 0 22px;width:22px;font-size:20px;line-height:1}
.nav-label{display:inline-block;min-width:0;overflow:hidden;text-overflow:ellipsis}
.app.sidebar-collapsed .layout{grid-template-columns:68px minmax(0,1fr)}
.app.sidebar-collapsed .sidebar{padding:14px 8px}
.app.sidebar-collapsed .sidebar-toggle{justify-content:center;padding:8px 0}
.app.sidebar-collapsed .sidebar-toggle-label,.app.sidebar-collapsed .nav-label{display:none}
.app.sidebar-collapsed .sidebar .nav button{justify-content:center;padding:10px 0}
.task-page-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:nowrap;white-space:nowrap}
.task-page-actions .btn{flex:0 0 auto;white-space:nowrap}
@media (min-width:1101px){.app.sidebar-collapsed .layout{grid-template-columns:68px minmax(0,1fr)}}
@media (min-width:651px) and (max-width:1100px){
  .layout{grid-template-columns:68px minmax(0,1fr)!important}
  .sidebar{display:block!important;padding:14px 8px!important}
  .mobile-nav{display:none!important}
  .sidebar .nav button{justify-content:center;padding:10px 0}
  .sidebar .nav-label,.sidebar-toggle-label{display:none}
  .sidebar-toggle{justify-content:center;padding:8px 0}
  .app.sidebar-expanded .layout{grid-template-columns:220px minmax(0,1fr)!important}
  .app.sidebar-expanded .sidebar{padding:18px 12px!important}
  .app.sidebar-expanded .sidebar .nav button{justify-content:flex-start;padding:11px 12px}
  .app.sidebar-expanded .sidebar .nav-label,.app.sidebar-expanded .sidebar-toggle-label{display:inline-block}
  .app.sidebar-expanded .sidebar-toggle{justify-content:flex-start;padding:9px 12px}
  .content{min-width:0;padding:18px}
}
@media (max-width:650px){
  .sidebar{display:none!important}
  .mobile-nav{display:flex!important}
  .task-page-actions{gap:6px}
  .task-page-actions .btn{padding:9px 10px;font-size:12px}
}

/* v1.2.18: keep task lists and generator tables inside the available viewport */
html,body,.app,.layout,.content,.card,.sg-card,.table-wrap,.sg-table-wrap{min-width:0;max-width:100%;}
.content{overflow-x:clip;}
.table-wrap{width:100%;max-width:100%;overflow-x:hidden!important;}
.data-table{width:100%!important;max-width:100%!important;min-width:0!important;table-layout:fixed!important;}
.data-table th,.data-table td{min-width:0!important;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;}
.sg-table-wrap,.sg-plan-table-wrap{width:100%!important;max-width:100%!important;overflow-x:hidden!important;}
.sg-library-inline,.sg-library-readonly,.sg-plan-inline{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important;}
.sg-library-inline th,.sg-library-inline td,.sg-plan-inline th,.sg-plan-inline td{min-width:0!important;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;}
.sg-library-inline td select,.sg-library-inline td input,.sg-library-inline td textarea,.sg-plan-inline td select,.sg-plan-inline td input,.sg-plan-inline td textarea{min-width:0!important;max-width:100%!important;box-sizing:border-box!important;}
.sg-library-inline th:nth-child(2),.sg-library-inline td:nth-child(2){width:30%!important;}
.sg-library-inline th:nth-child(3),.sg-library-inline td:nth-child(3){width:15%!important;}
.sg-library-inline th:nth-child(4),.sg-library-inline td:nth-child(4){width:8%!important;}
.sg-library-inline th:nth-child(5),.sg-library-inline td:nth-child(5){width:10%!important;}
.sg-library-inline th:nth-child(6),.sg-library-inline td:nth-child(6),.sg-library-inline th:nth-child(7),.sg-library-inline td:nth-child(7){width:11%!important;}
.sg-library-inline th:last-child,.sg-library-inline td:last-child{width:12%!important;}
@media (min-width:651px) and (max-width:1100px){
  .content{padding:16px!important;}
  .sg-review-filters{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(150px,.65fr)!important;gap:8px!important;width:100%!important;}
  .sg-review-filters .sg-library-search,.sg-review-filters .sg-library-department-filter{width:100%!important;min-width:0!important;max-width:100%!important;margin:0!important;}
  .sg-review-filters .sg-plan-actions{grid-column:1/-1;display:flex!important;flex-flow:row nowrap!important;gap:6px!important;width:100%!important;min-width:0!important;}
  .sg-review-filters .sg-plan-actions .btn{flex:1 1 0!important;min-width:0!important;width:auto!important;padding:9px 6px!important;font-size:12px!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere;}
  .sg-plan-inline th,.sg-plan-inline td{padding:5px 3px!important;font-size:10px!important;}
  .sg-library-inline th,.sg-library-inline td{padding:6px 4px!important;font-size:10px!important;}
  .data-table th,.data-table td{padding:7px 5px!important;font-size:11px!important;}
}
@media (max-width:650px){
  .table-wrap{overflow-x:hidden!important;}
  .data-table{font-size:10px!important;}
  .data-table th,.data-table td{padding:6px 3px!important;font-size:10px!important;}
  .sg-library-inline th,.sg-library-inline td{padding:5px 3px!important;font-size:9px!important;}
  .sg-library-inline th:first-child,.sg-library-inline td:first-child{width:28px!important;}
  .sg-library-inline th:last-child,.sg-library-inline td:last-child{width:78px!important;}
  .sg-review-filters .sg-plan-actions .btn{font-size:10px!important;padding:8px 4px!important;}
}
.sg-library-inline th:first-child,.sg-library-inline td:first-child{width:4%!important;}
.sg-library-inline th:nth-child(2),.sg-library-inline td:nth-child(2){width:27%!important;}
.sg-library-inline th:nth-child(3),.sg-library-inline td:nth-child(3){width:14%!important;}
.sg-library-inline th:nth-child(4),.sg-library-inline td:nth-child(4){width:8%!important;}
.sg-library-inline th:nth-child(5),.sg-library-inline td:nth-child(5){width:10%!important;}
.sg-library-inline th:nth-child(6),.sg-library-inline td:nth-child(6),.sg-library-inline th:nth-child(7),.sg-library-inline td:nth-child(7){width:11%!important;}
.sg-library-inline th:last-child,.sg-library-inline td:last-child{width:15%!important;}

/* v1.2.19: dedicated phone layout; retain administrator-selected brand variables */
.mobile-menu-toggle{display:none;flex:0 0 40px;width:40px;height:40px;align-items:center;justify-content:center;border-radius:10px;background:color-mix(in srgb,var(--primary) 10%,white);color:var(--primary);font-size:21px}
@media(max-width:650px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .app{width:100%;max-width:100%;overflow-x:clip}
  .topbar{height:auto;min-height:62px;padding:8px 10px;gap:8px;align-items:center;flex-wrap:nowrap}
  .mobile-menu-toggle{display:inline-flex}
  .top-brand{min-width:0;flex:1;gap:7px;margin:0}
  .top-brand img,.top-brand .mini{width:30px!important;height:30px!important;flex:0 0 30px}
  .top-brand-link{min-width:0;max-width:calc(100vw - 210px);font-size:12px;line-height:1.2;white-space:normal;overflow-wrap:anywhere;text-align:left}
  .hotel-info-link{flex:0 0 26px;width:26px;height:26px}
  .top-actions{gap:5px;flex:0 0 auto}
  .top-actions .notification-bell{width:32px;height:32px;padding:0}
  .top-actions .user-pill{padding:4px;background:transparent;font-size:0;max-width:36px}
  .top-actions .user-pill .avatar-fallback,.top-actions .user-pill .user-avatar-mini{width:30px;height:30px;font-size:12px}
  .top-actions>.btn{padding:7px 8px;font-size:11px;white-space:nowrap}
  .top-actions .lang-switch{display:none}
  .mobile-nav{display:none!important}
  .layout{display:block!important;min-height:calc(100vh - 62px);width:100%;max-width:100%}
  .sidebar{display:block!important;position:fixed!important;left:0;top:62px;bottom:0;width:min(280px,84vw)!important;max-width:84vw;z-index:40;padding:14px 12px!important;overflow-y:auto;overflow-x:hidden;transform:translateX(-105%);transition:transform .2s ease;box-shadow:none}
  .app.sidebar-expanded .sidebar{transform:translateX(0);box-shadow:12px 0 36px rgba(0,0,0,.2)}
  .app.sidebar-expanded .layout:before{content:"";position:fixed;inset:62px 0 0;background:rgba(10,30,34,.42);z-index:35}
  .sidebar-toggle{display:flex!important;justify-content:flex-start!important;padding:9px 12px!important}
  .sidebar-toggle-label{display:inline-block!important}
  .sidebar .nav button{display:flex!important;justify-content:flex-start!important;gap:12px;padding:11px 12px!important;min-height:44px}
  .sidebar .nav-label{display:inline-block!important}
  .content{padding:14px 12px!important;width:100%;max-width:100%;min-width:0;overflow-x:clip}
  .page-head{gap:10px;align-items:flex-start;flex-wrap:wrap;margin-bottom:14px}
  .page-head h2{font-size:22px;line-height:1.2}
  .page-head p{font-size:12px;line-height:1.4}
  .page-head-actions{width:100%;max-width:100%}
  .task-page-actions{justify-content:flex-start;flex-wrap:wrap;white-space:normal}
  .task-page-actions .btn{font-size:12px;padding:9px 11px}
  .quick-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .quick-action{min-width:0;justify-content:center;padding:10px 8px;font-size:12px}
  .quick-action span{overflow-wrap:anywhere}
  .opening{padding:8px 10px;max-width:100%}
  .opening b{font-size:21px}
  .dashboard-top,.dashboard-grid{grid-template-columns:minmax(0,1fr)!important;gap:12px}
  .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .metric{min-width:0;padding:12px 10px 42px;position:relative;min-height:136px}
  .metric span{font-size:11px;line-height:1.35;display:block;min-height:34px;overflow-wrap:anywhere}
  .metric b{font-size:23px;display:flex;align-items:baseline;gap:5px;flex-wrap:wrap;margin-top:7px;line-height:1.1}
  .metric b small{font-size:11px}
  .metric-view{position:absolute;right:8px;bottom:8px;margin:0;padding:6px 10px;font-size:11px}
  .donut-wrap{gap:14px;align-items:center;justify-content:center;flex-wrap:wrap}
  .donut{width:116px;height:116px;flex:0 0 116px}
  .donut:after{inset:22px}
  .legend{min-width:0;flex:1 1 150px}
  .legend div{font-size:11px;line-height:1.35;align-items:flex-start}
  .dept-row{grid-template-columns:minmax(0,1fr) auto;gap:7px;margin:13px 0}
  .dept-label{min-width:0;overflow-wrap:anywhere}
  .dept-row .stack{grid-column:1/-1;grid-row:2}
  .dept-nums{grid-column:2;grid-row:1;gap:6px;font-size:10px;flex-wrap:wrap}
  .card,.sg-card{padding:13px;border-radius:13px;min-width:0}
  .filters{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;padding:12px}
  .filters input,.filters select{width:100%;min-width:0;max-width:100%;font-size:14px}
  .table-wrap{width:100%;max-width:100%;overflow-x:hidden!important}
  .data-table{width:100%!important;min-width:0!important;table-layout:fixed!important;font-size:11px!important}
  .data-table th,.data-table td{padding:7px 5px!important;font-size:10px!important;line-height:1.35;overflow-wrap:anywhere;word-break:normal}
  .data-table th{white-space:normal!important}
  .tasks-table thead{display:none}
  .tasks-table,.tasks-table tbody,.tasks-table tr,.tasks-table td{display:block;width:100%!important;max-width:100%!important}
  .tasks-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;padding:11px 0;border-bottom:1px solid var(--border)}
  .tasks-table tbody td{border:0;padding:3px 2px!important;min-width:0}
  .tasks-table tbody td:nth-child(1){grid-column:1/-1;font-size:11px!important;color:var(--muted)}
  .tasks-table tbody td:nth-child(1):before{content:'Şöbə: ';font-weight:700;color:var(--muted)}
  .tasks-table tbody td:nth-child(2){grid-column:1/-1;font-size:13px!important;color:var(--text);line-height:1.4}
  .tasks-table tbody td:nth-child(3):before{content:'Başlama';display:block;font-size:10px;color:var(--muted);font-weight:700}
  .tasks-table tbody td:nth-child(4):before{content:'Bitmə';display:block;font-size:10px;color:var(--muted);font-weight:700}
  .tasks-table tbody td:nth-child(5):before{content:'Qalan müddət';display:block;font-size:10px;color:var(--muted);font-weight:700}
  .tasks-table tbody td:nth-child(6):before{content:'Status';display:block;font-size:10px;color:var(--muted);font-weight:700;margin-bottom:4px}
  .tasks-table tbody td:nth-child(7){grid-column:1/-1}
  .tasks-table tbody td:nth-child(7):before{content:'Qeyd: ';font-size:10px;color:var(--muted);font-weight:700}
  .tasks-table tbody td:nth-child(8){grid-column:1/-1}
  .tasks-table .actions{flex-wrap:wrap}
  .status{white-space:normal;text-align:center}
  .modal-bg{padding:8px;align-items:flex-end}
  .modal{width:100%;max-width:100%;max-height:92dvh;padding:15px;border-radius:16px 16px 10px 10px}
  .modal-head{position:sticky;top:-15px;background:#fff;padding:4px 0 10px;z-index:2}
  .two{grid-template-columns:minmax(0,1fr)!important;gap:0}
  .field{margin:10px 0}
  .field input,.field select,.field textarea{font-size:16px;min-width:0}
  .modal-actions{position:sticky;bottom:-15px;background:#fff;padding:10px 0 2px;flex-wrap:wrap}
  .modal-actions .btn{flex:1 1 auto}
  .sg-tabs{display:flex;overflow-x:auto;max-width:100%;padding-bottom:4px;scrollbar-width:thin}
  .sg-tabs button{flex:0 0 auto;font-size:12px;padding:9px 11px;white-space:nowrap}
  .sg-section-head,.sg-plan-head{align-items:stretch;gap:10px}
  .sg-library-top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;width:100%}
  .sg-library-top-actions .btn{min-width:0;white-space:normal;font-size:11px;padding:9px 6px}
  .sg-library-filters{display:grid;grid-template-columns:minmax(0,1fr);gap:7px}
  .sg-library-filters .field{margin:4px 0;min-width:0;width:100%}
  .sg-table-wrap,.sg-plan-table-wrap{overflow-x:hidden!important}
  .sg-library-inline,.sg-library-readonly,.sg-plan-inline{min-width:0!important;width:100%!important;table-layout:auto!important}
  .sg-library-inline tbody tr,.sg-plan-inline tbody tr{grid-template-columns:25px minmax(0,1fr) minmax(0,1fr)!important;gap:5px;padding:9px 0}
  .sg-library-inline td,.sg-plan-inline td{font-size:11px!important;min-width:0!important;overflow-wrap:anywhere}
  .sg-library-inline td:nth-child(2),.sg-plan-inline td:nth-child(2){font-size:12px!important;line-height:1.35}
  .sg-library-inline td select,.sg-library-inline td input,.sg-library-inline td textarea,.sg-plan-inline td select,.sg-plan-inline td input,.sg-plan-inline td textarea{font-size:14px!important;padding:7px 5px!important}
  .sg-review-filters{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .sg-review-filters .sg-plan-actions{grid-column:auto;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .sg-review-filters .sg-plan-actions .btn{font-size:11px!important;min-height:42px;padding:8px!important;white-space:normal!important;overflow-wrap:anywhere}
  .sg-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .sg-kpis>div{min-width:0;padding:10px!important}
  .sg-kpis b{font-size:20px!important}
  .calendar-month{gap:2px}
  .cal-day{min-height:55px;padding:3px;border-radius:5px}
  .cal-date{font-size:10px}
  .cal-task{font-size:8px;padding:2px;white-space:normal;overflow-wrap:anywhere}
  .weekdays{gap:2px}
  .weekdays b{font-size:9px;padding:4px 1px;text-align:center}
  .gantt{overflow-x:auto;max-width:100%;overscroll-behavior-x:contain}
  .g-months,.g-row{min-width:760px}
  .report-filters{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .report-filters .report-date-field{min-width:0!important;width:100%}
  .report-filters .report-apply-btn{width:100%;min-height:44px}
  .app-footer{font-size:9px;padding:12px;text-align:center}
}
@media(max-width:374px){
  .top-brand-link{font-size:11px;max-width:calc(100vw - 195px)}
  .top-actions>.btn{font-size:10px;padding:6px}
  .content{padding:10px 8px!important}
  .kpis{gap:6px!important}
  .metric{padding:10px 8px 40px;min-height:130px}
  .metric b{font-size:21px}
  .donut{width:100px;height:100px;flex-basis:100px}
  .sg-library-top-actions{grid-template-columns:minmax(0,1fr)}
}


/* v1.2.20: make the phone navigation a real toggleable drawer instead of an always-visible horizontal strip. */
@media (max-width:650px){
  .mobile-nav{display:none!important;position:fixed;top:62px;left:0;bottom:0;width:min(300px,84vw);max-width:calc(100vw - 28px);padding:12px;background:var(--secondary);flex-direction:column;align-items:stretch;gap:3px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;z-index:31;box-shadow:12px 0 28px rgba(0,0,0,.18)}
  .app.sidebar-expanded .mobile-nav{display:flex!important}
  .mobile-nav .nav button{display:flex;width:100%;min-height:44px;align-items:center;gap:12px;text-align:left;white-space:normal;padding:11px 12px;border-radius:9px;background:transparent;color:#dfe9ea}
  .mobile-nav .nav button.active,.mobile-nav .nav button:hover{background:rgba(255,255,255,.12);color:#fff}
  .app.sidebar-expanded:before{content:"";position:fixed;left:0;right:0;top:62px;bottom:0;background:rgba(10,30,34,.32);z-index:30}
  .mobile-menu-toggle{position:relative;z-index:32}
  .topbar{z-index:33}
}


/* v1.2.27: branding footer abbreviation */
@media (min-width:651px) and (max-width:1100px){
  .dashboard-top{grid-template-columns:minmax(0,1.55fr) minmax(260px,.85fr)!important;align-items:stretch!important;gap:12px!important}
  .dashboard-top .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}
  .dashboard-top .metric{min-height:118px;padding:12px 10px 38px!important}
  .dashboard-top .metric>span{min-height:0!important;line-height:1.3!important}
  .dashboard-top .metric>b{font-size:22px!important;white-space:normal!important;flex-wrap:wrap;gap:4px!important}
  .dashboard-top>.card{width:auto!important;min-width:0}
  .dashboard-top .donut-wrap{gap:12px!important;align-items:center}
  .dashboard-top .donut{width:112px;height:112px;flex:0 0 112px}
  .dashboard-top .donut:after{inset:22px}
  .dashboard-top .legend div{font-size:11px;line-height:1.3}
  .sg-review-filters{column-gap:12px!important}
  .sg-review-filters .sg-plan-actions{margin-left:8px!important;width:calc(100% - 8px)!important}
  .sg-review-filters .sg-plan-actions .btn:last-child{margin-left:5px!important}
  .sidebar-toggle{display:none!important}
  .app .sidebar{position:relative;z-index:15;overflow:visible!important;width:68px;transition:width .18s ease,padding .18s ease}
  .app .layout{grid-template-columns:68px minmax(0,1fr)!important}
  .app .sidebar .nav-label{display:none!important}
  .app .sidebar .nav button{justify-content:center!important;padding:10px 0!important}
  .app .sidebar:hover{width:220px;position:relative;z-index:20;padding:18px 12px!important;box-shadow:8px 0 22px rgba(0,0,0,.12)}
  .app .layout:has(.sidebar:hover){grid-template-columns:220px minmax(0,1fr)!important}
  .app .sidebar:hover .nav-label{display:inline-block!important}
  .app .sidebar:hover .nav button{justify-content:flex-start!important;padding:11px 12px!important}
  .app.sidebar-expanded .sidebar{width:220px}
}
@media (max-width:650px){
  .mobile-nav{display:none!important;flex-wrap:wrap;overflow:visible!important;max-height:0;padding:0!important;transition:max-height .18s ease,padding .18s ease}
  .app.sidebar-expanded .mobile-nav{display:flex!important;max-height:65vh;padding:8px!important;overflow-y:auto!important;gap:3px}
  .mobile-menu-toggle{display:inline-flex!important;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:9px;background:#edf4f4;color:var(--secondary);font-size:21px}
  .mobile-nav button{flex:1 1 44%;min-width:0;text-align:left;border-radius:8px;padding:10px!important}
  .dashboard-top{grid-template-columns:minmax(0,1fr)!important}
}

/* v1.2.28: compact phone dashboard and personalized greeting */
@media (max-width:650px){
  .dashboard-greeting{display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;margin-bottom:12px!important}
  .dashboard-greeting-text{flex:1 1 auto;min-width:0}
  .dashboard-greeting h2{font-size:18px!important;line-height:1.2!important;overflow-wrap:anywhere}
  .dashboard-greeting p{font-size:10px!important;margin-top:4px!important;overflow-wrap:anywhere}
  .dashboard-greeting .opening{flex:0 0 auto;width:auto;max-width:44%;padding:7px 8px!important;text-align:right!important;border-radius:9px}
  .dashboard-greeting .opening span{font-size:9px;line-height:1.2}
  .dashboard-greeting .opening b{font-size:17px!important;line-height:1.2;white-space:nowrap}
  .dashboard-greeting .opening small{font-size:8px;line-height:1.2;white-space:normal}
  .quick-actions{display:flex!important;flex-wrap:nowrap!important;justify-content:space-between;gap:7px!important;margin-bottom:12px;}
  .quick-action{flex:1 1 0!important;min-width:0!important;min-height:42px;padding:8px 4px!important;border-radius:10px!important;font-size:20px!important;line-height:1!important;gap:0!important;box-shadow:none}
  .quick-action span{display:none!important}
  .dashboard-top{grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .dashboard-top .kpis{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:6px!important;margin-bottom:0!important}
  .dashboard-top .metric{display:flex!important;align-items:center!important;gap:8px!important;min-height:0!important;padding:9px 10px!important;border-radius:10px!important}
  .dashboard-top .metric>span{flex:1 1 auto!important;min-width:0;min-height:0!important;font-size:11px!important;line-height:1.25!important;overflow-wrap:anywhere}
  .dashboard-top .metric>b{flex:0 0 auto!important;display:flex!important;align-items:baseline!important;gap:3px!important;margin:0!important;min-height:0!important;font-size:17px!important;line-height:1.1!important;white-space:nowrap!important;flex-wrap:nowrap!important}
  .dashboard-top .metric>b small{font-size:10px!important;white-space:nowrap!important}
  .dashboard-top .metric-view{position:static!important;flex:0 0 25px!important;width:25px;height:25px;display:flex!important;align-items:center;justify-content:center;margin:0!important;padding:0!important;border-radius:7px!important;font-size:0!important;background:#edf4f4!important}
  .metric-view-label{display:none!important}
  .metric-view-arrow{display:inline!important;font-size:17px;line-height:1}
  .dashboard-top>.card{padding:12px!important}
  .dashboard-top .chart-title{font-size:13px;margin-bottom:9px}
  .dashboard-top .donut-wrap{gap:10px!important;flex-wrap:nowrap!important;justify-content:flex-start!important}
  .dashboard-top .donut{width:90px!important;height:90px!important;flex:0 0 90px!important}
  .dashboard-top .donut:after{inset:17px!important}
  .dashboard-top .legend{flex:1 1 auto!important;min-width:0}
  .dashboard-top .legend div{font-size:10px!important;line-height:1.25!important;margin:5px 0!important}
}

/* v1.2.29: compact phone task cards and consistent Smart Generator cards */
@media(max-width:650px){
  /* Task filters: reduce the panel footprint while keeping every filter usable. */
  .card.filters{padding:8px!important;margin-bottom:10px;border-radius:11px;box-shadow:0 3px 12px rgba(18,52,59,.045)}
  .filters{gap:6px!important}
  .filters input,.filters select{min-height:36px!important;padding:7px 9px!important;font-size:13px!important;border-radius:8px!important}
  /* Task list: put row actions directly under the department line and tighten vertical rhythm. */
  .tasks-table tbody tr{position:relative;grid-template-columns:repeat(2,minmax(0,1fr));gap:3px 8px;padding:8px 0!important}
  .tasks-table tbody td{padding:2px 1px!important;line-height:1.25}
  .tasks-table tbody td:nth-child(1){grid-column:1/-1;grid-row:1;font-size:10px!important;line-height:1.2}
  .tasks-table tbody td:nth-child(8){grid-column:1/-1;grid-row:2;display:flex;justify-content:flex-end;min-height:29px;padding:0 0 2px!important}
  .tasks-table tbody td:nth-child(2){grid-column:1/-1;grid-row:3;font-size:12px!important;line-height:1.3;padding:2px 0 4px!important}
  .tasks-table tbody td:nth-child(3){grid-column:1;grid-row:4}
  .tasks-table tbody td:nth-child(4){grid-column:2;grid-row:4}
  .tasks-table tbody td:nth-child(5){grid-column:1;grid-row:5}
  .tasks-table tbody td:nth-child(6){grid-column:2;grid-row:5}
  .tasks-table tbody td:nth-child(7){grid-column:1/-1;grid-row:6;font-size:10px!important;line-height:1.25}
  .tasks-table tbody td:nth-child(3):before,.tasks-table tbody td:nth-child(4):before,.tasks-table tbody td:nth-child(5):before,.tasks-table tbody td:nth-child(6):before{font-size:9px!important;margin-bottom:1px!important}
  .tasks-table tbody td:nth-child(7):before{font-size:9px!important}
  .tasks-table .actions{gap:4px;flex-wrap:nowrap;justify-content:flex-end}
  .tasks-table .icon-btn{width:27px;height:27px;min-width:27px;border-radius:7px;font-size:13px}
  /* Shared mobile card pattern for Smart Generator review and Master Library. */
  .sg-plan-inline,.sg-library-inline{border-collapse:separate!important;border-spacing:0!important}
  .sg-plan-inline thead,.sg-library-inline thead{display:none!important}
  .sg-plan-inline tbody tr,.sg-library-inline tbody tr{display:grid!important;position:relative;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px 9px!important;padding:10px 9px!important;margin:0 0 9px!important;border:1px solid var(--border)!important;border-radius:10px!important;background:#fff!important;box-shadow:0 2px 7px rgba(18,52,59,.045)}
  .sg-plan-inline tbody td,.sg-library-inline tbody td{display:block!important;width:auto!important;min-width:0!important;max-width:100%!important;padding:2px 0!important;border:0!important;font-size:11px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
  .sg-plan-inline tbody td:nth-child(1),.sg-library-inline tbody td:nth-child(1){position:absolute!important;left:8px;top:9px;width:22px!important;padding:0!important}
  .sg-plan-inline tbody td:nth-child(1) input,.sg-library-inline tbody td:nth-child(1) input{width:16px;height:16px;margin:2px 0 0}
  .sg-plan-inline tbody td:nth-child(2),.sg-library-inline tbody td:nth-child(2){grid-column:1/-1!important;padding-left:27px!important;font-size:12px!important;font-weight:700!important;line-height:1.35!important;min-height:24px}
  .sg-plan-inline tbody td:nth-child(3),.sg-library-inline tbody td:nth-child(3){grid-column:1/-1!important}
  .sg-plan-inline tbody td:nth-child(4),.sg-library-inline tbody td:nth-child(4){grid-column:1;grid-row:auto}
  .sg-plan-inline tbody td:nth-child(5),.sg-library-inline tbody td:nth-child(5){grid-column:2;grid-row:auto}
  .sg-plan-inline tbody td:nth-child(6),.sg-library-inline tbody td:nth-child(6){grid-column:1}
  .sg-plan-inline tbody td:nth-child(7),.sg-library-inline tbody td:nth-child(7){grid-column:2}
  .sg-plan-inline tbody td:nth-child(8),.sg-library-inline tbody td:nth-child(8){grid-column:1/-1!important}
  .sg-plan-inline tbody td:nth-child(3):before,.sg-library-inline tbody td:nth-child(3):before{content:'Məsul şöbə';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:2px}
  .sg-plan-inline tbody td:nth-child(4):before,.sg-library-inline tbody td:nth-child(4):before{content:'Başlanğıc həftəsi';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:2px}
  .sg-plan-inline tbody td:nth-child(5):before,.sg-library-inline tbody td:nth-child(5):before{content:'İcra müddəti';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:2px}
  .sg-plan-inline tbody td:nth-child(6):before,.sg-library-inline tbody td:nth-child(6):before{content:'Başlanğıc tarixi';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:2px}
  .sg-plan-inline tbody td:nth-child(7):before,.sg-library-inline tbody td:nth-child(7):before{content:'Bitmə tarixi';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:2px}
  .sg-plan-inline tbody td:nth-child(8):before{content:'Prioritet';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:2px}
  .sg-library-inline tbody td:nth-child(8):before{content:'Əməliyyatlar';display:block;color:var(--muted);font-size:9px;font-weight:700;margin-bottom:4px}
  .sg-plan-inline td .sg-task-input,.sg-plan-inline td select,.sg-plan-inline td input:not([type=checkbox]){min-width:0!important;width:100%!important;max-width:100%!important;font-size:12px!important;padding:5px!important}
  .sg-plan-inline .sg-number{min-width:0!important;width:100%!important}
  .sg-plan-inline .sg-date-hint{white-space:normal;font-size:9px;line-height:1.25}
  .sg-library-inline .sg-library-date{white-space:normal;overflow-wrap:anywhere;font-size:10px}
  .sg-library-inline .sg-row-actions{display:flex;gap:5px;justify-content:flex-start;flex-wrap:wrap}
  .sg-library-inline .sg-icon-btn{width:29px;height:29px;flex:0 0 29px}
  .sg-review-filters{padding:0!important;margin-bottom:8px!important;gap:6px!important}
  .sg-review-filters .field{margin:0!important}
  .sg-review-filters input,.sg-review-filters select{min-height:36px!important;padding:7px 9px!important}
  .sg-review-filters .sg-plan-actions{gap:5px!important}
  .sg-review-filters .sg-plan-actions .btn{min-height:36px!important;padding:7px 5px!important;font-size:10px!important}
  .sg-library-filters{gap:6px!important}
  .sg-library-filters .field{margin:0!important}
}


/* v1.2.30: persistent top header and proportional hotel-info control on touch devices */
.topbar{
  position:sticky!important;
  top:0!important;
  z-index:100!important;
  flex-shrink:0;
}
.hotel-info-link{
  width:clamp(16px, 2.1vw, 22px);
  height:clamp(16px, 2.1vw, 22px);
  flex:0 0 clamp(16px, 2.1vw, 22px);
  font-size:clamp(9px, 1vw, 11px);
  border-width:1px;
}
.hotel-info-link span:first-child{font-size:inherit}
@media (min-width:651px) and (max-width:1100px){
  .topbar{min-height:64px;padding:8px 16px;gap:10px}
  .mobile-menu-toggle{display:inline-flex}
  .mobile-nav{display:none!important}
  .layout{grid-template-columns:1fr!important;min-height:calc(100vh - 64px)}
  .sidebar{
    display:block!important;position:fixed!important;left:0;top:64px;bottom:0;
    width:min(280px,84vw)!important;max-width:84vw;z-index:90;
    padding:14px 12px!important;overflow-y:auto;overflow-x:hidden;
    transform:translateX(-105%);transition:transform .2s ease;box-shadow:none
  }
  .app.sidebar-expanded .sidebar{transform:translateX(0);box-shadow:12px 0 36px rgba(0,0,0,.2)}
  .app.sidebar-expanded .layout:before{content:"";position:fixed;inset:64px 0 0;background:rgba(10,30,34,.42);z-index:85}
  .sidebar-toggle{display:flex!important;justify-content:flex-start!important;padding:9px 12px!important}
  .sidebar-toggle-label,.sidebar .nav-label{display:inline-block!important}
  .sidebar .nav button{display:flex!important;justify-content:flex-start!important;gap:12px;padding:11px 12px!important;min-height:44px}
}
@media(max-width:650px){
  .topbar{position:sticky!important;top:0!important;z-index:100!important;min-height:62px}
  .hotel-info-link{width:clamp(16px, 4.4vw, 20px);height:clamp(16px, 4.4vw, 20px);flex:0 0 clamp(16px, 4.4vw, 20px);font-size:9px;border-width:1px}
  .hotel-info-link span:first-child{font-size:9px}
}


/* v1.2.31: keep the menu control in the fixed top bar on desktop too */
@media (min-width:1101px){
  .mobile-menu-toggle{
    display:inline-flex!important;
    flex:0 0 38px;
    width:38px;height:38px;
    align-items:center;justify-content:center;
    border-radius:9px;
    background:#edf4f4;color:var(--secondary);
    font-size:21px;
  }
  .topbar{position:sticky!important;top:0!important;z-index:100!important}
}


/* v1.2.32 — refined mobile calendar, reports, graph and overlay controls */
@media (max-width:650px){
  /* Consistent compact rhythm across mobile pages */
  .content{padding:12px 10px 20px!important}
  .page-head{gap:8px!important;margin-bottom:12px!important;align-items:center!important}
  .page-head h2{font-size:19px!important;line-height:1.2!important;letter-spacing:-.2px}
  .page-head p{font-size:11px!important;line-height:1.4!important;margin:4px 0!important}
  .card{padding:12px!important;border-radius:12px!important;box-shadow:0 1px 4px rgba(20,45,52,.045)!important}
  .cards{gap:9px!important;margin-bottom:10px!important}
  .grid{gap:10px!important}
  .btn,.icon-btn,button,select,input,textarea{transition:background-color .15s ease,border-color .15s ease}
  .btn{min-height:34px;padding:7px 10px!important;border-radius:8px!important;font-size:11px!important}
  .icon-btn{width:30px;height:30px;min-width:30px;border-radius:8px!important}
  .field{gap:4px!important;margin-bottom:8px!important}
  .field label,.field>label{font-size:10px!important;line-height:1.3!important}
  .field input,.field select,.field textarea,
  input:not([type=checkbox]):not([type=radio]),select,textarea{
    min-height:37px!important;padding:8px 10px!important;border-radius:8px!important;
    font-size:12px!important;line-height:1.35!important;max-width:100%;
  }
  textarea{min-height:76px!important}
  /* Calendar: smaller controls and quiet day cells while keeping all seven days visible */
  .calendar-page-head{margin-bottom:8px!important}
  .calendar-card{padding:8px!important;border-radius:11px!important}
  .calendar-toolbar{gap:5px!important;margin-bottom:7px!important;align-items:center!important}
  .calendar-toolbar b{font-size:13px!important;min-width:0!important;line-height:1.25!important}
  .calendar-toolbar .btn{min-height:30px!important;padding:5px 7px!important;font-size:10px!important}
  .weekdays,.calendar-month{gap:2px!important}
  .weekdays b{padding:5px 0!important;font-size:9px!important;font-weight:700!important}
  .cal-day{min-height:56px!important;padding:3px 2px!important;border-radius:5px!important;border-width:1px!important}
  .cal-day>strong,.cal-day>b{font-size:10px!important;line-height:1.1!important}
  .cal-task{display:block!important;padding:2px!important;margin-top:2px!important;border-radius:4px!important;font-size:7px!important;line-height:1.15!important;overflow:hidden!important;overflow-wrap:anywhere!important}
  .cal-dept{font-size:6px!important;line-height:1.1!important}
  .calendar-head{margin-bottom:8px!important}
  .calendar-head span{font-size:10px!important}
  /* Reports: compact filters and type switcher; tables stay horizontally scrollable */
  .report-filter-card{padding:10px!important;margin-bottom:10px!important}
  .report-types{display:flex!important;gap:5px!important;flex-wrap:nowrap!important;overflow-x:auto!important;overscroll-behavior-x:contain;padding-bottom:4px;margin-bottom:9px!important}
  .report-types button{flex:0 0 auto;padding:6px 9px!important;border-radius:7px!important;font-size:10px!important;min-height:30px}
  .report-filters{gap:7px!important}
  .report-filters .field{margin:0!important}
  .report-actions{gap:5px!important}
  .report-actions .btn{min-height:31px!important;padding:6px 8px!important}
  .report-result-head{gap:7px!important;margin-bottom:8px!important;align-items:flex-start!important}
  .report-result-head strong,.report-result-head b{font-size:12px!important}
  .report-result-head span{font-size:10px!important}
  .report-table th,.report-table td{padding:6px 7px!important;font-size:10px!important;line-height:1.3!important}
  .monthly-pf,.monthly-report{min-width:680px!important}
  /* Plan graph / Gantt: preserve horizontal navigation but tighten rows and labels */
  .gantt{max-height:calc(100dvh - 145px)!important;border-radius:9px!important}
  .g-sticky{padding-bottom:4px!important}
  .g-months,.g-row{min-width:900px!important}
  .g-row{gap:7px!important;padding:6px 0!important}
  .g-name{font-size:11px!important;line-height:1.3!important}
  .g-name small{font-size:9px!important;margin-top:2px!important}
  .g-month-grid div{font-size:9px!important;padding:4px 2px!important}
  .g-track{height:20px!important;border-radius:5px!important}
  .g-track span{top:3px!important;height:14px!important;border-radius:4px!important}
  /* Modals and selection dialogs: lighter, shorter and easier to use with one hand */
  .modal-bg{align-items:flex-end!important;justify-content:center!important;padding:8px!important;padding-bottom:max(8px,env(safe-area-inset-bottom))!important}
  .modal,.modal-bg .modal{
    width:100%!important;max-width:100%!important;max-height:90dvh!important;
    padding:14px 12px!important;border-radius:15px 15px 11px 11px!important;
    box-shadow:0 -4px 24px rgba(12,35,40,.12)!important;
  }
  .modal-head{gap:8px!important;margin-bottom:10px!important;padding-bottom:8px!important}
  .modal-head h3{font-size:16px!important;line-height:1.25!important}
  .modal-head p{font-size:11px!important;line-height:1.4!important}
  .modal-head .icon-btn,.modal-head button{flex:0 0 auto;min-width:30px!important;min-height:30px!important}
  .modal .two{grid-template-columns:minmax(0,1fr)!important;gap:7px!important}
  .modal .field{margin-bottom:6px!important}
  .modal-actions{display:flex!important;gap:6px!important;margin-top:12px!important;padding-top:9px!important;flex-wrap:wrap!important}
  .modal-actions .btn{flex:1 1 auto;min-width:0!important;min-height:36px!important}
  .modal .table-wrap{max-height:40dvh!important;margin:8px 0!important;border-radius:8px!important}
  .modal .table th,.modal .table td,.modal table th,.modal table td{padding:6px!important;font-size:10px!important}
  .recipient-modal{width:100%!important}
  .recipient-grid{grid-template-columns:minmax(0,1fr)!important;gap:8px!important}
  .recipient-grid>div{padding:9px!important;border-radius:9px!important}
  .recipient-list{max-height:30dvh!important;gap:5px!important}
  .recipient-list label{padding:7px!important;border-radius:7px!important;font-size:11px!important;line-height:1.35!important}
  .recipient-list input{margin-right:6px!important}
  .recipient-picker{padding:9px 10px!important;border-radius:8px!important;font-size:12px!important}
  .message{padding:10px 35px 10px 0!important}
  .message-meta{gap:6px!important;margin-bottom:4px!important}
  .message-meta b,.message-meta strong{font-size:11px!important}
  .message-meta small{font-size:9px!important}
  .reply-btn{right:0!important;top:10px!important}
  .notice{padding:10px!important;gap:7px!important}
  .notice-body span{font-size:11px!important;line-height:1.4!important}
  .notice-date{font-size:9px!important}
  /* Native and custom selection controls should feel consistent */
  .modal select,.modal input,.modal textarea,.recipient-picker,
  .sg-plan-inline select,.sg-plan-inline input:not([type=checkbox]){
    border-radius:8px!important;border-color:#d8e0e2!important;box-shadow:none!important
  }
}


/* v1.2.34 — fluid tablet/desktop layout for notices, dialogs and selection controls */
:root{
  --ui-space:clamp(8px, .9vw, 16px);
  --ui-radius:clamp(8px, .7vw, 14px);
  --ui-control-height:clamp(36px, 2.8vw, 44px);
}
button, .btn, .icon-btn, input, select, textarea{
  max-width:100%;
}
.modal-bg{
  padding:clamp(10px, 2vw, 28px)!important;
  padding-bottom:max(clamp(10px, 2vw, 28px),env(safe-area-inset-bottom))!important;
}
.modal{
  width:min( min(92vw, 900px), calc(100vw - 2 * clamp(10px, 2vw, 28px)))!important;
  max-height:min(92dvh, 1000px)!important;
  border-radius:clamp(10px, 1vw, 18px)!important;
  padding:clamp(14px, 1.5vw, 24px)!important;
}
.modal-head{gap:clamp(8px, 1vw, 16px)!important}
.modal-actions{gap:clamp(6px, .8vw, 12px)!important;flex-wrap:wrap}
.modal-actions .btn{min-width:0}
.notice{gap:clamp(7px, 1vw, 15px)!important;padding:clamp(9px, 1vw, 15px)!important}
.notice-date{font-size:clamp(10px, .8vw, 12px)!important}
.notice-body span,.notice-body{overflow-wrap:anywhere}
.field input,.field select,.field textarea,
input:not([type=checkbox]):not([type=radio]),select,textarea{
  min-width:0;
}
@media (min-width:651px) and (max-width:1100px){
  .content{padding:clamp(14px, 2vw, 24px)!important}
  .card{padding:clamp(12px, 1.6vw, 20px)!important;border-radius:clamp(10px, 1.2vw, 16px)!important}
  .page-head h2{font-size:clamp(19px, 2.2vw, 26px)!important;line-height:1.2}
  .btn{min-height:var(--ui-control-height);padding:clamp(7px, .9vw, 11px) clamp(10px, 1.2vw, 16px)!important}
  .icon-btn{width:clamp(30px, 3.4vw, 40px);height:clamp(30px, 3.4vw, 40px);min-width:clamp(30px, 3.4vw, 40px)}
  .field{gap:5px!important;margin-bottom:clamp(7px, 1vw, 12px)!important}
  .field label,.field>label{font-size:clamp(11px, 1.15vw, 13px)!important}
  .field input,.field select,.field textarea,
  input:not([type=checkbox]):not([type=radio]),select,textarea{
    min-height:var(--ui-control-height)!important;padding:clamp(8px, 1vw, 12px)!important;
    font-size:clamp(12px, 1.25vw, 15px)!important;border-radius:9px!important
  }
  .modal-bg{align-items:center!important}
  .modal{width:min(88vw, 780px)!important;max-height:88dvh!important}
  .modal .two{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:clamp(8px, 1.4vw, 16px)!important}
  .modal-head h3{font-size:clamp(16px, 1.8vw, 21px)!important}
  .modal .table th,.modal .table td,.modal table th,.modal table td{padding:clamp(6px, .8vw, 10px)!important}
  .notice{grid-template-columns:minmax(105px, .7fr) minmax(0,2fr) auto!important}
  .notice-body span{font-size:clamp(11px, 1.15vw, 14px)!important}
  .recipient-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:clamp(8px, 1.2vw, 14px)!important}
}
@media (min-width:1101px){
  .content{padding:clamp(18px, 1.6vw, 32px)!important}
  .page-head h2{font-size:clamp(22px, 1.55vw, 30px)!important}
  .card{padding:clamp(16px, 1.2vw, 24px)!important}
  .btn{min-height:clamp(36px, 2.3vw, 44px)}
  .modal{width:min( min(82vw, 900px), calc(100vw - 48px))!important;max-height:90dvh!important}
  .modal .two{gap:clamp(12px, 1vw, 18px)!important}
  .modal-head h3{font-size:clamp(18px, 1.15vw, 23px)!important}
  .notice{grid-template-columns:minmax(125px, .6fr) minmax(0,2fr) auto!important}
  .notice-body span{font-size:clamp(12px, .85vw, 15px)!important}
}


/* v1.2.36 — stable top bar, left-aligned hotel brand, hover navigation */
.app{box-sizing:border-box;padding-top:70px!important}
.app>.topbar{
  position:fixed!important;top:0!important;left:0!important;right:0!important;
  width:100%!important;box-sizing:border-box!important;height:70px!important;min-height:70px!important;
  z-index:1000!important;justify-content:flex-start!important;gap:12px!important;
  background:#fff!important;isolation:isolate;
}
.app>.topbar>.mobile-menu-toggle{order:0;flex:0 0 38px;width:38px;height:38px}
.app>.topbar>.top-brand{
  order:1;flex:0 1 auto!important;min-width:0!important;max-width:min(60vw,720px);
  margin:0!important;justify-content:flex-start!important;text-align:left!important;
}
.app>.topbar>.top-actions{order:2;margin-left:auto!important;flex:0 0 auto!important}
.app>.topbar .top-brand-link{text-align:left!important;justify-content:flex-start!important}
.app>.layout{min-height:calc(100vh - 70px)}
/* Desktop starts with a compact icon rail. Hover temporarily expands it; leaving collapses it. */
@media (min-width:1101px){
  .app.sidebar-collapsed .sidebar{
    position:relative;width:68px;max-width:68px;z-index:90;
    transition:width .18s ease,padding .18s ease;
  }
  .app.sidebar-collapsed .sidebar:hover{
    position:fixed!important;left:0;top:70px;bottom:0;
    width:235px!important;max-width:235px!important;
    padding:18px 12px!important;z-index:950;
    box-shadow:8px 0 24px rgba(10,30,34,.12);
  }
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle{justify-content:flex-start!important;padding:9px 12px!important}
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle-label,
  .app.sidebar-collapsed .sidebar:hover .nav-label{display:inline-block!important}
  .app.sidebar-collapsed .sidebar:hover .nav button{justify-content:flex-start!important;padding:11px 12px!important}
}
@media (min-width:651px) and (max-width:1100px){
  .app{padding-top:64px!important}
  .app>.topbar{height:64px!important;min-height:64px!important;padding:8px 16px!important}
  .app>.layout{min-height:calc(100vh - 64px)}
  .app.sidebar-collapsed .sidebar{
    position:fixed!important;left:0;top:64px;bottom:0;
    width:68px!important;max-width:68px!important;padding:14px 8px!important;
    overflow:hidden;z-index:950;transition:width .18s ease;
  }
  .app.sidebar-collapsed .sidebar:hover{
    width:min(280px,84vw)!important;max-width:84vw!important;
    padding:14px 12px!important;overflow-y:auto!important;
    box-shadow:8px 0 24px rgba(10,30,34,.12);
  }
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle{justify-content:flex-start!important;padding:9px 12px!important}
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle-label,
  .app.sidebar-collapsed .sidebar:hover .nav-label{display:inline-block!important}
  .app.sidebar-collapsed .sidebar:hover .nav button{justify-content:flex-start!important;padding:11px 12px!important}
  .app.sidebar-expanded .sidebar{position:fixed!important;left:0;top:64px;bottom:0;width:min(280px,84vw)!important;max-width:84vw!important;z-index:950}
}
@media (max-width:650px){
  .app{padding-top:62px!important}
  .app>.topbar{height:62px!important;min-height:62px!important;padding:7px 10px!important;gap:7px!important}
  .app>.topbar>.mobile-menu-toggle{flex:0 0 36px;width:36px;height:36px}
  .app>.topbar>.top-brand{flex:1 1 auto!important;max-width:none!important;gap:6px!important}
  .app>.topbar .top-brand-link{max-width:calc(100vw - 220px)!important;text-align:left!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .app>.topbar .hotel-info-link{flex:0 0 20px!important;width:20px!important;height:20px!important}
  .app>.topbar>.top-actions{gap:4px!important}
  .app>.layout{min-height:calc(100vh - 62px)}
  .app.sidebar-expanded:before{top:62px!important}
  .app.sidebar-expanded .mobile-nav{position:fixed!important;left:8px;right:8px;top:68px;z-index:980!important;max-height:calc(100dvh - 80px)!important;overflow-y:auto!important;border-radius:12px;box-shadow:0 10px 30px rgba(10,30,34,.18)}
}
@media (prefers-reduced-motion:reduce){.sidebar,.app>.topbar{transition:none!important}}


/* v1.2.37 — phone: persistent header and aligned task-card rows */
@media (max-width:650px){
  html,body{scroll-padding-top:62px}
  body>.app>.topbar,.app>.topbar{
    position:fixed!important;top:0!important;left:0!important;right:0!important;
    width:100%!important;height:62px!important;min-height:62px!important;
    z-index:2000!important;transform:none!important;will-change:auto!important;
  }
  .app{padding-top:62px!important}
  .app>.layout{min-height:calc(100dvh - 62px)!important}
  .app>.topbar .top-brand{min-width:0!important;overflow:hidden!important}
  .app>.topbar .top-brand-link{min-width:0!important;max-width:calc(100vw - 220px)!important}
  /* Task Manager: department and actions share one line; task title moves up one row. */
  .tasks-table tbody tr{grid-template-columns:minmax(0,1fr) auto!important;gap:3px 8px!important}
  .tasks-table tbody td:nth-child(1){grid-column:1!important;grid-row:1!important;min-width:0!important;white-space:normal!important;padding-right:4px!important}
  .tasks-table tbody td:nth-child(1):before{content:'Şöbə: ';font-weight:700;color:var(--muted)}
  .tasks-table tbody td:nth-child(8){grid-column:2!important;grid-row:1!important;justify-content:flex-end!important;align-self:center!important;min-height:27px!important;padding:0!important;white-space:nowrap!important}
  .tasks-table tbody td:nth-child(2){grid-column:1/-1!important;grid-row:2!important;padding:2px 0 4px!important}
  .tasks-table tbody td:nth-child(3){grid-column:1!important;grid-row:3!important}
  .tasks-table tbody td:nth-child(4){grid-column:2!important;grid-row:3!important}
  .tasks-table tbody td:nth-child(5){grid-column:1!important;grid-row:4!important}
  .tasks-table tbody td:nth-child(6){grid-column:2!important;grid-row:4!important}
  .tasks-table tbody td:nth-child(7){grid-column:1/-1!important;grid-row:5!important}
  .tasks-table .actions{gap:3px!important;justify-content:flex-end!important;flex-wrap:nowrap!important}
  .tasks-table .icon-btn{width:25px!important;height:25px!important;min-width:25px!important}
  /* Review and Master Library: checkbox and task title on the same aligned first row. */
  .sg-plan-inline tbody tr,.sg-library-inline tbody tr{
    grid-template-columns:22px minmax(0,1fr)!important;column-gap:7px!important;row-gap:5px!important;
    padding:9px!important;align-items:start!important
  }
  .sg-plan-inline tbody td:nth-child(1),.sg-library-inline tbody td:nth-child(1){
    position:static!important;left:auto!important;top:auto!important;grid-column:1!important;grid-row:1!important;
    width:22px!important;min-width:22px!important;padding:2px 0 0!important;align-self:start!important
  }
  .sg-plan-inline tbody td:nth-child(2),.sg-library-inline tbody td:nth-child(2){
    grid-column:2!important;grid-row:1!important;padding:0!important;margin:0!important;min-height:0!important;
    font-size:12px!important;line-height:1.35!important;overflow-wrap:anywhere!important
  }
  .sg-plan-inline tbody td:nth-child(3),.sg-library-inline tbody td:nth-child(3){grid-column:1/-1!important;grid-row:2!important}
  .sg-plan-inline tbody td:nth-child(3):before,.sg-library-inline tbody td:nth-child(3):before{
    content:'Məsul şöbə';display:block;font-size:10px;color:var(--muted);font-weight:700;margin-bottom:2px
  }
  .sg-library-inline tbody td:nth-child(8){grid-column:2!important;grid-row:2!important;align-self:end!important;justify-self:end!important;padding-top:14px!important}
  .sg-library-inline .sg-row-actions{justify-content:flex-end!important;flex-wrap:nowrap!important;gap:4px!important}
  .sg-plan-inline tbody td:nth-child(4),.sg-library-inline tbody td:nth-child(4){grid-column:1!important;grid-row:auto!important}
  .sg-plan-inline tbody td:nth-child(5),.sg-library-inline tbody td:nth-child(5){grid-column:2!important;grid-row:auto!important}
  .sg-plan-inline tbody td:nth-child(6),.sg-library-inline tbody td:nth-child(6){grid-column:1!important;grid-row:auto!important}
  .sg-plan-inline tbody td:nth-child(7),.sg-library-inline tbody td:nth-child(7){grid-column:2!important;grid-row:auto!important}
  .sg-plan-inline tbody td:nth-child(8){grid-column:1/-1!important;grid-row:auto!important}
}


/* v1.2.39 — overlay navigation and one-row tablet dashboard */
/* Opening the navigation must overlay the page, never resize or push its content. */
@media (min-width:1101px){
  .app.sidebar-expanded .layout{grid-template-columns:68px minmax(0,1fr)!important}
  .app.sidebar-expanded .content{grid-column:2!important}
  .app.sidebar-collapsed .layout:has(.sidebar:hover) .content{grid-column:2!important}
  .app.sidebar-expanded .sidebar{position:fixed!important;left:0;top:70px;bottom:0;width:235px!important;max-width:235px!important;z-index:950;padding:18px 12px!important;overflow-y:auto!important;overflow-x:hidden!important;box-shadow:8px 0 24px rgba(10,30,34,.12)}
  .app.sidebar-expanded .sidebar .nav-label,.app.sidebar-expanded .sidebar-toggle-label{display:inline-block!important}
  .app.sidebar-expanded .sidebar .nav button{justify-content:flex-start!important;padding:11px 12px!important}
  .app.sidebar-expanded:before{content:"";position:fixed;left:0;right:0;top:70px;bottom:0;background:rgba(10,30,34,.28);z-index:900}
}
@media (min-width:651px) and (max-width:1100px){
  .app.sidebar-expanded .layout{grid-template-columns:68px minmax(0,1fr)!important}
  .app.sidebar-expanded .content{grid-column:2!important}
  .app.sidebar-expanded .sidebar{position:fixed!important;left:0;top:64px;bottom:0;width:min(280px,84vw)!important;max-width:84vw!important;z-index:950;padding:14px 12px!important;overflow-y:auto!important;overflow-x:hidden!important;box-shadow:8px 0 24px rgba(10,30,34,.12)}
  .app.sidebar-expanded:before{content:"";position:fixed;left:0;right:0;top:64px;bottom:0;background:rgba(10,30,34,.28);z-index:900}
  .dashboard-top{grid-template-columns:minmax(0,1.8fr) minmax(190px,1fr)!important;gap:8px!important;align-items:stretch!important}
  .dashboard-top .kpis{grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:5px!important;min-width:0!important}
  .dashboard-top .metric{min-width:0!important;padding:8px 6px 35px!important;min-height:128px!important;border-radius:9px!important}
  .dashboard-top .metric>span{font-size:10px!important;line-height:1.25!important;min-height:45px!important;overflow-wrap:anywhere!important}
  .dashboard-top .metric>b{font-size:18px!important;gap:3px!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .dashboard-top .metric>b small{font-size:10px!important}
  .dashboard-top .metric-view{right:5px!important;bottom:6px!important;padding:5px 7px!important;font-size:10px!important}
  .dashboard-top>.card{min-width:0!important;padding:10px!important}
  .dashboard-top>.card .chart-title{font-size:12px!important;margin-bottom:8px!important}
  .dashboard-top .donut-wrap{gap:8px!important;justify-content:center!important;flex-wrap:wrap!important}
  .dashboard-top .donut{width:76px!important;height:76px!important;flex:0 0 76px!important}
  .dashboard-top .donut:after{inset:16px!important}
  .dashboard-top .legend div{font-size:9px!important;margin:5px 0!important;gap:4px!important}
}
@media (max-width:650px){
  .app.sidebar-expanded .layout{display:block!important}
  .app.sidebar-expanded .mobile-nav{display:none!important}
  .app.sidebar-expanded .sidebar{position:fixed!important;left:0;top:62px;bottom:0;width:min(280px,84vw)!important;max-width:84vw!important;z-index:950;padding:14px 12px!important;overflow-y:auto!important;overflow-x:hidden!important}
  .app.sidebar-expanded:before{content:"";position:fixed;left:0;right:0;top:62px;bottom:0;background:rgba(10,30,34,.32);z-index:900}
}

/* v1.2.40: compact mobile overview actions, status bar and department rows */
.dashboard-plus{display:none}
.dashboard-actions-menu[hidden]{display:none!important}
.dashboard-actions-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:25;width:190px;padding:8px;background:#fff;border:1px solid var(--border);border-radius:14px;box-shadow:0 12px 32px rgba(18,52,59,.16)}
.dashboard-actions-menu button{display:flex;align-items:center;gap:10px;width:100%;padding:10px 9px;border-radius:9px;background:#fff;color:var(--secondary);text-align:left;font-size:13px}
.dashboard-actions-menu button:hover{background:#f1f7f7}
.opening-cluster{display:flex;align-items:center;gap:8px;position:relative}
.status-bar{display:flex;width:100%;height:13px;overflow:hidden;border-radius:99px;background:#eef1f2;margin:12px 0 15px}
.status-bar span{display:block;height:100%}.status-bar-done{background:#20ad69}.status-bar-progress{background:#f0b900}.status-bar-not{background:#ed5149}
.status-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.status-summary>div{display:flex;align-items:flex-start;gap:8px;min-width:0;font-size:12px}
.status-summary i{width:11px;height:11px;border-radius:50%;flex:0 0 11px;margin-top:3px}
.status-summary .done-dot{background:#20ad69}.status-summary .progress-dot{background:#f0b900}.status-summary .not-dot{background:#ed5149}
.status-summary span{display:flex;flex-direction:column;gap:4px;min-width:0}.status-summary b{font-size:13px}
@media(max-width:650px){
  .dashboard-greeting{align-items:center!important}
  .opening-cluster{flex:0 0 auto;width:48%;max-width:48%;gap:6px;align-items:stretch}
  .dashboard-greeting .opening{flex:1 1 auto;min-width:0;max-width:none!important;width:auto!important;text-align:center!important;padding:7px 5px!important}
  .dashboard-greeting .opening small{font-size:8px!important}
  .dashboard-plus{display:flex;align-items:center;justify-content:center;flex:0 0 38px;width:38px;height:38px;border-radius:9px;background:var(--primary);color:#fff;font-size:25px;font-weight:400;box-shadow:0 3px 8px rgba(15,118,110,.14)}
  .dashboard-actions-wrap{position:relative;flex:0 0 38px;align-self:center}
  .dashboard-actions-menu{right:0;top:calc(100% + 7px);width:175px}
  .quick-actions{display:none!important}
  .dashboard-top{grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
  .dashboard-top .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
  .dashboard-top .metric{position:relative;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:space-between;gap:5px!important;min-width:0;min-height:82px!important;padding:10px!important}
  .dashboard-top .metric>span{font-size:10px!important;line-height:1.25!important;min-height:25px}
  .dashboard-top .metric>b{font-size:20px!important;gap:4px!important;max-width:100%;white-space:nowrap}
  .dashboard-top .metric>b small{font-size:10px!important}
  .dashboard-top .metric-view{position:absolute!important;right:7px;bottom:7px;width:22px!important;height:22px!important;flex-basis:22px!important}
  .dashboard-top .metric.danger{grid-column:1/-1;min-height:66px!important;flex-direction:row!important;align-items:center!important;padding-right:38px!important}
  .dashboard-top .metric.danger>span{min-height:0;flex:1}
  .dashboard-top .metric.danger>b{font-size:22px!important}
  .dashboard-top>.card{padding:12px!important}
  .dashboard-top .chart-title{font-size:14px!important;margin-bottom:8px!important}
  .dashboard-top .donut-wrap,.dashboard-top .donut{display:none!important}
  .status-bar{height:12px;margin:10px 0 13px}
  .status-summary{gap:6px!important}
  .status-summary>div{gap:5px!important;font-size:10px!important}
  .status-summary i{width:9px;height:9px;flex-basis:9px}
  .status-summary b{font-size:11px!important;line-height:1.2}
  .readiness-card .dept-row{grid-template-columns:minmax(0,1fr) auto;gap:7px!important;margin:13px 0!important}
  .readiness-card .dept-label{min-width:0}
  .readiness-card .dept-label b{font-size:12px!important;overflow-wrap:anywhere}
  .readiness-card .dept-label span{display:none!important}
  .readiness-card .dept-row .stack{grid-column:1;grid-row:2}
  .readiness-card .dept-nums{grid-column:2;grid-row:1/3;align-self:center;gap:0!important;font-size:12px!important}
  .readiness-card .dept-nums .yellow,.readiness-card .dept-nums .red{display:none!important}
  .readiness-card .dept-nums .green{font-size:12px;font-weight:800}
}

/* v1.2.41 — phone navigation drawer uses a vertical list and never scrolls horizontally */
@media (max-width:650px){
  .app>.layout>.sidebar{display:none!important}
  .app>.mobile-nav{display:none!important}
  .app.sidebar-expanded>.mobile-nav{
    display:flex!important;flex-direction:column!important;align-items:stretch!important;
    position:fixed!important;left:0!important;right:auto!important;top:62px!important;bottom:0!important;
    width:min(280px,84vw)!important;max-width:84vw!important;height:auto!important;
    max-height:calc(100dvh - 62px)!important;overflow-y:auto!important;overflow-x:hidden!important;
    flex-wrap:nowrap!important;gap:3px!important;padding:14px 12px!important;
    border-radius:0 14px 14px 0!important;background:var(--secondary)!important;
    box-shadow:12px 0 36px rgba(10,30,34,.2)!important;z-index:1980!important;
  }
  .app.sidebar-expanded>.mobile-nav>button{
    display:flex!important;flex:0 0 auto!important;width:100%!important;min-width:0!important;
    min-height:44px!important;align-items:center!important;justify-content:flex-start!important;
    gap:12px!important;padding:11px 12px!important;margin:1px 0!important;
    white-space:normal!important;text-align:left!important;border-radius:9px!important;
    color:#dfe9ea!important;background:transparent!important;overflow-wrap:anywhere!important;
  }
  .app.sidebar-expanded>.mobile-nav>button.active,
  .app.sidebar-expanded>.mobile-nav>button:hover{background:rgba(255,255,255,.12)!important;color:#fff!important}
  .app.sidebar-expanded:before{position:fixed!important;inset:62px 0 0!important;z-index:1970!important;background:rgba(10,30,34,.42)!important}
}

/* v1.2.42 — compact dashboard metrics and mobile table alignment */
.dashboard-task-link{display:block;width:100%;padding:0;border:0;background:transparent;color:var(--secondary);font:inherit;font-weight:700;line-height:inherit;text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer}
.dashboard-task-link:hover{text-decoration:underline;color:var(--primary)}
.metric-view{display:flex;align-items:center;justify-content:center}
.metric-view-arrow{display:flex;align-items:center;justify-content:center;width:100%;height:100%;line-height:1;text-align:center}
@media (min-width:651px){
  .dashboard-top .kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
}
@media (min-width:651px) and (max-width:1100px){
  .dashboard-top{grid-template-columns:minmax(0,1.8fr) minmax(190px,1fr)!important;align-items:stretch!important}
  .dashboard-top .kpis{grid-template-columns:repeat(4,minmax(0,1fr))!important}
  .dashboard-top .metric{min-height:112px!important;padding:8px 6px 32px!important}
  .dashboard-top .metric>span{min-height:38px!important}
}
@media (max-width:650px){
  .dashboard-top .kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .dashboard-top .metric.danger{grid-column:auto!important;min-height:82px!important;flex-direction:column!important;align-items:flex-start!important;padding:10px!important}
  .dashboard-top .metric.danger>span{min-height:25px!important;flex:0 1 auto!important}
  .dashboard-top .metric.danger>b{font-size:20px!important}
  .dashboard-top .metric-view{display:flex!important;align-items:center!important;justify-content:center!important;padding:0!important}
  .dashboard-top .metric-view-arrow{align-items:center!important;justify-content:center!important;width:100%!important;height:100%!important;font-size:16px!important;line-height:1!important}
  .dashboard-grid>.card .data-table{table-layout:fixed!important}
  .dashboard-grid>.card .data-table th:nth-child(1),.dashboard-grid>.card .data-table td:nth-child(1){width:64%!important}
  .dashboard-grid>.card .data-table th:nth-child(2),.dashboard-grid>.card .data-table td:nth-child(2){width:20%!important;white-space:nowrap!important}
  .dashboard-grid>.card .data-table th:nth-child(3),.dashboard-grid>.card .data-table td:nth-child(3){width:16%!important}
  .dashboard-grid>.card .data-table th,.dashboard-grid>.card .data-table td{padding:6px 4px!important;font-size:10px!important}
  .dashboard-grid>.card .report-task-cell{min-width:0!important;max-width:none!important}
}

/* Dashboard greeting: profile name remains tappable on mobile without changing heading layout. */
.dashboard-user-name{display:inline;background:transparent;border:0;padding:0;margin:0;color:inherit;font:inherit;font-weight:inherit;line-height:inherit;text-align:left;cursor:pointer;border-radius:4px}
.dashboard-user-name:focus-visible{outline:2px solid var(--primary);outline-offset:3px}

/* v1.2.44 — tidy Master Library mobile task cards: aligned selector/title and non-overlapping metadata. */
@media(max-width:650px){
  .sg-library-inline tbody tr{
    display:grid!important;
    grid-template-columns:22px minmax(0,1fr)!important;
    grid-auto-flow:row!important;
    column-gap:8px!important;
    row-gap:8px!important;
    align-items:center!important;
    padding:12px!important;
  }
  .sg-library-inline tbody td{min-width:0!important;align-self:center!important}
  .sg-library-inline tbody td:nth-child(1){
    position:static!important;left:auto!important;top:auto!important;
    grid-column:1!important;grid-row:1!important;align-self:center!important;
    width:22px!important;min-width:22px!important;padding:0!important;margin:0!important;
  }
  .sg-library-inline tbody td:nth-child(1) input{
    display:block!important;width:18px!important;height:18px!important;margin:0!important;
  }
  .sg-library-inline tbody td:nth-child(2){
    grid-column:2!important;grid-row:1!important;padding:0!important;margin:0!important;
    min-height:0!important;align-self:center!important;font-size:13px!important;line-height:1.35!important;
  }
  .sg-library-inline tbody td:nth-child(3){grid-column:1/-1!important;grid-row:2!important;padding-top:3px!important}
  .sg-library-inline tbody td:nth-child(8){
    grid-column:1/-1!important;grid-row:3!important;justify-self:stretch!important;align-self:start!important;
    padding:0!important;margin:0!important;
  }
  .sg-library-inline tbody td:nth-child(8):before{margin-bottom:5px!important}
  .sg-library-inline .sg-row-actions{justify-content:flex-start!important;flex-wrap:nowrap!important;gap:7px!important}
  .sg-library-inline .sg-icon-btn{width:34px!important;height:34px!important;flex:0 0 34px!important}
  .sg-library-inline tbody td:nth-child(4){grid-column:1!important;grid-row:4!important}
  .sg-library-inline tbody td:nth-child(5){grid-column:2!important;grid-row:4!important}
  .sg-library-inline tbody td:nth-child(6){grid-column:1!important;grid-row:5!important}
  .sg-library-inline tbody td:nth-child(7){grid-column:2!important;grid-row:5!important}
  .sg-library-inline tbody td:nth-child(4):before,
  .sg-library-inline tbody td:nth-child(5):before,
  .sg-library-inline tbody td:nth-child(6):before,
  .sg-library-inline tbody td:nth-child(7):before{display:block!important;margin-bottom:3px!important}
  .sg-library-inline .sg-library-date{display:block!important;white-space:normal!important;overflow-wrap:anywhere!important;font-size:11px!important;line-height:1.35!important}
}

/* v1.2.45 — unify Smart Generator approval and Master Library task cards with the task-list hierarchy. */
@media(max-width:650px){
  .sg-plan-inline,.sg-library-inline{width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:separate!important;border-spacing:0!important}
  .sg-plan-inline tbody tr,.sg-library-inline tbody tr{
    display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-auto-flow:row!important;column-gap:12px!important;row-gap:9px!important;
    padding:13px!important;margin:0 0 10px!important;border:1px solid var(--border)!important;
    border-radius:12px!important;background:#fff!important;box-shadow:0 2px 8px rgba(18,52,59,.045)!important;
    align-items:start!important;min-width:0!important
  }
  .sg-plan-inline tbody td,.sg-library-inline tbody td{
    display:block!important;position:static!important;inset:auto!important;grid-row:auto!important;
    width:auto!important;min-width:0!important;max-width:100%!important;padding:0!important;margin:0!important;
    border:0!important;font-size:12px!important;line-height:1.35!important;overflow-wrap:anywhere!important;
    align-self:start!important;white-space:normal!important
  }
  .sg-plan-inline tbody td:nth-child(1),.sg-library-inline tbody td:nth-child(1){
    grid-column:1!important;grid-row:1!important;align-self:center!important;justify-self:start!important;
    width:22px!important;min-width:22px!important;padding:0!important
  }
  .sg-plan-inline tbody td:nth-child(1) input,.sg-library-inline tbody td:nth-child(1) input{
    display:block!important;width:18px!important;height:18px!important;margin:0!important
  }
  .sg-plan-inline tbody td:nth-child(2),.sg-library-inline tbody td:nth-child(2){
    grid-column:1/-1!important;grid-row:1!important;padding-left:30px!important;margin-left:-30px!important;
    min-height:24px!important;font-size:13px!important;font-weight:700!important;line-height:1.4!important;
    overflow-wrap:anywhere!important;align-self:center!important
  }
  .sg-plan-inline tbody td:nth-child(3),.sg-library-inline tbody td:nth-child(3){grid-column:1/-1!important;grid-row:2!important}
  .sg-plan-inline tbody td:nth-child(4),.sg-library-inline tbody td:nth-child(4){grid-column:1!important;grid-row:3!important}
  .sg-plan-inline tbody td:nth-child(5),.sg-library-inline tbody td:nth-child(5){grid-column:2!important;grid-row:3!important}
  .sg-plan-inline tbody td:nth-child(6),.sg-library-inline tbody td:nth-child(6){grid-column:1!important;grid-row:4!important}
  .sg-plan-inline tbody td:nth-child(7),.sg-library-inline tbody td:nth-child(7){grid-column:2!important;grid-row:4!important}
  .sg-plan-inline tbody td:nth-child(8),.sg-library-inline tbody td:nth-child(8){grid-column:1/-1!important;grid-row:5!important;justify-self:stretch!important;align-self:start!important;padding:0!important}
  .sg-plan-inline tbody td:nth-child(3):before,.sg-library-inline tbody td:nth-child(3):before,
  .sg-plan-inline tbody td:nth-child(4):before,.sg-library-inline tbody td:nth-child(4):before,
  .sg-plan-inline tbody td:nth-child(5):before,.sg-library-inline tbody td:nth-child(5):before,
  .sg-plan-inline tbody td:nth-child(6):before,.sg-library-inline tbody td:nth-child(6):before,
  .sg-plan-inline tbody td:nth-child(7):before,.sg-library-inline tbody td:nth-child(7):before,
  .sg-plan-inline tbody td:nth-child(8):before,.sg-library-inline tbody td:nth-child(8):before{
    display:block!important;color:var(--muted)!important;font-size:10px!important;font-weight:700!important;
    line-height:1.25!important;margin:0 0 4px!important;overflow-wrap:normal!important;word-break:normal!important
  }
  .sg-plan-inline tbody td:nth-child(3):before,.sg-library-inline tbody td:nth-child(3):before{content:'Məsul şöbə'!important}
  .sg-plan-inline tbody td:nth-child(4):before,.sg-library-inline tbody td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-plan-inline tbody td:nth-child(5):before,.sg-library-inline tbody td:nth-child(5):before{content:'İcra müddəti'!important}
  .sg-plan-inline tbody td:nth-child(6):before,.sg-library-inline tbody td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-plan-inline tbody td:nth-child(7):before,.sg-library-inline tbody td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-plan-inline tbody td:nth-child(8):before{content:'Prioritet'!important}
  .sg-library-inline tbody td:nth-child(8):before{content:'Əməliyyatlar'!important}
  .sg-plan-inline td select,.sg-plan-inline td input:not([type=checkbox]),.sg-plan-inline td textarea{
    display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;
    font-size:12px!important;line-height:1.3!important;padding:7px 8px!important;border-radius:7px!important
  }
  .sg-plan-inline td .sg-number{width:100%!important;min-width:0!important}
  .sg-plan-inline td:nth-child(4) .sg-date-hint,.sg-plan-inline td:nth-child(5) .sg-date-hint{display:none!important}
  .sg-plan-inline .sg-library-date,.sg-library-inline .sg-library-date{
    display:block!important;font-size:11px!important;line-height:1.35!important;white-space:normal!important;
    overflow-wrap:normal!important;word-break:normal!important;font-variant-numeric:tabular-nums
  }
  .sg-plan-inline .sg-row-flags{display:flex!important;flex-wrap:wrap!important;gap:4px!important;margin-top:5px!important}
  .sg-library-inline .sg-row-actions{display:flex!important;justify-content:flex-start!important;align-items:center!important;flex-wrap:nowrap!important;gap:7px!important}
  .sg-library-inline .sg-icon-btn{width:34px!important;height:34px!important;flex:0 0 34px!important}
}


/* v1.2.46 — tablet dashboard: place overall status beside the overdue KPI. */
@media (min-width:651px) and (max-width:1100px){
  .dashboard-top{
    display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
    align-items:stretch!important;gap:10px!important
  }
  .dashboard-top>.kpis{display:contents!important}
  .dashboard-top .metric{min-width:0!important;min-height:112px!important;padding:12px 10px 36px!important}
  .dashboard-top .metric>span{min-height:34px!important;line-height:1.3!important;overflow-wrap:anywhere!important}
  .dashboard-top .metric>b{font-size:22px!important;white-space:nowrap!important;gap:5px!important}
  .dashboard-top .metric-view{right:8px!important;bottom:7px!important}
  .dashboard-top .metric.danger{grid-column:1!important;grid-row:2!important;min-height:90px!important;display:flex!important;flex-direction:row!important;align-items:center!important;padding:12px 38px 12px 10px!important}
  .dashboard-top .metric.danger>span{min-height:0!important;flex:1 1 auto!important}
  .dashboard-top .metric.danger>b{font-size:22px!important}
  .dashboard-top>.card{grid-column:2/4!important;grid-row:2!important;width:auto!important;min-width:0!important;padding:13px!important;align-self:stretch!important}
  .dashboard-top>.card .chart-title{font-size:14px!important;margin-bottom:8px!important}
  .dashboard-top .status-bar{margin-bottom:9px!important}
  .dashboard-top .status-summary{gap:8px!important}
  .dashboard-top .status-summary>div{min-width:0!important;font-size:11px!important}
}


/* v1.2.52 — Master Library mobile: place action icons on the department row, aligned with the department value. */
@media(max-width:650px){
  .sg-library-inline tbody td:nth-child(3){grid-column:1!important;grid-row:2!important;min-width:0!important}
  .sg-library-inline tbody td:nth-child(8){grid-column:2!important;grid-row:2!important;justify-self:end!important;align-self:end!important;padding:0 0 1px!important;margin:0!important}
  .sg-library-inline tbody td:nth-child(8):before{display:none!important;content:none!important}
  .sg-library-inline .sg-row-actions{display:flex!important;justify-content:flex-end!important;align-items:center!important;flex-wrap:nowrap!important;gap:7px!important}
  .sg-library-inline .sg-icon-btn{width:34px!important;height:34px!important;flex:0 0 34px!important}
}

/* v1.2.47 — Master Library mobile: keep selector and task title side by side without overlap. */
@media(max-width:650px){
  .sg-library-inline tbody tr{
    grid-template-columns:24px minmax(0,1fr)!important;
    column-gap:10px!important;
    align-items:start!important;
  }
  .sg-library-inline tbody td:nth-child(1){
    grid-column:1!important;grid-row:1!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    align-self:start!important;width:24px!important;min-width:24px!important;
    padding:2px 0 0!important;margin:0!important;
  }
  .sg-library-inline tbody td:nth-child(1) input{
    width:18px!important;height:18px!important;margin:0!important;flex:0 0 18px!important;
  }
  .sg-library-inline tbody td:nth-child(2){
    grid-column:2!important;grid-row:1!important;
    padding:0!important;margin:0!important;min-width:0!important;width:100%!important;
    min-height:24px!important;align-self:start!important;justify-self:stretch!important;
    font-size:13px!important;line-height:1.4!important;font-weight:700!important;
    overflow-wrap:anywhere!important;word-break:normal!important;
  }
}


/* v1.2.48: phone review cards keep selection checkbox and task title side by side without overlap */
@media (max-width:650px){
  .sg-plan-inline tbody tr{grid-template-columns:24px minmax(0,1fr)!important;align-items:start!important;column-gap:8px!important;}
  .sg-plan-inline tbody td:nth-child(1){position:static!important;left:auto!important;top:auto!important;grid-column:1!important;grid-row:1!important;width:auto!important;min-width:0!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;padding:2px 0 0!important;}
  .sg-plan-inline tbody td:nth-child(1) input{display:block!important;width:18px!important;height:18px!important;margin:0!important;flex:0 0 18px!important;}
  .sg-plan-inline tbody td:nth-child(2){grid-column:2!important;grid-row:1!important;padding:0!important;margin:0!important;min-height:24px!important;min-width:0!important;overflow-wrap:anywhere!important;}
  .sg-plan-inline tbody td:nth-child(3){grid-column:1/-1!important;grid-row:auto!important;}
}


/* v1.2.49: keep upcoming-task status labels readable on phones. */
@media (max-width:650px){
  .upcoming-table{table-layout:fixed!important;width:100%!important}
  .upcoming-table th:nth-child(1),.upcoming-table td:nth-child(1){width:58%!important}
  .upcoming-table th:nth-child(2),.upcoming-table td:nth-child(2){width:21%!important;white-space:nowrap!important}
  .upcoming-table th:nth-child(3),.upcoming-table td:nth-child(3){width:21%!important;overflow:visible!important}
  .upcoming-table td:nth-child(3) .status{display:inline-flex!important;align-items:center;justify-content:center;white-space:nowrap!important;word-break:keep-all!important;overflow-wrap:normal!important;text-align:center;min-width:max-content;max-width:none;padding:7px 9px!important;font-size:10px!important;line-height:1.2!important;border-radius:999px}
  .upcoming-table td:nth-child(3){padding-right:5px!important}
}

/* v1.2.50 — tablet overview: all five KPI/status indicators on one row. */
@media (min-width:651px) and (max-width:1100px){
  .dashboard-top{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    align-items:stretch!important;
    gap:7px!important;
  }
  .dashboard-top>.kpis{display:contents!important}
  .dashboard-top .metric,
  .dashboard-top .metric.danger{
    grid-column:auto!important;grid-row:1!important;
    min-width:0!important;min-height:118px!important;
    display:flex!important;flex-direction:column!important;
    align-items:flex-start!important;justify-content:space-between!important;
    gap:5px!important;padding:10px 8px 34px!important;
    overflow:hidden!important;
  }
  .dashboard-top .metric>span{
    display:block!important;min-width:0!important;min-height:38px!important;
    font-size:10px!important;line-height:1.25!important;
    overflow-wrap:anywhere!important;word-break:normal!important;
  }
  .dashboard-top .metric>b,
  .dashboard-top .metric.danger>b{
    display:flex!important;align-items:baseline!important;gap:4px!important;
    min-width:0!important;margin:0!important;font-size:20px!important;
    line-height:1.1!important;white-space:nowrap!important;flex-wrap:nowrap!important;
  }
  .dashboard-top .metric>b small{font-size:10px!important;white-space:nowrap!important}
  .dashboard-top .metric-view{right:6px!important;bottom:6px!important;padding:4px 6px!important}
  .dashboard-top>.card{
    grid-column:5!important;grid-row:1!important;align-self:stretch!important;
    width:auto!important;min-width:0!important;min-height:118px!important;
    padding:10px 8px!important;overflow:hidden!important;
  }
  .dashboard-top>.card .chart-title{font-size:11px!important;line-height:1.2!important;margin-bottom:7px!important}
  .dashboard-top .status-bar{height:10px!important;margin-bottom:7px!important}
  .dashboard-top .status-summary{display:grid!important;grid-template-columns:1fr!important;gap:3px!important}
  .dashboard-top .status-summary>div{min-width:0!important;gap:4px!important;font-size:9px!important;line-height:1.15!important;align-items:center!important}
  .dashboard-top .status-summary i{width:7px!important;height:7px!important;flex:0 0 7px!important;margin-top:0!important}
  .dashboard-top .status-summary span{display:inline!important;min-width:0!important;overflow-wrap:anywhere!important}
  .dashboard-top .status-summary b{display:inline!important;font-size:9px!important;line-height:1.1!important}
}


/* v1.2.51 — mobile Smart Task Generator review cards: department/priority, editable timing, then read-only dates. */
@media (max-width:650px){
  .sg-plan-inline tbody tr{
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    column-gap:12px!important;row-gap:10px!important;
  }
  .sg-plan-inline tbody td:nth-child(3){grid-column:1!important;grid-row:2!important}
  .sg-plan-inline tbody td:nth-child(8){grid-column:2!important;grid-row:2!important}
  .sg-plan-inline tbody td:nth-child(4){grid-column:1!important;grid-row:3!important}
  .sg-plan-inline tbody td:nth-child(5){grid-column:2!important;grid-row:3!important}
  .sg-plan-inline tbody td:nth-child(6){grid-column:1!important;grid-row:4!important}
  .sg-plan-inline tbody td:nth-child(7){grid-column:2!important;grid-row:4!important}
  .sg-plan-inline tbody td:nth-child(3):before{content:'Şöbə'!important}
  .sg-plan-inline tbody td:nth-child(8):before{content:'Prioritet'!important}
  .sg-plan-inline tbody td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-plan-inline tbody td:nth-child(5):before{content:'İcra müddəti (həftə)'!important}
  .sg-plan-inline tbody td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-plan-inline tbody td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-plan-inline tbody td:nth-child(4) .sg-date-hint,
  .sg-plan-inline tbody td:nth-child(5) .sg-date-hint{display:none!important}
  .sg-plan-inline tbody td:nth-child(6),.sg-plan-inline tbody td:nth-child(7){
    background:#f3f7f7!important;border-radius:8px!important;padding:8px!important;
  }
  .sg-plan-inline tbody td:nth-child(6) .sg-library-date,
  .sg-plan-inline tbody td:nth-child(7) .sg-library-date{font-size:12px!important;line-height:1.35!important}
}


/* v1.2.53 — mobile upcoming tasks use stacked cards to avoid horizontal overflow. */
.upcoming-mobile-list{display:none}
@media (max-width:650px){
  .upcoming-desktop{display:none!important}
  .upcoming-mobile-list{display:flex;flex-direction:column;gap:8px;width:100%;min-width:0}
  .upcoming-mobile-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:10px;align-items:start;padding:12px 10px;border:1px solid var(--border);border-radius:12px;background:#fff;min-width:0;box-sizing:border-box}
  .upcoming-mobile-icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#e6f0ff;color:#2467c9;font-weight:800;font-size:18px;box-sizing:border-box}
  .upcoming-mobile-body{min-width:0;max-width:100%}
  .upcoming-mobile-title{font-size:14px;font-weight:700;line-height:1.4;white-space:normal;overflow-wrap:anywhere;word-break:normal;color:var(--text)}
  .upcoming-mobile-meta{display:flex;align-items:center;flex-wrap:wrap;gap:8px 12px;margin-top:7px;min-width:0}
  .upcoming-mobile-date{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#5e707b;white-space:nowrap}
  .upcoming-mobile-date span{font-size:15px;line-height:1}
  .upcoming-mobile-status{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:5px 10px;border-radius:999px;background:#edf1f4;color:#687780;font-size:12px;font-weight:700;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
  .upcoming-mobile-status.s-done{background:#e4f5eb;color:#18794e}
  .upcoming-mobile-status.s-progress{background:#fff3d5;color:#956500}
  .upcoming-mobile-status.s-not{background:#edf1f4;color:#687780}
}

/* v1.2.54 — mobile Smart Task Generator review: align task title beside selector and keep its warning directly below. */
@media (max-width:650px){
  .sg-plan-inline tbody tr{
    grid-template-columns:24px minmax(0,1fr)!important;
    column-gap:8px!important;row-gap:8px!important;
    align-items:start!important;
  }
  .sg-plan-inline tbody td:nth-child(1){
    position:static!important;left:auto!important;top:auto!important;
    grid-column:1!important;grid-row:1!important;
    display:flex!important;align-items:flex-start!important;justify-content:center!important;
    width:24px!important;min-width:24px!important;padding:2px 0 0!important;margin:0!important;
    align-self:start!important;
  }
  .sg-plan-inline tbody td:nth-child(1) input{
    display:block!important;width:18px!important;height:18px!important;
    margin:0!important;flex:0 0 18px!important;
  }
  .sg-plan-inline tbody td:nth-child(2){
    grid-column:2!important;grid-row:1!important;
    padding:0!important;margin:0!important;min-width:0!important;width:100%!important;
    min-height:24px!important;align-self:start!important;justify-self:stretch!important;
    font-size:13px!important;line-height:1.4!important;font-weight:700!important;
    overflow-wrap:anywhere!important;word-break:normal!important;
  }
  .sg-plan-inline tbody td:nth-child(2) .sg-task-input{
    width:100%!important;min-width:0!important;max-width:100%!important;
    min-height:24px!important;height:auto!important;padding:0!important;margin:0!important;
    font-size:13px!important;line-height:1.4!important;font-weight:700!important;
  }
  .sg-plan-inline tbody td:nth-child(2) .sg-row-flags{
    display:flex!important;flex-wrap:wrap!important;gap:4px!important;
    width:100%!important;max-width:100%!important;margin-top:6px!important;
  }
  .sg-plan-inline tbody td:nth-child(2) .sg-row-flags .sg-flag{
    white-space:normal!important;overflow-wrap:anywhere!important;max-width:100%!important;
  }
}

/* v1.2.55 — rebuild Master Library mobile cards to match the approved mockup. */
.sg-library-mobile-actions{display:none}
@media(max-width:650px){
  .sg-library-inline tbody tr[data-lib-row]{
    position:relative!important;display:grid!important;
    grid-template-columns:24px minmax(0,1fr)!important;
    grid-auto-flow:row!important;column-gap:10px!important;row-gap:12px!important;
    align-items:start!important;padding:14px!important;overflow:hidden!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td{display:block!important;box-sizing:border-box!important;min-width:0!important;width:auto!important;max-width:100%!important;padding:0!important;margin:0!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important;align-self:start!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(1){grid-column:1!important;grid-row:1!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;padding-top:2px!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(1) input{width:20px!important;height:20px!important;min-width:20px!important;margin:0!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(2){grid-column:2!important;grid-row:1!important;font-size:15px!important;font-weight:750!important;line-height:1.4!important;overflow-wrap:anywhere!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3){grid-column:2!important;grid-row:2!important;display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:10px!important;min-height:42px!important;padding:0!important;}
  .sg-library-inline .sg-library-department-value{flex:1 1 auto!important;min-width:0!important;overflow-wrap:anywhere!important;font-size:14px!important;line-height:1.35!important;padding-bottom:4px!important;}
  .sg-library-inline .sg-library-mobile-actions{display:flex!important;flex:0 0 auto!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;}
  .sg-library-inline .sg-library-mobile-actions .sg-icon-btn{display:flex!important;width:38px!important;height:38px!important;flex:0 0 38px!important;align-items:center!important;justify-content:center!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(8){display:none!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4){grid-column:2!important;grid-row:3!important;min-width:0!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5){grid-column:2!important;grid-row:3!important;margin-left:calc(50% + 6px)!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5){width:calc(50% - 6px)!important;min-height:76px!important;padding:10px!important;border:1px solid var(--border,#dfe7e9)!important;border-radius:10px!important;background:#f8fafb!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5):before{display:block!important;margin:0 0 8px!important;color:var(--muted,#687980)!important;font-size:12px!important;font-weight:700!important;line-height:1.3!important;white-space:normal!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5):before{content:'İcra müddəti (həftə)'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6){grid-column:2!important;grid-row:4!important;width:calc(50% - 6px)!important;min-height:70px!important;padding:10px!important;border-radius:10px 0 0 10px!important;background:#f1f6f6!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7){grid-column:2!important;grid-row:4!important;width:calc(50% - 6px)!important;margin-left:calc(50% + 6px)!important;min-height:70px!important;padding:10px!important;border-radius:0 10px 10px 0!important;background:#f1f6f6!important;border-left:1px solid #d8e2e4!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7):before{display:block!important;margin:0 0 6px!important;color:var(--muted,#687980)!important;font-size:12px!important;font-weight:700!important;line-height:1.3!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-library-inline .sg-library-date{font-size:13px!important;white-space:nowrap!important;}
}


/* v1.2.56 — keep dashboard metric arrows geometrically centered in their button backgrounds. */
.metric-view{display:grid!important;place-items:center!important;box-sizing:border-box!important;line-height:1!important;padding:0!important;align-content:center!important;justify-content:center!important;}
.metric-view .metric-view-arrow{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;line-height:1!important;text-align:center!important;align-self:center!important;justify-self:center!important;transform:none!important;position:static!important;}
@media(max-width:650px){.dashboard-top .metric-view{display:grid!important;place-items:center!important;padding:0!important;}.dashboard-top .metric-view .metric-view-arrow{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;line-height:1!important;}}


/* v1.2.57 — tablet dashboard: keep all four KPI cards and overall status in one horizontal row. */
@media (min-width:651px) and (max-width:1100px){
  .dashboard-top{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    grid-auto-flow:row!important;
    align-items:stretch!important;
    gap:7px!important;
    min-width:0!important;
  }
  .dashboard-top>.kpis{display:contents!important;min-width:0!important}
  .dashboard-top .metric,
  .dashboard-top .metric.danger{
    grid-column:auto!important;grid-row:1!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    min-height:108px!important;box-sizing:border-box!important;
    display:flex!important;flex-direction:column!important;
    align-items:flex-start!important;justify-content:space-between!important;
    gap:4px!important;padding:9px 7px 29px!important;
    overflow:hidden!important;
  }
  .dashboard-top .metric>span{
    display:block!important;width:100%!important;min-width:0!important;
    min-height:0!important;height:auto!important;
    font-size:clamp(7px,1.05vw,10px)!important;line-height:1.2!important;
    white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;
    overflow-wrap:normal!important;word-break:keep-all!important;
  }
  .dashboard-top .metric>b,
  .dashboard-top .metric.danger>b{
    display:flex!important;align-items:baseline!important;gap:3px!important;
    min-width:0!important;max-width:100%!important;margin:0!important;
    font-size:clamp(14px,2vw,21px)!important;line-height:1.1!important;
    white-space:nowrap!important;flex-wrap:nowrap!important;
  }
  .dashboard-top .metric>b small{font-size:clamp(8px,1vw,10px)!important;white-space:nowrap!important}
  .dashboard-top .metric-view{right:5px!important;bottom:5px!important;width:24px!important;height:24px!important;padding:0!important}
  .dashboard-top>.card{
    grid-column:5!important;grid-row:1!important;align-self:stretch!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    min-height:108px!important;box-sizing:border-box!important;padding:9px 7px!important;
    overflow:hidden!important;
  }
  .dashboard-top>.card .chart-title{font-size:clamp(9px,1.1vw,11px)!important;line-height:1.2!important;margin-bottom:6px!important;white-space:nowrap!important}
  .dashboard-top .status-bar{height:8px!important;margin-bottom:6px!important}
  .dashboard-top .status-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;align-items:start!important}
  .dashboard-top .status-summary>div{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;min-width:0!important;font-size:clamp(6px,.75vw,8px)!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important}
  .dashboard-top .status-summary i{width:6px!important;height:6px!important;flex:0 0 6px!important;margin:0 0 1px!important}
  .dashboard-top .status-summary span{display:block!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:clip!important;overflow-wrap:normal!important}
  .dashboard-top .status-summary b{display:block!important;font-size:clamp(7px,.8vw,9px)!important;line-height:1.1!important;white-space:nowrap!important}
}


/* v1.2.58 — use the approved upcoming-task card layout on desktop, tablet and phone. */
.upcoming-desktop{display:none!important}
.upcoming-mobile-list{display:flex!important;flex-direction:column;gap:10px;width:100%;min-width:0;box-sizing:border-box}
.upcoming-mobile-card{display:grid;grid-template-columns:42px minmax(0,1fr);gap:12px;align-items:start;padding:13px 12px;border:1px solid var(--border);border-radius:13px;background:#fff;min-width:0;max-width:100%;box-sizing:border-box}
.upcoming-mobile-icon{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#e6f0ff;color:#2467c9;font-weight:800;font-size:18px;box-sizing:border-box;line-height:1}
.upcoming-mobile-body{min-width:0;max-width:100%;overflow-wrap:anywhere}
.upcoming-mobile-title{font-size:14px;font-weight:700;line-height:1.4;white-space:normal;overflow-wrap:anywhere;word-break:normal;color:var(--text)}
.upcoming-mobile-meta{display:flex;align-items:center;flex-wrap:wrap;gap:7px 12px;margin-top:7px;min-width:0}
.upcoming-mobile-date{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:#5e707b;white-space:nowrap}
.upcoming-mobile-date span{font-size:15px;line-height:1}
.upcoming-mobile-status{display:inline-flex;align-items:center;justify-content:center;max-width:100%;padding:5px 11px;border-radius:999px;background:#edf1f4;color:#687780;font-size:12px;font-weight:700;line-height:1.25;white-space:normal;overflow-wrap:anywhere}
.upcoming-mobile-status.s-done{background:#e4f5eb;color:#18794e}
.upcoming-mobile-status.s-progress{background:#fff3d5;color:#956500}
.upcoming-mobile-status.s-not{background:#edf1f4;color:#687780}
@media (min-width:1101px){.upcoming-mobile-card{grid-template-columns:42px minmax(0,1fr);padding:13px 14px}.upcoming-mobile-title{font-size:14px}.upcoming-mobile-meta{gap:8px 14px}}
@media (min-width:651px) and (max-width:1100px){.upcoming-mobile-list{gap:9px}.upcoming-mobile-card{grid-template-columns:38px minmax(0,1fr);gap:10px;padding:11px}.upcoming-mobile-icon{width:32px;height:32px}.upcoming-mobile-title{font-size:13px}.upcoming-mobile-date,.upcoming-mobile-status{font-size:11px}}


/* v1.2.60 — replace conflicting mobile card placement with explicit, non-overlapping grids. */
@media (max-width:650px){
  /* Master Library: selector + title; department label/value/actions on one clean line; paired metadata below. */
  .sg-library-inline tbody tr[data-lib-row]{
    display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;
    grid-auto-flow:row!important;column-gap:10px!important;row-gap:12px!important;
    align-items:start!important;min-width:0!important;width:100%!important;
    padding:14px!important;overflow:hidden!important;box-sizing:border-box!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td{
    display:block!important;position:static!important;inset:auto!important;
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;
    margin:0!important;padding:0!important;white-space:normal!important;
    overflow-wrap:normal!important;word-break:normal!important;line-height:1.4!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(1){grid-column:1!important;grid-row:1!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;padding-top:2px!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(1) input{display:block!important;width:20px!important;height:20px!important;min-width:20px!important;margin:0!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(2){grid-column:2!important;grid-row:1!important;width:100%!important;font-size:15px!important;font-weight:750!important;line-height:1.4!important;overflow-wrap:anywhere!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3){
    grid-column:2!important;grid-row:2!important;display:grid!important;
    grid-template-columns:76px minmax(0,1fr) auto!important;column-gap:8px!important;
    align-items:center!important;justify-content:stretch!important;width:100%!important;min-height:42px!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3):before{
    content:'Məsul şöbə'!important;display:block!important;grid-column:1!important;grid-row:1!important;
    width:auto!important;min-width:0!important;margin:0!important;padding:0!important;
    font-size:12px!important;line-height:1.25!important;font-weight:700!important;color:var(--muted,#6b7b80)!important;
    white-space:normal!important;overflow-wrap:normal!important;word-break:normal!important;
  }
  .sg-library-inline .sg-library-department-value{
    grid-column:2!important;grid-row:1!important;min-width:0!important;width:auto!important;
    padding:0!important;margin:0!important;font-size:13px!important;line-height:1.35!important;
    overflow-wrap:anywhere!important;word-break:normal!important;white-space:normal!important;
  }
  .sg-library-inline .sg-library-mobile-actions{
    grid-column:3!important;grid-row:1!important;display:flex!important;align-items:center!important;
    justify-content:flex-end!important;flex-wrap:nowrap!important;gap:5px!important;min-width:0!important;
  }
  .sg-library-inline .sg-library-mobile-actions .sg-icon-btn{display:flex!important;width:32px!important;height:32px!important;flex:0 0 32px!important;align-items:center!important;justify-content:center!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(8){display:none!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5){grid-column:2!important;grid-row:3!important;width:calc(50% - 5px)!important;min-width:0!important;min-height:76px!important;padding:10px!important;border:1px solid var(--border,#dfe7e9)!important;border-radius:10px!important;background:#f8fafb!important;}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4){justify-self:start!important;margin:0!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5){justify-self:end!important;margin:0!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5):before{display:block!important;margin:0 0 8px!important;color:var(--muted,#687980)!important;font-size:12px!important;font-weight:700!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:normal!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5):before{content:'İcra müddəti (həftə)'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7){grid-column:2!important;grid-row:4!important;width:calc(50% - 5px)!important;min-width:0!important;min-height:70px!important;padding:10px!important;background:#f1f6f6!important;border:0!important;border-radius:10px!important;box-sizing:border-box!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6){justify-self:start!important;margin:0!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7){justify-self:end!important;margin:0!important;border-left:1px solid #d8e2e4!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7):before{display:block!important;margin:0 0 6px!important;color:var(--muted,#687980)!important;font-size:12px!important;font-weight:700!important;line-height:1.3!important;white-space:normal!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-library-inline .sg-library-date{display:block!important;font-size:12px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:normal!important}

  /* Smart Generator review: selector and title on row one; paired fields have independent half-width cells. */
  .sg-plan-inline tbody tr[data-sg-plan-row]{
    display:grid!important;grid-template-columns:24px minmax(0,1fr)!important;
    grid-auto-flow:row!important;column-gap:10px!important;row-gap:12px!important;
    align-items:start!important;min-width:0!important;width:100%!important;
    padding:14px!important;margin:0 0 12px!important;box-sizing:border-box!important;overflow:hidden!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td{
    display:block!important;position:static!important;inset:auto!important;float:none!important;
    box-sizing:border-box!important;min-width:0!important;max-width:100%!important;width:auto!important;
    margin:0!important;padding:0!important;border:0!important;white-space:normal!important;
    overflow-wrap:normal!important;word-break:normal!important;line-height:1.35!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(1){grid-column:1!important;grid-row:1!important;display:flex!important;align-items:flex-start!important;justify-content:center!important;padding-top:3px!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(1) input{width:20px!important;height:20px!important;min-width:20px!important;margin:0!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(2){grid-column:2!important;grid-row:1!important;width:100%!important;min-height:0!important;padding:0!important;margin:0!important;font-size:15px!important;font-weight:750!important;line-height:1.4!important;overflow-wrap:anywhere!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(2) textarea{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;resize:vertical!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(2) .sg-row-flags{display:flex!important;flex-wrap:wrap!important;gap:5px!important;margin-top:7px!important;min-width:0!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8){grid-column:2!important;grid-row:2!important;width:calc(50% - 5px)!important;min-width:0!important;justify-self:start!important;align-self:start!important;margin:0!important;padding:0!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8){justify-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7):before{display:block!important;position:static!important;width:auto!important;margin:0 0 6px!important;padding:0!important;font-size:12px!important;font-weight:700!important;line-height:1.3!important;color:var(--muted,#6b7b80)!important;white-space:normal!important;overflow-wrap:normal!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3):before{content:'Şöbə'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8):before{content:'Prioritet'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5){grid-column:2!important;grid-row:3!important;width:calc(50% - 5px)!important;min-width:0!important;min-height:0!important;padding:0!important;margin:0!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4){justify-self:start!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5){justify-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5):before{content:'İcra müddəti (həftə)'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4) input,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5) input,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3) select,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8) select{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;box-sizing:border-box!important;margin:0!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4) .sg-date-hint,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5) .sg-date-hint{display:none!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7){grid-column:2!important;grid-row:4!important;width:calc(50% - 5px)!important;min-width:0!important;min-height:68px!important;padding:10px!important;margin:0!important;background:#f1f6f6!important;border-radius:10px!important;box-sizing:border-box!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6){justify-self:start!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7){justify-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6) .sg-library-date,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7) .sg-library-date{display:block!important;font-size:12px!important;line-height:1.35!important;white-space:normal!important;overflow-wrap:normal!important}
}


/* v1.2.64 — approved mobile task-card alignment: action icons sit on the department value baseline. */
@media (max-width:650px){
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3){align-items:end!important}
  .sg-library-inline .sg-library-department-value{align-self:end!important}
  .sg-library-inline .sg-library-mobile-actions{align-items:flex-end!important;align-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(1){align-items:center!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(2){align-self:start!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(2) .sg-row-flags{display:flex!important;position:static!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important}
}

/* v1.2.61 — tablet dashboard: keep all five indicators on one row; arrow-only KPI action. */
.metric-view{display:grid!important;place-items:center!important;position:absolute!important;width:28px!important;height:28px!important;min-width:28px!important;min-height:28px!important;padding:0!important;box-sizing:border-box!important;line-height:1!important;}
.metric-view-label{display:none!important}
.metric-view-arrow{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;line-height:1!important;text-align:center!important;position:static!important;transform:none!important}
@media (min-width:651px) and (max-width:1200px){
  .dashboard-top{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;align-items:stretch!important;min-width:0!important;width:100%!important}
  .dashboard-top>.kpis{display:contents!important;min-width:0!important}
  .dashboard-top .metric,.dashboard-top .metric.danger{grid-column:auto!important;grid-row:1!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:108px!important;box-sizing:border-box!important;position:relative!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:space-between!important;gap:4px!important;padding:9px 7px 35px!important;overflow:hidden!important}
  .dashboard-top .metric>span{display:block!important;width:100%!important;min-width:0!important;min-height:0!important;font-size:clamp(7px,1vw,10px)!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:anywhere!important;word-break:normal!important}
  .dashboard-top .metric>b,.dashboard-top .metric.danger>b{display:flex!important;align-items:baseline!important;gap:3px!important;min-width:0!important;max-width:100%!important;margin:0!important;font-size:clamp(14px,1.8vw,21px)!important;line-height:1.1!important;white-space:nowrap!important;flex-wrap:nowrap!important}
  .dashboard-top .metric>b small{font-size:clamp(8px,.9vw,10px)!important;white-space:nowrap!important}
  .dashboard-top .metric-view{right:5px!important;bottom:5px!important;left:auto!important;top:auto!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important}
  .dashboard-top>.card{grid-column:5!important;grid-row:1!important;align-self:stretch!important;width:100%!important;min-width:0!important;max-width:100%!important;min-height:108px!important;box-sizing:border-box!important;padding:9px 7px!important;overflow:hidden!important}
  .dashboard-top>.card .chart-title{font-size:clamp(9px,1vw,11px)!important;line-height:1.2!important;margin-bottom:6px!important;white-space:nowrap!important}
  .dashboard-top .status-bar{height:8px!important;margin-bottom:6px!important}
  .dashboard-top .status-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;align-items:start!important}
  .dashboard-top .status-summary>div{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;min-width:0!important;font-size:clamp(6px,.7vw,8px)!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important}
  .dashboard-top .status-summary i{width:6px!important;height:6px!important;flex:0 0 6px!important;margin:0 0 1px!important}
  .dashboard-top .status-summary span{display:block!important;min-width:0!important;max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important}
  .dashboard-top .status-summary b{display:block!important;font-size:clamp(7px,.75vw,9px)!important;line-height:1.1!important;white-space:nowrap!important}
}

/* v1.2.62 — authoritative tablet dashboard layout. This final block intentionally overrides legacy tablet rules above. */
@media screen and (min-width:651px) and (max-width:1200px){
  .dashboard-top{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:7px!important;align-items:stretch!important;width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .dashboard-top>.kpis{display:contents!important}
  .dashboard-top>.kpis>.metric,.dashboard-top>.kpis>.metric.danger{grid-column:auto!important;grid-row:1!important;float:none!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:108px!important;height:auto!important;box-sizing:border-box!important;position:relative!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:space-between!important;gap:5px!important;padding:10px 7px 36px!important;overflow:hidden!important}
  .dashboard-top>.card{grid-column:5!important;grid-row:1!important;float:none!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:108px!important;height:auto!important;box-sizing:border-box!important;align-self:stretch!important;padding:10px 7px!important;overflow:hidden!important}
  .dashboard-top>.kpis>.metric>span{display:block!important;width:100%!important;min-width:0!important;min-height:0!important;font-size:clamp(7px,1vw,10px)!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}
  .dashboard-top>.kpis>.metric>b{display:flex!important;align-items:baseline!important;gap:3px!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;font-size:clamp(14px,1.8vw,21px)!important;line-height:1.1!important;white-space:nowrap!important;flex-wrap:nowrap!important}
  .dashboard-top>.kpis>.metric>b small{font-size:clamp(8px,.9vw,10px)!important;white-space:nowrap!important}
  .dashboard-top .metric-view{position:absolute!important;right:5px!important;bottom:5px!important;left:auto!important;top:auto!important;display:grid!important;place-items:center!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;margin:0!important;padding:0!important;line-height:1!important;font-size:0!important;box-sizing:border-box!important}
  .dashboard-top .metric-view-arrow{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;font-size:16px!important;line-height:1!important;text-align:center!important;position:static!important;transform:none!important}
  .dashboard-top>.card .chart-title{font-size:clamp(9px,1vw,11px)!important;line-height:1.2!important;margin-bottom:6px!important;white-space:nowrap!important}
  .dashboard-top .status-bar{height:8px!important;margin-bottom:6px!important}
  .dashboard-top .status-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;align-items:start!important}
  .dashboard-top .status-summary>div{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;min-width:0!important;font-size:clamp(6px,.7vw,8px)!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important}
  .dashboard-top .status-summary i{width:6px!important;height:6px!important;flex:0 0 6px!important;margin:0 0 1px!important}
  .dashboard-top .status-summary span{display:block!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;overflow-wrap:normal!important}
  .dashboard-top .status-summary b{display:block!important;font-size:clamp(7px,.75vw,9px)!important;line-height:1.1!important;white-space:nowrap!important}
}


/* v1.2.63 — tablet touch devices can report a 1366px CSS viewport in landscape.
   Use pointer capability, not width alone, so desktop monitors keep their desktop layout. */
@media screen and (min-width:651px) and (max-width:1400px){
  .dashboard-top{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-auto-flow:row!important;gap:7px!important;align-items:stretch!important;width:100%!important;min-width:0!important;box-sizing:border-box!important}
  .dashboard-top>.kpis{display:contents!important}
  .dashboard-top>.kpis>.metric,.dashboard-top>.kpis>.metric.danger{grid-column:auto!important;grid-row:1!important;float:none!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:108px!important;height:auto!important;box-sizing:border-box!important;position:relative!important;display:flex!important;flex-direction:column!important;align-items:flex-start!important;justify-content:space-between!important;gap:5px!important;padding:10px 7px 36px!important;overflow:hidden!important}
  .dashboard-top>.card{grid-column:5!important;grid-row:1!important;float:none!important;width:auto!important;min-width:0!important;max-width:none!important;min-height:108px!important;height:auto!important;box-sizing:border-box!important;align-self:stretch!important;padding:10px 7px!important;overflow:hidden!important}
  .dashboard-top>.kpis>.metric>span{display:block!important;width:100%!important;min-width:0!important;min-height:0!important;font-size:clamp(7px,1vw,10px)!important;line-height:1.2!important;white-space:normal!important;overflow-wrap:break-word!important;word-break:normal!important}
  .dashboard-top>.kpis>.metric>b{display:flex!important;align-items:baseline!important;gap:3px!important;width:auto!important;max-width:100%!important;min-width:0!important;margin:0!important;font-size:clamp(14px,1.8vw,21px)!important;line-height:1.1!important;white-space:nowrap!important;flex-wrap:nowrap!important}
  .dashboard-top>.kpis>.metric>b small{font-size:clamp(8px,.9vw,10px)!important;white-space:nowrap!important}
  .dashboard-top .metric-view{position:absolute!important;right:5px!important;bottom:5px!important;left:auto!important;top:auto!important;display:grid!important;place-items:center!important;width:24px!important;height:24px!important;min-width:24px!important;min-height:24px!important;margin:0!important;padding:0!important;line-height:1!important;font-size:0!important;box-sizing:border-box!important}
  .dashboard-top .metric-view-arrow{display:grid!important;place-items:center!important;width:100%!important;height:100%!important;margin:0!important;padding:0!important;font-size:16px!important;line-height:1!important;text-align:center!important;position:static!important;transform:none!important}
  .dashboard-top>.card .chart-title{font-size:clamp(9px,1vw,11px)!important;line-height:1.2!important;margin-bottom:6px!important;white-space:nowrap!important}
  .dashboard-top .status-bar{height:8px!important;margin-bottom:6px!important}
  .dashboard-top .status-summary{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:3px!important;align-items:start!important}
  .dashboard-top .status-summary>div{display:flex!important;flex-direction:column!important;align-items:flex-start!important;gap:3px!important;min-width:0!important;font-size:clamp(6px,.7vw,8px)!important;line-height:1.1!important;white-space:nowrap!important;overflow:hidden!important}
  .dashboard-top .status-summary i{width:6px!important;height:6px!important;flex:0 0 6px!important;margin:0 0 1px!important}
  .dashboard-top .status-summary span{display:block!important;min-width:0!important;max-width:100%!important;white-space:nowrap!important;overflow:hidden!important;overflow-wrap:normal!important}
  .dashboard-top .status-summary b{display:block!important;font-size:clamp(7px,.75vw,9px)!important;line-height:1.1!important;white-space:nowrap!important}
}


/* v1.2.65 — refine only the mobile task-card presentation in Master Library and Review/Approval.
   Metadata cards now use the full task-card width instead of starting after the selector column. */
@media screen and (max-width:650px){
  .sg-library-inline tbody tr[data-lib-row],
  .sg-plan-inline tbody tr[data-sg-plan-row]{
    gap:10px 10px!important;
    padding:14px!important;
    border-radius:14px!important;
    box-shadow:0 2px 7px rgba(18,52,59,.045)!important;
  }
  /* Keep selector and title side by side; all subsequent fields align to the card's inner edges. */
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(1),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(1){grid-column:1!important;grid-row:1!important;align-self:start!important;padding-top:2px!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(2),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(2){grid-column:2!important;grid-row:1!important;min-width:0!important;width:100%!important;max-width:100%!important;font-size:15px!important;line-height:1.35!important;overflow-wrap:anywhere!important}

  /* Master Library: department/actions full width, followed by two slim paired rows. */
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3){
    grid-column:1/-1!important;grid-row:2!important;width:100%!important;max-width:100%!important;
    grid-template-columns:72px minmax(0,1fr) auto!important;column-gap:8px!important;
    min-height:36px!important;align-items:center!important;padding:0!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3):before{font-size:11px!important;line-height:1.25!important}
  .sg-library-inline .sg-library-department-value{font-size:13px!important;line-height:1.3!important;padding:0!important;align-self:center!important}
  .sg-library-inline .sg-library-mobile-actions{gap:5px!important;align-items:center!important}
  .sg-library-inline .sg-library-mobile-actions .sg-icon-btn{width:32px!important;height:32px!important;flex:0 0 32px!important;border-radius:9px!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(8){display:none!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7){
    grid-column:1/-1!important;width:calc(50% - 5px)!important;min-width:0!important;max-width:calc(50% - 5px)!important;
    min-height:64px!important;height:auto!important;padding:9px 10px!important;margin:0!important;
    box-sizing:border-box!important;border:1px solid var(--border,#e4eaec)!important;border-radius:10px!important;
    background:#f7f9fa!important;align-self:stretch!important;justify-self:start!important;overflow:hidden!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6){grid-row:3!important;justify-self:start!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5),
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7){grid-row:3!important;justify-self:end!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6){grid-row:4!important;background:#f1f6f6!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7){grid-row:4!important;background:#f1f6f6!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6):before,
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7):before{
    display:block!important;margin:0 0 5px!important;font-size:11px!important;line-height:1.25!important;
    font-weight:700!important;color:var(--muted,#6b7b80)!important;white-space:normal!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(5):before{content:'İcra müddəti (həftə)'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-library-inline .sg-library-date{display:block!important;font-size:12px!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:normal!important}

  /* Review/Approval: department + priority, week + duration, then the two date cards. */
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8){
    grid-column:1/-1!important;grid-row:2!important;width:calc(50% - 5px)!important;max-width:calc(50% - 5px)!important;
    min-width:0!important;margin:0!important;padding:0!important;justify-self:start!important;align-self:start!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8){justify-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6):before,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7):before{
    display:block!important;margin:0 0 5px!important;font-size:11px!important;line-height:1.25!important;
    font-weight:700!important;color:var(--muted,#6b7b80)!important;white-space:normal!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3):before{content:'Şöbə'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8):before{content:'Prioritet'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5){
    grid-column:1/-1!important;grid-row:3!important;width:calc(50% - 5px)!important;max-width:calc(50% - 5px)!important;
    min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;justify-self:start!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5){justify-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6),
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7){
    grid-column:1/-1!important;grid-row:4!important;width:calc(50% - 5px)!important;max-width:calc(50% - 5px)!important;
    min-width:0!important;min-height:64px!important;height:auto!important;padding:9px 10px!important;margin:0!important;
    background:#f1f6f6!important;border:1px solid var(--border,#e4eaec)!important;border-radius:10px!important;
    box-sizing:border-box!important;justify-self:start!important;overflow:hidden!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7){justify-self:end!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(3) select,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(8) select,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4) input,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5) input{
    display:block!important;width:100%!important;max-width:100%!important;min-width:0!important;
    min-height:36px!important;height:36px!important;padding:6px 8px!important;margin:0!important;
    border:1px solid var(--border,#e4eaec)!important;border-radius:8px!important;background:#fff!important;
    box-sizing:border-box!important;font-size:13px!important;line-height:1.25!important;
  }
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(4):before{content:'Başlanğıc həftəsi'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(5):before{content:'İcra müddəti (həftə)'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6):before{content:'Başlanğıc tarixi'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7):before{content:'Bitmə tarixi'!important}
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(6) .sg-library-date,
  .sg-plan-inline tbody tr[data-sg-plan-row]>td:nth-child(7) .sg-library-date{display:block!important;font-size:12px!important;line-height:1.3!important;white-space:normal!important;overflow-wrap:normal!important}
}


/* v1.2.66 — restore Master Library view/edit controls and stabilize tablet orientation changes.
   Touch tablets may expose a desktop-sized CSS viewport in landscape; keep the tablet shell responsive. */
@media screen and (max-width:650px){
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3){
    display:grid!important;
    grid-template-columns:76px minmax(0,1fr) auto!important;
    align-items:center!important;
    width:100%!important;min-width:0!important;max-width:100%!important;
    overflow:visible!important;
  }
  .sg-library-inline .sg-library-mobile-actions{
    display:flex!important;visibility:visible!important;opacity:1!important;
    flex:0 0 auto!important;flex-wrap:nowrap!important;gap:5px!important;
    width:max-content!important;min-width:max-content!important;max-width:none!important;
    overflow:visible!important;position:relative!important;z-index:1!important;
  }
  .sg-library-inline .sg-library-mobile-actions .sg-icon-btn,
  .sg-library-inline .sg-library-mobile-actions .sg-view-btn,
  .sg-library-inline .sg-library-mobile-actions .sg-edit-btn,
  .sg-library-inline .sg-library-mobile-actions .sg-delete-btn{
    display:inline-flex!important;visibility:visible!important;opacity:1!important;
    flex:0 0 32px!important;width:32px!important;min-width:32px!important;height:32px!important;
    align-items:center!important;justify-content:center!important;box-sizing:border-box!important;
  }
  .sg-library-inline .sg-library-mobile-actions .sg-view-btn,
  .sg-library-inline .sg-library-mobile-actions .sg-edit-btn{
    color:var(--primary,#0f766e)!important;background:var(--card,#fff)!important;
    border:1px solid var(--border,#dfe7e9)!important;border-radius:9px!important;
  }
  .sg-library-inline .sg-library-mobile-actions svg{display:block!important;width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
}
/* A tablet's landscape viewport can be wider than 1100px. Detect touch capability as well as width,
   so portrait and landscape use the same responsive shell without changing desktop monitors. */
@media screen and (min-width:651px) and (max-width:1400px) and (pointer:coarse){
  .app{padding-top:64px!important;min-width:0!important;width:100%!important;max-width:100%!important;overflow-x:clip!important}
  .app>.topbar{height:64px!important;min-height:64px!important;padding:8px clamp(12px,1.6vw,20px)!important}
  .app>.layout{grid-template-columns:68px minmax(0,1fr)!important;min-width:0!important;width:100%!important;max-width:100%!important;min-height:calc(100dvh - 64px)!important}
  .app .sidebar{position:fixed!important;left:0!important;top:64px!important;bottom:0!important;width:68px!important;max-width:68px!important;padding:14px 8px!important;overflow:hidden!important;z-index:950!important}
  .app .sidebar .nav-label,.app .sidebar .sidebar-toggle-label{display:none!important}
  .app .sidebar .nav button,.app .sidebar .sidebar-toggle{justify-content:center!important;padding:10px 0!important}
  .app .content{grid-column:2!important;min-width:0!important;width:100%!important;max-width:100%!important;box-sizing:border-box!important;padding:clamp(12px,1.6vw,20px)!important;overflow-x:clip!important}
  .app .card,.app .sg-card,.app .page-head,.app .sg-section-head,.app .sg-library-filters,.app .sg-review-filters{min-width:0!important;max-width:100%!important;box-sizing:border-box!important}
  .app .table-wrap,.app .sg-table-wrap,.app .sg-plan-table-wrap{width:100%!important;min-width:0!important;max-width:100%!important;overflow-x:auto!important;overscroll-behavior-x:contain!important}
  .app.sidebar-expanded .layout{grid-template-columns:68px minmax(0,1fr)!important}
  .app.sidebar-expanded .content{grid-column:2!important}
  .app.sidebar-expanded .sidebar{width:min(280px,84vw)!important;max-width:84vw!important;overflow-y:auto!important;box-shadow:8px 0 24px rgba(10,30,34,.12)!important}
  .dashboard-top{min-width:0!important;max-width:100%!important}
}


/* v1.2.73 — mobile Master Library: keep the department label in place and move its value immediately beside it. */
@media screen and (max-width:650px){
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3){
    grid-template-columns:max-content minmax(0,1fr) max-content!important;
    column-gap:10px!important;
  }
  .sg-library-inline tbody tr[data-lib-row]>td:nth-child(3):before{
    grid-column:1!important;grid-row:1!important;align-self:center!important;
    white-space:nowrap!important;margin:0!important;
  }
  .sg-library-inline .sg-library-department-value{
    grid-column:2!important;grid-row:1!important;justify-self:start!important;align-self:center!important;
    max-width:100%!important;min-width:0!important;overflow-wrap:anywhere!important;
    padding-bottom:0!important;
  }
  .sg-library-inline .sg-library-mobile-actions{
    grid-column:3!important;grid-row:1!important;justify-self:end!important;align-self:center!important;
    margin-left:0!important;gap:5px!important;
  }
}


/* v1.2.76 — smooth, stable drawer motion with a lighter translucent backdrop. */
@media (max-width:1100px){
  .app .sidebar{
    transition:transform .28s cubic-bezier(.22,.61,.36,1), box-shadow .28s ease, background-color .28s ease!important;
    transform:translate3d(-101%,0,0);
    will-change:transform;
    backface-visibility:hidden;
    background:rgba(15,67,66,.91)!important;
    -webkit-backdrop-filter:blur(12px) saturate(125%);
    backdrop-filter:blur(12px) saturate(125%);
    transform-origin:left center;
  }
  .app.sidebar-expanded .sidebar{
    transform:translate3d(0,0,0)!important;
    box-shadow:10px 0 30px rgba(10,30,34,.16)!important;
  }
  .app .layout:before,.app.sidebar-expanded:before{
    transition:opacity .42s cubic-bezier(.22,.61,.36,1)!important;
  }
  .app.sidebar-expanded .layout:before{background:rgba(10,30,34,.24)!important;-webkit-backdrop-filter:blur(1px);backdrop-filter:blur(1px)}
}
@media (prefers-reduced-motion:reduce){
  .app .sidebar,.app .layout:before,.app.sidebar-expanded:before{transition:none!important}
}


/* v1.2.77 — drawer slides smoothly without scaling; translucent backdrop fades independently. */
@media (max-width:1100px){
  .app .sidebar{
    transition:transform .38s cubic-bezier(.22,.61,.36,1),box-shadow .4s ease,background-color .46s ease!important;
    width:min(280px,84vw)!important;
    max-width:84vw!important;
    transform:translate3d(-102%,0,0)!important;
    transform-origin:left center!important;
    will-change:transform;
    backface-visibility:hidden;
    -webkit-backface-visibility:hidden;
    background:rgba(15,67,66,.84)!important;
    -webkit-backdrop-filter:blur(14px) saturate(120%);
    backdrop-filter:blur(14px) saturate(120%);
  }
  .app.sidebar-expanded .sidebar{
    transform:translate3d(0,0,0)!important;
    box-shadow:10px 0 30px rgba(10,30,34,.14)!important;
  }
  .app .layout:before{
    content:"";
    position:fixed;
    left:0;right:0;top:64px;bottom:0;
    z-index:85;
    opacity:0;
    pointer-events:none;
    background:rgba(10,30,34,.18);
    -webkit-backdrop-filter:blur(1px);
    backdrop-filter:blur(1px);
    transition:opacity .42s cubic-bezier(.22,.61,.36,1)!important;
  }
  .app.sidebar-expanded .layout:before{
    opacity:1;
    pointer-events:auto;
    background:rgba(10,30,34,.18)!important;
  }
  .app.sidebar-expanded .sidebar{z-index:950!important}
}
@media(max-width:650px){
  .app .layout:before{top:62px}
}
@media (prefers-reduced-motion:reduce){
  .app .sidebar,.app .layout:before{transition:none!important}
}


/* v1.2.80 — consistent smooth navigation on desktop, tablet and mobile.
   Keep the drawer's dimensions stable; reveal it with clipping/translation instead of animating width. */
@media (min-width:1101px){
  .app.sidebar-collapsed .sidebar{
    width:235px!important;max-width:235px!important;
    clip-path:inset(0 167px 0 0);
    transition:clip-path .38s cubic-bezier(.22,.61,.36,1),box-shadow .38s ease,background-color .46s ease!important;
    will-change:clip-path;
    box-sizing:border-box!important;
  }
  .app.sidebar-collapsed .sidebar:hover{
    clip-path:inset(0 0 0 0);
    background:rgba(15,67,66,.94)!important;
    -webkit-backdrop-filter:blur(12px) saturate(120%);
    backdrop-filter:blur(12px) saturate(120%);
  }
  .app.sidebar-collapsed .sidebar .nav-label,
  .app.sidebar-collapsed .sidebar .sidebar-toggle-label{
    transition:opacity .18s ease;
  }
}
@media (min-width:651px) and (max-width:1100px){
  .app .sidebar{
    transition:transform .32s cubic-bezier(.22,.61,.36,1),box-shadow .32s ease!important;
    width:min(280px,84vw)!important;max-width:84vw!important;
    transform:translate3d(-102%,0,0)!important;
    will-change:transform;backface-visibility:hidden;
    background:rgba(15,67,66,.86)!important;
    -webkit-backdrop-filter:blur(14px) saturate(120%);backdrop-filter:blur(14px) saturate(120%);
  }
  .app.sidebar-expanded .sidebar{transform:translate3d(0,0,0)!important}
}
@media (max-width:650px){
  .app .sidebar{
    transition:transform .32s cubic-bezier(.22,.61,.36,1),box-shadow .32s ease!important;
    transform:translate3d(-102%,0,0)!important;
    background:rgba(15,67,66,.86)!important;
    -webkit-backdrop-filter:blur(14px) saturate(120%);backdrop-filter:blur(14px) saturate(120%);
  }
  .app.sidebar-expanded .sidebar{transform:translate3d(0,0,0)!important}
}
.app .sidebar{transform-origin:left center!important}
@media (prefers-reduced-motion:reduce){
  .app.sidebar-collapsed .sidebar,.app .sidebar,.app .layout:before,.app.sidebar-expanded:before{transition:none!important;will-change:auto!important}
}


/* v1.2.81 — keep collapsed navigation icons inside the visible rail.
   The previous clipped 235px drawer centered buttons outside the 68px visible area. */
@media (min-width:1101px){
  .app.sidebar-collapsed .sidebar{
    width:68px!important;max-width:68px!important;
    clip-path:none!important;overflow:hidden!important;
    padding:14px 8px!important;
  }
  .app.sidebar-collapsed .sidebar .nav-icon,
  .app.sidebar-collapsed .sidebar .sidebar-toggle-icon{
    display:inline-flex!important;visibility:visible!important;opacity:1!important;
  }
  .app.sidebar-collapsed .sidebar:hover{
    width:235px!important;max-width:235px!important;
    clip-path:none!important;overflow-y:auto!important;
    padding:18px 12px!important;
  }
}
@media (min-width:651px) and (max-width:1100px){
  .app.sidebar-collapsed .sidebar{
    width:68px!important;max-width:68px!important;
    clip-path:none!important;overflow:hidden!important;
  }
  .app.sidebar-collapsed .sidebar .nav-icon,
  .app.sidebar-collapsed .sidebar .sidebar-toggle-icon{
    display:inline-flex!important;visibility:visible!important;opacity:1!important;
  }
  .app.sidebar-collapsed .sidebar:hover{
    width:min(280px,84vw)!important;max-width:84vw!important;
    overflow-y:auto!important;
  }
}
@media screen and (min-width:651px) and (max-width:1400px) and (pointer:coarse){
  .app .sidebar .nav-icon,.app .sidebar .sidebar-toggle-icon{
    display:inline-flex!important;visibility:visible!important;opacity:1!important;
  }
}

/* v1.2.82: smoother sidebar expansion with stable icon alignment */
@media (min-width:651px){
  .sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-collapsed .sidebar:hover{
    transition:width .32s cubic-bezier(.22,.61,.36,1),
      max-width .32s cubic-bezier(.22,.61,.36,1),
      padding .32s cubic-bezier(.22,.61,.36,1),
      box-shadow .24s ease;
  }
  .sidebar .nav button,
  .sidebar-toggle{
    transition:background-color .2s ease,color .2s ease,padding .32s cubic-bezier(.22,.61,.36,1),
      justify-content .32s cubic-bezier(.22,.61,.36,1);
  }
  .sidebar .nav-icon,
  .sidebar-toggle-icon{
    flex:0 0 22px!important;width:22px!important;min-width:22px!important;
    margin:0!important;transform:none!important;transition:none!important;
  }
  .app.sidebar-collapsed .sidebar .nav-label,
  .app.sidebar-collapsed .sidebar .sidebar-toggle-label{
    display:inline-block!important;opacity:0!important;visibility:hidden!important;
    transition:opacity .16s ease,visibility 0s linear .16s!important;
  }
  .app.sidebar-collapsed .sidebar:hover .nav-label,
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle-label,
  .app.sidebar-expanded .sidebar .nav-label,
  .app.sidebar-expanded .sidebar .sidebar-toggle-label{
    display:inline-block!important;opacity:1!important;visibility:visible!important;
    transition:opacity .22s ease .06s,visibility 0s linear 0s!important;
  }
}
@media (prefers-reduced-motion:reduce){
  .sidebar,.sidebar .nav button,.sidebar-toggle,.sidebar .nav-label,.sidebar-toggle-label{
    transition:none!important;
  }
}

/* v1.2.83 — pin collapsed-rail icons to the exact horizontal center.
   Keep icon positioning independent from flex alignment/padding animation. */
@media (min-width:651px){
  .app.sidebar-collapsed .sidebar .nav button{
    position:relative!important;
    justify-content:flex-start!important;
    padding-left:0!important;padding-right:0!important;
  }
  .app.sidebar-collapsed .sidebar .nav button .nav-icon{
    position:absolute!important;
    left:50%!important;top:50%!important;
    transform:translate(-50%,-50%)!important;
    margin:0!important;
    width:22px!important;min-width:22px!important;
    text-align:center!important;
    flex:none!important;
  }
  .app.sidebar-collapsed .sidebar .sidebar-toggle{
    position:relative!important;justify-content:flex-start!important;
    padding-left:0!important;padding-right:0!important;
  }
  .app.sidebar-collapsed .sidebar .sidebar-toggle .sidebar-toggle-icon{
    position:absolute!important;left:50%!important;top:50%!important;
    transform:translate(-50%,-50%)!important;margin:0!important;
  }
  .app.sidebar-collapsed .sidebar:hover .nav button,
  .app.sidebar-expanded .sidebar .nav button{
    position:relative!important;justify-content:flex-start!important;padding:11px 12px!important;
  }
  .app.sidebar-collapsed .sidebar:hover .nav button .nav-icon,
  .app.sidebar-expanded .sidebar .nav button .nav-icon{
    position:static!important;transform:none!important;margin:0!important;
  }
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle,
  .app.sidebar-expanded .sidebar .sidebar-toggle{
    justify-content:flex-start!important;padding:9px 12px!important;
  }
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle .sidebar-toggle-icon,
  .app.sidebar-expanded .sidebar .sidebar-toggle .sidebar-toggle-icon{
    position:static!important;transform:none!important;margin:0!important;
  }
}


/* v1.2.85 — soften only the sidebar/backdrop background reveal; preserve icon positions and label timing. */
@media (min-width:651px){
  .app.sidebar-collapsed .sidebar .nav-label,
  .app.sidebar-collapsed .sidebar .sidebar-toggle-label{
    opacity:0!important;visibility:hidden!important;
    transform:translateX(-7px)!important;
    transition:opacity .24s ease,transform .32s cubic-bezier(.22,.61,.36,1),visibility 0s linear .24s!important;
    will-change:opacity,transform;
  }
  .app.sidebar-collapsed .sidebar:hover .nav-label,
  .app.sidebar-collapsed .sidebar:hover .sidebar-toggle-label,
  .app.sidebar-expanded .sidebar .nav-label,
  .app.sidebar-expanded .sidebar .sidebar-toggle-label{
    opacity:1!important;visibility:visible!important;transform:translateX(0)!important;
    transition:opacity .28s ease .08s,transform .32s cubic-bezier(.22,.61,.36,1) .04s,visibility 0s linear 0s!important;
  }
}
@media (prefers-reduced-motion:reduce){
  .app.sidebar-collapsed .sidebar .nav-label,
  .app.sidebar-collapsed .sidebar .sidebar-toggle-label,
  .app.sidebar-expanded .sidebar .nav-label,
  .app.sidebar-expanded .sidebar .sidebar-toggle-label{transition:none!important;transform:none!important}
}

/* Admin settings open in focused modal windows instead of expanding inline. */
.admin-launch-card{display:flex;flex-direction:column;align-items:flex-start;gap:10px;min-height:160px}
.admin-launch-card .btn{margin-top:auto}
.admin-management-modal{width:min(760px,calc(100vw - 28px));max-height:min(88vh,900px);overflow-y:auto}
.admin-management-modal .modal-head{position:sticky;top:0;z-index:2;background:var(--card-bg,#fff);padding-bottom:10px}
.admin-departments-list{max-height:55vh;overflow:auto;border:1px solid var(--border-color,#ddd);border-radius:10px;padding:8px 12px}
.admin-departments-list .admin-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--border-color,#eee)}
.admin-departments-list .admin-row:last-child{border-bottom:0}

/* Unified Hotel Features UI */
.sg-feature-type{display:inline-block;margin-left:5px;color:var(--muted);font-size:10px;font-weight:500;white-space:nowrap}.sg-feature-add{display:grid;grid-template-columns:minmax(120px,1fr) 150px auto;gap:8px;align-items:center}.sg-feature-add select{min-width:0;max-width:100%;height:38px;border:1px solid var(--border);border-radius:8px;padding:0 9px;background:var(--card);color:var(--text)}@media(max-width:560px){.sg-feature-add{grid-template-columns:1fr}.sg-feature-add select,.sg-feature-add button{width:100%}}

/* v1.2.97: task table desktop column balance */
@media (min-width: 900px) {
  .tasks-table { width: 100%; table-layout: fixed; }
  .tasks-table th:nth-child(1), .tasks-table td:nth-child(1) { width: 13%; }
  .tasks-table th:nth-child(2), .tasks-table td:nth-child(2) { width: auto; min-width: 320px; max-width: none; }
  .tasks-table th:nth-child(3), .tasks-table td:nth-child(3),
  .tasks-table th:nth-child(4), .tasks-table td:nth-child(4) { width: 8.5%; white-space: nowrap; }
  .tasks-table th:nth-child(5), .tasks-table td:nth-child(5) { width: 10%; white-space: nowrap; }
  .tasks-table th:nth-child(6), .tasks-table td:nth-child(6) { width: 9%; white-space: nowrap; }
  .tasks-table th:nth-child(7), .tasks-table td:nth-child(7) { width: 12%; min-width: 0; max-width: none; }
  .tasks-table th:nth-child(8), .tasks-table td:nth-child(8) { width: 124px; text-align: right; white-space: nowrap; }
  .tasks-table td:nth-child(8) .actions { display: flex; justify-content: flex-end; align-items: center; gap: 5px; }
  .tasks-table td:nth-child(2) { overflow-wrap: anywhere; }
}

/* v1.2.98: keep every modal below the fixed/sticky main header. */
.modal-bg.show {
  align-items: flex-start;
  padding: calc(70px + 16px) 20px 16px;
  overflow-y: auto;
}
.modal-bg.show > .modal {
  max-height: calc(100vh - 102px);
  flex: 0 1 auto;
  min-height: 0;
}
@media (max-width: 650px) {
  .modal-bg.show { padding: 78px 10px 10px; }
  .modal-bg.show > .modal { max-height: calc(100vh - 88px); }
}

/* Admin management dialogs: keep successful edits inside the active window. */
.hotel-profile-launcher{margin-top:16px}
.hotel-profile-modal{width:min(920px,calc(100vw - 28px));max-height:min(82vh,820px);overflow-y:auto}
.hotel-profile-modal .modal-head{position:sticky;top:0;z-index:3;background:var(--card-bg,#fff);padding-bottom:10px}
.modal-inline-feedback:empty{display:none}
.modal-inline-feedback{position:sticky;top:58px;z-index:2}
.modal-inline-feedback .alert{margin:8px 0;padding:10px 12px;border-radius:8px;background:#e8f6ef;color:#087443;border:1px solid #bde8d0}
.admin-inline-dept-add{display:flex;align-items:flex-end;gap:10px;margin-top:16px;padding-top:14px;border-top:1px solid var(--border)}
.admin-inline-dept-add .field{flex:1;margin:0}
@media(max-width:600px){.admin-inline-dept-add{align-items:stretch;flex-direction:column}.admin-inline-dept-add .btn{width:100%}}

/* v1.3.00 — fixed icon-only desktop navigation with hover tooltips; never expands on hover. */
@media (min-width: 651px) {
  .app .layout,
  .app.sidebar-collapsed .layout,
  .app.sidebar-expanded .layout { grid-template-columns: 68px minmax(0,1fr) !important; }
  .app .sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-expanded .sidebar {
    width:68px !important; min-width:68px !important; max-width:68px !important;
    padding:14px 8px !important; overflow:visible !important;
    position:relative; z-index:20; transition:none !important; box-shadow:none !important;
  }
  .app .sidebar-toggle { display:none !important; }
  .app .sidebar .nav button,
  .app.sidebar-collapsed .sidebar .nav button,
  .app.sidebar-expanded .sidebar .nav button {
    position:relative !important; display:flex !important; align-items:center !important;
    justify-content:center !important; gap:0 !important; width:100% !important;
    min-height:44px !important; padding:10px 0 !important; margin:2px 0 !important;
    overflow:visible !important; white-space:nowrap !important;
  }
  .app .sidebar .nav button .nav-icon { flex:0 0 24px; width:24px; text-align:center; }
  .app .sidebar .nav button .nav-label,
  .app.sidebar-collapsed .sidebar .nav button .nav-label,
  .app.sidebar-expanded .sidebar .nav button .nav-label {
    display:none !important; opacity:0 !important; visibility:hidden !important;
    position:absolute !important; left:calc(100% + 10px) !important; top:50% !important;
    transform:translateY(-50%) !important; z-index:1000 !important;
    width:max-content !important; max-width:260px !important; overflow:visible !important;
    padding:9px 12px !important; border-radius:8px !important;
    background:var(--secondary) !important; color:#fff !important;
    box-shadow:0 6px 20px rgba(0,0,0,.2) !important; font-size:12px !important;
    line-height:1.3 !important; pointer-events:none !important;
  }
  .app .sidebar .nav button:hover .nav-label,
  .app .sidebar .nav button:focus-visible .nav-label {
    display:block !important; opacity:1 !important; visibility:visible !important;
  }
  .app .sidebar .nav button:hover::after,
  .app .sidebar .nav button:focus-visible::after {
    content:""; position:absolute; left:calc(100% + 3px); top:50%;
    transform:translateY(-50%); border:7px solid transparent;
    border-right-color:var(--secondary); z-index:1000; pointer-events:none;
  }
  .app .sidebar:hover,
  .app.sidebar-collapsed .sidebar:hover,
  .app.sidebar-expanded .sidebar:hover { width:68px !important; min-width:68px !important; max-width:68px !important; }
}

/* v1.3.1 — modal dialogs start strictly below the fixed top bar; headers remain fully visible. */
:root { --app-fixed-header-height: 70px; }
@media (min-width: 651px) and (max-width: 1100px) {
  :root { --app-fixed-header-height: 64px; }
}
@media (max-width: 650px) {
  :root { --app-fixed-header-height: 62px; }
}
.modal-bg.show {
  position: fixed !important;
  inset: var(--app-fixed-header-height) 0 0 0 !important;
  display: flex !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  overscroll-behavior: contain;
}
.modal-bg.show > .modal {
  margin: 0 auto !important;
  max-height: calc(100dvh - var(--app-fixed-header-height) - 24px) !important;
  min-height: 0 !important;
  flex: 0 1 auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  box-sizing: border-box !important;
  scroll-padding-top: 12px;
}
.modal-bg.show > .modal > .modal-head,
.modal-bg.show > .modal .modal-head {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  background: var(--card, #fff) !important;
  padding-top: 8px !important;
}
@media (max-width: 650px) {
  .modal-bg.show { padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important; }
  .modal-bg.show > .modal { max-height: calc(100dvh - var(--app-fixed-header-height) - 16px) !important; }
}


/* v1.3.2 — final modal positioning fix: never allow legacy modal transforms/offsets to hide the heading. */
.modal-bg.show {
  position: fixed !important;
  inset: var(--app-fixed-header-height, 70px) 0 0 0 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  justify-content: center !important;
  padding: 12px 16px max(12px, env(safe-area-inset-bottom)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}
.modal-bg.show > .modal {
  position: relative !important;
  inset: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 auto !important;
  width: min(900px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - var(--app-fixed-header-height, 70px) - 24px) !important;
  min-height: 0 !important;
  flex: 0 0 auto !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  align-self: flex-start !important;
  box-sizing: border-box !important;
  scroll-padding-top: 16px !important;
}
.modal-bg.show > .modal > .modal-head,
.modal-bg.show > .modal .modal-head {
  position: sticky !important;
  top: 0 !important;
  transform: none !important;
  margin-top: 0 !important;
  padding-top: 10px !important;
  z-index: 50 !important;
  background: #fff !important;
  visibility: visible !important;
  opacity: 1 !important;
}
@media (max-width: 650px) {
  .modal-bg.show {
    padding: 8px 10px max(8px, env(safe-area-inset-bottom)) !important;
  }
  .modal-bg.show > .modal {
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - var(--app-fixed-header-height, 62px) - 16px) !important;
  }
}

/* v1.3.4 — fixed icon rail with non-layout-shifting hover tooltips on desktop and tablet */
@media (min-width: 651px) {
  .app .layout,
  .app.sidebar-expanded .layout,
  .app.sidebar-collapsed .layout,
  .app.sidebar-collapsed .layout:has(.sidebar:hover) {
    grid-template-columns: 68px minmax(0, 1fr) !important;
  }
  .app .sidebar,
  .app.sidebar-expanded .sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-collapsed .sidebar:hover {
    position: fixed !important;
    left: 0 !important;
    top: var(--app-fixed-header-height, 70px) !important;
    bottom: 0 !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    padding: 14px 8px !important;
    overflow: visible !important;
    z-index: 950 !important;
    box-shadow: none !important;
    transition: none !important;
  }
  .app .sidebar-toggle,
  .app .sidebar-toggle-label,
  .app .topbar .mobile-menu-toggle {
    display: none !important;
  }
  .app .sidebar .nav { overflow: visible !important; }
  .app .sidebar .nav button,
  .app.sidebar-expanded .sidebar .nav button,
  .app.sidebar-collapsed .sidebar:hover .nav button {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 10px 0 !important;
    gap: 0 !important;
    margin: 2px 0 !important;
    transform: none !important;
    transition: background-color .12s ease, color .12s ease !important;
    overflow: visible !important;
  }
  .app .sidebar .nav-label,
  .app.sidebar-expanded .sidebar .nav-label,
  .app.sidebar-collapsed .sidebar:hover .nav-label {
    display: none !important;
  }
  .app .sidebar .nav-icon {
    display: inline-flex !important;
    flex: 0 0 24px !important;
    width: 24px !important;
    height: 24px !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    line-height: 1 !important;
    transform: none !important;
  }
  .app .sidebar .nav button:hover,
  .app .sidebar .nav button:focus-visible {
    background: rgba(255,255,255,.08) !important;
    color: #fff !important;
    transform: none !important;
    box-shadow: none !important;
  }
  .app .sidebar .nav button::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%) translateX(-3px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    white-space: nowrap;
    max-width: min(300px, calc(100vw - 100px));
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 8px 11px;
    border-radius: 8px;
    background: #12343B;
    color: #fff;
    font-size: 12px;
    line-height: 1.25;
    font-weight: 600;
    box-shadow: 0 5px 16px rgba(10,30,34,.22);
    z-index: 1200;
    transition: opacity .12s ease, transform .12s ease, visibility .12s ease;
  }
  .app .sidebar .nav button:hover::after,
  .app .sidebar .nav button:focus-visible::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
  }
  .app.sidebar-expanded:before { display: none !important; }
}
@media (min-width: 651px) and (max-width: 1100px) {
  .app .sidebar,
  .app.sidebar-expanded .sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-collapsed .sidebar:hover {
    top: 64px !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    padding: 14px 8px !important;
  }
  .app .layout { grid-template-columns: 68px minmax(0, 1fr) !important; }
}


/* v1.3.5 — stabilize fixed icon rail; readable tooltips without layout or content flicker. */
@media (min-width: 651px) {
  .app .layout,
  .app.sidebar-expanded .layout,
  .app.sidebar-collapsed .layout,
  .app.sidebar-collapsed .layout:has(.sidebar:hover) {
    display: grid !important;
    grid-template-columns: 68px minmax(0, 1fr) !important;
  }
  .app .sidebar,
  .app.sidebar-expanded .sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-expanded .sidebar:hover,
  .app.sidebar-collapsed .sidebar:hover {
    position: fixed !important;
    left: 0 !important;
    top: var(--app-fixed-header-height, 70px) !important;
    bottom: 0 !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    flex: 0 0 68px !important;
    transform: none !important;
    transition: none !important;
    overflow: visible !important;
    z-index: 950 !important;
  }
  .app .main,
  .app .main-content,
  .app .content,
  .app .workspace {
    min-width: 0 !important;
  }
  .app .sidebar .nav button,
  .app.sidebar-expanded .sidebar .nav button,
  .app.sidebar-collapsed .sidebar .nav button,
  .app.sidebar-expanded .sidebar:hover .nav button,
  .app.sidebar-collapsed .sidebar:hover .nav button {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: center !important;
    transform: none !important;
    transition: background-color .12s ease, color .12s ease !important;
    box-shadow: none !important;
  }
  .app .sidebar .nav button .nav-label,
  .app.sidebar-expanded .sidebar .nav button .nav-label,
  .app.sidebar-collapsed .sidebar .nav button .nav-label {
    display: none !important;
  }
  .app .sidebar .nav button::after {
    content: attr(title) !important;
    position: absolute !important;
    left: calc(100% + 12px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    width: max-content !important;
    max-width: min(360px, calc(100vw - 100px)) !important;
    overflow: visible !important;
    text-overflow: clip !important;
    padding: 10px 14px !important;
    border-radius: 8px !important;
    background: #12343B !important;
    color: #fff !important;
    font-size: 15px !important;
    line-height: 1.35 !important;
    font-weight: 600 !important;
    box-shadow: 0 5px 16px rgba(10,30,34,.22) !important;
    z-index: 2000 !important;
    transition: opacity .1s ease, visibility .1s ease !important;
  }
  .app .sidebar .nav button:hover::after,
  .app .sidebar .nav button:focus-visible::after {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .app.sidebar-expanded::before,
  .app.sidebar-collapsed::before {
    display: none !important;
    content: none !important;
    pointer-events: none !important;
  }
}


/* v1.3.6 — restore the topbar menu icon on desktop/tablet while keeping the icon rail fixed. */
@media (min-width: 651px) {
  .app .topbar .mobile-menu-toggle {
    display: inline-flex !important;
    position: relative !important;
    z-index: 1100 !important;
    flex: 0 0 40px !important;
    width: 40px !important;
    height: 40px !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 4px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 10px !important;
    background: #edf4f4 !important;
    color: var(--secondary, #12343b) !important;
    font-size: 22px !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    transition: background-color .12s ease !important;
  }
  .app .topbar .mobile-menu-toggle:hover,
  .app .topbar .mobile-menu-toggle:focus-visible {
    background: #edf4f4 !important;
    color: var(--secondary, #12343b) !important;
    transform: none !important;
    box-shadow: none !important;
  }
}

/* v1.3.7 — final sidebar fix: expanded-state backdrops must never cover the workspace on desktop/tablet. */
@media (min-width: 651px) {
  .app .layout,
  .app.sidebar-expanded .layout,
  .app.sidebar-collapsed .layout,
  .app.sidebar-expanded .layout:has(.sidebar:hover),
  .app.sidebar-collapsed .layout:has(.sidebar:hover) {
    display: grid !important;
    grid-template-columns: 68px minmax(0, 1fr) !important;
    position: relative !important;
    isolation: auto !important;
  }
  /* These legacy backdrops were dimming/covering the whole page when the menu was hovered/toggled. */
  .app.sidebar-expanded::before,
  .app.sidebar-expanded:before,
  .app.sidebar-expanded .layout::before,
  .app.sidebar-expanded .layout:before,
  .app.sidebar-collapsed .layout::before,
  .app.sidebar-collapsed .layout:before {
    content: none !important;
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  .app .sidebar,
  .app.sidebar-expanded .sidebar,
  .app.sidebar-collapsed .sidebar,
  .app.sidebar-expanded .sidebar:hover,
  .app.sidebar-collapsed .sidebar:hover {
    position: fixed !important;
    left: 0 !important;
    top: var(--app-fixed-header-height, 70px) !important;
    bottom: 0 !important;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    padding: 14px 8px !important;
    transform: none !important;
    overflow: visible !important;
    z-index: 950 !important;
    box-shadow: none !important;
    transition: none !important;
  }
  .app .sidebar .sidebar-toggle,
  .app.sidebar-expanded .sidebar .sidebar-toggle,
  .app.sidebar-collapsed .sidebar .sidebar-toggle {
    display: none !important;
  }
  .app .sidebar .nav button,
  .app.sidebar-expanded .sidebar .nav button,
  .app.sidebar-collapsed .sidebar .nav button,
  .app.sidebar-expanded .sidebar:hover .nav button,
  .app.sidebar-collapsed .sidebar:hover .nav button {
    display: flex !important;
    position: relative !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 0 !important;
    padding: 10px 0 !important;
    margin: 2px 0 !important;
    transform: none !important;
    box-shadow: none !important;
    transition: background-color .12s ease, color .12s ease !important;
  }
  .app .sidebar .nav button .nav-label,
  .app.sidebar-expanded .sidebar .nav button .nav-label,
  .app.sidebar-collapsed .sidebar .nav button .nav-label,
  .app.sidebar-expanded .sidebar:hover .nav button .nav-label,
  .app.sidebar-collapsed .sidebar:hover .nav button .nav-label {
    display: none !important;
  }
  .app .sidebar .nav button::after {
    content: attr(title) !important;
    position: absolute !important;
    left: calc(100% + 9px) !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    white-space: nowrap !important;
    width: max-content !important;
    max-width: min(360px, calc(100vw - 100px)) !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 6px 12px !important;
    border-radius: 7px !important;
    background: #12343B !important;
    color: #fff !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(10,30,34,.2) !important;
    z-index: 2000 !important;
    transition: opacity .1s ease, visibility .1s ease !important;
  }
  .app .sidebar .nav button:hover::after,
  .app .sidebar .nav button:focus-visible::after {
    opacity: 1 !important;
    visibility: visible !important;
  }
  .app .content { grid-column: 2 !important; min-width: 0 !important; position: relative !important; z-index: auto !important; }
}


/* v1.3.8: hide the redundant topbar hamburger; the persistent sidebar remains the sole menu control. */
.app > .topbar > .mobile-menu-toggle {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.app > .topbar > .top-brand {
  margin-left: 0 !important;
}


/* v1.3.9 — remove the top gap above sticky modal headers. The header sits flush with the modal frame. */
.modal-bg.show > .modal,
.modal-bg.show .modal {
  padding-top: 0 !important;
}
.modal-bg.show > .modal > .modal-head,
.modal-bg.show .modal .modal-head {
  position: sticky !important;
  top: 0 !important;
  margin-top: 0 !important;
  margin-left: -22px !important;
  margin-right: -22px !important;
  padding: 16px 22px 12px !important;
  border-radius: 18px 18px 0 0 !important;
  border-top: 0 !important;
  background: var(--card, #fff) !important;
  z-index: 60 !important;
}
@media (max-width: 900px) {
  .modal-bg.show > .modal,
  .modal-bg.show .modal {
    padding-top: 0 !important;
  }
  .modal-bg.show > .modal > .modal-head,
  .modal-bg.show .modal .modal-head {
    margin-left: -15px !important;
    margin-right: -15px !important;
    padding: 12px 15px 10px !important;
    border-radius: 16px 16px 0 0 !important;
  }
}
@media (max-width: 650px) {
  .modal-bg.show > .modal,
  .modal-bg.show .modal {
    padding-top: 0 !important;
  }
  .modal-bg.show > .modal > .modal-head,
  .modal-bg.show .modal .modal-head {
    margin-left: -12px !important;
    margin-right: -12px !important;
    padding: 11px 12px 9px !important;
    border-radius: 15px 15px 0 0 !important;
  }
}


/* v1.3.10 — phone-only login sizing, greeting scale, and restored topbar menu. */
@media (max-width:650px) {
  .login { min-height:100svh; padding:16px; }
  .login-card { width:min(400px,100%); padding:24px 20px; border-radius:18px; }
  .login-brand { margin:0 0 22px; }
  .login-logo,.login-logo-fallback { width:68px; height:68px; margin-bottom:10px; }
  .login-logo-fallback { font-size:24px; border-radius:14px; }
  .login-brand h1 { font-size:clamp(16px,4.4vw,19px); line-height:1.22; overflow-wrap:anywhere; }
  .login-brand p { font-size:11px; line-height:1.35; }
  .app > .topbar > .mobile-menu-toggle {
    display:inline-flex!important; visibility:visible!important; pointer-events:auto!important;
    position:relative!important; z-index:2100!important; flex:0 0 36px!important;
    width:36px!important; height:36px!important; align-items:center!important;
    justify-content:center!important; opacity:1!important; margin:0!important;
    padding:0!important; font-size:21px!important; line-height:1!important;
  }
  .dashboard-greeting h2 { font-size:16px!important; line-height:1.2!important; }
  .dashboard-user-name { font-size:.94em!important; font-weight:700!important; }
}

/* v1.3.11 — phone-only input zoom guard and overflow containment. */
@media screen and (max-width:650px) {
  input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]):not([type=file]):not([type=image]):not([type=color]):not([type=range]):not([type=hidden]),
  select:not([hidden]):not([disabled]):not([aria-hidden="true"]):not([tabindex="-1"]),
  textarea:not([hidden]):not([disabled]):not([aria-hidden="true"]):not([tabindex="-1"]) {
    font-size:16px!important;
    line-height:1.35!important;
  }

  .app,
  .layout,
  .content,
  .page-head,
  .card,
  .field,
  .modal-bg,
  .modal,
  .app-notice-overlay,
  .app-notice-card {
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .app,
  .layout,
  .content,
  .modal-bg,
  .app-notice-overlay {
    max-width:100vw!important;
  }

  /* Keep wide data tables inside their own swipe area; Gantt has its own unchanged scroller. */
  .table-wrap,
  .sg-table-wrap,
  .sg-plan-table-wrap {
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    overflow-x:auto!important;
    overscroll-behavior-x:contain;
    -webkit-overflow-scrolling:touch;
  }

  .sg-library-readonly {
    width:max-content!important;
    min-width:1050px!important;
    max-width:none!important;
  }

  .modal-bg.show > .modal,
  .modal-bg.show .modal {
    width:calc(100vw - 20px)!important;
    max-width:calc(100vw - 20px)!important;
    min-width:0!important;
    box-sizing:border-box!important;
  }

  .modal-actions,
  .app-notice-actions {
    max-width:100%!important;
    flex-wrap:wrap!important;
  }

  .modal-actions > *,
  .app-notice-actions > * {
    min-width:0!important;
  }
}

/* v1.3.12 — keep focused fields and dialogs above the phone keyboard. */
@media screen and (max-width:650px) {
  body.mobile-keyboard-open .modal-bg.show {
    top:calc(var(--phone-visible-top,0px) + var(--app-fixed-header-height,62px))!important;
    right:0!important;
    bottom:auto!important;
    left:0!important;
    height:calc(var(--phone-visible-height,100dvh) - var(--app-fixed-header-height,62px))!important;
    max-height:none!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }

  body.mobile-keyboard-open .modal-bg.show > .modal,
  body.mobile-keyboard-open .modal-bg.show .modal {
    max-height:calc(100% - 16px)!important;
    min-height:0!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
    scroll-padding-block:12px 24px;
  }

  body.mobile-keyboard-open .app-notice-overlay {
    top:var(--phone-visible-top,0px)!important;
    right:0!important;
    bottom:auto!important;
    left:0!important;
    height:var(--phone-visible-height,100dvh)!important;
    max-height:var(--phone-visible-height,100dvh)!important;
    overflow-y:auto!important;
    align-items:flex-start!important;
    padding-top:max(12px,env(safe-area-inset-top))!important;
    overscroll-behavior:contain;
  }

  body.mobile-keyboard-open .app-notice-card {
    max-height:100%!important;
    overflow-y:auto!important;
    overscroll-behavior:contain;
  }
}

/* v1.3.13 — keep phone dialogs in their own scroll area while the keyboard is open. */
@media screen and (max-width:650px) {
  html.phone-modal-open,
  body.phone-modal-open {
    overflow:hidden!important;
  }

  body.phone-modal-open .modal-bg.show {
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }

  body.mobile-keyboard-open .modal-bg.show {
    overflow:hidden!important;
    background:rgba(10,30,34,.84)!important;
    overscroll-behavior:none!important;
  }

  body.mobile-keyboard-open .modal-bg.show > .modal,
  body.mobile-keyboard-open .modal-bg.show .modal {
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain!important;
  }

  body.mobile-keyboard-open .modal-actions {
    position:static!important;
    inset:auto!important;
    bottom:auto!important;
    z-index:auto!important;
    background:transparent!important;
    padding:0!important;
    border:0!important;
    box-shadow:none!important;
    margin-top:12px!important;
  }

  body.mobile-keyboard-open .app-notice-overlay {
    overflow:hidden!important;
    overscroll-behavior:none!important;
  }

  body.mobile-keyboard-open .app-notice-card {
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain!important;
  }
}

/* v1.3.14 — stabilize the phone form scroll and cover the native keyboard accessory backdrop. */
@media screen and (max-width:650px) {
  body.mobile-keyboard-open .modal-bg.show {
    height:calc(var(--phone-layout-height,100dvh) - var(--phone-visible-top,0px) - var(--app-fixed-header-height,62px))!important;
    max-height:none!important;
    overflow:hidden!important;
    background:#12343B!important;
    overscroll-behavior:none!important;
  }

  body.mobile-keyboard-open .modal-bg.show > .modal,
  body.mobile-keyboard-open .modal-bg.show .modal {
    max-height:calc(var(--phone-visible-height,100dvh) - var(--app-fixed-header-height,62px) - 16px)!important;
    scroll-behavior:auto!important;
  }

  body.mobile-keyboard-open .hotel-profile-modal {
    display:flex!important;
    flex-direction:column!important;
    height:calc(var(--phone-visible-height,100dvh) - var(--app-fixed-header-height,62px) - 16px)!important;
    max-height:calc(var(--phone-visible-height,100dvh) - var(--app-fixed-header-height,62px) - 16px)!important;
    overflow:hidden!important;
  }

  body.mobile-keyboard-open .hotel-profile-modal > .modal-head {
    position:static!important;
    flex:0 0 auto!important;
  }

  body.mobile-keyboard-open .hotel-profile-form-scroll {
    flex:1 1 0!important;
    min-height:0!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain!important;
    scroll-behavior:auto!important;
    scroll-padding-block:12px!important;
    padding-bottom:max(12px,env(safe-area-inset-bottom))!important;
  }
}

/* v1.3.17 — phone-only two-row header keeps the full hotel name visible. */
@media screen and (max-width:650px) {
  :root { --app-fixed-header-height:92px!important; }
  html,body { scroll-padding-top:92px!important; }
  .app { padding-top:92px!important; }
  .app>.topbar {
    display:grid!important;
    grid-template-columns:36px 42px 20px minmax(0,1fr) auto!important;
    grid-template-rows:42px 30px!important;
    column-gap:7px!important;
    row-gap:3px!important;
    height:auto!important;
    min-height:92px!important;
    padding:8px 10px!important;
    align-items:center!important;
    justify-content:initial!important;
  }
  .app>.topbar>.mobile-menu-toggle {
    grid-column:1!important;
    grid-row:1!important;
  }
  .app>.topbar>.top-brand {
    display:contents!important;
    min-width:0!important;
    max-width:none!important;
    overflow:visible!important;
  }
  .app>.topbar>.top-brand>img,
  .app>.topbar>.top-brand>.mini {
    grid-column:2!important;
    grid-row:1!important;
    width:42px!important;
    height:42px!important;
  }
  .app>.topbar .top-brand-link {
    grid-column:1/-1!important;
    grid-row:2!important;
    display:block!important;
    width:100%!important;
    min-width:0!important;
    max-width:none!important;
    min-height:30px!important;
    padding:0!important;
    overflow:visible!important;
    text-align:center!important;
    text-overflow:clip!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    font-size:clamp(11px,3.4vw,13px)!important;
    line-height:1.2!important;
  }
  .app>.topbar .hotel-info-link {
    grid-column:3!important;
    grid-row:1!important;
    width:20px!important;
    height:20px!important;
    flex:0 0 20px!important;
  }
  .app>.topbar>.top-actions {
    grid-column:5!important;
    grid-row:1!important;
    min-width:0!important;
    gap:4px!important;
  }
  .app>.layout { min-height:calc(100dvh - 92px)!important; }
  .app.sidebar-expanded .mobile-nav { top:98px!important; }
  .app.sidebar-expanded:before { top:92px!important; }
}
/* v1.3.18 — keep the phone hotel name on one line and size it to available width. */
@media screen and (max-width:650px) {
  .app>.topbar .top-brand-link {
    display:block!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    overflow-wrap:normal!important;
    text-overflow:clip!important;
    line-height:30px!important;
  }
}
/* v1.3.19 — keep the phone hotel name between the logo and information icon. */
@media screen and (max-width:650px) {
  :root { --app-fixed-header-height:62px!important; }
  html,body { scroll-padding-top:62px!important; }
  .app { padding-top:62px!important; }
  .app>.topbar {
    display:flex!important;
    grid-template-columns:none!important;
    grid-template-rows:none!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:4px!important;
    height:62px!important;
    min-height:62px!important;
    padding:7px 8px!important;
  }
  .app>.topbar>.mobile-menu-toggle {
    grid-column:auto!important;
    grid-row:auto!important;
    order:0!important;
    flex:0 0 34px!important;
    width:34px!important;
    height:36px!important;
  }
  .app>.topbar>.top-brand {
    display:flex!important;
    grid-column:auto!important;
    grid-row:auto!important;
    order:1!important;
    flex:1 1 0%!important;
    min-width:0!important;
    max-width:none!important;
    gap:4px!important;
    overflow:visible!important;
  }
  .app>.topbar>.top-brand>img,
  .app>.topbar>.top-brand>.mini {
    grid-column:auto!important;
    grid-row:auto!important;
    flex:0 0 36px!important;
    width:36px!important;
    height:36px!important;
  }
  .app>.topbar .top-brand-link {
    grid-column:auto!important;
    grid-row:auto!important;
    display:block!important;
    flex:1 1 0%!important;
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    height:36px!important;
    min-height:36px!important;
    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
    text-align:left!important;
    text-overflow:clip!important;
    white-space:nowrap!important;
    overflow-wrap:normal!important;
    font-size:clamp(10px,3.4vw,13px)!important;
    line-height:36px!important;
  }
  .app>.topbar .hotel-info-link {
    grid-column:auto!important;
    grid-row:auto!important;
    order:0!important;
    align-self:center!important;
    flex:0 0 20px!important;
    width:20px!important;
    height:20px!important;
  }
  .app>.topbar>.top-actions {
    grid-column:auto!important;
    grid-row:auto!important;
    order:2!important;
    flex:0 0 auto!important;
    min-width:0!important;
    gap:3px!important;
    margin-left:0!important;
  }
  .app>.topbar>.top-actions .notification-bell {
    flex:0 0 32px!important;
    width:32px!important;
    height:32px!important;
  }
  .app>.topbar>.top-actions>.btn {
    padding:6px 7px!important;
    font-size:10px!important;
  }
  .app>.layout { min-height:calc(100dvh - 62px)!important; }
  .app.sidebar-expanded .mobile-nav { top:68px!important; }
  .app.sidebar-expanded:before { top:62px!important; }
}
@media screen and (max-width:360px) {
  .app>.topbar { padding-right:6px!important; padding-left:6px!important; gap:3px!important; }
  .app>.topbar>.mobile-menu-toggle { flex-basis:32px!important; width:32px!important; }
  .app>.topbar>.top-brand { gap:3px!important; }
  .app>.topbar>.top-brand>img,
  .app>.topbar>.top-brand>.mini { flex-basis:32px!important; width:32px!important; height:32px!important; }
  .app>.topbar .hotel-info-link { flex-basis:18px!important; width:18px!important; height:18px!important; }
  .app>.topbar>.top-actions .notification-bell { flex-basis:30px!important; width:30px!important; height:30px!important; }
  .app>.topbar>.top-actions>.btn { padding:5px 6px!important; font-size:9px!important; }
}

/* v1.3.23 — filter alignment and catalogue ordering controls */
.filters { align-items:stretch; }
.filters > input, .filters > select { height:48px; min-height:48px; box-sizing:border-box; }
.filters > input { min-width:0; }
.report-filters {
  display:grid;
  grid-template-columns:minmax(250px,1.55fr) minmax(190px,1.2fr) repeat(2,minmax(150px,1fr)) repeat(2,minmax(145px,.82fr)) auto;
  align-items:end;
  gap:10px;
}
.report-filters > input,
.report-filters > select,
.report-filters .multi-select-wrap,
.report-filters .multi-select-btn,
.report-filters .report-date-field,
.report-filters .report-date-field input,
.report-filters .report-apply-btn { min-width:0; width:100%; box-sizing:border-box; }
.report-filters > input,
.report-filters > select,
.report-filters .multi-select-btn,
.report-filters .report-date-field input { height:48px; min-height:48px; }
.report-filters .report-date-field { min-width:0; flex:initial; }
.report-filters .report-date-field .date-control { height:48px; }
.report-filters .report-apply-btn { height:48px; min-height:48px; align-self:end; }
.filters .multi-select-btn { min-height:48px; }
.catalog-sort-tools { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.catalog-sort-tools .btn { padding:5px 9px; font-size:11px; }
.admin-dept-sort { display:flex; justify-content:flex-end; margin:4px 0 8px; }
.sg-manage-card-head { gap:10px; }
@media (max-width:1250px) {
  .report-filters { grid-template-columns:repeat(4,minmax(150px,1fr)); }
  .report-filters > input { grid-column:span 2; }
  .report-filters .report-apply-btn { width:100%; }
}
@media (max-width:850px) {
  .report-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .report-filters > input,
  .report-filters .multi-select-wrap { grid-column:1 / -1; }
  .report-filters .report-date-field { min-width:0; }
}
@media (max-width:520px) {
  .report-filters { grid-template-columns:minmax(0,1fr); }
  .report-filters > input,
  .report-filters .multi-select-wrap { grid-column:auto; }
}

@media (min-width:851px) {
  .card.filters:has(#taskSearch) { display:grid; grid-template-columns:minmax(260px,1.6fr) repeat(3,minmax(170px,1fr)); align-items:center; }
  .card.filters:has(#taskSearch) > input,
  .card.filters:has(#taskSearch) > select { width:100%; min-width:0; height:48px; min-height:48px; }
}
@media (max-width:850px) {
  .card.filters:has(#taskSearch) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .card.filters:has(#taskSearch) > input { grid-column:1 / -1; }
  .card.filters:has(#taskSearch) > input,
  .card.filters:has(#taskSearch) > select { width:100%; min-width:0; height:48px; min-height:48px; }
}

/* v1.3.24 — manual catalogue ordering controls */
.sg-manage-actions { display:flex; align-items:center; gap:4px; flex-wrap:nowrap; }
.sg-manage-actions .icon-btn:disabled { opacity:.28; cursor:not-allowed; }
.admin-row .sg-manage-actions { flex:0 0 auto; }

/* v1.3.30 admin settings card layout */
.admin-settings-launchers{grid-template-columns:repeat(2,minmax(0,1fr))!important}
.admin-settings-launchers>.card{min-width:0}
@media(max-width:1100px){.admin-settings-launchers{grid-template-columns:minmax(0,1fr)!important}}

/* v1.3.31: compact generator catalog statistics */
.sg-manage-hero-stat{width:154px;min-width:154px;max-width:154px;padding:10px 12px;column-gap:6px;row-gap:1px}
.sg-manage-hero-stat strong{font-size:18px}
.sg-manage-hero-stat span{font-size:10px}
@media(max-width:850px){.sg-manage-hero-stat{width:100%;min-width:0;max-width:260px}}

/* v1.3.32: compact and responsive generator catalog statistics */
.sg-manage-hero-stat{width:138px;min-width:138px;max-width:138px;padding:9px 10px;column-gap:5px;row-gap:1px}
.sg-manage-hero-stat strong,.sg-manage-hero-stat span{font-size:14px}
@media(max-width:1100px){.sg-manage-hero-stat{width:clamp(132px,22vw,160px);min-width:0;max-width:100%;padding:8px 9px}}
@media(max-width:600px){.sg-manage-hero{align-items:stretch;flex-direction:column;gap:12px}.sg-manage-hero-stat{width:100%;max-width:none;grid-template-columns:auto 1fr auto 1fr auto 1fr;justify-content:space-between;align-items:center;column-gap:6px;padding:8px 10px}.sg-manage-hero-stat strong{text-align:left;font-size:14px}.sg-manage-hero-stat span{font-size:14px;white-space:normal}}
