
:root{
  --lg-teal:#0f766e;--lg-teal-2:#0d9488;--lg-soft:#ecfdf5;
  --lg-text:#0f172a;--lg-muted:#64748b;--lg-border:#e2e8f0;
  --lg-bg:#f8fafc;--lg-panel:#fff;--lg-danger:#b42318;--lg-warn:#b54708;
}
html.dark{
  --lg-text:#f1f5f9;--lg-muted:#94a3b8;--lg-border:#1e293b;
  --lg-bg:#020617;--lg-panel:#0f172a;--lg-soft:rgba(13,148,136,.13);
}
#legener-tasks-slot{width:100%;min-width:0}
#legener-tasks-module{width:100%;min-width:0;color:var(--lg-text)}
#legener-tasks-module *{box-sizing:border-box}
.lg-tasks-shell{width:100%;min-width:0;padding-bottom:1rem}
.lg-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:14px}
.lg-title h1{font-size:1.25rem;line-height:1.6;font-weight:700;margin:0}
.lg-title p{font-size:.75rem;color:var(--lg-muted);margin:.2rem 0 0}
.lg-actions-top{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.lg-sync{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--lg-muted);white-space:nowrap}
.lg-dot{width:7px;height:7px;border-radius:999px;background:#94a3b8;flex:none}.lg-dot.on{background:#10b981}.lg-dot.err{background:#f04438}
.lg-btn{border:1px solid var(--lg-border);background:var(--lg-panel);color:var(--lg-text);border-radius:11px;padding:8px 11px;font-size:12px;font-weight:650;line-height:1.2}
.lg-btn:hover{filter:brightness(.985)}
.lg-primary{border-color:var(--lg-teal);background:var(--lg-teal);color:#fff}
.lg-danger{color:var(--lg-danger)}
.lg-ghost-small{padding:6px 8px;font-size:11px}
.lg-modes{display:flex;gap:7px;margin-bottom:11px}
.lg-mode{flex:1;border:1px solid var(--lg-border);background:var(--lg-panel);color:var(--lg-muted);padding:9px;border-radius:11px;font-size:12px;font-weight:700}
.lg-mode.active{background:var(--lg-teal);border-color:var(--lg-teal);color:#fff}
.lg-search-row{display:flex;gap:8px;margin-bottom:12px}
.lg-input,.lg-select,.lg-textarea{width:100%;min-width:0;border:1px solid var(--lg-border);background:var(--lg-panel);color:var(--lg-text);border-radius:11px;padding:10px 11px;font-size:13px;outline:none}
.lg-input:focus,.lg-select:focus,.lg-textarea:focus{border-color:#5eead4;box-shadow:0 0 0 3px rgba(13,148,136,.09)}
.lg-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:11px}
.lg-stat{border:1px solid var(--lg-border);background:var(--lg-panel);border-radius:13px;padding:11px;min-width:0}
.lg-stat span{font-size:10px;color:var(--lg-muted)}.lg-stat b{display:block;font-size:19px;margin-top:2px}
.lg-tabs{display:flex;gap:6px;overflow-x:auto;padding:1px 0 8px;scrollbar-width:none}.lg-tabs::-webkit-scrollbar{display:none}
.lg-tab{border:1px solid var(--lg-border);background:var(--lg-panel);color:var(--lg-muted);border-radius:999px;padding:7px 10px;white-space:nowrap;font-size:11px;font-weight:650}
.lg-tab.active{background:var(--lg-soft);border-color:#99f6e4;color:var(--lg-teal)}
.lg-viewhead{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:7px 0 8px}
.lg-viewhead h2{font-size:14px;font-weight:700;margin:0}
.lg-list{display:grid;gap:8px}
.lg-task{background:var(--lg-panel);border:1px solid var(--lg-border);border-radius:13px;padding:11px;display:grid;grid-template-columns:auto 1fr auto;gap:10px;align-items:start}
.lg-task.done{opacity:.6}
.lg-check{width:19px;height:19px;accent-color:var(--lg-teal);margin-top:2px}
.lg-subject{border:0;background:transparent;padding:0;color:var(--lg-text);font-weight:700;text-align:left;font-size:13px;cursor:pointer}
.lg-desc{font-size:11px;color:var(--lg-muted);margin-top:3px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.lg-pills{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}
.lg-pill{font-size:9.5px;padding:3px 6px;border-radius:999px;background:rgba(148,163,184,.13);color:var(--lg-muted)}
.lg-pill.work{background:var(--lg-soft);color:var(--lg-teal)}
.lg-pill.overdue{background:#fff1f2;color:#be123c}
html.dark .lg-pill.overdue{background:rgba(190,18,60,.12);color:#fda4af}
.lg-when{font-size:10.5px;color:var(--lg-muted);text-align:right;white-space:nowrap}
.lg-empty{border:1px dashed var(--lg-border);background:var(--lg-panel);border-radius:13px;padding:22px;text-align:center;font-size:12px;color:var(--lg-muted)}
.lg-notes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.lg-note{background:var(--lg-panel);border:1px solid var(--lg-border);border-radius:13px;padding:11px;min-width:0}
.lg-note h3{font-size:13px;margin:0 0 5px}.lg-note p{font-size:12px;color:var(--lg-muted);white-space:pre-wrap;margin:0;overflow-wrap:anywhere}
.lg-note-foot{display:flex;justify-content:space-between;align-items:center;gap:7px;margin-top:9px;font-size:10px;color:var(--lg-muted)}
.lg-note-actions{display:flex;gap:5px}
.lg-banner{display:none;border:1px solid #fedf89;background:#fffaeb;color:#7a2e0e;border-radius:12px;padding:9px 10px;font-size:11px;margin-bottom:10px}
.lg-banner.show{display:flex;align-items:center;justify-content:space-between;gap:8px}
html.dark .lg-banner{background:rgba(181,71,8,.12);border-color:rgba(253,176,34,.25);color:#fec84b}
.lg-modal{display:none;position:fixed;z-index:90;inset:0;background:rgba(2,6,23,.46);align-items:flex-end;justify-content:center;padding:12px}
.lg-modal.open{display:flex}
.lg-sheet{width:min(100%,650px);max-height:92vh;overflow:auto;background:var(--lg-panel);color:var(--lg-text);border-radius:21px;padding:16px;box-shadow:0 18px 60px rgba(2,6,23,.26)}
.lg-sheet-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:13px}
.lg-sheet-head h2{font-size:16px;font-weight:700;margin:0}.lg-close{border:0;background:rgba(148,163,184,.13);color:var(--lg-text);border-radius:9px;width:33px;height:33px}
.lg-form{display:grid;grid-template-columns:1fr 1fr;gap:10px}.lg-full{grid-column:1/-1}
.lg-form label{display:block;font-size:10.5px;color:var(--lg-muted);margin-bottom:5px}
.lg-textarea{min-height:92px;resize:vertical}
.lg-modal-actions{display:flex;gap:7px;justify-content:flex-end;flex-wrap:wrap;margin-top:13px}
.lg-detail-row{display:grid;grid-template-columns:105px 1fr;gap:10px;padding:8px 0;border-bottom:1px solid var(--lg-border);font-size:12px}
.lg-detail-row span:first-child{color:var(--lg-muted)}
.lg-sync-card{border:1px solid var(--lg-border);background:var(--lg-bg);border-radius:13px;padding:11px}
.lg-sync-card p{font-size:11px;color:var(--lg-muted);margin:5px 0 9px}
.lg-sync-meta{font-size:10.5px;color:var(--lg-muted);margin-top:8px;line-height:1.5}
.lg-backup-row{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:10px}
.lg-hidden-file{display:none}
@media(max-width:640px){
  .lg-head{align-items:center}.lg-title p{display:none}
  .lg-actions-top .lg-sync{width:100%;justify-content:flex-end;order:-1}
  .lg-actions-top .lg-btn:not(.lg-primary){display:none}
  .lg-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .lg-notes{grid-template-columns:1fr}
  .lg-task{grid-template-columns:auto 1fr}.lg-when{grid-column:2;text-align:left}
  .lg-form{grid-template-columns:1fr}.lg-full{grid-column:1}
  .lg-detail-row{grid-template-columns:92px 1fr}
}
@media(max-width:390px){
  .lg-title h1{font-size:1.1rem}
  .lg-actions-top{gap:5px}.lg-primary{padding:8px 9px}
}
