*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--cream);color:var(--ink)}body{min-height:100vh}.hidden{display:none!important}
button,input,textarea,select{font:inherit}button{cursor:pointer}.app-loading{min-height:100vh;display:grid;place-items:center}.loader{width:38px;height:38px;border:3px solid var(--peach);border-top-color:var(--orange);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}
.auth-wrap{min-height:100vh;display:grid;grid-template-columns:1.05fr .95fr}.brand-panel{padding:64px;display:flex;flex-direction:column;justify-content:space-between;background:linear-gradient(145deg,#cf6120,#e7803d);color:#fff;position:relative;overflow:hidden}.brand-panel:before,.brand-panel:after{content:"";position:absolute;border-radius:50%;background:rgba(255,255,255,.08)}.brand-panel:before{width:420px;height:420px;right:-170px;top:-120px}.brand-panel:after{width:300px;height:300px;left:-120px;bottom:-110px}.brandmark{display:flex;align-items:center;gap:12px;font-weight:850;font-size:28px;letter-spacing:.3px;z-index:1}.brandmark .logo{width:44px;height:44px;border-radius:15px;background:#fff;color:var(--orange);display:grid;place-items:center;font-weight:900}.hero-copy{z-index:1;max-width:560px}.hero-copy h1{font-size:clamp(42px,6vw,76px);line-height:.98;margin:0 0 22px;letter-spacing:-3px}.hero-copy p{font-size:20px;line-height:1.6;color:#fff7ef;margin:0}.brand-foot{z-index:1;color:#ffe8d3}.auth-panel{display:grid;place-items:center;padding:42px}.auth-card{width:min(480px,100%);background:rgba(255,255,255,.72);backdrop-filter:blur(12px);border:1px solid rgba(255,255,255,.9);border-radius:30px;padding:34px;box-shadow:var(--shadow)}.auth-card h2{font-size:30px;margin:0 0 8px;letter-spacing:-.8px}.sub{color:var(--muted);line-height:1.5}.field{display:flex;flex-direction:column;gap:7px;margin:16px 0}.field label{font-size:13px;font-weight:700;color:#5d544c}.field input,.field textarea,.field select{width:100%;border:1px solid var(--line);background:#fff;border-radius:14px;padding:13px 14px;outline:none;color:var(--ink)}.field input:focus,.field textarea:focus,.field select:focus{border-color:var(--orange);box-shadow:0 0 0 3px rgba(214,107,40,.11)}.field textarea{min-height:96px;resize:vertical}.btn{border:0;border-radius:14px;padding:12px 16px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.2s}.btn-primary{background:var(--orange);color:#fff}.btn-primary:hover{background:#bf5820;transform:translateY(-1px)}.btn-secondary{background:var(--peach2);color:#9a4d1f}.btn-ghost{background:transparent;border:1px solid var(--line);color:var(--ink)}.btn-danger{background:var(--redbg);color:var(--red)}.btn-full{width:100%}.auth-switch{text-align:center;margin-top:16px;color:var(--muted)}.link-btn{border:0;background:none;color:var(--orange);font-weight:800;padding:0}.tiny{font-size:12px;color:var(--muted)}
.shell{min-height:100vh;display:grid;grid-template-columns:260px 1fr}.sidebar{background:#2a251f;color:#fff;padding:24px 18px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.sidebar .brandmark{font-size:23px}.sidebar .brandmark .logo{width:38px;height:38px}.nav{margin-top:28px;display:flex;flex-direction:column;gap:7px}.nav button{border:0;background:transparent;color:#ded5cb;padding:12px 13px;border-radius:13px;text-align:left;font-weight:700;display:flex;align-items:center;gap:10px}.nav button:hover,.nav button.active{background:#413930;color:#fff}.nav .ico{width:22px;text-align:center}.sidebar-bottom{margin-top:auto;border-top:1px solid #463e35;padding-top:16px}.user-mini{display:flex;gap:10px;align-items:center}.avatar{width:42px;height:42px;border-radius:14px;background:var(--peach);color:#7d3d18;display:grid;place-items:center;font-weight:850;flex:0 0 auto}.avatar.sm{width:34px;height:34px;border-radius:11px}.user-mini strong{display:block;font-size:14px}.user-mini span{display:block;color:#bfb5aa;font-size:12px;margin-top:2px}.main{min-width:0}.topbar{height:78px;padding:0 30px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--line);background:rgba(251,244,232,.9);backdrop-filter:blur(12px);position:sticky;top:0;z-index:10}.top-actions{display:flex;gap:10px;align-items:center}.icon-btn{width:42px;height:42px;border-radius:13px;border:1px solid var(--line);background:var(--card);display:grid;place-items:center}.content{padding:30px;max-width:1500px;margin:0 auto}.headline-row{display:flex;justify-content:space-between;align-items:flex-start;gap:20px;margin-bottom:24px}.headline-row h1{margin:0;font-size:34px;letter-spacing:-1px}.eyebrow{color:var(--orange);font-weight:850;font-size:12px;text-transform:uppercase;letter-spacing:1.3px;margin-bottom:6px}.grid{display:grid;gap:18px}.grid-4{grid-template-columns:repeat(4,1fr)}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-2{grid-template-columns:repeat(2,1fr)}.card{background:var(--card);border:1px solid rgba(234,223,206,.9);border-radius:var(--radius);box-shadow:0 8px 26px rgba(95,70,42,.05);padding:20px}.stat{min-height:130px}.stat .label{color:var(--muted);font-size:13px;font-weight:700}.stat .value{font-size:34px;font-weight:900;letter-spacing:-1.4px;margin-top:10px}.stat .note{font-size:12px;color:var(--muted);margin-top:8px}.section{margin-top:24px}.section-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}.section-title h2{font-size:18px;margin:0}.list{display:flex;flex-direction:column;gap:10px}.list-item{padding:14px;border:1px solid var(--line);border-radius:16px;background:#fff;display:flex;align-items:center;gap:12px}.list-item .grow{flex:1;min-width:0}.list-item .title{font-weight:800}.list-item .meta{color:var(--muted);font-size:12px;margin-top:4px}.badge{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:850;white-space:nowrap}.badge.orange{background:var(--peach2);color:#9b4a19}.badge.green{background:var(--greenbg);color:var(--green)}.badge.red{background:var(--redbg);color:var(--red)}.badge.yellow{background:var(--yellowbg);color:var(--yellow)}.badge.gray{background:#f2eee9;color:#6f675e}.progress{height:8px;border-radius:999px;background:#efe6dc;overflow:hidden}.progress span{display:block;height:100%;background:var(--orange);border-radius:999px}.task-card{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center}.task-status{width:26px;height:26px;border-radius:9px;border:2px solid #d8cdc1;background:#fff}.task-status.done{background:var(--green);border-color:var(--green);position:relative}.task-status.done:after{content:'✓';color:#fff;position:absolute;inset:0;display:grid;place-items:center;font-size:14px;font-weight:900}.empty{padding:34px;text-align:center;color:var(--muted);border:1px dashed #d9cdbc;border-radius:18px;background:rgba(255,255,255,.45)}
.fab{position:fixed;right:30px;bottom:28px;width:58px;height:58px;border-radius:19px;border:0;background:var(--orange);color:#fff;font-size:28px;box-shadow:0 14px 30px rgba(214,107,40,.35);z-index:20}.modal-backdrop{position:fixed;inset:0;background:rgba(26,23,20,.46);display:grid;place-items:center;padding:20px;z-index:100}.modal{width:min(620px,100%);max-height:90vh;overflow:auto;background:var(--cream2);border-radius:26px;box-shadow:0 24px 80px rgba(0,0,0,.24);padding:24px}.modal.wide{width:min(900px,100%)}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.modal-head h2{margin:0}.close{width:38px;height:38px;border-radius:12px;border:1px solid var(--line);background:#fff;font-size:20px}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}.check-row{display:flex;align-items:center;gap:10px;margin:15px 0}.check-row input{width:18px;height:18px;accent-color:var(--orange)}.responsibility-list{display:flex;flex-direction:column;gap:8px}.responsibility-pill{background:#fff;border:1px solid var(--line);border-radius:14px;padding:10px 12px;display:flex;justify-content:space-between;gap:8px}.tabs{display:flex;gap:8px;overflow:auto;padding-bottom:4px}.tabs button{border:0;background:#eee5da;color:#63594f;border-radius:999px;padding:8px 12px;font-weight:750;white-space:nowrap}.tabs button.active{background:var(--orange);color:#fff}.profile-hero{display:flex;align-items:center;gap:16px}.profile-hero .avatar{width:64px;height:64px;border-radius:20px;font-size:20px}.profile-hero h2{margin:0}.profile-hero p{margin:4px 0 0;color:var(--muted)}.report-block{background:#fff;border:1px solid var(--line);border-radius:16px;padding:15px}.report-block h3{margin:0 0 8px;font-size:15px}.announcement{border-left:4px solid var(--orange)}.meeting{border-left:4px solid #9a5dd9}.toolbar{display:flex;gap:10px;flex-wrap:wrap}.toolbar input,.toolbar select{border:1px solid var(--line);border-radius:12px;background:#fff;padding:10px 12px}.toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%) translateY(20px);background:#2a251f;color:#fff;padding:12px 16px;border-radius:13px;opacity:0;pointer-events:none;transition:.2s;z-index:999;box-shadow:var(--shadow)}.toast.show{opacity:1;transform:translateX(-50%) translateY(0)}.install-banner{display:flex;align-items:center;gap:12px;background:#2a251f;color:#fff;padding:14px 16px;border-radius:17px}.install-banner .grow{flex:1}.install-banner p{margin:3px 0 0;color:#d8cec4;font-size:12px}.split-title{display:flex;align-items:center;gap:8px}.print-sheet{background:#fff;color:#1f1c18;padding:40px;max-width:850px;margin:auto}.print-sheet h1{font-size:28px}.print-sheet .brand-print{color:var(--orange);font-weight:900;letter-spacing:1px}.print-table{width:100%;border-collapse:collapse;margin-top:16px}.print-table th,.print-table td{text-align:left;border-bottom:1px solid #ddd;padding:9px 4px;font-size:13px}.print-only{display:none}
@media(max-width:1100px){.grid-4{grid-template-columns:repeat(2,1fr)}.grid-3{grid-template-columns:1fr 1fr}.shell{grid-template-columns:88px 1fr}.sidebar{padding:22px 12px}.sidebar .brandmark span,.nav button span:not(.ico),.sidebar-bottom .user-mini>div:last-child{display:none}.sidebar .brandmark{justify-content:center}.nav button{justify-content:center}.sidebar-bottom .user-mini{justify-content:center}}
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){.auth-wrap{grid-template-columns:1fr}.brand-panel{min-height:260px;padding:28px}.hero-copy h1{font-size:44px}.hero-copy p{font-size:16px}.brand-foot{display:none}.auth-panel{padding:18px}.auth-card{padding:24px}.shell{display:block}.sidebar{position:fixed;left:0;right:0;bottom:0;top:auto;height:72px;z-index:50;flex-direction:row;padding:8px 10px;border-top:1px solid #4b4239}.sidebar .brandmark,.sidebar-bottom{display:none}.nav{margin:0;display:grid;grid-auto-flow:column;grid-auto-columns:1fr;width:100%;gap:2px}.nav button{padding:8px 4px;display:flex;flex-direction:column;gap:3px;font-size:10px}.nav button span:not(.ico){display:block}.nav .ico{font-size:18px}.topbar{height:66px;padding:0 16px}.content{padding:18px 14px 100px}.grid-4,.grid-3,.grid-2{grid-template-columns:1fr}.headline-row{flex-direction:column}.headline-row h1{font-size:28px}.fab{bottom:86px;right:18px}.form-row{grid-template-columns:1fr}.modal-backdrop{align-items:end;padding:0}.modal,.modal.wide{width:100%;max-height:92vh;border-radius:26px 26px 0 0;padding:20px}.stat{min-height:auto}.stat .value{font-size:28px}}
@media print{body{background:#fff}.shell,.modal-backdrop,.toast{display:none!important}.print-only{display:block!important}.print-sheet{padding:0;max-width:none}.no-print{display:none!important}@page{margin:14mm}}

:root[data-theme="dark"]{
  --cream:#181512;--cream2:#211d18;--card:#27221d;--text:#f7efe5;--muted:#b7aa9d;--line:#3a332c;--orange:#e47b35;--orange2:#ff9a5a;--shadow:0 16px 36px rgba(0,0,0,.28)
}
:root[data-theme="dark"] body{background:var(--cream);color:var(--text)}
:root[data-theme="dark"] .card,
:root[data-theme="dark"] .modal,
:root[data-theme="dark"] .auth-card,
:root[data-theme="dark"] .report-block,
:root[data-theme="dark"] .responsibility-pill,
:root[data-theme="dark"] .list-item,
:root[data-theme="dark"] input,
:root[data-theme="dark"] textarea,
:root[data-theme="dark"] select,
:root[data-theme="dark"] .close,
:root[data-theme="dark"] .toolbar input,
:root[data-theme="dark"] .toolbar select{background:var(--card);color:var(--text);border-color:var(--line)}
:root[data-theme="dark"] .sidebar,:root[data-theme="dark"] .topbar{background:#1d1915;border-color:var(--line)}
:root[data-theme="dark"] .sub,:root[data-theme="dark"] .meta,:root[data-theme="dark"] .tiny,:root[data-theme="dark"] .note{color:var(--muted)}
:root[data-theme="dark"] .btn-secondary,:root[data-theme="dark"] .btn-ghost{background:#302820;color:var(--text);border-color:var(--line)}
:root[data-theme="dark"] .tabs button{background:#342c25;color:#cbbeb1}

/* Taskoliq brand logo */
.brandmark.brand-image{display:inline-flex;align-items:center;width:max-content;background:rgba(255,250,242,.97);border:1px solid rgba(255,255,255,.58);border-radius:20px;padding:10px 16px;box-shadow:0 12px 30px rgba(67,39,17,.13)}
.brandmark.brand-image img{display:block;width:182px;height:auto;max-height:54px;object-fit:contain}
.sidebar .brandmark.brand-image{padding:9px 12px;border-radius:17px;background:#fff8ee;border-color:#4b4239;box-shadow:0 8px 18px rgba(0,0,0,.12)}
.sidebar .brandmark.brand-image img{width:142px;max-height:38px}
.brand-panel .brandmark.brand-image{z-index:2}
.brand-print{display:flex;align-items:center;margin-bottom:16px}
.brand-print img{width:132px;height:auto;display:block}
@media(max-width:800px){.brandmark.brand-image img{width:148px}.sidebar .brandmark.brand-image img{width:122px}}
@media print{.brand-print img{width:120px!important}.brandmark.brand-image{box-shadow:none}}

/* Attendance */
.attendance-card{background:linear-gradient(135deg,#fffdf9 0%,#fff2e3 100%);border-color:#efcfad}
.attendance-main{display:flex;align-items:center;justify-content:space-between;gap:22px}
.attendance-main h2{margin:0 0 5px;font-size:22px;letter-spacing:-.4px}
.attendance-main .sub{margin:0}
.attendance-btn{min-width:132px;min-height:48px}
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){.attendance-main{align-items:flex-start;flex-direction:column}.attendance-btn{width:100%}}
:root[data-theme="dark"] .attendance-card{background:linear-gradient(135deg,#27221d,#34261c);border-color:#5a3b27}


/* Optional location verification */
.location-note{margin:14px 0;padding:12px 14px;border-radius:14px;background:var(--peach2);color:#8d481e;font-size:13px;font-weight:700}
.location-help{line-height:1.6}.location-help ol{padding-left:22px}.location-pin{width:54px;height:54px;border-radius:18px;background:var(--peach2);color:var(--orange);display:grid;place-items:center;font-size:28px;margin-bottom:14px}
.location-sites{display:flex;flex-direction:column;gap:9px}.location-site{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:15px;background:var(--card)}.location-link{color:var(--orange);font-weight:750;text-decoration:none}.location-link:hover{text-decoration:underline}.mini-empty{padding:18px}.settings-divider{height:1px;background:var(--line);margin:26px 0}
:root[data-theme="dark"] .location-note{background:#39281d;color:#f5b47f}
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){.location-site{align-items:flex-start;flex-direction:column}.location-site .btn{width:100%}}

/* Pre-hosting stabilization */
.user-mini-btn{width:100%;border:0;background:transparent;color:inherit;padding:4px 0;text-align:left;display:flex;gap:10px;align-items:center;border-radius:12px}
.user-mini-btn:hover{background:#3a332c;padding:8px}
.user-mini-btn>div:nth-child(2){min-width:0;flex:1}
.user-mini-btn strong,.user-mini-btn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.profile-chevron{margin-left:auto;color:#bfb5aa;font-size:24px;line-height:1}
.nav-label-mobile{display:none}
.workspace-title{min-width:0}
.workspace-title>strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.invite-test-note{margin-top:14px;padding:12px 13px;border-radius:14px;background:var(--peach2);color:#7b4a28;font-size:12px;line-height:1.5;border:1px solid #f0d7bf}
.event{border-left:4px solid #2f8f68}
.compact-toolbar{gap:14px}

@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){
  .sidebar{display:flex!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;height:auto!important;min-height:72px;padding:7px 6px max(7px,env(safe-area-inset-bottom))!important;z-index:80!important;overflow:hidden}
  .sidebar>.brandmark,.sidebar>.sidebar-bottom{display:none!important}
  .nav{margin:0!important;display:flex!important;flex-direction:row!important;width:100%!important;gap:2px!important;overflow:hidden!important}
  .nav button{flex:1 1 0!important;min-width:0!important;padding:7px 2px!important;border-radius:11px!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;gap:2px!important;font-size:9px!important;line-height:1.1!important;overflow:hidden}
  .nav .ico{width:auto!important;font-size:18px!important;line-height:1!important}
  .nav-label-desktop{display:none!important}
  .nav-label-mobile{display:block!important;width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:center}
  .topbar{height:64px;padding:0 10px!important;gap:8px}
  .workspace-title{flex:1;min-width:0;max-width:46%}
  .workspace-title>strong{font-size:14px}
  .workspace-title .tiny{font-size:10px}
  .top-actions{gap:5px!important;flex:0 0 auto}
  .icon-btn{width:36px!important;height:36px!important;border-radius:11px!important;font-size:14px}
  .content{padding:16px 12px calc(100px + env(safe-area-inset-bottom))!important}
  .fab{bottom:calc(84px + env(safe-area-inset-bottom))!important;right:14px!important;width:54px!important;height:54px!important}
  .headline-row{gap:14px!important;margin-bottom:18px!important}
  .headline-row>.toolbar{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .headline-row>.toolbar .btn{width:100%;padding:11px 10px}
  .headline-row>.toolbar .btn:nth-child(3){grid-column:1/-1}
  .card{padding:16px!important;border-radius:18px}
  .list-item{align-items:flex-start;flex-wrap:wrap;padding:12px}
  .list-item>.btn,.list-item>a.btn{width:100%;margin-top:4px}
  .section-title{align-items:flex-start;gap:10px}
  .section-title>.toolbar{justify-content:flex-end}
  .profile-hero{align-items:flex-start}
  .profile-hero .avatar{width:50px;height:50px;border-radius:16px}
  .empty{padding:26px 18px}
  .modal .toolbar .btn{flex:1 1 140px}
}

@media(max-width:390px){
  .workspace-title{max-width:40%}
  .top-actions{gap:3px!important}
  .icon-btn{width:34px!important;height:34px!important}
  .nav button{font-size:8.5px!important}
  .nav .ico{font-size:17px!important}
}

/* LAN / bulk-task usability */
.task-groups{display:grid;gap:18px}.staff-task-group{padding:22px}.profile-hero.compact{gap:10px}.profile-hero.compact .avatar{width:42px;height:42px;font-size:14px}.profile-hero.compact h2{font-size:18px;margin:0}.profile-hero.compact p{margin:3px 0 0}.task-number{width:28px;height:28px;min-width:28px;border-radius:9px;display:grid;place-items:center;background:#fbefe1;color:#b95318;font-weight:800;font-size:13px}
@media(max-width:700px){.staff-task-group{padding:14px}.task-number{width:24px;height:24px;min-width:24px}.task-card{align-items:flex-start}.task-card .badge{margin-left:auto}}
/* Persistent PWA install affordance: sign-in, desktop and mobile dashboards. */
.taskoliq-install{position:fixed;right:18px;bottom:18px;z-index:9999;display:flex;align-items:center;gap:9px;padding:12px 18px;border:1px solid #a8491c;border-radius:999px;background:#c45d25;color:#fff;box-shadow:0 8px 24px rgba(52,32,23,.25);font:700 14px/1.3 Arial,sans-serif;cursor:pointer;min-height:46px}
.taskoliq-install:hover,.taskoliq-install:focus-visible{background:#a8491c;outline:2px solid #f4bb91;outline-offset:2px}
@media(max-width:700px){.taskoliq-install{right:12px;bottom:calc(76px + env(safe-area-inset-bottom,0px));font-size:13px;padding:11px 14px}}

/* Password reveal control: available in login, activation, reset and profile dialogs. */
.field .password-field{position:relative;display:block;width:100%}
.field .password-field>input{width:100%;padding-right:54px}
.field .password-field>.password-eye{position:absolute;right:7px;top:50%;transform:translateY(-50%);width:40px;height:40px;display:grid;place-items:center;border:0;border-radius:10px;background:transparent;color:var(--muted);cursor:pointer}
.field .password-field>.password-eye:hover,.field .password-field>.password-eye:focus-visible{background:rgba(214,107,40,.10);color:var(--orange)}
.field .password-field>.password-eye.is-visible{color:var(--orange)}

/* Staff profile: all five sections stay visible and usable on small screens. */
.staff-profile-tabs{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:7px;overflow:visible}
.staff-profile-tabs button{white-space:normal;min-width:0;line-height:1.2;text-align:center;padding:11px 5px;font-size:12px}
.profile-tab-hint{display:none}
.attendance-live-time{font-variant-numeric:tabular-nums;color:var(--orange)}
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){
 .staff-profile-stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .staff-profile-stats .card{padding:14px;min-width:0}
 .staff-profile-stats .stat .value{font-size:23px}
 .staff-profile-tabs{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}
 .staff-profile-tabs button{border-radius:12px;min-height:42px;font-size:12px}
 .modal.wide .list-item{align-items:flex-start;min-width:0}
 .modal.wide .list-item .meta{overflow-wrap:anywhere;line-height:1.7}
 .modal.wide .location-link{overflow-wrap:anywhere}
 .modal.wide .toolbar .btn{flex:1 1 135px}
}

/* Compact Taskoliq identity in the mobile app header. */
.mobile-brand{display:none}
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){
  .topbar .mobile-brand{display:flex;flex:0 0 40px;width:40px;height:40px;align-items:center;justify-content:center;background:#fff8ee;border:1px solid #e9d6c1;border-radius:13px;box-shadow:0 3px 10px rgba(73,43,20,.07)}
  .topbar .mobile-brand img{display:block;width:31px;height:31px;object-fit:contain}
  .topbar .workspace-title{max-width:none;flex:1 1 auto}
  .topbar .workspace-title>strong{font-size:13px}
  .topbar .top-actions{gap:3px!important}
  .topbar .icon-btn{width:33px!important;height:33px!important}
}
@media(max-width:360px){.topbar .mobile-brand{width:34px;height:34px;flex-basis:34px}.topbar .mobile-brand img{width:27px;height:27px}.topbar .workspace-title>strong{font-size:12px}}

/* Private personal planner */
.personal-summary{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.personal-summary span{background:var(--surface-2,#f7eee6);border:1px solid var(--border,#eadbd0);padding:8px 12px;border-radius:12px;font-size:12px}.personal-done{text-decoration:line-through;opacity:.65}.personal-todo .grow{min-width:0}#personalBellCount:not(:empty){display:inline-flex;align-items:center;justify-content:center;min-width:16px;height:16px;padding:0 3px;border-radius:20px;background:#c45d25;color:white;font-size:10px;margin-left:2px}.personal-widget .section-title{align-items:flex-start}@media(max-width:600px){.personal-widget .section-title{flex-wrap:wrap}.personal-widget .toolbar{flex-wrap:wrap}}

/* Navigation refresh: clear, accessible controls and predictable dashboard rhythm. */
.ui-icon{display:block;width:22px;height:22px;flex-shrink:0}
.nav .ico{display:flex;align-items:center;justify-content:center;width:25px}
.nav .ico .ui-icon{width:22px;height:22px;stroke-width:2.15}
.icon-btn{color:var(--text,#33281f);transition:background .15s ease,transform .15s ease,border-color .15s ease}
.icon-btn:hover{background:var(--peach2,#f9e9d9);border-color:var(--orange,#d66b28);transform:translateY(-1px)}
.icon-btn:focus-visible,.nav button:focus-visible{outline:3px solid var(--orange,#d66b28);outline-offset:2px}
.top-actions .ui-icon{width:21px;height:21px;stroke-width:2.15}
.top-actions .logout-action{color:#b74d29}
.content>.grid+.personal-widget,.content>.card+.personal-widget{margin-top:24px}
.personal-widget{margin-top:24px;margin-bottom:24px}
@media (max-width:760px), (orientation:landscape) and (max-height:520px) and (pointer:coarse){
  .topbar .top-actions{gap:6px!important}
  .topbar .icon-btn{width:38px!important;height:38px!important;border-radius:12px!important}
  .topbar .icon-btn .ui-icon{width:21px;height:21px}
  .nav .ico .ui-icon{width:23px;height:23px;stroke-width:2.3}
  .nav button{gap:4px!important;font-size:10px!important;font-weight:750!important}
  .nav button.active{background:#504238!important;box-shadow:inset 0 0 0 1px rgba(255,255,255,.13)}
  .personal-widget{margin-top:20px!important;margin-bottom:20px!important}
}
@media(max-width:390px){.topbar .icon-btn{width:35px!important;height:35px!important}.topbar .top-actions{gap:4px!important}.nav button{font-size:9px!important}}

/* Phone landscape: keep the mobile shell, not the compact desktop sidebar.
   The height and coarse-pointer gate avoids changing desktop browser layouts. */
@media (orientation:landscape) and (max-height:520px) and (pointer:coarse){
  .shell{display:block!important;grid-template-columns:none!important}
  .sidebar{display:flex!important;position:fixed!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;width:100%!important;min-height:58px!important;height:auto!important;padding:5px max(10px,env(safe-area-inset-right)) max(5px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))!important;z-index:80!important}
  .sidebar>.brandmark,.sidebar>.sidebar-bottom{display:none!important}
  .nav{display:grid!important;grid-auto-flow:column!important;grid-auto-columns:minmax(0,1fr)!important;width:100%!important;margin:0!important;gap:3px!important}
  .nav button{display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;min-width:0!important;padding:5px 2px!important;gap:2px!important}
  .nav button span.nav-label-mobile{display:block!important}
  .nav button span.nav-label-desktop{display:none!important}
  .topbar{height:56px!important;padding:0 max(12px,env(safe-area-inset-right)) 0 max(12px,env(safe-area-inset-left))!important;gap:9px!important}
  .topbar .mobile-brand{display:flex!important;flex:0 0 36px!important;width:36px!important;height:36px!important}
  .topbar .mobile-brand img{width:28px!important;height:28px!important}
  .topbar .workspace-title{flex:1 1 auto!important;min-width:0!important;max-width:none!important}
  .topbar .workspace-title strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px!important}
  .topbar .top-actions{display:flex!important;gap:6px!important;flex:0 0 auto!important}
  .topbar .icon-btn{width:36px!important;height:36px!important}
  .content{padding:16px max(14px,env(safe-area-inset-right)) 90px max(14px,env(safe-area-inset-left))!important;max-width:100%!important}
  .main{min-width:0!important;width:100%!important}
  .grid-4,.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .fab{bottom:78px!important}
}

/* Dark-mode polish: readable controls, accessible cards and branded identity */
:root[data-theme="dark"] .mobile-brand,:root[data-theme="dark"] .topbar .mobile-brand{background:#f7e9d6!important;border:1px solid #a76a3d!important;box-shadow:0 3px 12px rgba(0,0,0,.28)!important}
:root[data-theme="dark"] .brandmark.brand-image,:root[data-theme="dark"] .sidebar .brandmark.brand-image{background:#f7e9d6;border-color:#9c633c;box-shadow:0 10px 24px rgba(0,0,0,.28)}
:root[data-theme="dark"] .icon-btn{background:#302922!important;border:1px solid #655244!important;color:#f9e8d5!important}
:root[data-theme="dark"] .icon-btn .ui-icon{color:inherit!important;stroke:currentColor!important}
:root[data-theme="dark"] .top-actions .logout-action{color:#ff9b65!important}
:root[data-theme="dark"] .icon-btn:hover{background:#483326!important;border-color:#ed8a4b!important}
:root[data-theme="dark"] .personal-summary span{background:#3b3028!important;border:1px solid #6b5240!important;color:#fff1e2!important;font-weight:750}
:root[data-theme="dark"] .empty,:root[data-theme="dark"] .mini-empty{background:#302a24!important;border-color:#655447!important;color:#e7d5c4!important}
:root[data-theme="dark"] .nav button{color:#f2e7dc!important}
:root[data-theme="dark"] .nav button.active{background:#4b392b!important;color:#fff6ec!important}
:root[data-theme="dark"] .nav .ico .ui-icon{stroke:currentColor!important;stroke-width:2.5}
:root[data-theme="dark"] .tabs button{background:#42342b!important;color:#f5e5d7!important;border:1px solid #6a5343}
:root[data-theme="dark"] .tabs button.active{background:#db702d!important;color:#fff!important;border-color:#e68c51}
:root[data-theme="dark"] .field label,:root[data-theme="dark"] .check-row,:root[data-theme="dark"] label{color:#eee0d1}
:root[data-theme="dark"] input::placeholder,:root[data-theme="dark"] textarea::placeholder{color:#bcae9f;opacity:1}
:root[data-theme="dark"] input:focus,:root[data-theme="dark"] textarea:focus,:root[data-theme="dark"] select:focus{outline:2px solid #ed9254;outline-offset:1px}
:root[data-theme="dark"] .badge.gray{background:#46382c;color:#f4dfca}
:root[data-theme="dark"] .btn-edit-update{border:1px solid #8b5b3d;color:#f4d7bd;background:#3d2e24}
.btn-edit-update{white-space:nowrap;padding:7px 12px;font-size:12px}
@media(max-width:760px){.section-title{gap:10px;flex-wrap:wrap}.btn-edit-update{min-height:36px}}

/* Desktop and tablet dark-mode contrast correction, 2026-10-14.
   Explicit icon strokes avoid inherited dark SVG colours. */
:root[data-theme="dark"]{--ink:#f7efe5;--peach2:#493426}
:root[data-theme="dark"] .topbar .top-actions .icon-btn{color:#f8e9d8!important;background:#342c26!important;border-color:#695445!important;box-shadow:0 2px 8px rgba(0,0,0,.14)}
:root[data-theme="dark"] .topbar .top-actions .icon-btn svg,
:root[data-theme="dark"] .topbar .top-actions .icon-btn svg *{stroke:#f8e9d8!important;fill:none!important}
:root[data-theme="dark"] .topbar .top-actions .logout-action,
:root[data-theme="dark"] .topbar .top-actions .logout-action svg,
:root[data-theme="dark"] .topbar .top-actions .logout-action svg *{color:#ffa36a!important;stroke:#ffa36a!important}
:root[data-theme="dark"] .sidebar .nav button{color:#e9dace!important}
:root[data-theme="dark"] .sidebar .nav button svg,
:root[data-theme="dark"] .sidebar .nav button svg *{stroke:#f2e7dd!important;fill:none!important}
:root[data-theme="dark"] .sidebar .nav button.active{background:#4c3e32!important;color:#fff5e9!important;box-shadow:inset 0 0 0 1px #735746}
:root[data-theme="dark"] .sidebar .nav button.active svg,
:root[data-theme="dark"] .sidebar .nav button.active svg *{stroke:#ffa363!important}
:root[data-theme="dark"] .empty,
:root[data-theme="dark"] .mini-empty,
:root[data-theme="dark"] .card .empty,
:root[data-theme="dark"] .card .mini-empty{background:#332b25!important;border:1px dashed #705b4a!important;color:#ead9c8!important;opacity:1!important}
:root[data-theme="dark"] .empty *,
:root[data-theme="dark"] .mini-empty *{color:#ead9c8!important;opacity:1!important}
:root[data-theme="dark"] .tabs button:not(.active){color:#f0e1d3!important;background:#3c3028!important;border-color:#715b4a!important}
:root[data-theme="dark"] .field input,
:root[data-theme="dark"] .field select,
:root[data-theme="dark"] .field textarea{color:#fff0e1!important;border-color:#6c5748!important;background:#302922!important}
:root[data-theme="dark"] .btn-ghost{color:#f7e6d6!important;border-color:#725848!important}
:root[data-theme="dark"] .icon-btn:focus-visible,
:root[data-theme="dark"] .nav button:focus-visible{outline:2px solid #ffa363!important;outline-offset:3px}
@media(min-width:761px){
 :root[data-theme="dark"] .topbar .top-actions .icon-btn{width:44px;height:44px;border-radius:14px}
 :root[data-theme="dark"] .topbar .top-actions .icon-btn svg{width:23px;height:23px;stroke-width:2.5!important}
 :root[data-theme="dark"] .sidebar .nav .ico svg{width:23px;height:23px;stroke-width:2.5!important}
}
