﻿:root{
      --bg:#f4f7ff;
      --panel:#ffffff;
      --panel2:#f7f9ff;
      --text:#1f2a44;
      --muted:#5f6f8c;
      --border:#c7d3ea;
      --accent:#6ea8fe;
      --danger:#ff5c7a;
      --warn:#ffcc66;
      --ok:#45e69a;
      --violet:#b783ff;
      --shadow: 0 10px 24px rgba(54,78,127,.14);
      --radius: 18px;
      --radius2: 14px;
      --max: 980px;
    }
    *{box-sizing:border-box}
    body{
      margin:0;
      font-family: "Manrope", "Segoe UI", "Noto Sans", sans-serif;
      background: radial-gradient(1100px 900px at 20% 0%, rgba(110,168,254,.18), transparent 55%),
                  radial-gradient(900px 700px at 90% 10%, rgba(183,131,255,.13), transparent 55%),
                  var(--bg);
      color: var(--text);
      min-height: 100vh;
      -webkit-tap-highlight-color: transparent;
    }
    .app{
      max-width: var(--max);
      margin: 0 auto;
      padding-bottom: calc(84px + env(safe-area-inset-bottom));
    }
    .topbar{
      position: sticky;
      top:0;
      z-index: 20;
      backdrop-filter: blur(10px);
      background: linear-gradient(to bottom, rgba(244,247,255,.94), rgba(244,247,255,.80));
      border-bottom: 1px solid rgba(150,170,205,.45);
    }
    .topbar-inner{
      display:flex;align-items:center;justify-content: space-between;gap:10px;
      padding: 14px 14px;
      padding-top: calc(10px + env(safe-area-inset-top));
    }
    .brand{display:flex;align-items:center;gap:10px;}
    .top-actions{display:flex;align-items:center;gap:8px;}
    .logo{
      width:40px;height:40px;border-radius: 14px;
      background: linear-gradient(140deg, rgba(110,168,254,.95), rgba(183,131,255,.85));
      box-shadow: var(--shadow);
      display:grid;place-items:center;
      font-weight:900;color:#06101f;letter-spacing:.5px;
    }
    .titleblock{line-height:1.05}
    .titleblock .h{font-size: 14px;font-weight:900;}
    .titleblock .s{font-size: 12px;color: var(--muted);margin-top: 3px;}
    .iconbtn{
      height:42px; min-width:42px;border-radius: 14px;
      background: rgba(255,255,255,.90);
      border: 1px solid rgba(150,170,205,.55);
      display:flex;align-items:center;justify-content:center;
      color: var(--text);cursor:pointer;
    }
    .iconbtn:active{transform: scale(.98)}
    .pill{
      display:inline-flex;align-items:center;gap:8px;
      padding: 8px 10px;border-radius: 999px;
      background: rgba(255,255,255,.82);
      border: 1px solid rgba(150,170,205,.55);
      color: var(--muted);font-size: 12px;white-space: nowrap;
    }
    .badge{
      display:inline-flex;align-items:center;gap:6px;
      padding: 6px 10px;border-radius: 999px;
      font-size: 12px;border: 1px solid rgba(150,170,205,.55);
      background: rgba(255,255,255,.82);color: var(--muted);
    }
    .dept-badge{
      display:inline-flex;align-items:center;justify-content:center;
      min-width: 30px;height: 22px;padding: 0 8px;border-radius: 999px;
      border:1px solid rgba(110,168,254,.45);
      background: rgba(110,168,254,.14);
      color:#2d5fbd;font-weight:900;font-size:12px;
    }
    .b-danger{border-color: rgba(255,92,122,.35); color: #ffb3c0; background: rgba(255,92,122,.12);}
    .b-warn{border-color: rgba(255,204,102,.35); color: #ffe0a3; background: rgba(255,204,102,.12);}
    .b-ok{border-color: rgba(69,230,154,.35); color: #b8ffdf; background: rgba(69,230,154,.12);}
    .b-violet{border-color: rgba(183,131,255,.38); color: #e3d2ff; background: rgba(183,131,255,.12);}
    .b-blue{border-color: rgba(110,168,254,.35); color: #2d5fbd; background: rgba(110,168,254,.12);}

    .content{padding: 14px;}
    .card{
      background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(250,252,255,.92));
      border: 1px solid rgba(150,170,205,.55);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      overflow: hidden;
    }
    .card + .card{ margin-top: 12px; }
    .card-h{
      padding: 14px;display:flex;align-items:center;justify-content: space-between;gap: 10px;
      border-bottom: 1px solid rgba(150,170,205,.40);
      background: rgba(236,242,255,.58);
    }
    .card-h .t{font-weight:900;font-size: 14px;}
    .card-b{ padding: 14px; }

    .statlist{display:flex;flex-direction:column;gap:10px;}
    .stat{
      display:flex;align-items:center;justify-content: space-between;gap:12px;
      padding: 12px;border-radius: var(--radius2);
      background: rgba(255,255,255,.72);
      border: 1px solid rgba(150,170,205,.45);
      cursor:pointer;
    }
    .stat:active{transform: scale(.99)}
    .stat .l{display:flex;flex-direction: column;gap:3px;}
    .stat .l .k{font-weight:900;font-size: 14px;display:flex;align-items:center;gap:8px;}
    .stat .l .d{font-size:12px;color:var(--muted)}
    .stat .r{display:flex;align-items:center;gap:10px;font-weight:1000;}

    .chips{display:flex;gap:10px;overflow:auto;padding-bottom: 4px;-webkit-overflow-scrolling: touch;}
    .chip{
      flex:0 0 auto;height: 36px;padding: 0 12px;border-radius: 999px;
      border:1px solid rgba(150,170,205,.55);
      background: rgba(255,255,255,.82);
      color: var(--muted);
      display:flex;align-items:center;gap:8px;
      cursor:pointer;font-size: 12px;user-select:none;
      transition: all .18s ease;
    }
    .chip.active{background: rgba(110,168,254,.16);border-color: rgba(110,168,254,.45);color: #2d5fbd;}
    .chips.task-chips{
      padding:6px;
      border-radius: 16px;
      border:1px solid rgba(150,170,205,.45);
      background: rgba(235,242,255,.55);
      gap:6px;
    }
    .chips.task-chips .chip{
      height: 32px;
      padding: 0 10px;
      font-size: 11px;
      background: rgba(255,255,255,.75);
      border-color: rgba(150,170,205,.4);
    }
    .chips.task-chips .chip.active{
      background: linear-gradient(180deg, rgba(110,168,254,.25), rgba(110,168,254,.12));
      border-color: rgba(110,168,254,.55);
      color:#2d5fbd;
      box-shadow: 0 6px 12px rgba(45,95,189,.15);
    }
    .chip-ico{display:none;font-size:14px;line-height:1;}
    .chip-text{display:inline;}
    .task-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom: 5px;}
    .search-inline{margin-top:0;}
    .search-inline label{display:none;}
    body.scope-all .task-meta .token-dept{display:none;}
    body.scope-all .task-meta .token-user{display:none;}
    body.scope-all .task-item.has-due .task-meta .token-ctrl{display:none;}
    body.scope-dept .task-meta .token-dept{display:none;}
    body.scope-dept .task-meta .token-user{display:none;}
    .control-lines{display:flex;flex-direction:column;gap:2px;}
    .control-counts{display:flex;gap:6px;flex-wrap:nowrap;}
    .control-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
    .control-block{display:flex;flex-direction:column;gap:10px;}
    .control-dept-grid{display:grid;gap:12px;}
    .control-dept-card{
      padding: 12px;
      border-radius: var(--radius2);
      background: rgba(255,255,255,.72);
      border: 1px solid rgba(150,170,205,.45);
    }
    .control-dept-head{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:8px;
    }
    .control-dept-name{font-weight:900;display:flex;align-items:center;gap:8px;}
    .control-dept-counts{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
    .control-dept-body{
      margin-top:10px;
      display:grid;
      grid-template-columns: repeat(3, minmax(0,1fr));
      gap:8px;
    }
    .control-dept-section{
      padding: 8px;
      border-radius: 12px;
      background: rgba(255,255,255,.78);
      border:1px solid rgba(150,170,205,.35);
      min-height: 80px;
    }
    .control-dept-section-h{
      font-size:11px;
      font-weight:900;
      color: var(--muted);
      display:flex;
      justify-content:space-between;
      margin-bottom:6px;
    }
    .control-dept-section-b{
      font-size:12px;
      line-height:1.35;
      color: var(--text);
    }
    .chips.dept-chips{overflow:visible;flex-wrap:wrap;}
    .disabled{opacity:.6;}

    .list{display:flex;flex-direction:column;gap:10px;margin-top: 12px;}
    .dept-group{display:flex;flex-direction:column;gap:8px;}
    .dept-disclosure summary{
      list-style:none;
      cursor:pointer;
      text-align:center;
      font-weight:900;
      text-transform:uppercase;
      letter-spacing:.6px;
      color: var(--text);
      display:flex;
      flex-direction:column;
      align-items:center;
      justify-content:center;
      gap:6px;
    }
    .dept-disclosure summary::-webkit-details-marker{display:none;}
    .dept-disclosure > *:not(summary){margin-top:8px;}
    .dept-counts{display:flex;flex-wrap:wrap;gap:6px;justify-content:center;}
    .dept-count{
      display:inline-flex;
      align-items:center;
      gap:4px;
      padding: 3px 8px;
      border-radius: 999px;
      font-size: 11px;
      font-weight: 900;
      border:1px solid rgba(150,170,205,.45);
      background: rgba(255,255,255,.84);
      color: var(--muted);
      white-space: nowrap;
    }
    .dept-count.zero{opacity:.45;}
    .dept-list{display:flex;flex-direction:column;gap:10px;}
    .item{
      padding: 12px;border-radius: var(--radius2);
      background: rgba(255,255,255,.72);
      /* border: 1px solid rgba(150,170,205,.45); */
      cursor:pointer;
    }
    .task-item{
      position:relative;
      padding:12px 14px 12px 18px;
      border:1px solid rgba(150,170,205,.45);
      background: rgba(255,255,255,.86);
      box-shadow: 0 10px 22px rgba(25,35,60,.08);
    }
    .task-item::after{
      content:"";
      position:absolute;
      left:0; top:0; bottom:0;
      width:4px;
      border-radius: var(--radius2) 0 0 var(--radius2);
      background:#2d5fbd;
    }
    .task-item[data-type="internal"]::after{background:#4b5f82;}
    .task-item[data-type="personal"]::after{background:#7151a8;}
    .task-item.has-due::after{background:#2f9a5d;}
    .task-item.ctrl-date::after{background:#6ea8fe;}
    .task-item.ctrl-always::after{background:#8b6fe0;}
    .task-item.is-overdue::after{background:#ff5c7a;}
    .task-item.has-due{border-color: transparent;}
    .task-item.ctrl-date{border-color: rgba(110,168,254,.45);}
    .task-item.ctrl-always{border-color: transparent;}
    .task-item.has-due .task-line .name{color:#2f9a5d;}
    .item:active{transform: scale(.99)}
    .item .row{display:flex;align-items:flex-start;justify-content: space-between;gap:10px;}
    .item .row .name{font-weight:900;font-size:14px;line-height:1.2;}
    .item .sub{
      color: var(--muted);
      font-size:12px;margin-top: 6px;
      display:flex;flex-wrap: wrap;gap:8px;align-items:center;
    }

    .actions{margin-top: 10px;display:flex;flex-wrap: wrap;gap:8px;}
    .btn{
      height: 40px;padding: 0 12px;border-radius: 12px;
      border:1px solid rgba(150,170,205,.55);
      background: rgba(255,255,255,.82);
      color: var(--text);
      font-weight: 900;font-size: 13px;
      cursor:pointer;
      display:inline-flex;align-items:center;justify-content:center;gap:8px;
      user-select:none;
    }
    .btn:active{transform: scale(.99)}
    .btn.primary{background: rgba(110,168,254,.18);border-color: rgba(110,168,254,.5);}
    .btn.danger{background: rgba(255,92,122,.14);border-color: rgba(255,92,122,.45);}
    .btn.warn{background: rgba(255,204,102,.14);border-color: rgba(255,204,102,.45);}
    .btn.ok{background: rgba(69,230,154,.14);border-color: rgba(69,230,154,.45);}
    .btn.violet{background: rgba(183,131,255,.14);border-color: rgba(183,131,255,.5);}
    .btn.ghost{background: transparent;border-color: rgba(150,170,205,.45);color: var(--muted);}

    .fab{
      position: fixed;right: 16px;
      bottom: calc(86px + env(safe-area-inset-bottom));
      z-index: 30;width: 56px;height: 56px;border-radius: 18px;
      border: 1px solid rgba(110,168,254,.55);
      background: linear-gradient(160deg, rgba(110,168,254,.25), rgba(183,131,255,.18));
      box-shadow: var(--shadow);
      color: #2d5fbd;font-weight: 1000;font-size: 22px;
      cursor: pointer;display:grid; place-items:center;
    }
    .fab:active{transform: scale(.98)}

    .nav{
      position: fixed;left:0; right:0; bottom:0;z-index: 40;
      background: rgba(246,249,255,.92);
      backdrop-filter: blur(10px);
      border-top: 1px solid rgba(150,170,205,.50);
      padding-bottom: env(safe-area-inset-bottom);
    }
    .nav-inner{max-width: var(--max);margin: 0 auto;display:grid;gap:8px;padding: 10px 12px;}
    .tabs{display:grid;grid-template-columns: repeat(4, 1fr);gap: 10px;}
    .tabs.three{ grid-template-columns: repeat(3, 1fr); }
    .tab{
      height: 54px;border-radius: 16px;
      border: 1px solid rgba(150,170,205,.55);
      background: rgba(255,255,255,.72);
      display:flex;flex-direction: column;align-items:center;justify-content:center;gap:4px;
      cursor:pointer;user-select:none;color: var(--muted);font-size: 11px;font-weight: 900;
      position: relative;
    }
    .tab.active{background: rgba(110,168,254,.16);border-color: rgba(110,168,254,.5);color: #2d5fbd;}
    .tab .ico{font-size: 19px; line-height: 1;}
    @media (hover:hover) and (pointer:fine){
      .tab:hover::after{
        content: attr(data-label);
        position:absolute;
        bottom: calc(100% + 8px);
        left: 50%;
        transform: translateX(-50%);
        background: rgba(31,42,68,.92);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        padding: 5px 8px;
        border-radius: 8px;
        white-space: nowrap;
        pointer-events:none;
        z-index: 80;
      }
    }

    .modal{
      position: fixed;inset:0;background: rgba(0,0,0,.55);
      display:none;align-items:center;justify-content:center;z-index: 60;
    }
    .modal.show{display:flex;}
    .sheet{
      width: min(var(--max), calc(100% - 20px));
      background: linear-gradient(180deg, rgba(250,252,255,.98), rgba(242,246,255,.98));
      border: 1px solid rgba(150,170,205,.55);
      border-radius: 22px;
      box-shadow: var(--shadow);
      padding: 14px;max-height: 86vh;overflow:auto;
    }
    @media (max-width: 768px){
      .modal{align-items:flex-end;}
      .sheet{
        width: min(var(--max), 100%);
        border-radius: 22px 22px 0 0;
      }
    }
    .sheet-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom: 10px;}
    .sheet-h .t{font-weight: 950;}
    .banner{
      margin: 12px 14px 0;
      border-radius: 16px;
      border: 1px solid rgba(110,168,254,.45);
      background: rgba(110,168,254,.14);
      color:#2d5fbd;
      padding: 10px 12px;
      display:flex; align-items:center; justify-content:space-between; gap:10px;
      font-size: 12px;font-weight: 900;
    }
    .field{display:flex; flex-direction:column;gap:8px;}
    label{font-size: 12px; color: var(--muted); font-weight: 900;}
    input, select, textarea{
      width:100%;
      background: rgba(255,255,255,.82);
      border: 1px solid rgba(150,170,205,.55);
      color: var(--text);
      border-radius: 14px;
      padding: 12px 12px;
      outline: none;
      font-size: 14px;
    }
    textarea{min-height: 96px; resize: vertical;}
    .row2{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
    .hint{font-size:12px;color:var(--muted);margin-top:8px;line-height:1.4}
    .sep{height:1px;background:rgba(150,170,205,.50);margin:12px 0}
    .mono{font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;}
    ul{margin:8px 0 0 18px; padding:0}
    li{margin:4px 0}
    .task-disclosure summary{
      list-style:none;
      cursor:pointer;
      font-weight:900;
      color:var(--text);
      display:flex;
      align-items:center;
      gap:8px;
    }
    .task-disclosure summary::-webkit-details-marker{display:none;}
    .task-disclosure summary::before{
      content:"";
      display:none;
    }
    .task-disclosure{display:block;}
    .task-disclosure > *:not(summary){margin-top:8px;}
    .task-meta{
      margin-top:0;
      display:flex;
      flex-wrap:wrap;
      gap:6px;
      align-items:center;
    }
    .task-line{
      display:flex;
      align-items:center;
      justify-content:space-between;
      gap:8px;
      flex-wrap:wrap;
    }
    .task-title{
      display:flex;
      flex-direction:column;
      align-items:flex-start;
      gap:4px;
      min-width:0;
      flex:1;
    }
    .task-note{
      font-size:12px;
      color: #d04a4a;
      margin-top:6px;
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    @keyframes overduePulse{
      0%,100%{opacity:.2;}
      50%{opacity:.8;}
    }
    @keyframes overdueGlow{
      0%,100%{box-shadow: 0 0 0 rgba(255,92,122,.0);}
      50%{box-shadow: 0 0 14px rgba(255,92,122,.28);}
    }
    .task-item.is-overdue{
      position: relative;
      animation: overdueGlow 1.6s ease-in-out infinite;
    }
    .task-item.is-overdue::before{
      content:"";
      position:absolute;
      inset:0;
      border-radius: var(--radius2);
      background: linear-gradient(90deg, rgba(255,92,122,.18), rgba(255,92,122,.06));
      opacity:.2;
      animation: overduePulse 1.6s ease-in-out infinite;
      pointer-events:none;
    }
    .control-task{display:inline;}
    .control-task.overdue-line{
      animation: overduePulse 1.6s ease-in-out infinite;
    }
    .task-num{color:var(--muted);}
    .task-title-type-managerial{color:#2d5fbd;}
    .task-title-type-internal{color:#4b5f82;}
    .task-title-type-personal{color:#7151a8;}
    .task-title-due{color:#2f9a5d;}
    .task-token{
      display:inline-flex;
      align-items:center;
      gap:4px;
      padding: 3px 7px;
      border-radius: 999px;
      font-size: 12px;
      line-height: 1.2;
      /* border:1px solid rgba(150,170,205,.45); */
      background: rgba(255,255,255,.84);
      color: var(--muted);
      white-space: nowrap;
    }
    .task-token .token-ico{display:none;}
    .task-token .token-text{display:inline;}
    .task-token.token-ctrl .token-ico{display:inline;}
    .task-token.token-due .token-ico{display:inline;}
    .task-token.token-due{
      font-weight: 900;
    }
    .task-token.token-due .token-text{
      font-weight: 900;
    }
    .task-token.priority-hot{
      color: #c34762;
    }
    .qa-short{display:none;}
    .token-flag{
      border-color: rgba(255,92,122,.45);
      background: rgba(255,92,122,.12);
      color: #c34762;
    }
    @media (min-width: 980px){
      .task-title .name{
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
      }
      .task-note{
        margin-top:0;
        max-width:320px;
      }
      .task-line .task-meta{
        flex-wrap:nowrap;
      }
    }
    @media (max-width: 640px){
      .task-toolbar{flex-direction:column;align-items:stretch;}
      .search-inline label{display:block;}
      .chip-ico{display:inline-flex;}
      .chip-text{display:none;}
      .chips.task-chips{padding:4px;}
      .chips.dept-chips{
        flex-wrap:nowrap;
        overflow:auto;
        gap:6px;
      }
      .chips.dept-chips .chip{justify-content:center;min-width:44px;}
      .chips.dept-chips .chip .mono{display:none;}
      .control-counts{display:none;}
      .control-lines{flex-direction:row;flex-wrap:wrap;gap:8px;}
      .control-grid{grid-template-columns:1fr;}
      .control-dept-body{grid-template-columns:1fr;}
      .control-dept-counts{display:none;}
      .task-line{
        flex-direction:row;
        align-items:center;
        gap:10px;
        overflow:hidden;
      }
      .task-meta{
        width:auto;
        flex:0 0 auto;
        margin-top:0;
        flex-wrap:nowrap;
        gap:4px;
        overflow:hidden;
      }
      .task-title{flex-direction:row;align-items:center;min-width:0;flex:1;}
      .task-title .name{font-size:13px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
      .task-num{font-size:11px;}
      .task-token{font-size:11px;padding:2px 7px;}
      .task-note{display:none;}
      .qa-full{display:none;}
      .qa-short{display:inline;}
      .task-token.token-status{display:none;}
      .task-token.token-priority{display:none;}
      .task-item.ctrl-always .task-token.token-due .token-text{display:none;}
      .task-item.ctrl-always .task-token.token-due .token-ico{display:inline;}
      .task-item.has-due .task-token.token-due.due-hot .token-text{color:#c34762;}
    }
    @media (max-width: 640px){
      body.compact-tasks .task-line .name{
        flex:1;
        min-width:0;
        white-space:nowrap;
        overflow:hidden;
        text-overflow:ellipsis;
      }
      body.compact-tasks .task-line .task-meta{
        margin-top:0;
        flex-wrap:nowrap;
      }
      .task-token.compact-hide .token-text{display:none;}
      .task-token.compact-hide .token-ico{display:inline;}
    }
    .analytics-grid{display:grid;gap:10px;}
    .analytics-block{padding:12px;}
    .analytics-bars{margin-top:10px;display:flex;flex-direction:column;gap:8px;}
    .analytics-bar-row{
      display:grid;
      grid-template-columns: 58px 1fr 32px;
      gap:8px;
      align-items:center;
    }
    .analytics-label{
      font-size:11px;
      color:var(--muted);
      white-space:nowrap;
      overflow:hidden;
      text-overflow:ellipsis;
    }
    .analytics-bar-wrap{
      height:8px;
      border-radius:999px;
      background: rgba(150,170,205,.25);
      overflow:hidden;
    }
    .analytics-bar{
      height:100%;
      border-radius:999px;
      background: linear-gradient(90deg, rgba(110,168,254,.92), rgba(69,230,154,.85));
      min-width:2px;
    }
    .analytics-value{
      text-align:right;
      font-size:11px;
      color:var(--muted);
    }
    .task-sheet-compact{display:flex;flex-direction:column;gap:8px;}
    .task-sheet-compact .task-meta{margin-top:6px;}
    .task-sheet-compact .task-title .name{font-weight:900;}
    .toast-container{
      position: fixed;
      right: 14px;
      bottom: calc(92px + env(safe-area-inset-bottom));
      z-index: 95;
      pointer-events:none;
      opacity:0;
      transform: translateY(8px);
      transition: opacity .2s ease, transform .2s ease;
    }
    .toast-container.show{
      opacity:1;
      transform: translateY(0);
    }
    .toast{
      max-width: min(360px, calc(100vw - 28px));
      border-radius: 12px;
      padding: 10px 12px;
      font-size: 12px;
      font-weight: 800;
      border:1px solid rgba(150,170,205,.55);
      background: rgba(255,255,255,.96);
      color: var(--text);
      box-shadow: var(--shadow);
    }
    .toast.toast-ok{
      border-color: rgba(69,230,154,.45);
      background: rgba(69,230,154,.14);
    }
    .toast.toast-info{
      border-color: rgba(110,168,254,.45);
      background: rgba(110,168,254,.14);
    }
    .token-type-managerial{
      border-color: rgba(110,168,254,.45);
      background: rgba(110,168,254,.14);
      color: #2d5fbd;
    }
    .token-type-internal{
      border-color: rgba(150,170,205,.55);
      background: rgba(150,170,205,.14);
      color: #4b5f82;
    }
    .token-type-personal{
      border-color: rgba(183,131,255,.45);
      background: rgba(183,131,255,.14);
      color: #7151a8;
    }

    body.theme-dark{
      --bg:#0b0c10;
      --panel:#11131a;
      --panel2:#151925;
      --text:#e9eef7;
      --muted:#a7b0c2;
      --border:#232a3a;
      --shadow: 0 12px 30px rgba(0,0,0,.35);
      background: radial-gradient(1100px 900px at 20% 0%, rgba(110,168,254,.18), transparent 55%),
                  radial-gradient(900px 700px at 90% 10%, rgba(183,131,255,.13), transparent 55%),
                  var(--bg);
      color: var(--text);
    }
    body.theme-dark .topbar{
      background: linear-gradient(to bottom, rgba(11,12,16,.92), rgba(11,12,16,.68));
      border-bottom: 1px solid rgba(35,42,58,.75);
    }
    body.theme-dark .iconbtn{
      background: rgba(21,25,37,.85);
      border-color: rgba(35,42,58,.85);
      color: var(--text);
    }
    body.theme-dark .pill{
      background: rgba(21,25,37,.75);
      border-color: rgba(35,42,58,.85);
      color: var(--muted);
    }
    body.theme-dark .badge{
      background: rgba(21,25,37,.75);
      border-color: rgba(35,42,58,.85);
      color: var(--muted);
    }
    body.theme-dark .b-blue{ color: #cfe2ff; }
    body.theme-dark .b-violet{ color: #e3d2ff; }
    body.theme-dark .b-ok{ color: #b8ffdf; }
    body.theme-dark .b-warn{ color: #ffe0a3; }
    body.theme-dark .b-danger{ color: #ffb3c0; }
    body.theme-dark .card{
      background: linear-gradient(180deg, rgba(21,25,37,.92), rgba(17,19,26,.92));
      border-color: rgba(35,42,58,.85);
      box-shadow: var(--shadow);
    }
    body.theme-dark .card-h{
      border-bottom-color: rgba(35,42,58,.7);
      background: rgba(17,19,26,.35);
    }
    body.theme-dark .stat,
    body.theme-dark .item,
    body.theme-dark .tab{
      background: rgba(21,25,37,.55);
      border-color: rgba(35,42,58,.75);
      color: var(--text);
    }
    body.theme-dark .tab .ico{color: var(--text);}
    @media (hover:hover) and (pointer:fine){
      body.theme-dark .tab:hover::after{
        background: rgba(236,242,255,.95);
        color: #1f2a44;
      }
    }
    body.theme-dark .chip{
      background: rgba(21,25,37,.75);
      border-color: rgba(35,42,58,.85);
      color: var(--muted);
    }
    body.theme-dark .chip.active,
    body.theme-dark .tab.active{
      background: rgba(110,168,254,.16);
      border-color: rgba(110,168,254,.45);
      color: #d7e7ff;
    }
    body.theme-dark .btn{
      background: rgba(21,25,37,.75);
      border-color: rgba(35,42,58,.85);
      color: var(--text);
    }
    body.theme-dark .btn.ghost{
      background: transparent;
      border-color: rgba(35,42,58,.75);
      color: var(--muted);
    }
    body.theme-dark .nav{
      background: rgba(11,12,16,.86);
      border-top: 1px solid rgba(35,42,58,.8);
    }
    body.theme-dark .sheet{
      background: linear-gradient(180deg, rgba(21,25,37,.98), rgba(11,12,16,.98));
      border-color: rgba(35,42,58,.85);
    }
    body.theme-dark .banner{
      color: #d7e7ff;
      border-color: rgba(110,168,254,.45);
      background: rgba(110,168,254,.14);
    }
    body.theme-dark input,
    body.theme-dark select,
    body.theme-dark textarea{
      background: rgba(21,25,37,.75);
      border-color: rgba(35,42,58,.85);
      color: var(--text);
    }
    body.theme-dark .sep{ background: rgba(35,42,58,.8); }
    body.theme-dark .modal{ background: rgba(0,0,0,.55); }
    body.theme-dark .task-token{
      border-color: rgba(35,42,58,.75);
      background: rgba(21,25,37,.75);
      color: var(--muted);
    }
    body.theme-dark .task-title-type-managerial{color:#cfe2ff;}
    body.theme-dark .task-title-type-internal{color:#c3cce0;}
    body.theme-dark .task-title-type-personal{color:#e3d2ff;}
    body.theme-dark .analytics-bar-wrap{ background: rgba(35,42,58,.7); }
    body.theme-dark .analytics-value,
    body.theme-dark .analytics-label{ color: var(--muted); }
    body.theme-dark .token-type-managerial{
      border-color: rgba(110,168,254,.45);
      background: rgba(110,168,254,.18);
      color: #cfe2ff;
    }
    body.theme-dark .token-type-internal{
      border-color: rgba(35,42,58,.85);
      background: rgba(21,25,37,.90);
      color: #c3cce0;
    }
    body.theme-dark .token-type-personal{
      border-color: rgba(183,131,255,.45);
      background: rgba(183,131,255,.18);
      color: #e3d2ff;
    }
    body.theme-dark .toast{
      border-color: rgba(35,42,58,.75);
      background: rgba(21,25,37,.95);
      color: var(--text);
    }
    body.theme-dark .toast.toast-ok{
      border-color: rgba(69,230,154,.45);
      background: rgba(69,230,154,.18);
    }
    body.theme-dark .toast.toast-info{
      border-color: rgba(110,168,254,.45);
      background: rgba(110,168,254,.18);
    }


