:root{--bg:#f5f7fa;--surface:#fff;--text:#182333;--muted:#738095;--border:#e5eaf0;--navy:#16283e;--teal:#0f9187;--teal-soft:#e6f6f3;--gold:#d79536;--shadow:0 8px 30px rgba(22,40,62,.055);--radius:16px}
    *{box-sizing:border-box}
    html{scrollbar-gutter:stable}
    body{margin:0;color:var(--text);font:14px/1.47 -apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;background:var(--bg)}
    button,input,select,textarea{font:inherit}
    button{cursor:pointer}
    button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid rgba(15,145,135,.45);outline-offset:2px}
    .app{min-height:100vh}
    .topbar{background:var(--navy);color:white;min-height:80px;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:17px clamp(20px,3.25vw,56px);border-bottom:1px solid rgba(255,255,255,.1)}
    .brand{display:flex;align-items:center;gap:14px}
    .brand-mark{width:43px;height:43px;border-radius:13px;display:grid;place-items:center;background:#0b9f91;color:white;box-shadow:0 8px 22px rgba(0,0,0,.18)}
    .brand-mark svg{width:24px;height:24px}
    .brand-name{font-size:18px;font-weight:800;letter-spacing:-.4px;line-height:1.15}
    .brand-sub{font-size:12px;color:#bbcad8;margin-top:3px}
    .top-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
    .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:39px;padding:9px 14px;border-radius:10px;border:1px solid var(--border);color:#28394d;background:white;font-size:13px;font-weight:700;transition:background .12s,transform .12s,border-color .12s;white-space:nowrap}
    .btn:hover{background:#f3f7f9;border-color:#cdd8e0}.btn:active{transform:translateY(1px)}
    .btn svg{width:16px;height:16px;flex:none}
    .btn-primary{background:var(--teal);border-color:var(--teal);color:white}.btn-primary:hover{background:#0b7f76;border-color:#0b7f76}
    .btn-ghost{background:rgba(255,255,255,.085);color:#e8f1f8;border-color:rgba(255,255,255,.19)}.btn-ghost:hover{background:rgba(255,255,255,.17);border-color:rgba(255,255,255,.32)}
    .btn-danger{border-color:#f1cdcf;background:#fff8f8;color:#b23a46}.btn-danger:hover{background:#ffebec}
    .workspace{padding:28px clamp(20px,3.25vw,56px) 40px;max-width:1900px;margin:auto}
    .headline{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:24px}
    h1{font-size:27px;letter-spacing:-.9px;line-height:1.25;margin:0 0 5px;font-weight:800}
    .subtitle{font-size:13px;color:var(--muted);margin:0}
    .local-note{font-size:12px;color:#567068;display:flex;align-items:center;gap:7px;background:#e8f5f0;border:1px solid #d1eae2;border-radius:20px;padding:7px 11px}
    .local-note svg{width:14px;height:14px}
    .metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin-bottom:26px}
    .metric{border:1px solid var(--border);background:var(--surface);border-radius:var(--radius);padding:17px 19px 18px;box-shadow:var(--shadow);min-height:105px}
    .metric-label{font-size:12px;color:var(--muted);font-weight:650;display:flex;align-items:center;gap:7px}
    .metric-label svg{width:16px;height:16px;color:#8b99a9}
    .metric-value{font-size:25px;letter-spacing:-.9px;font-weight:800;margin-top:13px;line-height:1.15;white-space:nowrap;text-overflow:ellipsis;overflow:hidden}
    .metric-hint{font-size:11px;color:#8896a4;margin-top:3px}
    .board-header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 16px;flex-wrap:wrap}
    .board-heading{display:flex;gap:10px;align-items:center}.board-heading h2{margin:0;font-size:19px;letter-spacing:-.5px}.board-heading .count{font-size:12px;background:#e4ebf0;color:#546479;padding:4px 9px;border-radius:30px;font-weight:800}
    .view-tabs{display:flex;align-items:center;gap:4px;padding:4px;background:#e8edf2;border-radius:12px;width:fit-content}
    .view-tab{border:0;background:transparent;color:#6a7a8d;padding:9px 15px;font-weight:750;border-radius:9px;min-width:140px;font-size:13px}
    .view-tab.active{color:#163247;background:white;box-shadow:0 2px 7px rgba(30,50,70,.08)}
    .controls{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin:0 0 17px}
    .searchbox{height:42px;display:flex;align-items:center;background:white;border:1px solid var(--border);border-radius:10px;padding:0 12px;min-width:240px;flex:1;max-width:410px}
    .searchbox svg{width:17px;height:17px;color:#8a9aac;margin-right:9px;flex:none}.searchbox input{border:0;background:transparent;outline:none;width:100%;color:var(--text);min-width:0}.searchbox input::placeholder{color:#9aa7b5}
    .filter-select{height:42px;max-width:235px;border:1px solid var(--border);border-radius:10px;color:#415367;background:white;padding:0 32px 0 12px;font-weight:600}
    .toggle{height:42px;display:inline-flex;align-items:center;gap:8px;padding:0 13px;border:1px solid var(--border);background:white;border-radius:10px;font-size:13px;color:#58697b;font-weight:700;user-select:none;cursor:pointer}
    .toggle input{accent-color:var(--teal);cursor:pointer}
    .board-nav{display:flex;align-items:center;gap:6px;margin-left:auto}.board-nav button{width:42px;min-height:42px;padding:0;font-size:20px}.board-nav button[disabled]{opacity:.42;cursor:default}
    .board-scroll{overflow-x:auto;overflow-y:hidden;padding:2px 1px 24px;scrollbar-color:#b9c5d0 transparent;scrollbar-width:thin}
    .board{display:flex;gap:14px;align-items:flex-start;min-height:315px}
    .lane{width:295px;min-width:295px;border:1px solid var(--border);background:#eff2f6;border-radius:15px;overflow:hidden;display:flex;flex-direction:column;max-height:calc(100vh - 160px);min-height:305px;transition:background .13s,border-color .13s}
    .lane.drop-target{background:#e3f5ef;border-color:#0f9187;box-shadow:inset 0 0 0 1px #0f9187}
    .lane-head{padding:14px 14px 11px;border-top:4px solid var(--lane-accent,#8496a9);background:#f7f9fb;display:flex;align-items:center;justify-content:space-between;gap:10px}
    .lane-title{font-size:13px;font-weight:800;display:flex;align-items:center;gap:9px}.lane-dot{width:9px;height:9px;border-radius:99px;background:var(--lane-accent,#889);flex:none}
    .lane-count{background:#e5ebf0;border:1px solid #dce4eb;border-radius:8px;padding:2px 8px;font-size:12px;color:#617186;font-weight:800}
    .lane-sum{padding:0 14px 11px;font-size:11px;color:#8290a0;background:#f7f9fb;border-bottom:1px solid #e3e8ee}
    .lane-list{padding:11px;overflow-y:auto;flex:1;min-height:188px;scrollbar-width:thin}
    .card{display:block;width:100%;text-align:left;border:1px solid #e7edf2;border-radius:12px;background:white;padding:13px;box-shadow:0 3px 8px rgba(23,35,47,.034);margin-bottom:10px;cursor:grab;transition:box-shadow .12s,border-color .12s,transform .12s}
    .card:hover{border-color:#b9d9d5;box-shadow:0 7px 17px rgba(25,54,67,.09);transform:translateY(-1px)}.card:active{cursor:grabbing}
    .card.dragging{opacity:.4;transform:scale(.985)}
    .card-meta{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:7px}
    .tender-number{font-size:11px;font-weight:800;color:#5f7185;letter-spacing:.1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .card-star{color:#d6982e;font-size:14px;flex:none}
    .card-title{font-size:13px;font-weight:800;line-height:1.42;margin-bottom:10px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;overflow-wrap:anywhere}
    .card-amount{font-size:17px;font-weight:850;letter-spacing:-.45px;margin-bottom:9px}
    .card-customer{color:#7c8998;font-size:11px;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;overflow:hidden;margin-bottom:9px}
    .chip{font-size:10.5px;font-weight:750;padding:4px 8px;border-radius:6px;background:#eaf0f6;color:#50697d;display:inline-flex;line-height:1.3;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
    .card-bottom{margin-top:11px;border-top:1px solid #f0f2f4;padding-top:10px;display:flex;align-items:center;gap:7px;justify-content:space-between;flex-wrap:wrap}
    .deadline{font-size:11px;color:#6c7d8c;display:inline-flex;align-items:center;gap:5px;font-weight:750}.deadline svg{width:13px;height:13px;flex:none}
    .deadline.soon{color:#ad700e}.deadline.late{color:#ca4c50}.deadline.distant{color:#277b69}
    .note-preview{color:#748392;font-size:11px;margin-top:10px;border-left:2px solid #d3dfeb;padding-left:8px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
    .empty{padding:30px 15px;text-align:center;font-size:12px;line-height:1.6;color:#93a0ad}
    .footnote{font-size:12px;line-height:1.7;color:#8290a1;padding:14px 0 0;display:flex;align-items:center;gap:8px}
    .footnote svg{width:15px;height:15px;flex:none}
    .empty-state{background:white;border:1px dashed #cbd7df;text-align:center;border-radius:17px;padding:36px 24px;margin-bottom:20px}
    .empty-state .big-icon{width:56px;height:56px;background:#eaf6f4;border-radius:18px;display:grid;place-items:center;margin:0 auto 13px;color:#109587}.empty-state .big-icon svg{width:28px;height:28px}
    .empty-state h3{font-size:17px;margin:0 0 6px}.empty-state p{color:var(--muted);font-size:13px;margin:0 0 17px}
    .storage-warning{padding:12px 15px;background:#fff0e9;border:1px solid #f3bea7;border-radius:11px;color:#914721;font-size:13px;margin-bottom:18px;display:none}
    .storage-warning.visible{display:block}
    .overlay{position:fixed;inset:0;z-index:30;background:rgba(13,26,42,.65);display:none;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(3px)}.overlay.open{display:flex}
    .dialog{width:100%;max-width:740px;max-height:calc(100vh - 34px);background:white;border-radius:20px;display:flex;flex-direction:column;box-shadow:0 27px 70px rgba(0,0,0,.26);overflow:hidden}
    .dialog-header{padding:20px 24px;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:14px}
    .dialog-header h2{font-size:20px;letter-spacing:-.5px;margin:0}.dialog-header p{font-size:12px;color:var(--muted);margin:3px 0 0}
    .close{width:35px;height:35px;border:0;border-radius:10px;background:#f0f3f6;color:#566779;font-size:23px;line-height:1}.close:hover{background:#e4ebf0}
    .dialog-body{overflow-y:auto;padding:20px 24px 8px;overscroll-behavior:contain}
    .section-label{margin:0 0 12px;font-size:11px;font-weight:850;text-transform:uppercase;letter-spacing:1px;color:#8190a0}
    .form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px 15px;margin-bottom:22px}
    .field{display:flex;flex-direction:column;gap:5px;min-width:0}.field.full{grid-column:1/-1}
    .field label{font-size:12px;font-weight:750;color:#46586b}.field .optional{color:#9ba9b6;font-weight:500}
    .field input,.field select,.field textarea{width:100%;border:1px solid #dce4eb;border-radius:9px;background:#fff;color:#223447;padding:10px 11px;outline:none;min-height:40px;transition:border-color .1s,box-shadow .1s}
    .field textarea{resize:vertical;min-height:79px;line-height:1.45}
    .field input:focus,.field textarea:focus,.field select:focus{border-color:#2eafa1;box-shadow:0 0 0 3px rgba(15,145,135,.1)}
    .field input::placeholder,.field textarea::placeholder{color:#a2afbb}
    .dates-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px 15px;margin-bottom:20px}
    .details-extra{border:1px solid #e4eaf0;border-radius:10px;padding:12px 14px;margin-bottom:19px}
    .details-extra summary{font-size:12px;font-weight:800;color:#5d7084;cursor:pointer;user-select:none}.details-extra[open] summary{margin-bottom:14px}
    .details-extra .form-grid{margin-bottom:0}
    .dialog-footer{padding:14px 24px;border-top:1px solid var(--border);display:flex;align-items:center;gap:9px;justify-content:flex-end;background:#fafbfd;flex-wrap:wrap}
    .dialog-footer .left{margin-right:auto}
    .toast{position:fixed;z-index:50;bottom:24px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;background:#203c49;color:white;border-radius:11px;padding:12px 18px;font-size:13px;font-weight:700;box-shadow:0 9px 25px rgba(0,0,0,.2);transition:transform .2s,opacity .2s;max-width:calc(100vw - 30px);text-align:center}
    .toast.show{opacity:1;transform:translate(-50%,0)}
    .sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
    @media (max-width:850px){.topbar{align-items:flex-start}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.board-header{align-items:flex-start;flex-direction:column}.view-tabs{width:100%}.view-tab{flex:1;min-width:0}}
    @media(max-width:570px){.topbar{padding:15px;flex-direction:column;gap:14px;align-items:stretch}.brand{justify-content:center}.top-actions{justify-content:center}.top-actions .btn{flex:1}.workspace{padding:20px 13px 30px}.headline{margin-bottom:16px}.metrics{gap:8px}.metric{padding:13px;min-height:100px}.metric-value{font-size:21px}.board-heading h2{font-size:18px}.controls>*{max-width:100%;flex:1}.searchbox{flex-basis:100%}.filter-select{max-width:none}.lane{min-width:280px;width:280px}.dialog{border-radius:13px}.overlay{padding:8px}.dialog-header,.dialog-body,.dialog-footer{padding-left:15px;padding-right:15px}.form-grid{grid-template-columns:1fr}.dates-grid{grid-template-columns:1fr 1fr}.dialog-footer .left{margin-right:0}}
    /* Keep the complete tender form and its actions inside the window. */
    .dialog{max-width:1040px;max-height:calc(100dvh - 32px)}
    .dialog-header,.dialog-footer{flex-shrink:0;padding:14px 20px}
    #tenderForm{display:flex;flex-direction:column;min-height:0}
    .dialog-body{display:grid;grid-template-columns:1.1fr 1fr;gap:14px 24px;padding:16px 20px 12px;min-height:0}
    .form-main,.form-schedule{min-width:0}
    .form-schedule{border-left:1px solid var(--border);padding-left:24px}
    .section-label{margin-bottom:9px}
    .form-grid{gap:10px 12px;margin-bottom:0}
    .field{gap:4px}
    .field input,.field select,.field textarea{min-height:36px;padding:7px 10px}
    .field textarea{height:58px;min-height:58px;resize:none}
    .dialog-footer [hidden]{display:none}
    .dates-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 12px;margin-bottom:14px}
    .form-schedule .form-grid{margin-bottom:0!important}
    .details-extra{grid-column:1/-1;margin:0;padding:10px 12px}
    .details-extra[open] summary{margin-bottom:10px}
    .details-extra .form-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 12px}
    .details-extra .field.full:first-child{grid-column:1/3}
    .details-extra .field.full:last-child{grid-column:3/5;grid-row:1/3}
    .details-extra textarea{flex:1;min-height:46px}
    @media(min-width:701px) and (max-height:740px){
      .overlay{padding:10px}
      .dialog{max-height:calc(100dvh - 20px)}
      .dialog-header,.dialog-footer{padding:10px 18px}
      .dialog-body{padding:10px 18px;gap:10px 20px}
      .form-schedule{padding-left:20px}
      .form-grid,.dates-grid{row-gap:5px}
      .field{gap:3px}
      .field input,.field select{height:30px;min-height:30px;padding:4px 8px}
      .field textarea{height:46px;min-height:46px}
      .details-extra{padding:8px 10px}
      .details-extra .form-grid{row-gap:5px}
      .details-extra[open] summary{margin-bottom:7px}
      .section-label{margin-bottom:7px}
      .dates-grid{margin-bottom:10px}
    }
    @media(max-width:700px){
      .dialog-body{grid-template-columns:1fr;gap:14px}
      .form-schedule{border-left:0;border-top:1px solid var(--border);padding:12px 0 0}
      .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
      .details-extra .form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
      .details-extra .field.full:first-child{grid-column:1/-1}
      .details-extra .field.full:last-child{grid-column:1/-1;grid-row:auto}
    }
    @media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
/* Calm layout: primary actions first, secondary controls on demand. */
:root{--muted:#5c6b7c;--teal:#087c73;--radius:12px;--shadow:none}
body{font-size:15px;background:#f6f7f9}
[hidden]{display:none!important}
.topbar{background:white;color:var(--text);border-bottom:1px solid var(--border);min-height:76px}
.brand-mark{box-shadow:none;border-radius:10px;background:var(--teal)}
.brand-sub{color:var(--muted)}
.workspace{max-width:1600px;padding-top:32px}
.btn{min-height:44px;font-size:14px;font-weight:600}
.headline{margin-bottom:22px}h1{font-size:28px;font-weight:700}
.subtitle{font-size:14px}
.metrics{grid-template-columns:repeat(3,minmax(0,1fr));gap:0;border:1px solid var(--border);border-radius:12px;background:white;margin-bottom:28px}
.metric{border:0;border-radius:0;background:transparent;min-height:0;padding:18px 24px}
.metric+.metric{border-left:1px solid var(--border)}
.metric-value{margin-top:8px;font-size:24px;font-weight:700}
.metric-label,.metric-hint{color:var(--muted);font-size:12px}
.metric-hint{margin-top:5px}
.board-heading h2{font-size:17px;font-weight:650}
.view-tab{min-height:44px;font-weight:600;color:#536375}
.searchbox{height:44px;max-width:480px}.searchbox input::placeholder{color:#64748b}
.controls{align-items:flex-start;margin-bottom:20px}
.data-menu,.filters{position:relative}
.data-menu summary,.filters summary{list-style:none;cursor:pointer}
.data-menu summary::-webkit-details-marker,.filters summary::-webkit-details-marker{display:none}
.data-menu summary::after,.filters summary::after{content:'';width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(45deg);margin:-4px 2px 0 8px;flex-shrink:0}
.data-menu[open] summary::after,.filters[open] summary::after{transform:rotate(225deg);margin-top:4px}
.data-menu-body,.filter-body{position:absolute;z-index:10;top:calc(100% + 8px);right:0;background:white;border:1px solid var(--border);box-shadow:0 8px 24px #18233316;border-radius:12px;padding:12px;display:grid;gap:8px;min-width:245px}
.filter-body{left:0;right:auto}.filter-select{max-width:100%;width:100%;height:44px}.toggle{height:44px}
.board-scroll{overflow:visible;padding:0}
.board{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:16px;min-height:0}
.lane{width:auto;min-width:0;min-height:170px;max-height:none;border:1px solid #e3e8ee;border-radius:12px;background:#edf0f4}
.lane-head{border-top:0;background:transparent;padding:16px 14px 8px}.lane-title{font-weight:650;font-size:14px}
.lane-count{border:0;background:#e1e7ed;color:#536375}
.lane-list{overflow:visible;min-height:100px;padding:8px 10px}
.card{box-shadow:none;padding:15px;cursor:pointer;border-radius:9px}
.card-title{font-size:15px;font-weight:650}.card-amount{font-size:18px;font-weight:700}
.card-customer,.tender-number,.deadline{font-size:12px;color:#58697a}.chip{font-size:12px;font-weight:500;background:#f0f3f6;color:#536375}
.card:focus-visible{outline:3px solid var(--teal);outline-offset:2px}.card:hover{transform:none;box-shadow:none}
.empty{padding:24px 10px;color:#64748b}.footnote{color:#5c6b7c;margin-top:20px;font-size:12px}
.empty-state{border-style:solid;padding:48px 24px}.empty-state p{font-size:14px}
.schedule-details{border-bottom:1px solid var(--border);margin-bottom:20px}
.schedule-details summary{cursor:pointer;font-size:14px;color:#536375;padding:8px 0 16px;min-height:44px}
.schedule-details .dates-grid{margin-top:8px}
.form-schedule>.dates-grid{display:block}.form-schedule>.dates-grid .field{width:100%}
.close{min-width:44px;min-height:44px}.field label{font-size:13px;color:#425367}
.field input,.field select,.field textarea{min-height:44px;font-size:14px}.field textarea{min-height:80px;resize:vertical}
.dialog-body{padding-top:20px;padding-bottom:20px}.section-label{color:#536375}
.details-extra summary{font-size:13px;min-height:28px}.field .optional{color:#64748b}
@media(max-width:700px){
 .topbar{padding:16px;gap:16px}.brand{justify-content:flex-start}.top-actions{justify-content:flex-start;flex-wrap:nowrap}.top-actions>.btn{flex:1}.data-menu-body{left:0;right:auto}
 .workspace{padding:24px 16px}.metrics{grid-template-columns:1fr}.metric{padding:14px 18px;display:grid;grid-template-columns:1fr auto;gap:4px 12px}.metric+.metric{border-left:0;border-top:1px solid var(--border)}.metric-value{grid-column:2;grid-row:1/3;align-self:center;margin:0;font-size:21px}.metric-hint{margin:0}
 .controls .searchbox{flex-basis:100%;min-width:0;max-width:none}.controls .filters{flex:0 0 auto}.filter-body{min-width:260px}
 .board{grid-template-columns:1fr}.lane{min-height:0}.lane-list{min-height:0}.lane .empty{padding:10px}.view-tabs{width:100%}.view-tab{padding:9px;min-width:0}
 .field input,.field select,.field textarea{font-size:16px}.form-grid,.dates-grid{grid-template-columns:1fr}.dialog-footer{gap:8px}.dialog-footer .left{margin-right:auto}.dialog-footer .btn{padding:8px 10px;font-size:13px}
}
/* Wide tender list with compact status filters. */
.status-tabs{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 20px}
.status-tab{display:inline-flex;align-items:center;gap:8px;min-height:44px;padding:9px 13px;border:1px solid transparent;border-radius:8px;background:transparent;color:#536375;font-size:14px;cursor:pointer}
.status-tab span{font-size:12px;color:#657386;background:#e9edf2;border-radius:5px;padding:1px 6px}
.status-tab:hover{background:#edf0f4}.status-tab[aria-pressed=true]{background:#e0f1ee;color:#076d65;border-color:#b5dad4;font-weight:650}
.status-tab[aria-pressed=true] span{background:#c8e7e1;color:#076d65}
.board-header{margin-bottom:16px}.controls{margin-bottom:16px}.searchbox{max-width:540px}
.tender-list{border:1px solid var(--border);border-radius:12px;background:white;overflow:hidden}
.tender-list table{border-collapse:collapse;table-layout:fixed;width:100%;text-align:left}
.tender-list th{font-size:13px;font-weight:500;color:#596a7c;background:#fafbfc;padding:15px 22px;border-bottom:1px solid var(--border)}
.tender-list th:first-child{width:45%}.tender-list th:nth-child(2){width:18%}.tender-list th:nth-child(3){width:18%}.tender-list th:nth-child(4){width:19%}
.tender-list td{padding:24px 22px;vertical-align:middle;border-bottom:1px solid var(--border);overflow-wrap:anywhere}
.tender-list tr:last-child td{border-bottom:0}.tender-row{cursor:pointer}.tender-row:hover{background:#f8fbfa}
.tender-name{display:block;border:0;padding:0;background:none;text-align:left;color:#182f43;font-size:18px;line-height:1.45;font-weight:650;overflow-wrap:anywhere;max-width:100%}
.tender-name:hover{color:var(--teal)}.tender-meta{font-size:13px;color:#607184;line-height:1.6;margin-top:7px;overflow-wrap:anywhere}
.tender-amount{font-size:17px;font-weight:650;font-variant-numeric:tabular-nums}
.status-label{display:inline-flex;align-items:center;gap:8px;line-height:1.5;font-size:14px}.status-label>span{width:7px;height:7px;border-radius:50%;flex:none}
.tender-list .deadline{font-size:14px;line-height:1.5;font-weight:500}
#shortTitleHelp{font-size:12px;color:#607184;line-height:1.5}
@media(max-width:950px){.tender-list th,.tender-list td{padding:18px 14px}.tender-list th:first-child{width:38%}.tender-list th:nth-child(2){width:20%}.tender-list th:nth-child(3){width:20%}.tender-list th:nth-child(4){width:22%}}
@media(max-width:700px){
 .status-tabs{gap:4px;margin-bottom:16px}.status-tab{padding:8px 10px;font-size:13px}
 .tender-list{background:transparent;border:0;overflow:visible}.tender-list table,.tender-list tbody{display:block}.tender-list thead{display:none}
 .tender-list tr{display:block;background:white;border:1px solid var(--border);border-radius:12px;padding:18px;margin-bottom:12px}
 .tender-list td{display:flex;justify-content:space-between;align-items:baseline;gap:16px;border:0;padding:8px 0;font-size:15px}
 .tender-list td.tender-main{display:block;padding:0 0 14px;margin-bottom:8px;border-bottom:1px solid var(--border)}
 .tender-list td[data-label]::before{content:attr(data-label);font-size:12px;font-weight:400;color:#607184;flex-shrink:0}
 .tender-name{font-size:18px}.tender-meta{font-size:12px}.tender-list .deadline,.status-label{font-size:13px}
}

/* Filtering must not move the controls or trigger scroll anchoring. */
.results-region{min-height:280px;overflow-anchor:none}
.status-tab,.status-tab[aria-pressed=true]{font-weight:600}

/* Keep the portal action outside the scrolling form. */
.dialog-heading{flex:1;min-width:0}
.tender-open{flex-shrink:0;text-decoration:none;white-space:nowrap}
.tender-open[hidden]{display:none}
@media(max-width:570px){
 .dialog-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px}
 .dialog-header .close{grid-column:2;grid-row:1}
 .tender-open{grid-column:1 / -1;grid-row:2;width:100%;justify-content:center}
}

/* Leave room for the full filter label and use consistent chevrons. */
.filter-body{width:310px;min-width:0;max-width:calc(100vw - 44px)}
.filter-select,.field select,.quick-status{appearance:none;padding-right:38px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2353677b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;background-size:20px}
.schedule-details summary,.details-extra summary{list-style:none;display:flex;align-items:center;gap:10px}
.schedule-details summary::-webkit-details-marker,.details-extra summary::-webkit-details-marker{display:none}
.schedule-details summary::before,.details-extra summary::before{content:'';width:7px;height:7px;border-right:2px solid currentColor;border-bottom:2px solid currentColor;transform:rotate(-45deg);flex-shrink:0}
.schedule-details[open] summary::before,.details-extra[open] summary::before{transform:rotate(45deg);margin-top:-4px}

.filter-body{left:auto;right:0}
@media(max-width:570px){.filter-body{left:0;right:auto}}

/* Quiet card and work views. */
[hidden]{display:none!important}
.dialog{max-width:780px}
.compact-body{display:flex;flex-direction:column;gap:16px}
.primary-fields{grid-template-columns:1fr 1fr}
.primary-fields .field:last-child{grid-column:1/-1}
.compact-body .details-extra{padding:12px 14px;background:#fafbfd;border:1px solid var(--border);border-radius:12px}
.compact-body .details-extra .form-grid{grid-template-columns:1fr 1fr;margin-top:14px;gap:12px}
.compact-body .details-extra .field.full{grid-column:1/-1;grid-row:auto}
.compact-body .schedule-details{margin-top:16px}
.compact-body .field input,.compact-body .field select{height:44px;min-height:44px}
.compact-body .field textarea{min-height:80px;resize:vertical}
.checklist{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:16px}
.checklist label{display:flex;gap:8px;align-items:center;font-size:14px}
.checklist input{accent-color:var(--teal);width:18px;height:18px}
#checkProgress{margin-left:auto;color:var(--teal)}
.upcoming{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:20px 0}
.deadline-group{border:1px solid var(--border);border-radius:12px;background:white;min-width:0}
.deadline-group summary{padding:16px;cursor:pointer;font-size:14px;list-style:none;display:flex;justify-content:space-between;gap:8px}
.deadline-group summary strong{color:var(--teal)}
.deadline-group>div{padding:0 12px 12px;font-size:13px;color:var(--muted)}
.deadline-group button,.calendar-day button{border:0;background:#eff7f6;color:var(--text);padding:10px;text-align:left;border-radius:8px;display:block;width:100%;margin:6px 0;overflow-wrap:anywhere}
.deadline-group small,.calendar-day small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.action-group{grid-column:1/-1}
.view-toolbar,.view-tabs{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.view-toolbar{margin:20px 0;justify-content:space-between}
.view-tabs [aria-pressed=true]{background:var(--teal-soft);color:#08796f;border-color:#9ed3cf}
#syncStatus{font-size:12px;color:var(--muted)}
.filter-body{max-height:70vh;overflow-y:auto}
.filter-range{display:grid;grid-template-columns:1fr 1fr;gap:8px;min-width:0}
.filter-range input{min-width:0}
.quick-status{border:1px solid var(--border);border-radius:8px;background-color:#fff;color:var(--text);padding:8px;max-width:100%;font-size:13px}
.archive-action{display:block;background:none;border:0;padding:5px 0;color:var(--muted);font-size:12px}
.next-action{font-size:12px;color:#536375;margin-top:8px}
.changed-badge,.change-notice{background:#fff4db;color:#7b561d;border-radius:6px;padding:6px 9px;font-size:12px;display:inline-block;margin-top:6px}
.calendar-nav{display:flex;align-items:center;justify-content:space-between;margin:20px 0}
.calendar-nav h2{font-size:18px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.weekday{text-align:center;font-size:12px;color:var(--muted);padding:8px}
.calendar-day{border:1px solid var(--border);background:white;border-radius:8px;min-height:120px;padding:8px;font-size:12px}
.calendar-day.blank{background:transparent;border:0}
.calendar-day.is-today{border:2px solid var(--teal)}
.login-panel{min-height:100dvh;display:grid;place-items:center;padding:20px;background:var(--bg)}
.login-card{width:min(100%,380px);padding:30px;border:1px solid var(--border);border-radius:18px;background:white;display:grid;gap:14px}
.login-card h1{font-size:24px;margin:0}.login-card p{color:var(--muted);margin:0}
.login-card input{min-height:44px;border:1px solid var(--border);border-radius:8px;padding:10px}
#loginError{color:#ad3345}
@media(max-width:700px){.upcoming{grid-template-columns:1fr 1fr}.calendar-grid{gap:3px}.calendar-day{padding:4px;min-height:84px}.calendar-day button{font-size:10px;padding:4px}.calendar-day small{display:none}}
@media(max-width:570px){.primary-fields,.compact-body .details-extra .form-grid,.checklist{grid-template-columns:1fr}.top-actions{flex-wrap:wrap}.top-actions .btn{min-width:0}.dialog-header h2{font-size:18px}.compact-body{padding:15px}.view-tabs .btn{padding:9px 12px}}

.quick-status{padding-right:38px}
.account-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.password-dialog{padding:0;border:0;border-radius:18px;max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);box-shadow:0 20px 80px #18233340}
.password-dialog::backdrop{background:#18233399}
.password-dialog .login-card{border:0;width:400px;max-width:100%;padding:24px}
.password-dialog h2{margin:0;font-size:22px}
#passwordMessage{font-size:14px;color:var(--text)}
