
*{box-sizing:border-box}body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;color:#183c4d;background:#f5f8f9}button,input,select{font:inherit}button{cursor:pointer}
.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(145deg,#eef7f8,#f7fafb)}.login-card{width:min(420px,92vw);background:#fff;border:1px solid #dce7eb;border-radius:22px;padding:38px;box-shadow:0 20px 60px #153d4c14}.logo,.brand{display:flex;align-items:center;gap:11px}.logo>span,.brand>span{width:40px;height:40px;border-radius:11px;background:#0d9b7b;color:#fff;display:grid;place-items:center;font-weight:900}.logo small,.brand small{display:block;color:#7a8b92;font-size:9px;letter-spacing:.15em}.login-card h1{margin:34px 0 7px;font-size:28px}.login-card p{color:#7d8d94}.login-card label{display:block;margin:18px 0 0;font-size:12px;font-weight:700}.login-card input{display:block;width:100%;margin-top:7px;padding:13px;border:1px solid #d5e0e4;border-radius:10px}.login-card button{width:100%;margin-top:20px;border:0;border-radius:10px;padding:13px;background:#087f64;color:#fff;font-weight:800}
.app{display:grid;grid-template-columns:240px 1fr;min-height:100vh}.sidebar{background:#063d52;color:#d9edf2;padding:24px 14px;display:flex;flex-direction:column}.brand{padding:3px 10px 25px}.brand b{font-size:14px}.compose{margin:0 6px 24px;border:0;border-radius:11px;background:#fff;color:#08465b;padding:12px;font-weight:800}.nav{display:flex;gap:11px;padding:11px 12px;color:#b9d7df;text-decoration:none;border-radius:9px;margin:2px 0;font-size:12px;cursor:pointer}.nav.active,.nav:hover{background:#0a7180;color:#fff}.nav b{margin-left:auto}.side-bottom{margin-top:auto;border-top:1px solid #ffffff18;padding-top:15px}.side-bottom a,.side-bottom button{display:block;width:100%;padding:11px 12px;background:none;border:0;color:#b9d7df;text-align:left;font-size:12px}.top{height:70px;background:#fff;border-bottom:1px solid #dfe8eb;display:flex;align-items:center;gap:20px;padding:0 26px}.search{height:40px;max-width:650px;flex:1;display:flex;align-items:center;background:#f3f7f8;border:1px solid #e1e9ec;border-radius:10px;padding:0 12px}.search input{border:0;outline:0;background:transparent;flex:1;padding:8px}.top-right{display:flex;align-items:center;gap:10px;margin-left:auto;color:#71838a;font-size:11px}.top-right button{border:0;background:#eef4f5;border-radius:9px;width:38px;height:38px}.mobile-menu{display:none}.toolbar{padding:22px 28px 14px;display:flex;justify-content:space-between;align-items:end}.toolbar h1{margin:0;font-size:23px}.toolbar p{margin:5px 0 0;color:#849299;font-size:11px}.toolbar button{border:1px solid #d8e3e7;background:#fff;border-radius:8px;padding:8px 11px;font-size:11px;margin-left:6px}.mail-layout{margin:0 28px 28px;background:#fff;border:1px solid #dce6e9;border-radius:15px;overflow:hidden;display:grid;grid-template-columns:390px minmax(0,1fr);height:calc(100vh - 160px);min-height:560px;box-shadow:0 6px 25px #183c4d08}.list{border-right:1px solid #e0e8eb;overflow:auto}.message{display:grid;grid-template-columns:34px 1fr 22px;gap:10px;padding:14px 16px;border-bottom:1px solid #edf1f2;cursor:pointer}.message:hover,.message.selected{background:#f3faf8}.avatar{width:34px;height:34px;border-radius:50%;background:#e8f2f4;color:#176078;display:grid;place-items:center;font-size:11px;font-weight:800}.msg-main{min-width:0}.msg-top{display:flex;justify-content:space-between;gap:10px}.sender{font-size:12px;font-weight:800;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.date{font-size:9px;color:#96a3a8;white-space:nowrap}.subject{font-size:11px;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.preview{font-size:10px;color:#849299;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.unread .sender,.unread .subject{font-weight:900;color:#123d50}.star{border:0;background:none;color:#a6b4b9}.star.on{color:#e3a72b}.reader{overflow:auto;background:#fff}.empty-reader{height:100%;display:grid;place-content:center;text-align:center;color:#8b999e}.empty-reader div{font-size:36px}.empty-reader h2{color:#2a4c5b;font-size:18px}.reader-head{padding:24px 30px;border-bottom:1px solid #e5ecee}.reader-head h2{margin:0 0 14px;font-size:20px;color:#173f51}.sender-line{display:flex;align-items:center;gap:10px}.sender-line .avatar{width:38px;height:38px}.sender-info strong{font-size:12px}.sender-info div,.sender-info time{font-size:10px;color:#829198;display:block;margin-top:2px}.reader-actions{margin-left:auto}.reader-actions button{border:1px solid #dce6e8;background:#fff;border-radius:8px;padding:7px 10px;margin-left:5px;font-size:11px}.reader-body{padding:30px;max-width:900px;color:#304d59;font-size:13px;line-height:1.7}.reader-body img{max-width:100%;height:auto}.reader-body table{max-width:100%;border-collapse:collapse}.reader-body td,.reader-body th{border:1px solid #e1e8ea;padding:7px}.reader-footer{border-top:1px solid #edf1f2;padding:14px 30px;color:#93a0a5;font-size:10px}.attachments{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}.attachment{display:flex;align-items:center;gap:8px;border:1px solid #dce6e9;background:#f8fafb;border-radius:9px;padding:9px 11px;text-decoration:none;color:#31515d;font-size:10px}
.modal{position:fixed;inset:0;background:#0b304866;display:grid;place-items:center;padding:20px;z-index:20}.compose-card,.settings-card{width:min(900px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 30px 80px #001c2a33}.compose-card header,.settings-card header{display:flex;justify-content:space-between;padding:18px 22px;border-bottom:1px solid #e1e8ea}.compose-card header small{display:block;color:#849299;font-size:10px;margin-top:3px}.compose-card header button,.settings-card header button{border:0;background:none;font-size:24px}.compose-card form{padding:20px}.field-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.compose-card label{font-size:10px;font-weight:800;color:#6e8188}.compose-card input,.compose-card select{width:100%;margin-top:5px;padding:10px;border:1px solid #d7e2e5;border-radius:8px}.editor-tools{display:flex;gap:4px;margin-top:10px}.editor-tools button{border:1px solid #dbe5e8;background:#fff;border-radius:6px;padding:6px 9px;font-size:11px}.editor{min-height:280px;border:1px solid #d7e2e5;border-radius:8px;padding:14px;margin-top:4px;outline:none}.attach{border:1px dashed #bdd0d6;background:#f7fafb;border-radius:8px;padding:9px;margin-top:10px}.compose-footer{display:flex;align-items:center;gap:10px;margin-top:16px}.compose-footer .send{margin-left:auto;background:#087f64;color:#fff;border:0;border-radius:8px;padding:10px 18px;font-weight:800}.secondary{border:1px solid #d7e2e5;background:#fff;border-radius:8px;padding:9px}.settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:30px;padding:24px}.settings-grid input{padding:9px;border:1px solid #d7e2e5;border-radius:8px;margin:4px}.settings-grid button{padding:9px;border:0;background:#087f64;color:#fff;border-radius:8px}.identity-item{padding:10px;border:1px solid #e0e8ea;border-radius:8px;margin:7px 0;font-size:11px}.muted{color:#8a999e;font-size:10px;line-height:1.6}
@media(max-width:900px){.app{grid-template-columns:1fr}.sidebar{position:fixed;left:-260px;top:0;bottom:0;width:240px;z-index:30;transition:.2s}.sidebar.open{left:0}.mobile-menu{display:block;border:0;background:#eef4f5;border-radius:8px;padding:9px}.top{padding:0 14px}.top-right span{display:none}.mail-layout{grid-template-columns:1fr;margin:0 12px 12px;height:calc(100vh - 150px)}.reader{display:none}.mail-layout.reader-open .list{display:none}.mail-layout.reader-open .reader{display:block}.toolbar{padding:18px 14px 12px}.field-row,.settings-grid{grid-template-columns:1fr}.compose-card form{padding:14px}}


/* V1.0.3 — polished mailbox modal system */
body.modal-open{overflow:hidden}
.modal[hidden]{display:none!important}
.modal{
  position:fixed;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:28px;
  background:rgba(5,31,43,.56);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
  z-index:1000;
}
.compose-card,.settings-card{
  width:min(940px,calc(100vw - 56px));
  max-height:min(88vh,820px);
  overflow:hidden;
  background:#fff;
  border:1px solid rgba(7,61,82,.12);
  border-radius:18px;
  box-shadow:0 28px 90px rgba(0,30,45,.28);
  display:flex;
  flex-direction:column;
}
.settings-card{width:min(760px,calc(100vw - 56px))}
.compose-card>header,.settings-card>header{
  flex:0 0 auto;
  min-height:62px;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  padding:16px 22px;
  background:#fff;
  border-bottom:1px solid #e4ebee;
}
.compose-card>header b,.settings-card>header b{
  color:#173e4e;
  font-size:15px;
  font-weight:800;
}
.compose-card>header small{
  display:block;
  color:#87969d;
  font-size:10px;
  margin-top:4px;
}
.compose-card>header button,.settings-card>header button{
  width:34px;height:34px;
  border:0;
  border-radius:9px;
  background:#f3f7f8;
  color:#61747c;
  font-size:20px;
  line-height:1;
  cursor:pointer;
}
.compose-card>header button:hover,.settings-card>header button:hover{background:#e7eef0;color:#173e4e}
.compose-card form{padding:18px 22px 20px;overflow:auto}
.field-row{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.compose-card input,.compose-card select{
  box-sizing:border-box;
  background:#fff;
  color:#294a56;
  font-size:12px;
}
.compose-card label{display:block;margin-bottom:10px}
.editor{
  min-height:250px;
  max-height:340px;
  overflow:auto;
  line-height:1.65;
  background:#fff;
}
.compose-footer{
  position:sticky;
  bottom:0;
  padding-top:14px;
  background:#fff;
}
.settings-grid{
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:22px;
  padding:22px;
  overflow:auto;
}
.settings-grid>div{
  border:1px solid #e1eaed;
  border-radius:13px;
  padding:18px;
  background:#fbfcfc;
}
.settings-grid h3{margin:0 0 8px;color:#244754;font-size:13px}
.settings-grid p{margin:0 0 12px}
.settings-grid form{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;align-items:center}
.settings-grid form input{box-sizing:border-box;width:100%;margin:0}
.settings-grid form button{white-space:nowrap;cursor:pointer}
.settings-grid .muted{display:block;margin-top:10px}
.identity-item{
  background:#fff;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
@media(max-width:760px){
 .modal{padding:12px;align-items:center}
 .compose-card,.settings-card{width:100%;max-height:92vh;border-radius:14px}
 .field-row,.settings-grid{grid-template-columns:1fr}
 .settings-grid form{grid-template-columns:1fr}
 .compose-card form{padding:14px}
 .editor{min-height:210px}
}


/* V1.0.4 — authentication visibility fix */
[hidden]{display:none!important}
html,body{min-height:100%;margin:0}
.login-page[hidden],.app[hidden],.modal[hidden]{display:none!important}
.login-page{
  min-height:100vh;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 20px;
  background:linear-gradient(135deg,#eef8fa 0%,#f8fbfc 55%,#eaf5f3 100%);
}
.login-card{
  width:min(390px,calc(100vw - 40px));
  box-sizing:border-box;
  padding:32px;
  background:#fff;
  border:1px solid #dce8eb;
  border-radius:18px;
  box-shadow:0 20px 60px rgba(12,55,70,.12);
}
.login-card .logo{margin-bottom:24px}
.login-card .login-logo{width:52px;height:52px;display:block;object-fit:contain;border-radius:14px;flex:0 0 52px}
.login-card h1{margin:0 0 7px;color:#173e4e;font-size:24px}
.login-card>p{margin:0 0 22px;color:#7a8b92;font-size:12px}
.login-card label{display:block;margin:0 0 13px;color:#5f737c;font-size:10px;font-weight:800}
.login-card input{width:100%;box-sizing:border-box;margin-top:6px;padding:12px 13px;border:1px solid #d5e2e6;border-radius:9px;background:#fff;outline:none}
.login-card input:focus{border-color:#46bca4;box-shadow:0 0 0 3px rgba(70,188,164,.12)}
.login-card form>button{width:100%;margin-top:5px;padding:12px;border:0;border-radius:9px;background:#39b99f;color:#fff;font-weight:800;cursor:pointer}
.login-card form>button:hover{background:#2fa88f}
#loginError{min-height:18px;margin-top:10px;color:#b33a3a;font-size:11px}

/* V1.0.5 — Gmail-style message selection and bulk actions */
.toolbar-left{display:flex;align-items:center;gap:18px;min-width:0}.toolbar-left>div{min-width:0}.toolbar-actions{display:flex;align-items:center;gap:6px}.toolbar-actions button:disabled{opacity:.45;cursor:not-allowed;background:#f5f8f9}.select-all{display:flex;align-items:center;gap:7px;color:#647980;font-size:11px;white-space:nowrap;cursor:pointer}.select-all input{width:15px;height:15px;margin:0;accent-color:#087f64}.message{grid-template-columns:22px 34px minmax(0,1fr) 22px;align-items:center}.message-check{display:grid;place-items:center;cursor:pointer}.message-check input{width:15px;height:15px;margin:0;accent-color:#087f64}.message.checked{background:#eef9f6}.message.checked:hover,.message.selected{background:#e8f7f3}.message-check input:focus-visible,.select-all input:focus-visible{outline:2px solid #39b99f;outline-offset:2px}.message .star{padding:2px}.toolbar-actions button{white-space:nowrap}
@media(max-width:900px){.toolbar-left{gap:10px}.select-all span{display:none}.toolbar-actions button{padding:7px 8px}.message{grid-template-columns:22px 34px minmax(0,1fr) 22px}}


/* V1.0.6 — final settings layout */
.settings-card{
 width:min(980px,calc(100vw - 48px));
 max-height:min(86vh,760px);
 display:flex;
 flex-direction:column;
 overflow:hidden;
 background:#fff;
 border:1px solid #dce7ea;
 border-radius:18px;
 box-shadow:0 28px 90px rgba(8,38,52,.28);
}
.settings-header{
 display:flex!important;
 align-items:flex-start!important;
 justify-content:space-between!important;
 gap:24px;
 padding:22px 24px!important;
 border-bottom:1px solid #e4ecef;
 background:#fff;
}
.settings-kicker{
 display:block;
 margin-bottom:5px;
 color:#16816a;
 font-size:9px;
 font-weight:900;
 letter-spacing:.12em;
}
.settings-header h2{margin:0;color:#173e4e;font-size:20px;line-height:1.25}
.settings-header p{margin:6px 0 0;color:#84939a;font-size:11px}
.settings-header>button{flex:0 0 auto}
.settings-body{
 display:grid;
 grid-template-columns:205px minmax(0,1fr);
 min-height:0;
 flex:1;
}
.settings-nav{
 padding:16px 11px;
 background:#f7fafb;
 border-right:1px solid #e1eaed;
}
.settings-nav-item{
 width:100%;
 display:flex;
 align-items:center;
 gap:10px;
 padding:10px 12px;
 margin-bottom:3px;
 border:0;
 border-radius:9px;
 background:transparent;
 color:#61757d;
 text-align:left;
 font-size:11px;
 font-weight:750;
 cursor:pointer;
}
.settings-nav-item:hover{background:#eaf2f4;color:#254a58}
.settings-nav-item.active{background:#dff1ec;color:#08775a}
.settings-content{
 min-width:0;
 overflow:auto;
 padding:25px 28px;
 background:#fff;
}
.settings-tab[hidden]{display:none!important}
.settings-section-title{margin-bottom:18px}
.settings-section-title h3{margin:0;color:#244957;font-size:16px}
.settings-section-title p{margin:5px 0 0;color:#84939a;font-size:11px}
.settings-card-grid{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:12px;
}
.setting-item{
 padding:16px;
 border:1px solid #e1eaed;
 border-radius:12px;
 background:#fbfcfc;
}
.setting-label{
 display:block;
 margin-bottom:6px;
 color:#87969c;
 text-transform:uppercase;
 letter-spacing:.07em;
 font-size:8px;
 font-weight:850;
}
.setting-item strong,.settings-account-card strong{display:block;color:#2d4c58;font-size:12px}
.setting-item small,.settings-account-card small{
 display:block;
 margin-top:7px;
 color:#8a999f;
 font-size:10px;
 line-height:1.5;
}
.status-dot{
 display:inline-block;
 width:7px;height:7px;
 margin-right:5px;
 border-radius:50%;
 background:#1fa56f;
}
.sender-list{display:grid;gap:8px;margin-bottom:18px}
.sender-list .empty-state{
 padding:20px;
 border:1px dashed #d6e3e6;
 border-radius:11px;
 color:#88979d;
 font-size:11px;
 text-align:center;
}
.settings-form-card{
 padding:17px;
 border:1px solid #dfe8eb;
 border-radius:13px;
 background:#f9fbfb;
}
.settings-form-heading h4{margin:0;color:#294b58;font-size:12px}
.settings-form-heading p{margin:5px 0 14px;color:#89979d;font-size:10px}
.settings-inline-form{
 display:grid;
 grid-template-columns:1fr 1fr auto;
 gap:10px;
 align-items:end;
}
.settings-inline-form label span{
 display:block;
 margin-bottom:5px;
 color:#687d85;
 font-size:9px;
 font-weight:800;
}
.settings-inline-form input{
 width:100%;
 box-sizing:border-box;
 padding:10px 11px;
 border:1px solid #d6e3e7;
 border-radius:8px;
 background:#fff;
 font-size:11px;
 outline:none;
}
.settings-inline-form input:focus{border-color:#55b9a4;box-shadow:0 0 0 3px rgba(85,185,164,.1)}
.settings-inline-form button{
 padding:10px 13px;
 border:0;
 border-radius:8px;
 background:#0b765b;
 color:#fff;
 font-size:10px;
 font-weight:800;
 cursor:pointer;
}
.settings-status{min-height:14px;margin:9px 0 0;font-size:10px;color:#6c7f86}
.settings-account-card{
 display:grid;
 grid-template-columns:1fr 1fr;
 gap:12px;
}
.settings-account-card>div{
 padding:17px;
 border:1px solid #e1eaed;
 border-radius:12px;
 background:#fbfcfc;
}
.settings-footer{
 display:flex!important;
 align-items:center!important;
 justify-content:space-between!important;
 gap:16px;
 padding:12px 20px!important;
 border-top:1px solid #e4ecef;
 background:#fbfcfc;
}
.settings-footer>span{color:#89979d;font-size:9px}
.settings-done{
 padding:9px 17px;
 border:0;
 border-radius:8px;
 background:#0b765b;
 color:#fff;
 font-size:10px;
 font-weight:800;
 cursor:pointer;
}
@media(max-width:760px){
 .settings-card{width:calc(100vw - 24px);max-height:92vh}
 .settings-body{grid-template-columns:1fr}
 .settings-nav{display:flex;gap:5px;overflow:auto;border-right:0;border-bottom:1px solid #e1eaed;padding:9px}
 .settings-nav-item{width:auto;min-width:max-content;margin:0}
 .settings-content{padding:20px 16px}
 .settings-card-grid,.settings-account-card,.settings-inline-form{grid-template-columns:1fr}
 .settings-footer{align-items:flex-start!important;flex-direction:column}
 .settings-done{width:100%}
}


/* V1.0.7 — settings UI replacement */
.settings-card{
 width:min(980px,calc(100vw - 48px));
 max-height:min(86vh,760px);
 overflow:hidden;
 display:flex;
 flex-direction:column;
 background:#fff;
 border:1px solid #d9e5e9;
 border-radius:18px;
 box-shadow:0 30px 90px rgba(0,29,43,.26);
}
.settings-header{
 display:flex!important;
 align-items:flex-start!important;
 justify-content:space-between!important;
 gap:24px;
 padding:22px 24px!important;
 border-bottom:1px solid #e3eaed;
 background:#fff;
}
.settings-kicker{display:block;margin:0 0 5px;color:#08785b;font-size:8px;font-weight:900;letter-spacing:.12em}
.settings-header h2{margin:0;color:#173f4e;font-size:20px;line-height:1.2}
.settings-header p{margin:6px 0 0;color:#85959c;font-size:11px}
.settings-header>button{width:34px!important;height:34px!important;border:0!important;border-radius:8px!important;background:#f2f6f7!important;color:#61757d!important;font-size:21px!important;cursor:pointer}
.settings-header>button:hover{background:#e6eef0!important;color:#173f4e!important}
.settings-layout{display:grid;grid-template-columns:205px minmax(0,1fr);min-height:0;flex:1}
.settings-sidebar{padding:15px 10px;background:#f7fafb;border-right:1px solid #e0e9ec}
.settings-tab-btn{width:100%;display:flex;align-items:center;gap:10px;padding:10px 12px;margin-bottom:3px;border:0;border-radius:9px;background:transparent;color:#60757d;text-align:left;font-size:11px;font-weight:800;cursor:pointer}
.settings-tab-btn:hover{background:#eaf2f4;color:#244957}
.settings-tab-btn.active{background:#dff1eb;color:#08775a}
.settings-panel{min-width:0;overflow:auto;padding:26px 28px;background:#fff}
.settings-panel-section[hidden]{display:none!important}
.settings-section-heading{margin-bottom:18px}
.settings-section-heading h3{margin:0;color:#234754;font-size:16px}
.settings-section-heading p{margin:5px 0 0;color:#87969c;font-size:11px;line-height:1.5}
.settings-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.settings-info{padding:16px;border:1px solid #dfe8eb;border-radius:12px;background:#fbfcfc}
.settings-info>span{display:block;margin-bottom:6px;color:#89989e;text-transform:uppercase;letter-spacing:.07em;font-size:8px;font-weight:900}
.settings-info>strong{display:block;color:#2b4b57;font-size:12px;word-break:break-word}
.settings-info>small{display:block;margin-top:7px;color:#8a999f;font-size:10px;line-height:1.45}
.settings-status-dot{display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:50%;background:#20a36e}
.settings-note{margin-top:14px;padding:16px;border-radius:12px;background:#f5faf8;border:1px solid #dcece6}
.settings-note strong{display:block;color:#28515b;font-size:11px}
.settings-note p{margin:6px 0 0;color:#71858d;font-size:10px;line-height:1.6}
.settings-note code{padding:2px 4px;border-radius:4px;background:#e7f0ed;font-size:9px}
.settings-identities{display:grid;gap:8px;margin-bottom:16px}
.settings-identities>div{border:1px solid #dfe8eb;border-radius:10px;padding:12px;background:#fbfcfc}
.settings-add-card{padding:17px;border:1px solid #dce7ea;border-radius:13px;background:#f8fafb}
.settings-add-card h4{margin:0;color:#294b58;font-size:12px}
.settings-add-card>div>p{margin:5px 0 14px;color:#89989e;font-size:10px}
.settings-add-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}
.settings-add-form label span{display:block;margin-bottom:5px;color:#6c8088;font-size:9px;font-weight:800}
.settings-add-form input{width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid #d5e2e6;border-radius:8px;background:#fff;font-size:11px;outline:none}
.settings-add-form input:focus{border-color:#55b9a4;box-shadow:0 0 0 3px rgba(85,185,164,.1)}
.settings-add-form button{padding:10px 14px;border:0;border-radius:8px;background:#0b765b;color:#fff;font-size:10px;font-weight:800;cursor:pointer}
.settings-account-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.settings-footer{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 20px!important;border-top:1px solid #e3eaed;background:#fbfcfc}
.settings-footer span{color:#89979d;font-size:9px}
.settings-done{padding:9px 17px;border:0;border-radius:8px;background:#0b765b;color:#fff;font-size:10px;font-weight:800;cursor:pointer}
@media(max-width:700px){
 .settings-card{width:calc(100vw - 24px);max-height:92vh}
 .settings-layout{grid-template-columns:1fr}
 .settings-sidebar{display:flex;gap:4px;overflow:auto;border-right:0;border-bottom:1px solid #e0e9ec;padding:9px}
 .settings-tab-btn{width:auto;min-width:max-content;margin:0}
 .settings-panel{padding:20px 15px}
 .settings-info-grid,.settings-account-grid,.settings-add-form{grid-template-columns:1fr}
}

.brand-link{display:flex;align-items:center;gap:11px;color:inherit;text-decoration:none}

/* Komatsu Equipment brand logo and favicon */
.brand-logo{width:38px;height:38px;display:block;object-fit:contain;border-radius:10px;flex:0 0 38px}
.brand-link{display:flex;align-items:center;gap:11px}

/* V1.1.0 — stable route navigation and dedicated settings page */
.mail-content-shell[hidden],.settings-page[hidden]{display:none!important}
.page-route-heading{margin:0 0 20px}
.page-route-heading h1{margin:0;color:#173e4e;font-size:24px}.page-route-heading p{margin:6px 0 0;color:#829298;font-size:11px}
.route-settings-layout{display:grid;grid-template-columns:205px minmax(0,1fr);min-height:590px;border:1px solid #dce7ea;border-radius:15px;overflow:hidden;background:#fff;box-shadow:0 7px 25px rgba(15,52,66,.05)}
.route-settings-nav{padding:15px 10px;background:#f7fafb;border-right:1px solid #e1eaed}
.route-settings-tab{display:flex;align-items:center;gap:10px;width:100%;padding:10px 12px;margin-bottom:3px;border:0;border-radius:9px;background:transparent;color:#61757d;text-align:left;font-size:11px;font-weight:800;cursor:pointer}.route-settings-tab:hover{background:#eaf2f4;color:#234a58}.route-settings-tab.active{background:#dff1eb;color:#08775a}
.route-settings-content{min-width:0;overflow:auto;padding:26px 28px}.route-settings-panel[hidden]{display:none!important}.route-section-heading{margin-bottom:18px}.route-section-heading h2{margin:0;color:#244957;font-size:16px}.route-section-heading p{margin:5px 0 0;color:#87969c;font-size:11px}
.route-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.route-info{padding:16px;border:1px solid #dfe8eb;border-radius:12px;background:#fbfcfc}.route-info>span{display:block;margin-bottom:6px;color:#89989e;text-transform:uppercase;letter-spacing:.07em;font-size:8px;font-weight:900}.route-info>strong{display:block;color:#2b4b57;font-size:12px;word-break:break-word}.route-info>small{display:block;margin-top:7px;color:#8a999f;font-size:10px;line-height:1.45}
.settings-status-dot{display:inline-block;width:7px;height:7px;margin-right:5px;border-radius:50%;background:#20a36e}
.route-identities{display:grid;gap:8px;margin-bottom:16px}.route-identity{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:14px 16px;border:1px solid #dfe8eb;border-radius:11px;background:#fbfcfc}.route-identity strong{display:block;color:#2a4b57;font-size:11px}.route-identity>div>span{display:block;color:#87969d;font-size:10px;margin-top:4px}.route-identity-status{display:inline-block;color:#16775c!important;background:#e5f4ef;border-radius:999px;padding:5px 8px;font-size:8px!important;font-weight:800;white-space:nowrap}
.route-empty{padding:20px;border:1px dashed #d7e3e6;border-radius:10px;text-align:center;color:#87979d;font-size:10px}
.route-add-card{padding:17px;border:1px solid #dce7ea;border-radius:13px;background:#f8fafb}.route-add-card h3{margin:0;color:#294b58;font-size:12px}.route-add-card p{margin:5px 0 14px;color:#89979d;font-size:10px}
.route-add-form{display:grid;grid-template-columns:1fr 1fr auto;gap:10px;align-items:end}.route-add-form label span{display:block;margin-bottom:5px;color:#6c8088;font-size:9px;font-weight:800}.route-add-form input{width:100%;box-sizing:border-box;padding:10px 11px;border:1px solid #d5e2e6;border-radius:8px;background:#fff;font-size:11px}.route-add-form button{padding:10px 14px;border:0;border-radius:8px;background:#0b765b;color:#fff;font-size:10px;font-weight:800;cursor:pointer}.route-settings-status{min-height:15px;margin-top:9px;color:#5e7982;font-size:10px}
@media(max-width:760px){.route-settings-layout{grid-template-columns:1fr}.route-settings-nav{display:flex;gap:4px;overflow:auto;border-right:0;border-bottom:1px solid #e1eaed;padding:9px}.route-settings-tab{width:auto;min-width:max-content;margin:0}.route-settings-content{padding:20px 15px}.route-info-grid,.route-add-form{grid-template-columns:1fr}}

/* V1.1.2 — Settings is a true standalone view */
.settings-page{width:100%;box-sizing:border-box}
.settings-page .page-route-heading{padding:4px 2px 0;margin:0}
.settings-page .settings-kicker{display:block;color:#16866b;font-size:8px;font-weight:900;letter-spacing:.12em;margin-bottom:7px}
.settings-page .route-settings-layout{width:100%;min-height:560px;margin-top:32px!important}
.settings-page .route-settings-content{background:#fff}
.settings-page .route-section-heading{padding-bottom:2px}
.settings-page .route-info-grid{max-width:100%}
.settings-page .route-info{min-height:78px}
.settings-page .route-settings-tab{font-size:10px}
.settings-page .route-settings-tab span{font-size:10px}
@media(min-width:1100px){
  .settings-page .route-settings-layout{min-height:600px}
  .settings-page .route-settings-content{padding:30px 34px}
}

/* V1.1.5 — explicit settings spacing + authentication boot state */
.settings-page>.route-settings-layout{margin-top:32px!important}
@media(max-width:760px){
  .settings-page>.route-settings-layout{margin-top:22px!important}
}
.auth-boot{
  position:fixed;
  inset:0;
  z-index:2000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
  background:linear-gradient(135deg,#eef8fa 0%,#f8fbfc 55%,#eaf5f3 100%);
}
.auth-boot[hidden]{display:none!important}
.auth-boot-card{
  width:min(360px,calc(100vw - 40px));
  padding:30px;
  border:1px solid #dce8eb;
  border-radius:18px;
  background:#fff;
  box-shadow:0 20px 60px rgba(21,61,76,.10);
  text-align:center;
}
.auth-boot-card img{
  width:42px;height:42px;object-fit:contain;border-radius:10px;
  display:block;margin:0 auto 14px
}
.auth-boot-card strong{display:block;color:#173e4e;font-size:15px}
.auth-boot-card span{display:block;margin-top:6px;color:#829298;font-size:11px}

/* =========================================================
   V1.1.6 — FINAL SETTINGS STRUCTURE
   ========================================================= */

.settings-page{
  width:100%!important;
  min-height:calc(100vh - 70px)!important;
  box-sizing:border-box!important;
  padding:34px 32px 46px!important;
  background:#f5f8f9!important;
}

.settings-page .page-route-heading{
  display:block!important;
  width:100%!important;
  padding:0 2px!important;
  margin:0 0 36px!important;
  min-height:64px!important;
}

.settings-page .settings-kicker{
  display:block!important;
  margin:0 0 8px!important;
  color:#087f64!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.14em!important;
}

.settings-page .page-route-heading h1{
  margin:0!important;
  color:#173e4e!important;
  font-size:28px!important;
  line-height:1.2!important;
  font-weight:800!important;
}

.settings-page .page-route-heading p{
  margin:7px 0 0!important;
  color:#7d8e95!important;
  font-size:12px!important;
  line-height:1.5!important;
}

/* Explicit separation: the card is the next block after the heading. */
.settings-page > .route-settings-layout{
  display:grid!important;
  grid-template-columns:220px minmax(0,1fr)!important;
  width:100%!important;
  min-height:620px!important;
  margin:0!important;
  border:1px solid #d8e4e8!important;
  border-radius:16px!important;
  overflow:hidden!important;
  background:#fff!important;
  box-shadow:0 8px 30px rgba(20,58,72,.07)!important;
}

.settings-page .route-settings-nav{
  padding:22px 14px!important;
  background:#f7fafb!important;
  border-right:1px solid #dce7ea!important;
}

.settings-page .route-settings-tab{
  min-height:42px!important;
  padding:11px 13px!important;
  margin:0 0 5px!important;
  border:1px solid transparent!important;
  border-radius:9px!important;
  background:transparent!important;
  color:#63777f!important;
  font-size:11px!important;
  font-weight:800!important;
}

.settings-page .route-settings-tab:hover{
  background:#edf5f5!important;
  color:#234b59!important;
}

.settings-page .route-settings-tab.active{
  background:#e2f4ef!important;
  border-color:#cde9e1!important;
  color:#08775b!important;
}

.settings-page .route-settings-content{
  min-width:0!important;
  padding:34px 38px 42px!important;
  background:#fff!important;
  overflow:auto!important;
}

.settings-page .route-section-heading{
  margin:0 0 24px!important;
  padding:0 0 18px!important;
  border-bottom:1px solid #e6edef!important;
}

.settings-page .route-section-heading h2{
  margin:0!important;
  color:#244957!important;
  font-size:18px!important;
  line-height:1.3!important;
}

.settings-page .route-section-heading p{
  margin:6px 0 0!important;
  color:#87969c!important;
  font-size:11px!important;
  line-height:1.5!important;
}

.settings-page .route-info-grid{
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
  width:100%!important;
}

.settings-page .route-info{
  min-height:105px!important;
  padding:18px 19px!important;
  border:1px solid #dfe8eb!important;
  border-radius:12px!important;
  background:#fbfcfc!important;
}

.settings-page .route-info>span{
  margin-bottom:8px!important;
  color:#8a999f!important;
  font-size:8px!important;
  letter-spacing:.08em!important;
}

.settings-page .route-info>strong{
  color:#294c59!important;
  font-size:13px!important;
}

.settings-page .route-info>small{
  margin-top:8px!important;
  color:#89999f!important;
  font-size:10px!important;
  line-height:1.5!important;
}

.settings-page .route-identities{
  display:grid!important;
  gap:10px!important;
  margin:0 0 22px!important;
}

.settings-page .route-identity{
  padding:15px 17px!important;
  border:1px solid #dfe8eb!important;
  border-radius:11px!important;
  background:#fbfcfc!important;
}

.settings-page .route-add-card{
  padding:20px!important;
  border:1px solid #dce7ea!important;
  border-radius:13px!important;
  background:#f7fafb!important;
}

.settings-page .route-add-card h3{
  margin:0!important;
  font-size:13px!important;
}

.settings-page .route-add-card p{
  margin:6px 0 16px!important;
  font-size:10px!important;
  line-height:1.5!important;
}

.settings-page .route-add-form{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr) auto!important;
  gap:12px!important;
  align-items:end!important;
}

.settings-page .route-add-form input{
  min-height:40px!important;
}

.settings-page .route-add-form button{
  min-height:40px!important;
}

@media(max-width:900px){
  .settings-page{
    padding:24px 18px 32px!important;
  }

  .settings-page .page-route-heading{
    margin-bottom:26px!important;
  }

  .settings-page .page-route-heading h1{
    font-size:24px!important;
  }

  .settings-page > .route-settings-layout{
    grid-template-columns:1fr!important;
    min-height:0!important;
  }

  .settings-page .route-settings-nav{
    display:flex!important;
    gap:5px!important;
    padding:10px!important;
    overflow-x:auto!important;
    border-right:0!important;
    border-bottom:1px solid #dce7ea!important;
  }

  .settings-page .route-settings-tab{
    flex:0 0 auto!important;
    width:auto!important;
    margin:0!important;
  }

  .settings-page .route-settings-content{
    padding:25px 20px 30px!important;
  }

  .settings-page .route-info-grid{
    grid-template-columns:1fr!important;
  }

  .settings-page .route-add-form{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:520px){
  .settings-page{
    padding:18px 12px 24px!important;
  }

  .settings-page .page-route-heading{
    margin-bottom:20px!important;
  }

  .settings-page .route-settings-content{
    padding:20px 15px 24px!important;
  }
}

/* V1.1.8 strict auth gate: protected app stays hidden until /api/auth/me passes. */
#login[hidden], #app[hidden] { display:none !important; }

/* V1.2.2 — sender identity management */
.route-identity-actions{display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap}
.route-identity-protected{display:inline-block!important;color:#647b84!important;background:#edf3f4;border-radius:999px;padding:5px 8px!important;font-size:8px!important;font-weight:800}
.route-identity-delete{border:1px solid #e4c9c9;background:#fff5f5;color:#a33a3a;border-radius:7px;padding:6px 9px;font-size:8px;font-weight:800;cursor:pointer}
.route-identity-delete:hover{background:#fdeaea;border-color:#dca9a9}
.route-identity-delete:disabled{opacity:.55;cursor:wait}
@media(max-width:760px){.route-identity{align-items:flex-start}.route-identity-actions{justify-content:flex-start}}

.app-switcher{display:inline-flex;align-items:center;gap:6px;height:36px;padding:0 12px;border:1px solid #dce7eb;border-radius:10px;background:#fff;color:#254b5b;text-decoration:none;font-size:12px;font-weight:800;white-space:nowrap}.app-switcher:hover{background:#f4f9fa}

/* V1.2.5 — clean, mobile-first Mail experience */
@media(max-width:900px){
  html,body{width:100%;min-width:0;overflow-x:hidden!important}
  body.mail-menu-open{overflow:hidden!important}
  .app{display:block!important;width:100%!important;min-height:100dvh!important}
  .sidebar{
    position:fixed!important;left:0!important;top:0!important;bottom:0!important;
    width:min(285px,86vw)!important;height:100dvh!important;min-height:100dvh!important;
    z-index:1200!important;transform:translateX(-105%)!important;
    transition:transform .22s ease!important;overflow-y:auto!important;overflow-x:hidden!important;
    box-sizing:border-box!important;padding:16px 12px!important;
    box-shadow:18px 0 42px rgba(0,0,0,.25)!important;
  }
  .sidebar.open{transform:translateX(0)!important}
  .mail-mobile-backdrop{
    position:fixed!important;inset:0!important;z-index:1100!important;
    background:rgba(3,27,38,.45)!important;opacity:0;pointer-events:none;
    transition:opacity .18s ease!important;
  }
  .mail-mobile-backdrop.open{opacity:1;pointer-events:auto}
  .brand{padding:4px 8px 18px!important}
  .compose{margin:0 5px 16px!important;width:calc(100% - 10px)!important;min-height:44px!important}
  .nav{min-height:44px!important;align-items:center!important;padding:9px 11px!important;margin:2px 0!important}
  .side-bottom{padding-top:12px!important}
  main{width:100%!important;min-width:0!important}
  .top{
    position:sticky!important;top:0!important;z-index:1000!important;
    height:auto!important;min-height:58px!important;
    padding:9px 10px!important;gap:8px!important;
    box-sizing:border-box!important;
    box-shadow:0 1px 8px rgba(17,48,62,.06)!important;
  }
  .mobile-menu{
    display:grid!important;place-items:center!important;flex:0 0 40px!important;
    width:40px!important;height:40px!important;border:1px solid #dce7ea!important;
    border-radius:11px!important;background:#fff!important;color:#214b5b!important;
    font-size:20px!important;cursor:pointer!important;
  }
  .search{height:40px!important;min-width:0!important;width:auto!important;max-width:none!important;flex:1 1 auto!important;padding:0 9px!important}
  .search input{min-width:0!important;font-size:12px!important}
  .top-right{margin-left:0!important;gap:6px!important;flex:0 0 auto!important}
  #mailAddress{display:none!important}
  .app-switcher{width:40px!important;height:40px!important;padding:0!important;display:grid!important;place-items:center!important;font-size:0!important;border-radius:11px!important}
  .app-switcher:first-letter{font-size:18px!important}
  .top-right>#refresh{width:40px!important;height:40px!important;flex:0 0 40px!important}
  .mail-content-shell{width:100%!important;min-width:0!important}
  .toolbar{
    padding:15px 12px 11px!important;display:flex!important;align-items:center!important;
    gap:10px!important;flex-wrap:wrap!important;
  }
  .toolbar-left{min-width:0!important;flex:1 1 auto!important;display:flex!important;align-items:center!important;gap:8px!important}
  .toolbar h1{font-size:20px!important;line-height:1.2!important}
  .toolbar p{font-size:10px!important}
  .toolbar-actions{display:flex!important;gap:5px!important;flex:0 0 auto!important}
  .toolbar button{margin:0!important;padding:8px 9px!important;min-height:36px!important;font-size:10px!important}
  .select-all span{display:none!important}
  .mail-layout{
    margin:0 10px 18px!important;width:calc(100% - 20px)!important;
    height:auto!important;min-height:calc(100dvh - 145px)!important;
    display:block!important;border-radius:13px!important;
    overflow:hidden!important;
  }
  .list{
    width:100%!important;max-height:none!important;min-height:calc(100dvh - 210px)!important;
    border-right:0!important;border-bottom:0!important;overflow:visible!important;
  }
  .message{
    grid-template-columns:32px minmax(0,1fr) 20px!important;gap:8px!important;
    padding:12px 11px!important;
  }
  .avatar{width:32px!important;height:32px!important}
  .sender{font-size:11px!important}.subject{font-size:10px!important}.preview{font-size:9px!important}.date{font-size:8px!important}
  .reader{
    position:fixed!important;inset:58px 0 0 0!important;z-index:1050!important;
    display:none!important;overflow-y:auto!important;
  }
  .mail-layout.reader-open .list{display:none!important}
  .mail-layout.reader-open .reader{display:block!important}
  .reader-head{padding:16px 13px!important}
  .reader-head h2{font-size:18px!important;margin-bottom:12px!important}
  .sender-line{align-items:flex-start!important;flex-wrap:wrap!important}
  .sender-info{min-width:0!important;flex:1 1 150px!important}
  .reader-actions{width:100%!important;margin:10px 0 0!important;display:flex!important;gap:6px!important}
  .reader-actions button{margin:0!important;min-height:38px!important;flex:1 1 auto!important}
  .reader-body{padding:18px 13px!important;font-size:12px!important;line-height:1.65!important;overflow-wrap:anywhere!important}
  .reader-body img{max-width:100%!important;height:auto!important}
  .reader-body table{display:block!important;width:100%!important;overflow-x:auto!important}
  .reader-footer{padding:12px 13px!important}
  .attachments{gap:6px!important}
  .attachment{max-width:100%!important;overflow:hidden!important}
  .empty-reader{min-height:55vh!important}
  .compose-card{
    width:calc(100vw - 18px)!important;max-width:none!important;max-height:94dvh!important;
    border-radius:14px!important;
  }
  .compose-card header{padding:14px 15px!important}
  .compose-card form{padding:14px!important}
  .field-row{grid-template-columns:1fr!important}
  .compose-card input,.compose-card select{min-height:42px!important}
  .compose-footer{flex-wrap:wrap!important;gap:8px!important}
  .compose-footer .send,.compose-footer .secondary{min-height:40px!important}
  .modal{padding:9px!important}
}
@media(max-width:520px){
  .top{padding:8px!important}
  .mobile-menu,.app-switcher,#refresh{width:38px!important;height:38px!important;flex-basis:38px!important}
  .search{height:38px!important}
  .toolbar{padding:13px 10px 10px!important}
  .mail-layout{margin:0 7px 14px!important;width:calc(100% - 14px)!important}
  .message{padding:11px 9px!important}
  .toolbar-actions button{font-size:9px!important;padding:7px 8px!important}
  .reader{inset:54px 0 0 0!important}
}
/* Keep Mail's own mobile navigation immune to global/public nav styles. */
@media(max-width:900px){
  .sidebar nav,.sidebar .nav{
    position:static!important;display:flex!important;flex-direction:column!important;
    width:100%!important;height:auto!important;background:transparent!important;
    box-shadow:none!important;border:0!important;
  }
}

/* V1.2.6 — MOBILE STRUCTURE CORRECTION
   Fixes the 4-column message row, navigation alignment, reader header,
   and mobile toolbar sizing. This intentionally overrides only mobile CSS. */
@media(max-width:900px){
  /* Mobile drawer: icon + label must remain on one horizontal row. */
  .sidebar nav{
    display:block!important;
    flex-direction:initial!important;
    width:100%!important;
  }
  .sidebar .nav{
    display:flex!important;
    flex-direction:row!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:100%!important;
    min-height:46px!important;
    box-sizing:border-box!important;
    gap:11px!important;
    padding:10px 12px!important;
    margin:2px 0!important;
    font-size:13px!important;
    line-height:1.2!important;
  }
  .sidebar .nav span{
    display:block!important;
    flex:1 1 auto!important;
    text-align:left!important;
  }
  .sidebar .nav b{
    margin-left:auto!important;
    flex:0 0 auto!important;
  }

  /* Four actual children: checkbox, avatar, message content, star. */
  #messageList .message{
    display:grid!important;
    grid-template-columns:32px 34px minmax(0,1fr) 24px!important;
    align-items:center!important;
    column-gap:8px!important;
    row-gap:0!important;
    width:100%!important;
    min-width:0!important;
    box-sizing:border-box!important;
    padding:12px 10px!important;
  }
  #messageList .message-check{
    width:32px!important;
    display:grid!important;
    place-items:center!important;
  }
  #messageList .message-check input{
    width:18px!important;
    height:18px!important;
  }
  #messageList .avatar{
    width:34px!important;
    height:34px!important;
    flex:none!important;
  }
  #messageList .msg-main{
    min-width:0!important;
    width:100%!important;
    overflow:hidden!important;
  }
  #messageList .msg-top{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    width:100%!important;
    min-width:0!important;
    gap:7px!important;
  }
  #messageList .sender{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:11px!important;
  }
  #messageList .date{
    flex:0 0 auto!important;
    font-size:8px!important;
  }
  #messageList .subject{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:10px!important;
    margin-top:3px!important;
  }
  #messageList .preview{
    display:block!important;
    width:100%!important;
    min-width:0!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    font-size:9px!important;
    margin-top:2px!important;
  }
  #messageList .star{
    width:24px!important;
    min-width:24px!important;
    padding:3px!important;
    justify-self:end!important;
    font-size:18px!important;
  }

  /* Reader: title/details first, actions underneath as compact buttons. */
  .mail-layout.reader-open .reader{
    padding:0!important;
  }
  .reader .reader-head{
    display:block!important;
    width:100%!important;
    box-sizing:border-box!important;
    padding:16px 14px 14px!important;
    overflow:hidden!important;
  }
  .reader .reader-head > div:first-child{
    display:block!important;
    width:100%!important;
    min-width:0!important;
  }
  .reader .reader-head h2{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    margin:0 0 13px!important;
    font-size:19px!important;
    line-height:1.25!important;
    overflow-wrap:anywhere!important;
  }
  .reader .sender-line{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    align-items:flex-start!important;
    gap:9px!important;
    flex-wrap:nowrap!important;
  }
  .reader .sender-info{
    min-width:0!important;
    max-width:calc(100% - 43px)!important;
    flex:1 1 auto!important;
    overflow:hidden!important;
  }
  .reader .sender-info strong,
  .reader .sender-info div,
  .reader .sender-info time{
    display:block!important;
    max-width:100%!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
  }
  .reader .reader-actions{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    width:100%!important;
    box-sizing:border-box!important;
    gap:7px!important;
    margin:14px 0 0!important;
  }
  .reader .reader-actions button{
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    height:42px!important;
    margin:0!important;
    padding:8px 5px!important;
    border-radius:9px!important;
    font-size:12px!important;
    white-space:nowrap!important;
  }
  .reader .reader-body{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:none!important;
    overflow:hidden!important;
    padding:18px 14px!important;
  }
  .reader .reader-body *{
    max-width:100%!important;
  }
  .reader .reader-body img{
    display:block!important;
    max-width:100%!important;
    width:auto!important;
    height:auto!important;
    object-fit:contain!important;
  }

  /* Header responsive layout. */
  .top-right .app-switcher{
    position:relative!important;
    font-size:0!important;
    width:40px!important;
    height:40px!important;
    padding:0!important;
  }
  .top-right .app-switcher::before{
    content:"↗"!important;
    display:grid!important;
    place-items:center!important;
    width:100%!important;
    height:100%!important;
    font-size:18px!important;
    line-height:1!important;
    color:#174c60!important;
  }
}
@media(max-width:520px){
  .sidebar{
    width:min(300px,88vw)!important;
  }
  #messageList .message{
    grid-template-columns:30px 32px minmax(0,1fr) 22px!important;
    column-gap:7px!important;
    padding:11px 9px!important;
  }
  #messageList .message-check{width:30px!important}
  #messageList .avatar{width:32px!important;height:32px!important}
  #messageList .star{width:22px!important;min-width:22px!important;font-size:17px!important}
  .reader .reader-head{padding:14px 12px 12px!important}
  .reader .reader-actions{gap:6px!important}
  .reader .reader-actions button{min-height:40px!important;height:40px!important;font-size:11px!important}
}

/* V1.2.7 — COMPOSE/REPLY/FORWARD MOBILE OVERLAY
   The reader uses z-index:1050 on mobile. The compose modal was still
   using z-index:20, so the open message painted over the compose window.
   Keep the reader in the DOM, but always put the compose modal above it. */
.modal{
  z-index:2000!important;
}
@media(max-width:900px){
  body.modal-open{
    overflow:hidden!important;
    touch-action:none!important;
  }
  .modal{
    position:fixed!important;
    inset:0!important;
    z-index:2000!important;
    display:flex!important;
    align-items:flex-end!important;
    justify-content:center!important;
    padding:0!important;
    background:rgba(5,31,43,.58)!important;
    backdrop-filter:blur(4px)!important;
    -webkit-backdrop-filter:blur(4px)!important;
  }
  .modal[hidden]{
    display:none!important;
  }
  .modal .compose-card{
    position:relative!important;
    z-index:2001!important;
    width:100%!important;
    max-width:100%!important;
    height:min(92dvh,760px)!important;
    max-height:92dvh!important;
    margin:0!important;
    border-radius:18px 18px 0 0!important;
    overflow:hidden!important;
    display:flex!important;
    flex-direction:column!important;
    box-shadow:0 -12px 45px rgba(0,28,42,.25)!important;
  }
  .modal .compose-card header{
    flex:0 0 auto!important;
    min-height:58px!important;
    box-sizing:border-box!important;
    padding:14px 16px!important;
  }
  .modal .compose-card form{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    -webkit-overflow-scrolling:touch!important;
    padding:14px!important;
  }
  .modal .compose-card .editor{
    min-height:180px!important;
    max-height:none!important;
  }
  .modal .compose-card .compose-footer{
    position:sticky!important;
    bottom:0!important;
    background:#fff!important;
    padding:10px 0 2px!important;
    z-index:2!important;
  }
}
@media(max-width:520px){
  .modal .compose-card{
    height:94dvh!important;
    max-height:94dvh!important;
    border-radius:16px 16px 0 0!important;
  }
  .modal .compose-card header{
    padding:13px 14px!important;
  }
  .modal .compose-card form{
    padding:12px!important;
  }
  .modal .compose-card .editor{
    min-height:160px!important;
  }
}

/* v1.3.0 — Komatsu Equipment PDF editor */
.attachment-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.edit-pdf-btn,.attachment-edit-pdf,.attachment-remove{border:1px solid #c9d7dd;background:#fff;color:#174c60;border-radius:8px;padding:6px 9px;font-size:12px;cursor:pointer}
.edit-pdf-btn:hover,.attachment-edit-pdf:hover,.attachment-remove:hover{background:#eef6f8}
.local-attachment{display:flex!important;align-items:center;gap:8px;justify-content:space-between}
.pdf-editor-modal{z-index:3000!important;background:rgba(5,25,35,.72)!important;display:flex!important;align-items:center;justify-content:center;padding:18px}
.pdf-editor-modal[hidden]{display:none!important}
.pdf-editor-card{width:min(1280px,96vw);height:min(94vh,900px);background:#f4f7f8;border-radius:18px;overflow:hidden;display:flex;flex-direction:column;box-shadow:0 20px 70px rgba(0,0,0,.28)}
.pdf-editor-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#fff;border-bottom:1px solid #dce5e9}
.pdf-editor-header b{display:block;font-size:17px;color:#173b49}.pdf-editor-header small{display:block;color:#70838c;margin-top:3px;max-width:70vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.pdf-editor-header button{border:0;background:transparent;font-size:28px;line-height:1;color:#526771;cursor:pointer}
.pdf-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:10px 12px;background:#fff;border-bottom:1px solid #dce5e9}
.pdf-toolbar button{border:1px solid #cbd9de;background:#fff;color:#254b58;border-radius:8px;padding:8px 11px;cursor:pointer;font-size:13px}.pdf-toolbar button:hover{background:#eef6f8}.pdf-toolbar .pdf-tool.active{background:#174c60;color:#fff;border-color:#174c60}.pdf-toolbar .primary{background:#174c60;color:#fff;border-color:#174c60}.pdf-toolbar-spacer{flex:1}
.pdf-editor-body{min-height:0;flex:1;display:flex;align-items:center;justify-content:center;gap:10px;padding:14px;overflow:auto;background:#dce5e9}
.pdf-page-stage{position:relative;display:inline-block;max-width:calc(100% - 80px);max-height:100%;overflow:auto;background:#fff;box-shadow:0 4px 20px rgba(0,0,0,.16);line-height:0}
.pdf-page-stage canvas{display:block;max-width:none}.pdf-page-stage #pdfOverlay{cursor:crosshair}
.pdf-page-nav{flex:0 0 42px;width:42px;height:54px;border:1px solid #c4d2d8;background:#fff;border-radius:10px;font-size:30px;color:#174c60;cursor:pointer}.pdf-page-nav:disabled{opacity:.35;cursor:not-allowed}
.pdf-loading{position:absolute;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.82);font-size:14px;color:#45606c}.pdf-loading[hidden]{display:none}
.pdf-editor-footer{display:flex;align-items:center;gap:16px;padding:9px 14px;background:#fff;border-top:1px solid #dce5e9;color:#6c7f88;font-size:12px}.pdf-editor-footer span:nth-child(2){font-weight:600;color:#174c60}
@media(max-width:900px){.pdf-editor-modal{padding:0}.pdf-editor-card{width:100%;height:100%;max-height:none;border-radius:0}.pdf-toolbar{overflow-x:auto;flex-wrap:nowrap}.pdf-toolbar-spacer{display:none}.pdf-editor-body{padding:8px;gap:6px}.pdf-page-stage{max-width:calc(100% - 58px)}.pdf-page-nav{flex-basis:34px;width:34px;height:46px;font-size:25px}.pdf-editor-footer{font-size:11px;gap:8px;flex-wrap:wrap}.pdf-editor-footer span:last-child{width:100%}}
