:root{font-family:system-ui,-apple-system,'Segoe UI',sans-serif;color:#18291f;background:#f5f5f1;font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,textarea,select{font:inherit}button{cursor:pointer;background:#214631;color:white;border:0;border-radius:11px;padding:12px 16px;font-weight:650}button:hover{filter:brightness(1.1)}button:disabled{opacity:.45;cursor:default}.plain{background:transparent;color:#435148}.hidden{display:none!important}.muted,.fineprint{color:#66776d}.fineprint{font-size:.82rem}.login-page{min-height:100dvh;display:grid;place-items:center;padding:25px;background:linear-gradient(135deg,#142b20,#335840)}.auth-card{background:white;border-radius:18px;padding:28px;width:min(100%,420px);box-shadow:0 12px 50px #10201655}.auth-card .logo{width:100%;height:140px;object-fit:contain}.auth-card h1{font-size:1.5rem;margin:10px 0 2px}.auth-card p{margin:5px 0 24px}.auth-card label,form label{display:flex;flex-direction:column;font-weight:600;font-size:.89rem;gap:6px;margin:12px 0}.auth-card button,form button.primary{width:100%}input,textarea,select{border:1px solid #cbd4cb;border-radius:9px;padding:11px;background:#fff;color:#17271c;min-width:0;width:100%}textarea{min-height:86px;resize:vertical}.topbar{display:flex;gap:12px;align-items:center;background:#12281e;color:white;padding:9px max(14px,env(safe-area-inset-right));border-bottom:3px solid #bf934e}.topbar .brandmark{height:45px;width:45px;object-fit:contain;border-radius:9px}.topbar strong{letter-spacing:.08em}.topbar small{display:block;color:#d1dfd6;margin-top:2px;font-size:.76rem}.topbar .plain{margin-left:auto;color:#fff;padding:8px}.main-layout{max-width:1120px;margin:0 auto;display:grid;grid-template-columns:170px 1fr;gap:20px;min-height:calc(100dvh - 58px)}.tabs{background:#e7eee7;padding:24px 12px;display:flex;flex-direction:column;gap:6px}.tabs button{color:#224330;background:transparent;text-align:left;padding:12px}.tabs button.selected{background:#244a33;color:white}.content{padding:24px 14px 45px;min-width:0}.page h1{font-size:1.5rem;margin:0 0 18px}.page h2{font-size:1.2rem}.heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:14px}.heading h1,.heading h2{margin:0}.small{padding:9px 12px}.filters{display:flex;gap:12px;flex-wrap:wrap;margin:10px 0 20px}.filters label{font-size:.8rem;font-weight:600;min-width:130px;flex:1}.filters input,.filters select{margin-top:5px}.item{background:white;border:1px solid #dbe1d9;border-radius:12px;padding:16px;margin:10px 0;box-shadow:0 2px 10px #20302008}.item h3{margin:3px 0 7px;font-size:1.02rem}.item p{margin:4px 0;color:#536457;font-size:.87rem}.item .row{display:flex;gap:8px;align-items:center;justify-content:space-between;flex-wrap:wrap}.item .actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}.item button{padding:8px 11px;font-size:.82rem}.badge{border-radius:20px;display:inline-flex;padding:4px 9px;font-size:.72rem;font-weight:700;background:#e6e9e5;color:#455548}.badge.Urgent{background:#f9dddd;color:#961f27}.badge.Medium{background:#fff0cd;color:#996216}.badge.Normal{background:#e4f3e8;color:#2f7242}.statgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:15px 0}.stat{background:white;padding:15px;border-radius:13px;border:1px solid #e4e9e1}.stat b{font-size:1.8rem;display:block;color:#224e37}.stat span{font-size:.8rem;color:#57665b}.modal-layer{position:fixed;inset:0;background:#121b16a0;display:grid;place-items:center;padding:16px;z-index:99}.modal{background:white;border-radius:16px;max-width:640px;width:100%;max-height:90dvh;overflow:auto;padding:20px}.modal h2{font-size:1.2rem}.modal .heading{margin-bottom:20px}.modal h3{font-size:1rem}.modal .actions{display:flex;gap:9px;flex-wrap:wrap;margin-top:14px}.modal .actions button{flex:1}.secondary{background:#e7ece6;color:#1e4030}.danger{background:#ad3b39}.message{border-left:3px solid #ac8347;padding:8px 12px;margin:8px 0;background:#f5f5f0;border-radius:3px;font-size:.86rem}.toast{position:fixed;bottom:20px;left:50%;transform:translateX(-50%);background:#193f2b;color:white;border-radius:10px;padding:13px 20px;max-width:90vw;box-shadow:0 8px 30px #0005;z-index:130}.hint{background:#f4f0e5;padding:10px;border-radius:9px;font-size:.85rem;color:#755924}.formgrid{display:grid;grid-template-columns:1fr 1fr;gap:5px 14px}.formgrid .wide{grid-column:1/-1}@media(max-width:650px){.main-layout{display:block;padding-bottom:60px}.tabs{position:fixed;bottom:0;left:0;right:0;padding:8px 4px env(safe-area-inset-bottom);display:flex;flex-direction:row;justify-content:space-around;z-index:30;box-shadow:0 -6px 20px #0001}.tabs button{font-size:.73rem;padding:10px 7px;text-align:center;border-radius:9px}.content{padding:22px 13px 55px}.statgrid{gap:7px}.stat{padding:11px}.stat b{font-size:1.45rem}.formgrid{display:block}.formgrid .wide{grid-column:auto}}

/* KTR mobile fix v2 */

.password-control{display:flex;align-items:stretch;position:relative;width:100%;gap:6px}
.password-control input{flex:1;min-width:0;color:#17271c!important;-webkit-text-fill-color:#17271c!important;caret-color:#17271c;opacity:1!important;font:16px system-ui,sans-serif;letter-spacing:normal}
.password-control input[type=password]{-webkit-text-security:disc}
.password-control input[type=text]{-webkit-text-security:none}
.auth-card .password-toggle{width:auto;flex:0 0 auto;display:flex;gap:5px;align-items:center;justify-content:center;background:#e7eee7;color:#214631;padding:10px;border:1px solid #b7c8ba;font-size:13px;min-height:44px}
.password-control input:focus-visible,.password-toggle:focus-visible{outline:3px solid #92702f;outline-offset:2px}

.password-control{gap:10px;align-items:stretch;margin-bottom:6px}
.password-control input{width:0;min-height:46px}
.auth-card .password-toggle{gap:7px;min-width:86px;line-height:1;padding:10px}
.password-toggle svg{display:block;flex-shrink:0}
.password-toggle span{display:block;line-height:1}
.auth-card .recovery-link{display:block;width:auto;margin:16px auto;padding:8px;background:transparent;color:#214631;text-decoration:underline;min-height:44px}
.topbar .brandmark{width:76px;height:48px;object-fit:contain;object-position:center;background:white;padding:4px;flex-shrink:0}
.topbar{flex-wrap:wrap}
.topbar #account-password{margin-left:auto;font-size:.76rem}
.topbar #logout{margin-left:0;font-size:.8rem}
@media(max-width:430px){.topbar{gap:8px}.topbar strong{font-size:.9rem}.topbar #account-password{margin-left:0}.topbar #logout{margin-left:auto}}


/* Aligned mobile header */

@media(max-width:650px){

  .topbar{

    display:grid;

    grid-template-columns:76px minmax(0,1fr) auto;

    grid-template-areas:"logo identity identity" "logo password logout";

    align-items:center;

    gap:8px 12px;

    padding:16px 14px;

  }

  .topbar .brandmark{

    grid-area:logo;

    align-self:center;

    width:76px;

    height:54px;

  }

  .topbar>div{grid-area:identity;min-width:0}

  .topbar strong{font-size:.95rem}

  .topbar #account-password{

    grid-area:password;

    margin:0;

    justify-self:start;

  }

  .topbar #logout{

    grid-area:logout;

    margin:0;

    justify-self:end;

  }

  .topbar #account-password,.topbar #logout{

    display:flex;

    align-items:center;

    justify-content:center;

    min-height:44px;

    padding:8px;

    font-size:.75rem;

    line-height:1.2;

    white-space:nowrap;

  }

}



/* Mobile header: identity centred, actions on right */

@media(max-width:650px){

  .topbar{

    grid-template-columns:76px minmax(0,1fr) 104px;

    grid-template-areas:"logo identity password" "logo identity logout";

    gap:0 8px;

    align-items:center;

  }

  .topbar>div{

    align-self:center;

    margin:0;

  }

  .topbar strong{

    display:block;

    font-size:.85rem;

    letter-spacing:.02em;

  }

  .topbar #who{

    display:block;

    font-size:.72rem;

    line-height:1.4;

    margin-top:4px;

    white-space:normal;

  }

  .topbar #account-password,.topbar #logout{

    justify-self:end;

    justify-content:flex-end;

    width:104px;

    box-sizing:border-box;

    margin:0;

    padding:8px 0;

    font-size:.7rem;

    text-align:right;

  }

}



/* Compact gold header buttons */

@media(max-width:650px){

  .topbar{

    grid-template-columns:76px minmax(0,1fr) 76px;

    grid-template-rows:44px 44px;

    gap:6px 8px;

  }

  .topbar #account-password,

  .topbar #logout{

    display:flex;

    align-items:center;

    justify-content:center;

    width:76px;

    height:44px;

    min-height:44px;

    box-sizing:border-box;

    padding:5px 6px;

    margin:0;

    border:1px solid #b79555;

    border-radius:9px;

    background:transparent;

    color:#fff;

    font-size:.68rem;

    font-weight:600;

    line-height:1.2;

    text-align:center;

    white-space:normal;

  }

}

