:root{
    --bg:#eef1f6; --card:#ffffff; --border:#e2e6ec; --border-soft:#eef0f3;
    --text:#161b28; --text-dim:#5c6472; --text-faint:#96a0ad;
    --blue:#2563eb; --blue-dark:#1d4ed8; --blue-soft:#eaf1fe; --blue-mid:#3b82f6;
    --green:#16a34a; --green-soft:#e9f7ee;
    --amber:#d97706; --amber-soft:#fdf1e0;
    --red:#dc2626; --red-soft:#fdecec;
    --mrcl:#7c3aed; --mrcl-soft:#f3ecfe;
    --radius:12px;
    --shadow-sm:0 1px 2px rgba(20,25,45,.05);
    --shadow-md:0 6px 20px rgba(20,25,45,.08);
    --shadow-lg:0 14px 34px rgba(20,25,45,.14);
    font-family: -apple-system, "Inter", "Segoe UI", Helvetica, Arial, sans-serif;
  }
  *{box-sizing:border-box;}
  body{margin:0;background:var(--bg);color:var(--text);font-size:12.5px;-webkit-font-smoothing:antialiased;}
  .app{display:flex;flex-direction:column;min-height:100vh;}
  .topbar{display:flex;align-items:center;gap:18px;background:var(--card);border-bottom:1px solid var(--border);padding:11px 22px;position:sticky;top:0;z-index:20;box-shadow:var(--shadow-sm);}
  .brand{display:flex;align-items:center;gap:9px;font-weight:800;font-size:14.5px;letter-spacing:-.01em;}
  .brand .icon{width:28px;height:28px;border-radius:8px;background:linear-gradient(155deg,var(--blue-mid),var(--blue-dark));color:#fff;display:flex;align-items:center;justify-content:center;font-size:13px;flex-shrink:0;box-shadow:var(--shadow-sm);}
  .topnav{display:flex;align-items:center;gap:6px;flex:1;}
  .who{display:flex;align-items:center;gap:8px;margin-left:auto;}
  .who .av{width:28px;height:28px;border-radius:50%;background:linear-gradient(155deg,var(--blue-mid),var(--blue-dark));color:#fff;display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0;box-shadow:var(--shadow-sm);}
  .who .name{font-weight:700;font-size:12px;}
  .who .role{color:var(--text-faint);font-size:10.5px;}
  @media(max-width:520px){ .who .role{display:none;} }
  main.panel{flex:1;width:100%;padding:18px 22px 28px;max-width:920px;margin:0 auto;}
  @media(max-width:640px){
    main.panel{padding:12px 12px 20px;}
    .topbar{padding:9px 14px;}
  }
  .card{background:var(--card);border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow-md);}
  .card-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid var(--border-soft);}
  .card-head h1{font-size:17px;margin:0;letter-spacing:-.01em;}
  .card-body{padding:14px 20px 16px;}
  .close-x{background:none;border:none;font-size:16px;color:var(--text-faint);cursor:pointer;}
  .sched-section{padding:16px 0;border-top:1px solid var(--border-soft);border-radius:6px;transition:background-color .5s ease;}
  .sched-section:first-child{padding-top:0;border-top:none;}
  .sched-section.section-flash{background-color:var(--blue-soft);}
  .tab-count{display:inline-flex;align-items:center;justify-content:center;min-width:15px;height:15px;padding:0 4px;border-radius:20px;background:var(--blue-soft);color:var(--blue-dark);font-size:9px;font-weight:700;margin-left:6px;vertical-align:middle;}
  label.field-label{display:block;font-size:11px;font-weight:600;color:var(--text);margin-bottom:3px;white-space:nowrap;}
  input[type=text], input[type=date], input[type=number]{
    width:100%;padding:6px 9px;border:1px solid var(--border);border-radius:7px;font-size:12px;color:var(--text);background:#fff;
  }
  input:focus{outline:2px solid var(--blue);outline-offset:1px;}
  .deadline-box{background:#fbf7ee;border:1px solid #f0e6cf;border-radius:9px;padding:8px 12px;margin:8px 0 10px;}
  .deadline-box .field-label{color:#8a6a1f;}
  .deadline-box .row{display:flex;align-items:center;gap:10px;}
  .deadline-box input{max-width:220px;}
  section.block{margin-bottom:10px;}
  .block-head{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:6px;}
  .block-head h2{font-size:12.5px;margin:0;}
  .data-source-badge{font-size:9px;font-weight:700;padding:2px 8px;border-radius:20px;letter-spacing:.02em;}
  .data-source-badge.live{background:var(--green-soft, #e9f7ee);color:#166534;}
  .data-source-badge.demo{background:#f2f3f6;color:var(--text-faint);}
  .data-source-badge.checking{background:#f2f3f6;color:var(--text-faint);}
  .hint{font-size:10px;color:var(--text-faint);}
  .attendee-row{display:flex;flex-direction:column;gap:5px;border:1px solid var(--border-soft);border-radius:8px;padding:6px 9px;margin-bottom:5px;background:#fff;}
  .attendee-top{display:flex;align-items:center;gap:9px;}
  .attendee-row .av{width:26px;height:26px;border-radius:50%;background:#eef1f6;color:var(--blue-dark);display:flex;align-items:center;justify-content:center;font-weight:700;font-size:10.5px;flex-shrink:0;}
  .attendee-row .who-info{flex:1;min-width:0;overflow:hidden;}
  .attendee-row .who-info .nm{font-weight:600;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:5px;}
  .attendee-row .who-info .co{font-size:10px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .working-hours-line{font-size:9.5px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .tier-group{display:flex;gap:3px;flex-shrink:0;}
  .tier-group.organizer-tier-group{align-items:center;}
  .tier-btn{border:1px solid transparent;background:#f2f3f6;color:var(--text-dim);font-size:10px;padding:4px 8px;border-radius:6px;cursor:pointer;font-weight:600;}
  .tier-btn:hover{background:var(--blue-dark);color:#fff;}
  .tier-btn.sel-priority, .tier-btn.sel-required, .tier-btn.sel-optional{background:var(--blue-dark);color:#fff;box-shadow:0 1px 2px rgba(30,42,74,.35);}
  .tier-btn:disabled{cursor:default;opacity:1;}
  .tz-pill{display:inline-flex;align-items:center;font-size:10px;font-weight:700;letter-spacing:.02em;color:var(--text-dim);background:#f2f3f6;border-radius:20px;padding:1px 7px;margin-left:0;flex-shrink:0;}
  .tz-pill.tz-ET{background:#e2f9ed;color:#11884d;}   
  .tz-pill.tz-CT{background:#e2e9f9;color:#113988;}   
  .tz-pill.tz-MT{background:#f9f0e2;color:#885c11;}   
  .tz-pill.tz-PT{background:#f9e9e2;color:#883911;}   
  .tz-pill.tz-UK{background:#eae2f9;color:#3d1188;}   
  .tz-pill.tz-IST{background:#e2f9f6;color:#11887c;}  
  .tz-pill.tz-SGT{background:#e2f2f9;color:#116488;}  
  .tz-pill.tz-CET{background:#e3e2f9;color:#171188;}  
  .tz-pill.tz-AEST{background:#eff9e2;color:#588811;} 
  .tz-pill.tz-JST{background:#f9e2ec;color:#881149;}  
  .tz-pill.tz-GMT{background:#eef1f6;color:#475569;}  
  .tz-color-legend{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:6px 0 4px;}
  .tz-color-legend .tz-legend-title{font-size:9.5px;color:var(--text-faint);font-weight:600;margin-right:2px;}
  .role-pill{display:inline-flex;align-items:center;font-size:9px;font-weight:700;letter-spacing:.02em;border-radius:20px;padding:1px 7px;flex-shrink:0;white-space:nowrap;}
  .role-pill.required{background:var(--blue-soft);color:var(--blue-dark);}
  .role-pill.priority{background:var(--amber-soft);color:var(--amber);}
  .role-pill.optional{background:#f2f3f6;color:var(--text-dim);}
  .tz-banner{display:flex;align-items:flex-start;gap:8px;background:#f2f3f6;color:var(--text-dim);border-radius:7px;padding:7px 10px;font-size:11px;line-height:1.4;margin-bottom:8px;}
  .tz-banner .tz-banner-icon{flex-shrink:0;font-size:13px;line-height:1.4;}
  .tz-banner .tz-banner-text{flex:1;}
  .tz-banner strong{color:var(--text);}
  input.weight-input{width:30px !important;padding:4px 2px !important;text-align:center;border:1px solid var(--border);border-radius:6px;font-size:11.5px;flex-shrink:0;}
  .rm-btn{width:26px;height:26px;border-radius:6px;border:1px solid var(--border);background:#fff;color:var(--text-faint);cursor:pointer;flex-shrink:0;}
  .rm-btn:disabled{opacity:.45;cursor:not-allowed;background:#f8fafc;color:#94a3b8;}
  .add-attendee-row{display:flex;align-items:center;gap:10px;border:1.5px dashed var(--border);border-radius:10px;padding:8px 12px;}
  .add-attendee-row input{border:none;padding:6px 0;flex:1;}
  .add-attendee-row input:focus{outline:none;}
  .plus-circ{width:22px;height:22px;border-radius:50%;background:#f2f3f6;color:var(--text-dim);display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;}
  .mini-avail-row{display:flex;align-items:center;gap:6px;padding-left:35px;}
  .mini-avail-label{font-size:9px;color:var(--text-faint);flex-shrink:0;white-space:nowrap;}
  .mini-avail{display:flex;gap:3px;flex-wrap:wrap;}
  .mini-cell{width:32px;height:24px;border-radius:5px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;cursor:default;}
  .mini-cell .mc-time{font-size:9px;font-weight:700;}
  .mini-cell .mc-tz{font-size:7px;font-weight:600;opacity:.75;letter-spacing:.02em;}
  .mini-cell.free{background:var(--green-soft);color:var(--green);}
  .mini-cell.tentative{background:var(--amber-soft);color:var(--amber);}
  .mini-cell.busy{background:var(--red-soft);color:var(--red);}
  .mini-cell.off-hours{box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);}
  .mini-cell.off-hours.free{background:var(--green-soft);color:var(--green);}
  .mini-cell.off-hours.tentative{background:var(--amber-soft);color:var(--amber);}
  .mini-cell.off-hours.busy{background:var(--red-soft);color:var(--red);}
  .mini-cell.off-hours.oof{background:var(--mrcl-soft);color:var(--mrcl);}
  .mini-cell.off-hours.elsewhere{background:#eef1f6;color:var(--text-dim);}
  .mini-cell.best-col{outline:2px solid var(--blue);outline-offset:-2px;}
  @media(max-width:640px){
    .mini-avail-row{padding-left:0;flex-wrap:wrap;}
  }
  .field-wrap{position:relative;}
  .typeahead-dd{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px rgba(20,25,40,.1);z-index:30;max-height:260px;overflow-y:auto;display:none;}
  .typeahead-dd.show{display:block;}
  .typeahead-dd .ta-status{padding:8px 12px;font-size:11px;color:var(--text-faint);border-bottom:1px solid var(--border-soft);display:flex;align-items:center;gap:6px;}
  .typeahead-dd .ta-status .spark{color:var(--mrcl);}
  .ta-item{display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;}
  .ta-item:hover, .ta-item.active{background:var(--blue-soft);}
  .ta-item .av{width:26px;height:26px;border-radius:50%;background:#eef1f6;color:var(--blue-dark);display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:700;flex-shrink:0;}
  .ta-item .ta-info{min-width:0;flex:1;}
  .ta-item .ta-name{font-size:12.5px;font-weight:600;}
  .ta-item .ta-email{font-size:11px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .ta-item .ta-score{font-size:10px;color:var(--text-faint);background:#f2f3f6;padding:2px 6px;border-radius:20px;flex-shrink:0;}
  .ta-empty{padding:14px 12px;font-size:12px;color:var(--text-faint);}
  .ta-create{padding:9px 12px;cursor:pointer;font-size:12px;color:var(--blue);font-weight:600;border-top:1px solid var(--border-soft);}
  .ta-create:hover{background:var(--blue-soft);}
  .delegate-block{margin-bottom:10px;}
  .delegate-block-secondary{padding-top:10px;border-top:1px solid var(--border-soft);}
  .delegate-selector{position:relative;}
  .delegate-current{display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:9px;padding:6px 9px;cursor:pointer;background:#fff;}
  .delegate-current:hover{border-color:var(--blue);}
  .delegate-current .av{width:32px;height:32px;border-radius:50%;background:var(--blue-dark);color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;flex-shrink:0;}
  .delegate-info{flex:1;min-width:0;}
  .delegate-name{font-size:13.5px;font-weight:600;display:flex;align-items:center;gap:7px;}
  .delegate-tag-you{font-size:10px;font-weight:700;color:var(--blue);background:var(--blue-soft);padding:1px 7px;border-radius:20px;}
  .delegate-role{font-size:11.5px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .delegate-chevron{color:var(--text-faint);font-size:12px;flex-shrink:0;}
  .delegate-dd{position:absolute;top:calc(100% + 6px);left:0;right:0;background:#fff;border:1px solid var(--border);border-radius:10px;box-shadow:0 8px 24px rgba(20,25,40,.12);z-index:31;max-height:300px;overflow-y:auto;display:none;}
  .delegate-dd.show{display:block;}
  .delegate-dd .dd-search{padding:8px;border-bottom:1px solid var(--border-soft);}
  .delegate-dd .dd-search input{width:100%;padding:8px 10px;border:1px solid var(--border);border-radius:8px;font-size:12.5px;}
  .delegate-dd .dd-label{padding:8px 12px 4px;font-size:10.5px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--text-faint);}
  .delegate-item{display:flex;align-items:center;gap:10px;padding:9px 12px;cursor:pointer;}
  .delegate-item:hover, .delegate-item.active{background:var(--blue-soft);}
  .delegate-item .av{width:28px;height:28px;border-radius:50%;background:#eef1f6;color:var(--blue-dark);display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;flex-shrink:0;}
  .delegate-item .di-info{flex:1;min-width:0;}
  .delegate-item .di-name{font-size:12.5px;font-weight:600;}
  .delegate-item .di-role{font-size:11px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .delegate-item .di-check{color:var(--blue);font-size:14px;flex-shrink:0;display:none;}
  .delegate-item.sel .di-check{display:block;}
  .delegate-banner{display:none;align-items:center;gap:10px;background:var(--blue-soft);color:#1e3a8a;border-radius:8px;padding:10px 12px;font-size:12px;margin-top:10px;}
  .delegate-banner.show{display:flex;}
  .delegate-banner .db-icon{flex-shrink:0;}
  .delegate-banner .db-text{flex:1;}
  .delegate-banner .db-switch{flex-shrink:0;background:none;border:1px solid var(--blue);color:var(--blue);font-size:11.5px;font-weight:600;padding:5px 10px;border-radius:7px;cursor:pointer;}
  .chat-launcher{position:fixed;bottom:22px;right:22px;width:56px;height:56px;border-radius:50%;background:var(--blue-dark);color:#fff;border:none;font-size:22px;cursor:pointer;box-shadow:0 6px 20px rgba(20,25,40,.25);z-index:60;display:flex;align-items:center;justify-content:center;transition:background .15s ease, box-shadow .15s ease;}
  .chat-launcher:hover{background:#1a43b8;box-shadow:0 8px 22px rgba(29,78,216,.35);}
  .chat-launcher:active{background:#173a9e;}
  .chat-launcher .chat-dot{position:absolute;top:6px;right:6px;width:9px;height:9px;border-radius:50%;background:var(--mrcl);border:2px solid #fff;}
  .chat-panel{position:fixed;bottom:22px;right:22px;width:380px;max-width:calc(100vw - 24px);height:560px;max-height:calc(100vh - 100px);background:#fff;border-radius:16px;box-shadow:0 16px 48px rgba(20,25,40,.25);z-index:60;display:none;flex-direction:column;overflow:hidden;border:1px solid var(--border);}
  .chat-panel.show{display:flex;}
  .chat-head{background:var(--blue-dark);color:#fff;padding:14px 16px;display:flex;align-items:center;gap:10px;flex-shrink:0;}
  .chat-head .ch-icon{width:30px;height:30px;border-radius:8px;background:rgba(255,255,255,.15);display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;}
  .chat-head .ch-text strong{display:block;font-size:13.5px;}
  .chat-head .ch-text span{font-size:11px;color:rgba(255,255,255,.7);}
  .chat-head .ch-close{margin-left:auto;background:none;border:none;color:rgba(255,255,255,.8);font-size:16px;cursor:pointer;}
  .chat-body{flex:1;overflow-y:auto;padding:14px;display:flex;flex-direction:column;gap:10px;background:#fafbfc;}
  .chat-msg{max-width:85%;padding:9px 12px;border-radius:12px;font-size:12.5px;line-height:1.5;}
  .chat-msg.bot{align-self:flex-start;background:#fff;border:1px solid var(--border-soft);border-bottom-left-radius:3px;}
  .chat-msg.bot.ai-foundry-reply{background:#111827;border:3px solid #000;border-left:8px solid #000;color:#f9fafb;box-shadow:0 0 0 3px rgba(0,0,0,.25), 0 6px 14px rgba(0,0,0,.35);font-weight:800;letter-spacing:.01em;}
  .chat-msg.user{align-self:flex-end;background:var(--blue-dark);color:#fff;border-bottom-right-radius:3px;}
  .chat-msg.bot b{color:var(--text);}
  .chat-msg ul{margin:6px 0 0;padding-left:16px;}
  .chat-msg.chat-typing{color:var(--text-faint);font-style:italic;}
  .chat-chips{display:flex;flex-wrap:wrap;gap:6px;padding:0 14px 12px;flex-shrink:0;}
  .chat-chip{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:11px;font-weight:600;padding:6px 10px;border-radius:20px;cursor:pointer;}
  .chat-chip:hover{border-color:var(--blue);color:var(--blue);}
  .chat-input-row{display:flex;gap:8px;padding:12px;border-top:1px solid var(--border-soft);flex-shrink:0;}
  .chat-input-row input{flex:1;padding:10px 12px;border:1px solid var(--border);border-radius:20px;font-size:12.5px;}
  .chat-input-row input:focus{outline:2px solid var(--blue-dark);outline-offset:1px;}
  .chat-input-row button{width:38px;height:38px;border-radius:50%;background:var(--blue-dark);color:#fff;border:none;font-size:14px;cursor:pointer;flex-shrink:0;}
  @media(max-width:460px){
    .chat-panel{width:calc(100vw - 20px);right:10px;bottom:10px;height:calc(100vh - 90px);}
    .chat-launcher{bottom:14px;right:14px;}
  }
  .chat-msg.teams-msg{background:transparent;border:none;padding:0;max-width:95%;}
  .teams-card{background:#fff;border:1px solid var(--border);border-radius:12px;padding:10px 12px;box-shadow:0 1px 3px rgba(20,25,40,.06);}
  .teams-card.resolved{background:#fafbfc;}
  .tc-head{display:flex;align-items:center;gap:8px;margin-bottom:7px;}
  .tc-icon{width:22px;height:22px;border-radius:6px;background:#5b5fc7;color:#fff;font-size:11px;font-weight:800;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
  .tc-head-text strong{display:block;font-size:12.5px;color:var(--text);}
  .tc-head-text span{font-size:11px;color:var(--text-faint);}
  .tc-body{font-size:12px;color:var(--text-dim);line-height:1.5;margin-bottom:9px;}
  .tc-actions{display:flex;gap:8px;}
  .tc-btn{flex:1;border:1px solid var(--border);background:#fff;font-size:11px;font-weight:600;padding:7px 8px;border-radius:7px;cursor:pointer;color:var(--text-dim);}
  .tc-btn.tc-yes:hover{border-color:var(--green);color:var(--green);}
  .tc-btn.tc-no:hover{border-color:var(--red);color:var(--red);}
  .agenda-row{display:flex;align-items:center;gap:8px;margin-bottom:5px;}
  .agenda-num{width:16px;color:var(--text-faint);font-size:11px;flex-shrink:0;}
  .agenda-row input[type=text]{flex:1;min-width:0;}
  .agenda-row input[type=number]{width:48px;text-align:center;}
  .agenda-row .unit{font-size:11px;color:var(--text-faint);width:22px;}
  .agenda-row .ag-min.ag-zero{border-color:#d8dee9;background:#f8fafc;color:#475569;}
  .agenda-row .unit.unit-zero{color:#64748b;text-decoration:underline dotted;text-underline-offset:2px;cursor:help;}
  .agenda-total{font-size:11px;color:var(--text-dim);margin:4px 0 8px 26px;}
  .add-agenda{background:none;border:1px dashed var(--border);color:var(--text-dim);font-size:11.5px;font-weight:600;padding:6px 10px;border-radius:7px;cursor:pointer;}
  .mrcl-toggle{display:flex;align-items:center;gap:10px;border:1px solid var(--mrcl-soft);background:var(--mrcl-soft);border-radius:9px;padding:8px 12px;margin-top:8px;}
  .mrcl-toggle .m-icon{width:24px;height:24px;border-radius:7px;background:var(--mrcl);color:#fff;font-weight:700;font-size:11px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
  .mrcl-toggle .m-text{min-width:0;}
  .mrcl-toggle .m-text strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .mrcl-toggle .m-text span{font-size:10.5px;color:#6d4fae;}
  .switch{margin-left:auto;position:relative;width:34px;height:20px;flex-shrink:0;}
  .switch input{opacity:0;width:0;height:0;}
  .slider{position:absolute;inset:0;background:#c9bff2;border-radius:22px;cursor:pointer;transition:.15s;}
  .slider:before{content:"";position:absolute;width:14px;height:14px;left:3px;top:3px;background:#fff;border-radius:50%;transition:.15s;}
  input:checked + .slider{background:var(--mrcl);}
  input:checked + .slider:before{transform:translateX(14px);}
  .mrcl-options{border:1px solid var(--mrcl-soft);border-top:none;border-radius:0 0 9px 9px;margin:-6px 0 0;padding:10px 12px 10px;background:#fbf9ff;display:none;}
  .mrcl-options.show{display:block;}
  .mrcl-options .opt-row{margin-bottom:8px;}
  .mrcl-options .opt-row:last-child{margin-bottom:0;}
  .mrcl-options label.field-label{color:#5b21b6;}
  .lang-row{display:flex;gap:10px;}
  .lang-row .lg{flex:1;min-width:0;}
  select.mrcl-select{width:100%;padding:6px 8px;border:1px solid var(--border);border-radius:7px;font-size:11.5px;background:#fff;color:var(--text);}
  select.mrcl-select:focus{outline:2px solid var(--mrcl);outline-offset:1px;}
  .chip-input-box{display:flex;flex-wrap:wrap;gap:5px;border:1px solid var(--border);border-radius:7px;padding:5px 7px;background:#fff;min-height:32px;}
  .chip{display:flex;align-items:center;gap:5px;background:var(--mrcl-soft);color:#5b21b6;border-radius:20px;padding:3px 5px 3px 9px;font-size:11px;font-weight:600;}
  .chip .chip-x{cursor:pointer;width:14px;height:14px;border-radius:50%;background:rgba(124,58,237,.15);display:flex;align-items:center;justify-content:center;font-size:9px;}
  .chip-input-box input{border:none;flex:1;min-width:110px;padding:3px 2px;font-size:11.5px;}
  .chip-input-box input:focus{outline:none;}
  .opt-hint{font-size:10px;color:#7c5fbf;margin-top:4px;}
  .recur-toggle{display:flex;align-items:center;gap:10px;border:1px solid var(--border-soft);background:#fff;border-radius:9px;padding:8px 12px;}
  .recur-toggle .r-icon{width:24px;height:24px;border-radius:7px;background:#eef0f3;color:var(--text-dim);font-size:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
  .recur-toggle .r-text{min-width:0;}
  .recur-toggle .r-text strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .recur-toggle .r-text span{font-size:10.5px;color:var(--text-faint);}
  .recur-panel{border:1px solid var(--border-soft);border-top:none;border-radius:0 0 9px 9px;margin:-6px 0 0;padding:10px 12px 10px;background:#fafbfc;display:none;}
  .recur-panel.show{display:block;}
  .recur-panel .opt-row{margin-bottom:8px;}
  .recur-panel .opt-row:last-child{margin-bottom:0;}
  .recur-row2{display:flex;gap:10px;}
  .recur-row2 .lg{flex:1;min-width:0;}
  .pattern-btns{display:flex;gap:5px;flex-wrap:wrap;}
  .pattern-btn{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:11px;font-weight:600;padding:5px 10px;border-radius:6px;cursor:pointer;}
  .pattern-btn.sel{background:var(--blue-dark);color:#fff;border-color:var(--blue-dark);}
  .weekday-btns{display:flex;gap:5px;margin-top:6px;}
  .weekday-btn{width:26px;height:26px;border-radius:50%;border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:10.5px;font-weight:700;cursor:pointer;}
  .weekday-btn.sel{background:var(--blue);color:#fff;border-color:var(--blue);}
  .duration-row{display:flex;align-items:center;gap:6px;}
  .duration-row input{width:60px;flex:none;}
  .recur-summary{background:var(--blue-soft);color:var(--blue);border-radius:7px;padding:6px 10px;font-size:11px;margin-top:3px;}
  .room-toggle{display:flex;align-items:center;gap:10px;border:1px solid var(--border-soft);background:#fff;border-radius:9px;padding:8px 12px;}
  .room-toggle .r-icon{width:24px;height:24px;border-radius:7px;background:#eef0f3;color:var(--text-dim);font-size:13px;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
  .room-toggle .r-text{min-width:0;}
  .room-toggle .r-text strong{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
  .room-toggle .r-text span{font-size:10.5px;color:var(--text-faint);}
  .room-panel{border:1px solid var(--border-soft);border-top:none;border-radius:0 0 9px 9px;margin:-6px 0 0;padding:10px;background:#fafbfc;display:none;}
  .room-panel.show{display:block;}
  .room-card{display:flex;align-items:center;gap:10px;border:1px solid var(--border);border-radius:9px;padding:7px 10px;background:#fff;margin-bottom:6px;cursor:pointer;}
  .room-card:last-child{margin-bottom:0;}
  .room-card .rm-icon{width:26px;height:26px;border-radius:7px;background:#eef0f3;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;}
  .room-card .rm-info{flex:1;min-width:0;}
  .room-card .rm-name{font-size:12px;font-weight:600;}
  .room-card .rm-meta{font-size:10px;color:var(--text-faint);}
  .room-status{font-size:10px;font-weight:700;padding:3px 8px;border-radius:20px;flex-shrink:0;}
  .room-status.free{background:var(--green-soft);color:var(--green);}
  .room-status.busy{background:var(--red-soft);color:var(--red);}
  .room-card input{flex-shrink:0;}
  .room-hint{font-size:10px;color:var(--text-faint);margin-top:6px;}
  .avail-card{border:1px solid var(--border-soft);border-radius:9px;padding:10px 12px;position:relative;}
  .avail-tabs{display:flex;align-items:center;gap:6px;justify-content:flex-start;margin-bottom:8px;overflow-x:auto;flex-wrap:nowrap;-webkit-overflow-scrolling:touch;}
  .avail-tabs .day-btn{flex-shrink:0;}
  .avail-tabs .arrow{background:none;border:1px solid var(--border);width:22px;height:22px;border-radius:6px;cursor:pointer;color:var(--text-dim);}
  .avail-tabs .day-btn{border:1px solid var(--border);background:#fff;padding:5px 10px;border-radius:7px;font-size:11px;font-weight:600;color:var(--text-dim);cursor:pointer;}
  .avail-tabs .day-btn.active{background:var(--blue-soft);color:var(--blue);border-color:var(--blue-soft);}
  table.avail-grid{width:100%;border-collapse:separate;border-spacing:3px;}
  table.avail-grid th{font-size:10px;color:var(--text-faint);font-weight:500;padding-bottom:4px;position:sticky;top:0;z-index:8;background:#fff;box-shadow:0 1px 0 var(--border-soft);opacity:1;backdrop-filter:none;}
  table.avail-grid td.namecell{text-align:left;font-size:11px;font-weight:600;white-space:nowrap;padding-right:6px;padding-left:2px;position:sticky;left:-2px;z-index:7;background:#fff;opacity:1;backdrop-filter:none;isolation:isolate;}
  table.avail-grid thead th:first-child{left:0;z-index:5;}
  table.avail-grid td.namecell .namecell-top{display:flex;align-items:center;gap:4px;flex-wrap:nowrap;white-space:nowrap;background:#fff;position:relative;z-index:1;}
  table.avail-grid td.namecell .tierdot{display:inline-block;width:5px;height:5px;border-radius:50%;margin-right:5px;}
  .cell{width:44px;height:28px;border-radius:5px;display:flex;flex-direction:column;align-items:center;justify-content:center;line-height:1.1;cursor:default;border:1.5px dotted rgba(20,25,45,.16);}
  .cell .c-time{font-size:9px;font-weight:700;white-space:nowrap;text-align:center;width:100%;}
  .cell .c-tz{font-size:7px;font-weight:600;opacity:.75;letter-spacing:.02em;text-align:center;width:100%;}
  table.avail-grid td{vertical-align:middle;}
  .cell.free{background:var(--green-soft);color:var(--green);}
  .cell.tentative{background:var(--amber-soft);color:var(--amber);}
  .cell.busy{background:var(--red-soft);color:var(--red);}
  .cell.oof{background:var(--mrcl-soft);color:var(--mrcl);}
  .cell.elsewhere{background:#eef1f6;color:#5c6472;}
  .cell.off-hours{box-shadow:inset 0 0 0 1px rgba(0,0,0,.12);}
  .cell.off-hours.free{background:var(--green-soft);color:var(--green);}
  .cell.off-hours.tentative{background:var(--amber-soft);color:var(--amber);}
  .cell.off-hours.busy{background:var(--red-soft);color:var(--red);}
  .cell.off-hours.oof{background:var(--mrcl-soft);color:var(--mrcl);}
  .cell.off-hours.elsewhere{background:#eef1f6;color:var(--text-dim);}
  /* Same thin three-tier hierarchy as the Availability Overview (.fullday-cell):
     Best = thin DOTTED gold + stripe fill, Next Best = thin dotted gold,
     everything else = thin dotted neutral (base .cell rule above). All three
     tiers now share the same 1.5px dotted weight — only color/fill differ. */
  .cell.ai-top-pick,.cell.ai-next-best,.cell.ai-also-good{position:relative;overflow:hidden;z-index:1;}
  .cell.ai-top-pick{border:1.5px dotted #f5a623;}
  .cell.ai-top-pick::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(135deg, rgba(245,166,35,.22) 0 6px, transparent 6px 12px);pointer-events:none;z-index:0;}
  /* Bug fix ("differentiate best time / second-best time / other best
     times"): this rule was missing entirely, so the second-best slot
     (ai-next-best, suggestionRank === 1) rendered with no highlight at all
     \u2014 indistinguishable from a plain free cell. Same gold hue as the top
     pick (still visibly "a top suggestion"), but without the diagonal
     stripe fill, so it reads as one tier down. */
  .cell.ai-next-best{border:1.5px dotted #f5a623;background:rgba(245,166,35,.10);}
  .cell.ai-next-best::before{display:none;}
  .cell.ai-also-good{border:1.5px dotted #c97d0e;}
  .cell.ai-also-good::before{display:none;}
  /* A slot the user manually picked (different from the agent's suggestion)
     gets its own solid blue fill+border instead of just a darkened tile, so
     it reads as a distinct third state rather than a muddier version of
     whatever ai-* class it also carries. */
  .cell.user-picked{border:2.5px solid var(--blue-dark);background:var(--blue-soft) !important;box-shadow:0 0 0 1px var(--blue-dark);filter:none;}
  .cell.user-picked::before{display:none;}
  .best-banner{margin-top:8px;background:var(--green-soft);color:#166534;border-radius:7px;padding:7px 10px;font-size:11px;display:none;align-items:flex-start;gap:6px;line-height:1.4;}
  .best-banner.show{display:flex;}
  .best-banner-lines{display:flex;flex-direction:column;gap:4px;width:100%;}
  .best-banner-line{display:flex;align-items:flex-start;gap:6px;}
  .best-banner-icon{width:14px;flex:0 0 14px;display:inline-flex;justify-content:center;line-height:1.2;}
  .suggestion-list{margin-top:6px;display:none;flex-direction:column;gap:5px;}
  .suggestion-list.show{display:flex;}
  .suggestion-item{display:flex;align-items:center;gap:9px;border:1px solid var(--border);border-radius:8px;padding:6px 9px;background:#fff;}
  .suggestion-item.chosen{border-color:var(--blue);background:var(--blue-soft);}
  .suggestion-item .sg-rank{width:16px;height:16px;border-radius:50%;background:#f2f3f6;color:var(--text-dim);font-size:9.5px;font-weight:700;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
  .suggestion-item .sg-time{font-weight:700;font-size:11.5px;width:58px;flex-shrink:0;}
  .suggestion-item .sg-detail{flex:1;font-size:10.5px;color:var(--text-dim);line-height:1.4;}
  .suggestion-item .sg-detail b.miss-req{color:var(--red);font-weight:700;}
  .suggestion-item .sg-detail b.miss-pri{color:var(--amber);font-weight:700;}
  .suggestion-item .sg-use{flex-shrink:0;border:1px solid var(--border);background:#fff;color:var(--text);font-size:10.5px;font-weight:600;padding:5px 10px;border-radius:6px;cursor:pointer;}
  .suggestion-item.chosen .sg-use{background:var(--blue-dark);color:#fff;border-color:var(--blue-dark);}
  .next-slot-nav{display:none;align-items:center;gap:8px;margin-top:8px;background:#fff;border:1px solid var(--border);border-radius:9px;padding:6px 9px;}
  .next-slot-nav.show{display:flex;}
  .nav-arrow{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:10.5px;font-weight:600;padding:5px 9px;border-radius:6px;cursor:pointer;flex-shrink:0;white-space:nowrap;}
  .nav-arrow:hover:not(:disabled){border-color:var(--blue);color:var(--blue);}
  .nav-arrow:disabled{opacity:.4;cursor:not-allowed;}
  .nav-info{flex:1;text-align:center;font-size:10.5px;color:var(--text-dim);}
  .override-row {
      display: flex;
      align-items: center;
      gap: 8px;
      flex-wrap: nowrap;
  }

  .override-row input[type="date"] {
      width: 130px;
      min-width: 130px;
  }

  .override-row input[type="text"] {
      width: 90px;
      min-width: 90px;
  }

  .override-row button {
      white-space: nowrap;
      width: auto;
  }
  .override-box{display:none;margin-top:8px;border:1px solid var(--border);border-radius:9px;padding:8px 10px;background:#fafbfc;}
  .override-box.show{display:block;}
  .override-head{font-size:11px;font-weight:600;margin-bottom:6px;display:flex;align-items:center;gap:6px;}
  .override-row{display:flex;gap:6px;flex-wrap:wrap;}
  .override-row input[type=date]{flex:1;min-width:130px;}
  .override-row select{flex:0 0 80px;padding:6px 7px;border:1px solid var(--border);border-radius:7px;font-size:11px;background:#fff;}
  .override-row button{flex-shrink:0;background:var(--blue-dark);color:#fff;border:none;padding:6px 12px;border-radius:7px;font-size:11px;font-weight:600;cursor:pointer;white-space:nowrap;}
  .override-row button:hover{background:#141b34;}
  .override-note{margin-top:6px;font-size:10.5px;line-height:1.4;display:none;padding:6px 9px;border-radius:6px;}
  .override-note.show{display:block;}
  .override-note.ok{background:var(--green-soft);color:#166534;}
  .override-note.warn{background:var(--amber-soft);color:#8a5a05;}
  @media(max-width:640px){
    /* .override-row select{flex:1 1 100px;}
    .override-row button{flex:1 1 100%;} */
    .next-slot-nav{flex-wrap:wrap;}
    .nav-info{flex-basis:100%;order:3;}
  }
  .legend{display:flex;gap:12px;margin-top:8px;font-size:10.5px;color:var(--text-dim);flex-wrap:wrap;}
  .legend span{display:inline-flex;align-items:center;gap:4px;}
  .legend i{width:9px;height:9px;border-radius:3px;display:inline-block;}
  .availability-guide{margin-top:8px;padding:8px 10px;border:1px solid var(--border-soft);background:#fafbfc;border-radius:8px;}
  .availability-guide-title{font-size:11px;font-weight:700;color:var(--text);margin-bottom:4px;}
  .availability-guide .legend{margin-top:0;justify-content:center;align-items:center;}
  .legend-offhours-swatch{width:9px;height:9px;border-radius:3px;display:inline-block;background:#dce7ef;border:1px solid #becedc;}
  .legend-buffer-swatch{width:11px;height:11px;border-radius:3px;display:inline-block;background:#fff4da;border:1px solid #c08537;position:relative;}
  .legend-buffer-swatch::after{content:"";position:absolute;bottom:1px;right:1px;width:4px;height:4px;border-radius:50%;background:#8a5a00;box-shadow:0 0 0 1px #fff;}
  .legend-dot-swatch{width:11px;height:11px;border-radius:3px;display:inline-block;background:#fff6e8;}
  .legend-dot-top{border:1.5px dotted #f5a623;background:rgba(245,166,35,.2);}
  .legend-dot-next{border:1.5px dotted #c97d0e;background:#fff;}
  .legend-dot-manual{border:2.5px solid var(--blue-dark);background:var(--blue-soft);}
  .legend-dot-also{border:2px dotted #c97d0e;background:#fff;}
  .legend-pick-swatch{width:9px;height:9px;border-radius:3px;display:inline-block;background:var(--blue-dark);border:1.5px solid #fff;box-shadow:0 0 0 1px var(--blue-dark);}
  .card-foot{display:flex;justify-content:flex-end;gap:8px;padding:10px 18px;border-top:1px solid var(--border-soft);}
  .btn{padding:10px 18px;border-radius:9px;font-size:13.5px;font-weight:600;cursor:pointer;border:1px solid var(--border);background:#fff;color:var(--text);transition:background .15s,box-shadow .15s,transform .1s;}
  .btn:hover{background:var(--border-soft);}
  .btn:active{transform:translateY(1px);}
  .btn.primary{background:#000;color:#fff;border:none;box-shadow:var(--shadow-sm);}
  .btn.primary:disabled{opacity:.45;cursor:not-allowed;}
  .btn.primary:hover:not(:disabled){box-shadow:var(--shadow-md);filter:brightness(1.2);}
  @media(max-width:640px){
    .card-foot{flex-wrap:wrap;padding:10px 16px;}
    .card-foot .btn{flex:1;min-width:110px;}
  }
.demo-badge{display:inline-block;font-size:9px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:var(--mrcl);background:var(--mrcl-soft);border-radius:5px;padding:1px 6px;margin-left:5px;vertical-align:middle;}
/* Footer status bar: kept in the DOM (still updated by setStatus() and still
   drives aria-live for screen readers) but visually hidden — it duplicated
   what toasts (errors) and modals (success) already show, and looked like a
   persistent error banner sitting in the page header/footer. See setStatus()
   in taskpane.js, which now also routes every message through a toast popup. */
.status-line{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.status-line.error{color:var(--red);}
.status-line.ok{color:var(--green);}
.attendee-row-simple{display:flex;align-items:center;gap:9px;border:1px solid var(--border-soft);border-radius:8px;padding:6px 9px;margin-bottom:5px;background:#fff;}
.attendee-row-simple .nm{flex:1;min-width:0;}
.attendee-row-simple .nm .name{font-weight:600;font-size:12px;}
.attendee-row-simple .nm .email{font-size:10px;color:var(--text-faint);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.empty-note{font-size:11px;color:var(--text-faint);padding:6px 2px;}
.chip.static{opacity:.7;}
.origin-pill{display:inline-flex;align-items:center;font-size:9px;font-weight:700;letter-spacing:.02em;border-radius:20px;padding:1px 7px;flex-shrink:0;}
.origin-pill.internal{background:var(--green-soft);color:var(--green);}
.origin-pill.external{background:#f2f3f6;color:var(--text-dim);}
.agenda-warning{font-size:10.5px;color:var(--amber);background:var(--amber-soft);border-radius:6px;padding:4px 8px;margin:2px 0 8px 26px;}
.attachment-list{display:flex;flex-direction:column;gap:5px;margin-bottom:6px;}
.attachment-item{display:flex;align-items:center;gap:8px;border:1px solid var(--border-soft);border-radius:8px;padding:6px 9px;background:#fff;font-size:11.5px;}
.attachment-item .att-icon{width:22px;height:22px;border-radius:6px;background:#eef0f3;display:flex;align-items:center;justify-content:center;font-size:11px;flex-shrink:0;}
.attachment-item .att-name{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.attachment-item .att-size{color:var(--text-faint);font-size:10px;flex-shrink:0;}
.attachment-item .rm-btn{width:22px;height:22px;font-size:11px;}
.add-attachment{background:none;border:1px dashed var(--border);color:var(--text-dim);font-size:11.5px;font-weight:600;padding:6px 10px;border-radius:7px;cursor:pointer;}
/* Full-screen overlay shown from the Confirm click through the create/update
   call finishing, success or error — previously there was no loader at all,
   so a slow create-event call just looked like nothing was happening. */
.fullscreen-loader{position:fixed;inset:0;background:rgba(20,25,40,.55);backdrop-filter:blur(2px);z-index:80;display:none;align-items:center;justify-content:center;}
.fullscreen-loader.show{display:flex;}
.fsl-box{background:#fff;border-radius:14px;padding:28px 34px;display:flex;flex-direction:column;align-items:center;gap:14px;box-shadow:0 20px 50px rgba(20,25,40,.3);max-width:280px;text-align:center;}
.fsl-spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--border-soft);border-top-color:var(--blue-mid);animation:fsl-spin .8s linear infinite;}
.fsl-text{font-size:12.5px;font-weight:600;color:var(--text-dim);}
@keyframes fsl-spin{to{transform:rotate(360deg);}}

.toast{position:fixed;top:14px;left:50%;transform:translateX(-50%) translateY(-10px);display:flex;align-items:center;gap:10px;min-width:260px;max-width:min(560px,calc(100vw - 24px));padding:10px 14px;border-radius:14px;background:rgba(24,34,58,.96);color:#fff;font-size:12px;font-weight:600;box-shadow:0 14px 34px rgba(20,25,40,.22);z-index:60;opacity:0;pointer-events:auto;transition:opacity .2s, transform .2s, box-shadow .2s;backdrop-filter:blur(10px);}
.toast.error{background:rgba(40,39,33,.96);color:#fff2c8;box-shadow:0 14px 34px rgba(40,39,33,.22);}
.toast.show{opacity:1;transform:translateX(-50%) translateY(0);}
.toast-ring{display:none;}
.toast.error .toast-ring{background:conic-gradient(#fbbf24 calc(var(--toast-progress) * 1turn), rgba(255,255,255,.18) 0);}
.toast:hover .toast-ring{opacity:1;}
.toast-text{line-height:1.35;}
.toast-close{margin-left:2px;width:20px;height:20px;border:none;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font-size:14px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;}
.toast-close:hover{background:rgba(255,255,255,.26);}
.toast.error .toast-close{background:rgba(255,255,255,.2);color:#fff7e2;}
.topbar-link{display:flex;align-items:center;gap:6px;background:none;border:none;color:var(--text-dim);font-size:12.5px;font-weight:700;cursor:pointer;padding:7px 12px;border-radius:8px;transition:background .15s,color .15s;}
.topbar-link .tl-icon{font-size:13px;}
.topbar-link:hover{background:var(--border-soft);color:var(--text);}
.topbar-link.active{background:var(--blue-soft);color:var(--blue);}
.back-to-dash{background:none;border:none;color:var(--blue);font-size:11px;font-weight:700;cursor:pointer;padding:0 0 6px;display:inline-block;}
.back-to-dash:hover{text-decoration:underline;}
.dash-card{overflow:visible;}
/* Bug fix: the "Meeting Organizer" section on the Meeting Requests dashboard
   sits in a plain .sched-section, which only has vertical padding (16px 0 —
   see the base rule up top) everywhere else it's used, on the assumption
   the form around it supplies its own horizontal padding. On the dashboard
   card nothing else does, so the heading and the organizer picker box sat
   flush against the card's rounded edges while the header/toolbar above and
   below correctly use 20px. Matching that here, scoped to the dashboard only
   so the create/reschedule form's own .sched-section usage is untouched. */
#dashboardView .sched-section{padding:16px 20px;}
.dash-head{align-items:flex-start;}
.dash-head h1{margin-bottom:3px;}
.dash-head .hint{font-size:11px;}
.dash-head-actions{display:flex;flex-direction:column;align-items:flex-end;gap:8px;min-width:280px;}
.dash-head .btn.primary{display:flex;align-items:center;gap:4px;white-space:nowrap;}
.dash-head .btn.primary span{font-size:15px;line-height:1;font-weight:700;}
.dash-delegate-block{margin:0;width:100%;max-width:none;}
.dash-delegate-block .delegate-selector{width:100%;}
.dash-delegate-block .field-label{margin-bottom:4px;}
.dash-delegate-block .delegate-current{padding:9px 12px;}
.dash-delegate-block .delegate-current .av{width:28px;height:28px;font-size:11px;}
.dash-delegate-block .delegate-name{font-size:12.5px;}
.dash-delegate-block .delegate-role{font-size:10.5px;}
.dash-delegate-block .delegate-banner{margin-top:8px;font-size:11px;}
/* Bug fix: this forced the dropdown permanently open (display:block,
   position:static) regardless of the .show class the click-toggle JS
   (wireDelegatePicker1 in taskpane.js) adds/removes — so on the Meeting
   Requests dashboard the organizer picker rendered as a big, permanently
   expanded, unstyled block that pushed the rest of the page down instead of
   behaving as a proper floating dropdown. Now it behaves exactly like every
   other .delegate-dd on the page: hidden until clicked, then an absolutely
   positioned, bordered, shadowed panel anchored under the trigger row \u2014
   which is what actually keeps it aligned with the page instead of blowing
   out the card's layout. Only the sizing tweaks below (width/padding/font
   size for the tighter dashboard card) are dashboard-specific.*/
.dash-delegate-block .delegate-dd{max-height:260px;}
.dash-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:12px 20px;border-bottom:1px solid var(--border-soft);}
.dash-tabs{display:flex;gap:6px;flex-wrap:wrap;}
.dash-tab{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:11.5px;font-weight:600;padding:6px 13px;border-radius:20px;cursor:pointer;transition:background .15s,color .15s,border-color .15s;}
.dash-tab:hover{background:var(--border-soft);}
.dash-tab.active{background:var(--blue-dark);border-color:var(--blue-dark);color:#fff;}
.dash-search{position:relative;display:flex;align-items:center;min-width:200px;flex:1;max-width:340px;}
.dash-search .ds-icon{position:absolute;left:11px;font-size:12px;color:var(--text-faint);pointer-events:none;}
.dash-search input{width:100%;padding:8px 28px 8px 31px;border:1px solid var(--border);border-radius:9px;font-size:12px;background:#fbfbfd;transition:background .15s,border-color .15s;}
.dash-search input:focus{outline:none;border-color:var(--blue);background:#fff;box-shadow:0 0 0 3px var(--blue-soft);}
.dash-search .ds-clear{position:absolute;right:6px;display:none;border:none;background:none;color:var(--text-faint);font-size:11px;cursor:pointer;padding:4px;}
.dash-search.has-text .ds-clear{display:block;}
.dash-search-summary{padding:8px 20px 0;font-size:11px;color:var(--text-dim);}
.dash-sync-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;padding:10px 20px;background:#fafbfd;border-bottom:1px solid var(--border-soft);}
.dash-sync-label{font-size:10.5px;color:var(--text-faint);font-weight:600;}
.dash-sync-actions{display:flex;gap:8px;}
.dash-sync-btn{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:11px;font-weight:600;padding:6px 11px;border-radius:7px;cursor:pointer;white-space:nowrap;transition:background .15s,border-color .15s,color .15s;}
.dash-sync-btn:hover{background:var(--blue-soft);border-color:var(--blue-soft);color:var(--blue);}
.dash-empty{padding:40px 20px;text-align:center;color:var(--text-faint);font-size:12.5px;}
.meeting-card{border:1px solid var(--border);border-radius:12px;padding:16px 18px;margin-bottom:12px;background:#fff;transition:box-shadow .15s,border-color .15s;}
.meeting-card:hover{box-shadow:var(--shadow-sm);border-color:#d7dce4;}
.meeting-card:last-child{margin-bottom:0;}
.mc-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
.mc-title{font-weight:700;font-size:14px;color:var(--text);letter-spacing:-.01em;}
.mc-meta{font-size:11px;color:var(--text-faint);margin-top:3px;}
.mc-tag{display:inline-block;background:var(--blue-soft);color:var(--blue);font-size:10px;font-weight:700;border-radius:6px;padding:2px 8px;margin-left:6px;}
.mc-edit-btn{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:11px;font-weight:600;padding:6px 13px;border-radius:8px;cursor:pointer;white-space:nowrap;flex-shrink:0;transition:background .15s;}
.mc-edit-btn:hover{background:var(--border-soft);}
.mc-status-summary{display:flex;gap:16px;flex-wrap:wrap;font-size:11.5px;font-weight:700;margin-bottom:10px;}
.mc-stat.accepted{color:var(--green);}
.mc-stat.declined{color:var(--red);}
.mc-stat.pending{color:var(--amber);}
.mc-attendee-chips{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:12px;}
.attendee-chip{border:none;border-radius:20px;font-size:11px;font-weight:600;padding:5px 11px;cursor:pointer;transition:filter .15s;}
.attendee-chip:hover{filter:brightness(0.96);}
.attendee-chip.accepted{background:var(--green-soft);color:var(--green);}
.attendee-chip.declined{background:var(--red-soft);color:var(--red);}
.attendee-chip.pending{background:var(--amber-soft);color:var(--amber);}
.mc-remind-row{border-top:1px solid var(--border-soft);padding-top:11px;}
.mc-remind-btn{border:1px solid var(--amber);background:var(--amber-soft);color:var(--amber);font-size:11.5px;font-weight:700;padding:7px 13px;border-radius:8px;cursor:pointer;transition:filter .15s;}
.mc-remind-btn:hover{filter:brightness(0.97);}
.mc-remind-btn.mc-remind-done{opacity:.6;cursor:default;}
.mc-remind-note{font-size:10.5px;color:var(--text-dim);margin-top:6px;}
.mc-all-responded{border-top:1px solid var(--border-soft);padding-top:11px;font-size:11.5px;color:var(--green);font-weight:700;}
@media(max-width:480px){
  .dash-toolbar{flex-direction:column;align-items:stretch;}
  .dash-search{max-width:none;}
  .dash-head{flex-direction:column;align-items:stretch;gap:10px;}
  .dash-head-actions{align-items:stretch;min-width:0;}
  .dash-delegate-block{width:100%;}
  .dash-head .btn.primary{justify-content:center;}
  .dash-sync-row{flex-direction:column;align-items:stretch;}
  .dash-sync-actions{justify-content:stretch;}
  .dash-sync-btn{flex:1;}
}
.buffer-toggle-row{margin:10px 0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:stretch;gap:8px;}
.buffer-field{display:flex;align-items:center;gap:8px;border:1px solid var(--border-soft);background:#fff;border-radius:9px;padding:8px 12px;min-width:0;}
.buffer-field .r-text{flex:1;display:flex;align-items:center;font-size:12px;color:var(--text-dim);white-space:normal;overflow:visible;text-overflow:clip;line-height:1.1;}
.buffer-field .r-text strong{display:block;line-height:1.1;margin:0;}
.buffer-field input[type="number"]{width:60px;border:1px solid var(--border);border-radius:7px;padding:6px 8px;font-size:12px;text-align:center;}
.buffer-unit{font-size:11px;color:var(--text-faint);}
.buffer-toggle-row #bufferHint{grid-column:1 / -1;}
.buffer-badge{display:inline-block;font-size:9px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#8a5a00;background:#fff4da;border:1px solid #ffe4a3;border-radius:5px;padding:1px 5px;margin-left:4px;vertical-align:middle;}
th.buffer-col{color:var(--text-faint);}
.cell.buffer-col-slot{outline:1px dashed rgba(22,27,40,.28);outline-offset:-1px;}
.cell.buffer-col-slot.free{background:var(--green-soft);color:var(--green);}
.cell.buffer-col-slot.tentative{background:var(--amber-soft);color:var(--amber);}
.cell.buffer-col-slot.busy{background:var(--red-soft);color:var(--red);}
.cell.buffer-col-slot.oof{background:var(--mrcl-soft);color:var(--mrcl);}
.cell.buffer-col-slot.elsewhere{background:#eef1f6;color:var(--text-dim);}
.room-search-row{margin-bottom:8px;}
.room-search-row input{width:100%;border:1px solid var(--border);border-radius:7px;padding:7px 9px;font-size:12px;box-sizing:border-box;}
.room-selected-chip{display:flex;align-items:center;gap:9px;border:1px solid var(--mrcl);background:var(--mrcl-soft);border-radius:9px;padding:7px 9px;margin-bottom:8px;}
.room-selected-chip .rsc-icon{width:26px;height:26px;border-radius:7px;background:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;flex-shrink:0;}
.room-selected-chip .rsc-info{flex:1;min-width:0;}
.room-selected-chip .rsc-name{font-size:12px;font-weight:700;color:#5b21b6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.room-selected-chip .rsc-meta{font-size:10px;color:#7c3aed;opacity:.85;}
.room-selected-chip .chip-x{cursor:pointer;width:18px;height:18px;border-radius:50%;background:rgba(124,58,237,.15);display:flex;align-items:center;justify-content:center;font-size:13px;line-height:1;flex-shrink:0;color:#5b21b6;}
.room-selected-chip .chip-x:hover{background:rgba(124,58,237,.28);}
.room-hint{font-size:11.5px;color:var(--text-faint);padding:8px 2px;}
.room-hint.error{color:var(--red);}
.room-results-summary{font-size:11px;color:var(--text-dim);background:#f3f6fb;border:1px solid var(--border-soft);border-radius:8px;padding:6px 9px;margin:0 0 7px;}
.room-card{cursor:pointer;transition:background .15s,border-color .15s;}
.room-card:hover{background:#f2f5fa;}
.room-card.selected{border-color:var(--green);background:var(--green-soft);}
.room-status.selected{background:var(--green);color:#fff;}
.room-status.available-at-time{background:#e8f1ff;color:#1f4f8f;}
.room-load-more{width:100%;margin-top:6px;border:1px dashed var(--border);background:#fff;color:var(--text-dim);font-size:11px;font-weight:600;padding:7px;border-radius:7px;cursor:pointer;}
.room-load-more:hover{background:var(--border-soft);}
.mc-actions{display:flex;gap:6px;flex-shrink:0;}
.mc-forward-btn{border:1px solid var(--border);background:#fff;color:var(--text-dim);font-size:11px;font-weight:600;padding:6px 12px;border-radius:8px;cursor:pointer;white-space:nowrap;transition:background .15s;}
.mc-forward-btn:hover{background:var(--border-soft);}
.mc-cancel-btn{border:1px solid var(--red-soft);background:#fff;color:var(--red);font-size:11px;font-weight:600;padding:6px 12px;border-radius:8px;cursor:pointer;white-space:nowrap;transition:background .15s;}
.mc-cancel-btn:hover{background:var(--red-soft);}
.avail-head-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end;}
.avail-head-toggle{display:flex;align-items:center;gap:8px;white-space:nowrap;padding:4px 8px;border:1px solid var(--border-soft);border-radius:999px;background:#fff;}
.avail-head-toggle .field-label{font-size:11px;color:var(--text-dim);margin:0;}
.fullday-view{margin-top:8px;border:1px solid var(--border-soft);border-radius:10px;padding:10px;background:#fff;}
.fullday-legend{display:flex;flex-wrap:wrap;gap:12px;font-size:10.5px;color:var(--text-dim);margin-bottom:8px;}
.fullday-legend span{display:inline-flex;align-items:center;gap:5px;}
.fullday-swatch{display:inline-block;width:11px;height:11px;border-radius:3px;}
.fullday-swatch.status-free{background:var(--green-soft);border:1px solid var(--green);}
.fullday-swatch.status-tentative{background:var(--amber-soft);border:1px solid var(--amber);}
.fullday-swatch.status-busy{background:var(--red-soft);border:1px solid var(--red);}
.fullday-swatch.status-oof{background:var(--mrcl-soft);border:1px solid var(--mrcl);}
.fullday-swatch.status-elsewhere{background:#eef1f6;border:1px solid #5c6472;}
.fullday-swatch.best-solid{border:1.5px dotted #f5a623;background:rgba(245,166,35,.2);}
.fullday-swatch.best-dotted{border:1.5px dotted #c97d0e;background:#fff;}
.fullday-swatch.manual-pick{border:2.5px solid var(--blue-dark);background:var(--blue-soft);}
.fullday-demo-note{color:var(--text-faint);font-style:italic;}
.fullday-scroll{overflow:auto;max-height:360px;position:relative;border:1px solid var(--border-soft);border-radius:8px;padding:6px 6px 6px 2px;background:#fff;-webkit-overflow-scrolling:touch;}
/* NOTE: .fullday-row is a FLEX container (not grid). Older WebKit/WebView engines
   (notably the WebViews used inside Outlook mobile) have a long-standing bug where
   position:sticky fails on the direct child of a display:grid container, which is
   why the name column used to scroll away with the rest of the row. Flex children
   don't hit that bug, so the frozen/sticky name column now works reliably everywhere.
   The hour cells still use CSS grid for column alignment, just nested one level
   deeper inside .fullday-cells so they're no longer the sticky element's parent. */
.fullday-row{display:flex;align-items:flex-start;gap:6px;margin-bottom:4px;min-width:max-content;}
.fullday-header{margin-bottom:6px;position:sticky;top:0;z-index:12;background:#fff;padding:4px 0;align-items:center;opacity:1;backdrop-filter:none;isolation:isolate;}
.fullday-header::before{content:"";position:absolute;inset:0;background:#fff;z-index:-1;pointer-events:none;}
.fullday-name{flex:0 0 172px;width:172px;position:sticky;left:-2px;z-index:11;background:#fff;box-shadow:2px 0 6px rgba(20,25,45,.08);font-size:10.5px;font-weight:600;color:var(--text-dim);white-space:normal;overflow:hidden;text-overflow:ellipsis;padding:4px 8px 4px 2px;line-height:1.3;align-self:stretch;opacity:1;backdrop-filter:none;isolation:isolate;}
.fullday-name::before{content:"";position:absolute;inset:0;background:#fff;z-index:-1;pointer-events:none;}
.fullday-header .fullday-name{z-index:13;box-shadow:none;top:0;background:#fff;opacity:1;}
.fullday-header .fullday-cells{background:#fff;opacity:1;backdrop-filter:none;}
.fullday-name-top{display:flex;align-items:center;flex-wrap:nowrap;gap:4px;color:var(--text);white-space:nowrap;background:#fff;position:relative;z-index:1;}
.fullday-tz{display:block;font-size:9px;font-weight:400;color:var(--text-faint);}
.fullday-cells{display:grid;gap:2px;flex:0 0 auto;min-width:max-content;}
.fullday-hourlabel{font-size:7.5px;color:var(--text-faint);text-align:center;letter-spacing:-.02em;white-space:nowrap;overflow:hidden;}
.fullday-cell .fc-time{display:block;font-size:7px;font-weight:700;line-height:1.15;text-align:center;pointer-events:none;white-space:nowrap;overflow:hidden;width:100%;}
.fullday-cell .fc-tz{display:block;font-size:5.5px;font-weight:600;line-height:1.1;text-align:center;opacity:.75;pointer-events:none;white-space:nowrap;overflow:hidden;width:100%;}
.grid-loading-overlay{position:absolute;inset:0;background:rgba(255,255,255,.72);display:flex;align-items:center;justify-content:center;gap:8px;z-index:10;border-radius:8px;font-size:11.5px;font-weight:600;color:var(--text-dim);}
.grid-loading-overlay .spinner{width:14px;height:14px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--blue);animation:grid-spin .7s linear infinite;}
@keyframes grid-spin{to{transform:rotate(360deg);}}
#durationInput:disabled{opacity:.6;cursor:wait;}
.fullday-cell{height:24px;border-radius:4px;position:relative;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;border:1.5px dotted rgba(20,25,45,.16);}
.fullday-cell.band-unknown{background-image:repeating-linear-gradient(45deg,#eee,#eee 3px,#f7f7f5 3px,#f7f7f5 6px);}
.fullday-swatch.band-working{background:#eef3fb;border:1px solid #d7e3f7;}
.fullday-swatch.band-buffer{background:var(--amber-soft);border:1px solid #f6d9a6;}
.fullday-swatch.band-nonworking{background:#eef1f6;border:1px solid #dfe4eb;}
.fullday-swatch.band-unknown{background:repeating-linear-gradient(45deg,#eee,#eee 3px,#f7f7f5 3px,#f7f7f5 6px);}
/* Status colors: soft/pastel fills with matching colored text, consistent with the rest of the app's palette. */
.fullday-cell.status-free{background:var(--green-soft);}
.fullday-cell.status-free .fc-time,.fullday-cell.status-free .fc-tz{color:var(--green);}
.fullday-cell.status-tentative{background:var(--amber-soft);}
.fullday-cell.status-tentative .fc-time,.fullday-cell.status-tentative .fc-tz{color:var(--amber);}
.fullday-cell.status-busy{background:var(--red-soft);}
.fullday-cell.status-busy .fc-time,.fullday-cell.status-busy .fc-tz{color:var(--red);}
.fullday-cell.status-oof{background:var(--mrcl-soft);}
.fullday-cell.status-oof .fc-time,.fullday-cell.status-oof .fc-tz{color:var(--mrcl);}
.fullday-cell.status-elsewhere{background:#eef1f6;}
.fullday-cell.status-elsewhere .fc-time,.fullday-cell.status-elsewhere .fc-tz{color:#5c6472;}
/* Buffer / outside-working-hours bands: same status hue, slightly muted + a diagonal
   texture so they read as a "different band" without losing the status color or,
   crucially, without a text label sitting on top of the time (that's what used to
   cause "Buffer" to visually cover everything in the cell). A small corner dot is
   the only extra marker now; full detail is still available on hover via title. */
.fullday-cell.band-buffer,.fullday-cell.band-nonworking{position:relative;overflow:visible;}
.fullday-cell.band-buffer::before,.fullday-cell.band-nonworking::before{content:"";position:absolute;inset:0;border-radius:4px;background:repeating-linear-gradient(135deg, rgba(20,25,45,.06) 0 5px, transparent 5px 10px);pointer-events:none;overflow:hidden;}
.fullday-cell.band-nonworking{opacity:.72;}
.fullday-cell.band-buffer::after{content:"";position:absolute;bottom:1px;right:1px;width:5px;height:5px;border-radius:50%;background:#c97d0e;box-shadow:0 0 0 1.5px #fff;pointer-events:none;z-index:2;}
.fullday-cell.band-buffer.status-free,.fullday-cell.band-nonworking.status-free{background:var(--green-soft);}
.fullday-cell.band-buffer.status-tentative,.fullday-cell.band-nonworking.status-tentative{background:var(--amber-soft);}
.fullday-cell.band-buffer.status-busy,.fullday-cell.band-nonworking.status-busy{background:var(--red-soft);}
.fullday-cell.band-buffer.status-oof,.fullday-cell.band-nonworking.status-oof{background:var(--mrcl-soft);}
.fullday-cell.band-buffer.status-elsewhere,.fullday-cell.band-nonworking.status-elsewhere{background:#eef1f6;}
/* Best-time treatment, three-tier hierarchy (thin DOTTED lines throughout, per design ask):
   - Best Slot: thin (1.5px) DOTTED gold border + light striped fill.
   - Next Best: thin (1.5px) DOTTED gold border, no fill.
   - Everything else: thin (1.5px) DOTTED neutral border (see base .fullday-cell rule above).
   Only the fill (and badge) distinguish Best from Next Best now — border weight/style is
   consistent across all three tiers. */
.fullday-cell.ai-top-pick,.fullday-cell.ai-next-best,.fullday-cell.ai-also-good{position:relative;overflow:hidden;}
.fullday-cell.ai-top-pick{border:1.5px dotted #f5a623;z-index:2;}
.fullday-cell.ai-top-pick::before{content:"";position:absolute;inset:0;background:repeating-linear-gradient(135deg, rgba(245,166,35,.22) 0 6px, transparent 6px 12px);pointer-events:none;z-index:0;}
/* Bug fix: same missing-rule issue as .cell.ai-next-best above \u2014 the
   second-best slot had zero visual treatment in the 24-hour view too. */
.fullday-cell.ai-next-best{border:1.5px dotted #f5a623;background:rgba(245,166,35,.10);z-index:1;}
.fullday-cell.ai-next-best::before{display:none;}
.fullday-cell.ai-also-good{border:1.5px dotted #c97d0e;z-index:1;}
.fullday-cell.ai-also-good::before{display:none;}
.fc-best-badge{position:absolute;top:1px;right:1px;min-width:11px;height:11px;padding:0 2px;border-radius:6px;background:#f5a623;color:#fff;font-size:7px;font-weight:700;line-height:11px;text-align:center;z-index:3;pointer-events:none;}
.fc-best-badge.also{background:#fff;color:#c97d0e;border:1.5px solid #c97d0e;}
.fullday-cell.user-picked{border:2.5px solid var(--blue-dark);background:var(--blue-soft) !important;box-shadow:0 0 0 1px var(--blue-dark);filter:none;z-index:3;}
.fullday-cell.user-picked .fc-time,.fullday-cell.user-picked .fc-tz{color:var(--blue-dark);}
.unknown-badge{display:inline-block;font-size:9px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:var(--text-dim);background:#eee;border:1px solid #ddd;border-radius:5px;padding:1px 5px;margin-left:4px;vertical-align:middle;}
.delegate-item.revoked{cursor:not-allowed;opacity:.55;}
.delegate-item.revoked:hover{background:transparent;}
.delegate-item.revoked .di-role{color:var(--red);}
.confirm-modal{display:none;position:fixed;inset:0;background:rgba(20,25,45,.45);z-index:1000;align-items:flex-start;justify-content:center;padding:32px 16px;overflow-y:auto;}
.confirm-modal.show{display:flex;}
.confirm-card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow-lg);width:100%;max-width:480px;padding:0;overflow:hidden;}
.confirm-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border-soft);font-size:15px;font-weight:700;color:var(--text);}
.confirm-close{border:none;background:transparent;color:var(--text-faint);font-size:15px;cursor:pointer;line-height:1;padding:4px;}
.confirm-close:hover{color:var(--text);}
.confirm-body{padding:20px 22px 6px;}
.confirm-card h2{margin:0 0 18px;font-size:17px;font-weight:700;color:var(--text);}
.confirm-rows{display:flex;flex-direction:column;}
.confirm-row{display:flex;align-items:flex-start;gap:10px;padding:11px 0;border-bottom:1px solid var(--border-soft);font-size:12.5px;}
.confirm-row:last-child{border-bottom:none;}
.btn-link-sm{background:none;border:none;color:var(--mrcl);font-size:11.5px;font-weight:700;cursor:pointer;padding:0;margin-left:auto;flex-shrink:0;}
.btn-link-sm:hover{text-decoration:underline;}
.cr-icon{flex-shrink:0;width:18px;text-align:center;opacity:.85;}
.cr-label{flex:0 0 92px;color:var(--text-faint);font-weight:600;padding-top:1px;}
.cr-value{flex:1;min-width:0;color:var(--text);}
.confirm-subtle{color:var(--text-faint);font-weight:400;}
.confirm-attendee-list{list-style:disc;margin:0;padding-left:20px;display:flex;flex-direction:column;gap:8px;}
.confirm-attendee-list li{font-size:12.5px;color:var(--text);}
.confirm-email{font-size:11px;color:var(--text-faint);}
.confirm-foot{display:flex;justify-content:flex-end;gap:10px;padding:16px 22px 20px;border-top:1px solid var(--border-soft);}
.cancel-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.cancel-modal.show {
  display: flex;
}
.cancel-modal-content {
  width: 420px;
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  position: relative;
}
.cancel-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 20;
  border-radius: 12px;
}
.cancel-loading-spinner {
  width: 36px;
  height: 36px;
  border: 4px solid #dde3ee;
  border-top-color: #d92d20;
  border-radius: 50%;
  animation: grid-spin 0.75s linear infinite;
}
.cancel-loading-label {
  font-size: 14px;
  font-weight: 600;
  color: #3a4a5c;
}
.findbest-busy-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,.32);backdrop-filter:blur(1px);z-index:1200;align-items:center;justify-content:center;}
.findbest-busy-overlay.show{display:flex;}
.findbest-busy-card{display:flex;align-items:center;gap:10px;background:#fff;border:1px solid var(--border);border-radius:10px;padding:12px 14px;box-shadow:var(--shadow-lg);font-size:12.5px;font-weight:700;color:var(--text);}
.findbest-busy-card .spinner{width:16px;height:16px;border-radius:50%;border:2px solid var(--border);border-top-color:var(--blue);animation:grid-spin .7s linear infinite;}
.cancel-body textarea {
  width: 100%;
  min-height: 90px;
  margin-top: 12px;
  resize: vertical;
}
.cancel-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.btn-danger {
  background: #d92d20;
  color: #fff;
  border: none;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}
.btn-secondary {
  background: #f3f4f6;
  border: 1px solid #ddd;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}
#forwardMeetingEmails {
  width: 100%;
  height: 40px;
  padding: 8px 12px;
  margin-top: 8px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}
.btn-primary {
  background: #0078d4;
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  cursor: pointer;
}
.forward-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.52);
}
.forward-modal.show {
  display: flex;
}
.insights-modal {
  position: fixed;
  inset: 0;
  z-index: 10500;
  display: none;
  align-items: stretch;
  justify-content: center;
  background: rgba(15, 23, 42, 0.6);
}
.insights-modal.show {
  display: flex;
}
.insights-modal-content {
  width: 100%;
  height: 100%;
  max-width: none;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  overflow: hidden;
}
.insights-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-bottom: 1px solid #e8edf5;
}
.insights-header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
}
.insights-header p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}
.insights-close-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  cursor: pointer;
  color: #667085;
  background: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  font-size: 14px;
}
.insights-tabs {
  display: flex;
  gap: 4px;
  padding: 0 28px;
  border-bottom: 1px solid #e8edf5;
  flex-shrink: 0;
}
.insights-tab {
  border: none;
  background: none;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  color: #667085;
  cursor: pointer;
  border-bottom: 3px solid transparent;
}
.insights-tab.active {
  color: #0078d4;
  border-bottom-color: #0078d4;
}
.insights-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px 28px 40px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.insights-panel {
  display: none;
}
.insights-panel.active {
  display: block;
}
.insights-panel h3 {
  margin: 0 0 12px;
  font-size: 17px;
  color: #111827;
}
.insights-intro {
  color: #344054;
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0 0 14px;
}
.insights-subhead {
  font-weight: 700;
  color: #111827;
  font-size: 13px;
  margin: 16px 0 6px;
}
.insights-list {
  margin: 0 0 4px;
  padding-left: 20px;
  color: #344054;
  font-size: 13px;
  line-height: 1.7;
}
.insights-list-numbered {
  list-style: decimal;
}
.mc-insights-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text-dim);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s;
}
.mc-insights-btn:hover {
  background: var(--border-soft);
}
.insights-send-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #e8edf5;
}
.insights-send-section h4 {
  margin: 0 0 10px;
  font-size: 13.5px;
  color: #111827;
}
.insights-send-section .forward-section-header {
  margin-top: 12px;
}
.insights-send-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.forward-modal-content {
  width: min(920px, 100%);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
}
.forward-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e8edf5;
}
.forward-header h2 {
  margin: 0;
  color: #111827;
  font-size: 20px;
  font-weight: 700;
}
.forward-header p {
  margin: 5px 0 0;
  color: #667085;
  font-size: 13px;
}
.forward-close-btn {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  cursor: pointer;
  color: #667085;
  background: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
}
.forward-close-btn:hover {
  color: #111827;
  background: #f8fafc;
}
.forward-body {
  padding: 20px 24px;
  overflow-y: auto;
}
.forward-search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 9px;
}
.forward-search-box:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.forward-search-icon {
  color: #94a3b8;
}
#forwardAttendeeSearch {
  width: 100%;
  min-width: 0;
  padding: 11px 0;
  border: 0;
  outline: 0;
  font-size: 14px;
}
.forward-search-clear {
  display: none;
  cursor: pointer;
  color: #64748b;
  background: transparent;
  border: 0;
}
.forward-search-clear.show {
  display: inline-flex;
}
.forward-directory-status {
  min-height: 20px;
  margin-top: 8px;
  color: #667085;
  font-size: 12px;
}
.forward-directory-results {
  max-height: 220px;
  margin-top: 8px;
  overflow-y: auto;
  border: 1px solid #e4e9f1;
  border-radius: 10px;
}
.forward-directory-results:empty {
  display: none;
}
.forward-directory-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f6;
}
.forward-directory-item:last-child {
  border-bottom: 0;
}
.forward-directory-item:hover {
  background: #f8fafc;
}
.forward-directory-item-disabled {
  opacity: 0.6;
  background: #f9fafb;
}
.forward-directory-item-disabled:hover {
  background: #f9fafb;
}
.forward-directory-avatar,
.forward-selected-avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 700;
}
.forward-directory-info,
.forward-selected-info {
  min-width: 0;
  flex: 1;
}
.forward-directory-name,
.forward-selected-name {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forward-directory-email,
.forward-selected-email {
  margin-top: 2px;
  overflow: hidden;
  color: #8491a7;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.forward-add-btn {
  cursor: pointer;
  padding: 7px 13px;
  color: #ffffff;
  background: #2563eb;
  border: 0;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 650;
}
.forward-add-btn:disabled {
  cursor: default;
  color: #64748b;
  background: #e2e8f0;
}
.forward-selected-section {
  margin-top: 22px;
}
.forward-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.forward-section-header h3 {
  margin: 0;
  color: #111827;
  font-size: 15px;
}
.forward-section-header p {
  margin: 3px 0 0;
  color: #667085;
  font-size: 12px;
}
.forward-selected-count {
  min-width: 28px;
  padding: 4px 9px;
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 999px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
}
.forward-selected-attendees {
  border: 1px solid #e4e9f1;
  border-radius: 10px;
}
.forward-selected-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-bottom: 1px solid #edf1f6;
}
.forward-selected-row:last-child {
  border-bottom: 0;
}
.forward-permission-group {
  display: flex;
  align-items: center;
  gap: 4px;
}
.forward-permission-btn {
  cursor: pointer;
  padding: 8px 12px;
  color: #475569;
  background: #f1f3f7;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
}
.forward-permission-btn:hover {
  background: #e8edf5;
}
.forward-permission-btn.selected {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  box-shadow: 0 2px 5px rgba(37, 99, 235, 0.24);
}
.forward-remove-btn {
  width: 34px;
  height: 34px;
  cursor: pointer;
  color: #94a3b8;
  background: #ffffff;
  border: 1px solid #d8dee9;
  border-radius: 8px;
}
.forward-remove-btn:hover {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}
.forward-empty-state,
.forward-result-empty {
  padding: 18px;
  color: #667085;
  text-align: center;
  font-size: 13px;
}
.forward-comment-section {
  margin-top: 20px;
}
.forward-optional-label {
  margin-left: 4px;
  color: #94a3b8;
  font-weight: 400;
}
#forwardMeetingComment {
  width: 100%;
  min-height: 82px;
  box-sizing: border-box;
  resize: vertical;
  padding: 10px 12px;
  outline: none;
  border: 1px solid #d8dee9;
  border-radius: 8px;
  font-family: inherit;
}
#forwardMeetingComment:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}
.forward-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  background: #f8fafc;
  border-top: 1px solid #e8edf5;
}
.forward-loading-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 20;
  border-radius: 12px;
}
.forward-loading-spinner {
  width: 38px;
  height: 38px;
  border: 4px solid #dde3ee;
  border-top-color: #4a6fa5;
  border-radius: 50%;
  animation: grid-spin 0.75s linear infinite;
}
.forward-loading-label {
  font-size: 14px;
  font-weight: 600;
  color: #3a4a5c;
}
@media (max-width: 760px) {
  .forward-selected-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .forward-selected-info {
    width: calc(100% - 52px);
  }
  .forward-permission-group {
    width: 100%;
    padding-left: 50px;
    flex-wrap: wrap;
  }
  .forward-remove-btn {
    position: absolute;
    right: 36px;
  }
}
@media (max-width:420px){
  .confirm-card{padding:18px 16px 16px;}
  .cr-label{flex-basis:76px;}
}
.success-modal{display:none;position:fixed;inset:0;background:rgba(20,25,45,.45);z-index:1100;align-items:center;justify-content:center;padding:16px;}
.success-modal.show{display:flex;}
.success-card{background:var(--card);border-radius:var(--radius);box-shadow:var(--shadow-lg);width:100%;max-width:360px;padding:26px 24px 22px;text-align:center;}
.success-icon{width:46px;height:46px;margin:0 auto 12px;border-radius:50%;background:var(--green-soft);color:var(--green);display:flex;align-items:center;justify-content:center;font-size:22px;font-weight:800;}
.success-card h2{margin:0 0 8px;font-size:16px;font-weight:700;color:var(--text);}
.success-body{font-size:12.5px;color:var(--text-dim);line-height:1.5;margin-bottom:18px;}
.success-ok-btn{width:100%;}
.btn:disabled{opacity:.55;cursor:not-allowed;}
.btn:disabled:hover{background:#fff;}
.btn.primary:disabled:hover{filter:none;box-shadow:var(--shadow-sm);}
.btn.loading{position:relative;color:transparent !important;pointer-events:none;}
.btn.loading::after{
  content:"";position:absolute;top:50%;left:50%;width:14px;height:14px;margin:-7px 0 0 -7px;
  border-radius:50%;border:2px solid rgba(0,0,0,.18);border-top-color:var(--text-dim);
  animation:btn-spin .7s linear infinite;
}
.btn.primary.loading::after{border-color:rgba(255,255,255,.35);border-top-color:#fff;}
@keyframes btn-spin{to{transform:rotate(360deg);}}
.tz-pill{cursor:help;border-bottom:1px dotted currentColor;}
/* ================= EXTERNAL-ATTENDEE POLL & CONSOLIDATION AGENT ================= */
/* Real endpoints wired in src/pollFeature.js + src/services/pollService.js */
.poll-cta-banner{display:none;align-items:center;gap:12px;background:var(--mrcl-soft);border:1px solid #e4d9f7;border-radius:10px;padding:12px 14px;margin-top:10px;}
.poll-cta-banner.show{display:flex;flex-wrap:wrap;}
.poll-cta-banner .pcb-icon{width:30px;height:30px;border-radius:8px;background:var(--mrcl);color:#fff;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0;}
.poll-cta-banner .pcb-text{flex:1;min-width:180px;font-size:12px;color:#4c1d95;line-height:1.5;}
.poll-cta-banner .pcb-text strong{display:block;font-size:13px;}
.btn.mrcl-btn{background:var(--mrcl);color:#fff;border:none;}
.btn.mrcl-btn:hover{background:#6b21d8;}
.btn.mrcl-outline{background:#fff;color:var(--mrcl);border:1px solid #d9c8f7;}
.btn.mrcl-outline:hover{border-color:var(--mrcl);}

.poll-opt-check{display:flex;align-items:center;gap:10px;border:1px solid var(--border-soft);border-radius:10px;padding:10px 12px;margin-bottom:8px;cursor:pointer;}
.poll-opt-check:hover{border-color:#d9c8f7;}
.poll-opt-check input{accent-color:var(--mrcl);width:16px;height:16px;flex-shrink:0;}
.poll-opt-check .poc-time{font-weight:700;font-size:13px;}
.poll-opt-check .poc-meta{font-size:11px;color:var(--text-faint);margin-top:2px;}
.poll-opt-check.poll-attendee-check .poc-time{font-size:12.5px;}
.poll-opt-check input:disabled,.poll-setup-send-btn:disabled{opacity:.5;cursor:not-allowed;}
.poll-custom-toggle{display:flex;align-items:center;gap:12px;border:1px solid var(--mrcl-soft);background:#fbf9ff;border-radius:10px;padding:10px 12px;margin-top:12px;}
.poll-custom-toggle .pct-text{flex:1;font-size:12px;color:#5b21b6;}
.poll-custom-toggle .pct-text strong{display:block;font-size:12.5px;}

.poll-block .block-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.poll-status-pill{font-size:10.5px;font-weight:700;padding:3px 10px;border-radius:20px;background:var(--mrcl-soft);color:#5b21b6;}
.poll-status-pill.closed{background:var(--green-soft);color:var(--green);}
.poll-card{border:1px solid var(--border-soft);border-radius:12px;padding:16px;background:#fff;margin-bottom:14px;}
.poll-card-title{font-size:12.5px;font-weight:700;color:var(--text-dim);text-transform:uppercase;letter-spacing:.3px;margin-bottom:12px;display:flex;align-items:center;gap:6px;}
.poll-option-row{margin-bottom:12px;}
.poll-option-row:last-child{margin-bottom:0;}
.poll-option-head{display:flex;justify-content:space-between;align-items:baseline;font-size:12.5px;margin-bottom:4px;}
.poll-option-head .pot-label{font-weight:700;}
.poll-option-head .pot-meta{font-size:10.5px;color:var(--text-faint);}
.poll-option-head .pot-votes{font-weight:700;color:var(--mrcl);font-size:11.5px;}
.poll-bar-track{height:8px;border-radius:20px;background:#f1eefc;overflow:hidden;}
.poll-bar-fill{height:100%;background:var(--mrcl);border-radius:20px;transition:width .5s ease;}
.poll-option-row.winner .poll-bar-fill{background:var(--green);}
.poll-option-row.winner .pot-votes{color:var(--green);}
.poll-option-row.winner .poll-option-head .pot-label::after{content:" \1F3C6 Agent recommended";font-size:10.5px;font-weight:700;color:var(--green);}
.poll-resp-list{display:flex;flex-direction:column;gap:8px;}
.poll-resp-item{display:flex;align-items:center;gap:10px;font-size:12px;padding:8px 10px;border-radius:8px;background:#fbfbfc;border:1px solid var(--border-soft);}
.poll-resp-item .pri-av{width:26px;height:26px;border-radius:50%;background:var(--blue-dark);color:#fff;display:flex;align-items:center;justify-content:center;font-size:10.5px;font-weight:700;flex-shrink:0;}
.poll-resp-item .pri-info{flex:1;}
.poll-resp-item .pri-name{font-weight:600;}
.poll-resp-item .pri-sub{color:var(--text-faint);font-size:10.5px;margin-top:1px;}
.poll-resp-item .pri-status{font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;flex-shrink:0;}
.poll-resp-item .pri-status.pending{background:var(--amber-soft);color:var(--amber);}
.poll-resp-item .pri-status.responded{background:var(--green-soft);color:var(--green);}
.poll-resp-item .pri-status.custom{background:var(--mrcl-soft);color:#5b21b6;}
.poll-resp-item .pri-status.declined{background:var(--red-soft);color:var(--red);}
.agent-panel{border:1px dashed #d9c8f7;border-radius:12px;padding:16px;background:#fbf9ff;}
.agent-panel-head{display:flex;align-items:center;gap:10px;margin-bottom:12px;}
.agent-avatar{width:32px;height:32px;border-radius:9px;background:var(--mrcl);color:#fff;display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;}
.agent-panel-title{font-weight:700;font-size:13px;color:#4c1d95;}
.agent-panel-sub{font-size:11px;color:#6d4fae;margin-top:1px;}
.agent-recommend-card{margin-top:14px;background:var(--green-soft);border-radius:10px;padding:14px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;}
.agent-recommend-card .arc-icon{width:34px;height:34px;border-radius:50%;background:#fff;color:var(--green);display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;}
.agent-recommend-card .arc-text{flex:1;min-width:200px;font-size:12.5px;color:#166534;}
.agent-recommend-card .arc-text strong{display:block;font-size:14px;}
.poll-timeline{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px;}
.poll-timeline-step{display:flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;color:var(--text-faint);padding:4px 9px;border-radius:20px;background:#f2f3f6;}
.poll-timeline-step.done{background:var(--green-soft);color:var(--green);}
.poll-timeline-step.active{background:var(--mrcl-soft);color:#5b21b6;}

/* ---- Poll setup modal overlay (was missing entirely — this is the fix) ---- */
.modal-bg{position:fixed;inset:0;background:rgba(20,20,30,.45);display:none;align-items:center;justify-content:center;z-index:1200;padding:20px;}
.modal-bg.show{display:flex;}
.modal{background:#fff;border-radius:14px;max-width:560px;width:100%;max-height:85vh;overflow-y:auto;padding:0;box-shadow:0 20px 60px rgba(20,25,45,.25);}
.modal-head{padding:20px 24px;border-bottom:1px solid var(--border-soft);display:flex;justify-content:space-between;align-items:center;}
.modal-head h2{font-size:16px;margin:0;}
.modal-body{padding:20px 24px;font-size:13px;line-height:1.6;}
.modal-foot{padding:16px 24px;border-top:1px solid var(--border-soft);display:flex;justify-content:flex-end;gap:10px;}
.close-x{background:none;border:none;font-size:18px;color:var(--text-faint);cursor:pointer;}
@media(max-width:640px){ .modal{margin:0 4px;} .modal-foot{flex-wrap:wrap;} }