:root{
  --orange:#f47323;--orange2:#df6517;--green:#246d0a;--icon:#4cb748;
  --ink:#111827;--text:#374151;--muted:#6b7280;--muted2:#94a3b8;
  --bg:#f5f7fa;--line:#e5e7eb;--white:#fff;
}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,Arial,sans-serif;background:var(--bg);color:var(--text)}body{font-size:14px}button,input{font:inherit}.d-none{display:none!important}
.boot-gate,.login-gate{position:fixed;inset:0;z-index:9000;display:grid;place-items:center;background:radial-gradient(circle at 20% 10%,rgba(244,115,35,.10),transparent 33%),radial-gradient(circle at 85% 80%,rgba(36,109,10,.10),transparent 38%),#f7f9fc}.boot-card,.login-card{width:min(470px,calc(100% - 32px));padding:30px 36px 34px;background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:0 24px 70px rgba(15,23,42,.14);text-align:center}.brand-logo{width:180px;height:105px;object-fit:contain}.boot-title,.login-title{font-size:1.25rem;font-weight:800;color:var(--ink)}.boot-sub,.login-sub{color:var(--muted);line-height:1.55;margin-top:7px}.login-btn{width:100%;height:46px;margin-top:22px;border:0;border-radius:12px;background:var(--green);color:#fff;font-weight:800;cursor:pointer}.login-btn:disabled{opacity:.6}.login-error{margin-top:12px;color:#b91c1c;font-size:.75rem}.fatal{color:#b91c1c;font-weight:700}.spinner{width:20px;height:20px;border:2px solid #e5e7eb;border-top-color:var(--orange);border-radius:50%;animation:spin .8s linear infinite;margin:14px auto 8px}@keyframes spin{to{transform:rotate(360deg)}}
.app-shell{width:min(1540px,calc(100% - 36px));margin:0 auto;padding:16px 0 30px}.welcome{position:relative;overflow:hidden;min-height:124px;border:1px solid var(--line);border-radius:16px;background:linear-gradient(105deg,#fff 0%,rgba(255,255,255,.95) 42%,rgba(236,247,232,.74) 100%);box-shadow:0 2px 8px rgba(15,23,42,.05);margin-bottom:14px}.welcome:before{content:"";position:absolute;right:-55px;bottom:-145px;width:650px;height:300px;border-radius:50%;background:linear-gradient(145deg,rgba(244,115,35,.11),rgba(36,109,10,.10));transform:rotate(-5deg)}.welcome-grid{position:relative;z-index:1;min-height:124px;display:grid;grid-template-columns:minmax(250px,1fr) minmax(270px,.82fr) minmax(430px,1.38fr);align-items:center;gap:26px;padding:18px 28px}.eyebrow{font-size:.67rem;font-weight:800;letter-spacing:.06em;color:#475569}.welcome-name{font-size:1.68rem;font-weight:800;color:var(--ink);margin-top:2px}.welcome-msg{font-size:.78rem;color:#475569;margin-top:3px}.welcome-en{font-size:.64rem;color:var(--muted2);font-style:italic}.clock{text-align:center;padding:4px 22px;border-left:1px solid rgba(148,163,184,.28);border-right:1px solid rgba(148,163,184,.28)}.clock-time{font-size:2.15rem;font-weight:800;letter-spacing:-.045em;color:var(--ink);font-variant-numeric:tabular-nums}.solar{margin-top:8px;font-size:.76rem;font-weight:800;color:#475569}.lunar{margin-top:3px;font-size:.64rem;font-style:italic;color:var(--muted2)}.hero-right{display:flex;flex-direction:column;gap:12px;min-width:0}.slogan-row{display:flex;align-items:center;justify-content:space-between;gap:16px}.slogan{font-size:.91rem;font-weight:800;color:var(--green);line-height:1.23;text-transform:uppercase}.slogan-en{font-size:.54rem;color:#64748b;text-transform:uppercase;font-weight:600}.slogan-line{width:44px;height:2px;background:var(--orange);margin-top:7px}.user-box,.workspace-user{display:flex;align-items:center;gap:9px;min-width:0}.avatar{width:36px;height:36px;display:grid;place-items:center;border-radius:50%;background:var(--green);color:#fff;font-size:.7rem;font-weight:800;flex:0 0 36px}.user-copy{min-width:0}.user-name{font-size:.7rem;font-weight:800;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:165px}.user-role{font-size:.55rem;color:#7b8796;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:165px;margin-top:2px}.search{position:relative}.search svg{position:absolute;left:13px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:#94a3b8}.search input{width:100%;height:39px;padding:0 13px 0 38px;border:1px solid #dce2e8;border-radius:10px;background:rgba(255,255,255,.94);font-size:.76rem;outline:0}.search input:focus{border-color:#fdba74;box-shadow:0 0 0 .17rem rgba(244,115,35,.10)}
.dashboard{display:grid;grid-template-columns:minmax(310px,1fr) minmax(0,2fr);gap:22px;align-items:start}.left-stack{display:flex;flex-direction:column;gap:12px;min-width:0}.task-panel{height:430px;min-height:430px;max-height:430px;display:flex;flex-direction:column;padding:16px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 3px 14px rgba(15,23,42,.055)}.task-head{display:flex;justify-content:space-between;align-items:center;gap:14px}.task-title-wrap{display:flex;align-items:center;gap:11px}.task-icon{width:40px;height:40px;display:grid;place-items:center;border-radius:11px;background:#edf8e9;color:var(--green)}.task-title{font-size:.8rem;font-weight:800;color:#1f2937}.task-en{font-size:.6rem;font-style:italic;color:var(--muted2);margin-top:2px}.task-count{min-width:34px;height:28px;display:grid;place-items:center;padding:0 9px;border-radius:999px;background:#fff2e8;color:var(--orange2);font-size:.72rem;font-weight:800}.task-list{flex:1;min-height:0;overflow:auto;margin:10px -4px;padding:0 4px}.task-period+.task-period{margin-top:14px}.task-period-head{display:flex;align-items:center;justify-content:space-between;padding-bottom:8px;border-bottom:1px solid #eef2f7;color:#64748b;font-size:.6rem;font-weight:800;letter-spacing:.08em}.task-period-head span:last-child{min-width:23px;height:20px;display:grid;place-items:center;padding:0 6px;border-radius:999px;background:#f1f5f9;font-size:.56rem}.task-row{width:100%;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 4px;border:0;border-bottom:1px solid #f1f5f9;background:transparent;text-align:left;cursor:pointer}.task-row:hover{background:#f8fafc;border-radius:9px}.priority{width:8px;height:8px;border-radius:50%;background:#94a3b8}.priority.p1{background:#dc2626}.priority.p2{background:#f59e0b}.priority.p3{background:#22a447}.task-main{min-width:0}.task-main b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.72rem;color:#1f2937}.task-main small{display:block;margin-top:3px;color:var(--muted2);font-size:.56rem}.task-time{font-size:.64rem;font-weight:800;color:#475569;white-space:nowrap}.task-empty{min-height:58px;display:flex;align-items:center;justify-content:center;padding:20px 10px;text-align:center;color:var(--muted2);font-size:.7rem}.task-full{height:38px;border:0;border-radius:11px;background:var(--green);color:#fff;font-size:.7rem;font-weight:800;cursor:pointer}.task-full:hover{background:#1f5f09}.google-panel{padding:14px;border:1px solid #e2e8f0;border-radius:18px;background:#fff;box-shadow:0 3px 14px rgba(15,23,42,.045)}.google-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px}.google-title{font-size:.68rem;font-weight:800;color:#334155;letter-spacing:.055em}.google-en{font-size:.54rem;font-style:italic;color:var(--muted2)}.quick-apps{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.quick-app-btn{display:flex;align-items:center;gap:10px;min-width:0;min-height:66px;padding:9px 10px;border:1px solid #edf0f3;border-radius:12px;background:#fff;text-align:left;cursor:pointer;box-shadow:0 2px 7px rgba(15,23,42,.035);transition:.14s}.quick-app-btn:hover{transform:translateY(-2px);box-shadow:0 6px 14px rgba(15,23,42,.09)}.quick-app-logo-wrap{width:42px;height:42px;display:grid;place-items:center;flex:0 0 42px}.quick-app-logo{width:38px;height:38px;object-fit:contain}.quick-app-copy{min-width:0}.quick-app-name,.quick-app-sub{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.quick-app-name{font-size:.66rem;font-weight:800;color:#1f2937}.quick-app-sub{font-size:.52rem;color:var(--muted2);margin-top:3px}
.module-zone{min-width:0;padding:10px 2px 4px}.module-grid{display:grid;grid-template-columns:repeat(6,minmax(108px,1fr));column-gap:18px;row-gap:24px;align-content:start;justify-items:center}.module-card{width:100%;min-height:132px;display:flex;flex-direction:column;align-items:center;padding:0 4px;border:0;background:transparent;text-align:center;cursor:pointer;transition:transform .16s}.module-card.authorized:hover{transform:translateY(-2px)}.module-card.locked{cursor:not-allowed}.module-icon-tile{width:90px;height:90px;display:grid;place-items:center;background:#fff;border-radius:10px;box-shadow:0 4px 14px rgba(15,23,42,.10)}.module-icon{width:70px;height:70px;object-fit:contain}.module-card.locked .module-icon{filter:grayscale(1);opacity:.3}.module-title{max-width:150px;margin-top:10px;font-size:.7rem;font-weight:800;line-height:1.24;color:#27313f;text-transform:uppercase}.module-en{max-width:150px;margin-top:3px;font-size:.56rem;font-style:italic;line-height:1.22;color:#7b8796}.module-card.locked .module-title,.module-card.locked .module-en{color:#a4acb7}.empty-wide{grid-column:1/-1;color:var(--muted);padding:32px;text-align:center}
.workspace{position:fixed;inset:0;z-index:5000;display:none;background:#fff}.workspace.show{display:flex;flex-direction:column}.workspace-top{min-height:60px;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 15px;border-bottom:1px solid var(--line);background:#fff}.workspace-left,.workspace-actions{display:flex;align-items:center;gap:10px;min-width:0}.workspace-actions{justify-content:flex-end}.workspace-btn,.secondary-btn{height:36px;padding:0 11px;border:1px solid #d8dde4;border-radius:8px;background:#fff;color:#475569;font-size:.7rem;font-weight:800;cursor:pointer}.workspace-btn:hover,.secondary-btn:hover{border-color:#fb923c;color:var(--orange2)}.workspace-title{font-size:.84rem;font-weight:800;color:var(--ink)}.workspace-sub{font-size:.58rem;color:var(--muted2)}.workspace-datetime{font-size:.66rem;font-weight:700;color:#475569;white-space:nowrap}.workspace-user{padding-left:10px;border-left:1px solid var(--line)}.workspace-user .avatar{width:32px;height:32px;flex-basis:32px;font-size:.64rem}.workspace-frame{width:100%;flex:1;border:0;background:#f8fafc}.native-workspace{flex:1;overflow:auto;background:#f5f7fa}.workspace-loader{height:100%;display:grid;place-items:center;align-content:center;color:var(--muted);gap:8px}.it-page{max-width:1480px;margin:0 auto;padding:22px}.it-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.it-head h2{margin:0;color:var(--ink);font-size:1.2rem}.it-head p{margin:4px 0 0;color:var(--muted);font-size:.72rem}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:15px 0}.kpis>div{padding:15px;border:1px solid var(--line);border-radius:12px;background:#fff}.kpis small{display:block;color:#64748b;font-size:.62rem;font-weight:800;text-transform:uppercase}.kpis b{display:block;margin-top:3px;font-size:1.5rem;color:var(--ink)}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:10px;background:#fff}.table-wrap table{width:100%;min-width:1000px;border-collapse:collapse}.table-wrap th,.table-wrap td{padding:10px 12px;border-bottom:1px solid #eef2f7;text-align:left;font-size:.7rem}.table-wrap th{background:#f8fafc;color:#64748b;font-size:.6rem;text-transform:uppercase}.table-wrap td small{display:block;color:var(--muted2);margin-top:2px}.native-error{margin:24px;padding:16px;background:#fff1f2;color:#be123c;border-radius:12px}.toast-host{position:fixed;right:18px;top:18px;z-index:10000;display:grid;gap:8px}.toast-card{max-width:420px;padding:12px 14px;border-radius:10px;background:#fff;border:1px solid var(--line);box-shadow:0 10px 30px rgba(15,23,42,.14);font-size:.74rem}.toast-card.error{border-left:4px solid #dc2626}.toast-card.warn{border-left:4px solid #f59e0b}.toast-card.ok{border-left:4px solid #22a447}
@media(max-width:1250px){.welcome-grid{grid-template-columns:minmax(230px,1fr) minmax(230px,.8fr) minmax(360px,1.28fr);gap:18px}.dashboard{grid-template-columns:minmax(290px,.94fr) minmax(0,2.06fr)}.module-grid{grid-template-columns:repeat(5,minmax(105px,1fr));column-gap:14px}}
@media(max-width:950px){.welcome-grid{grid-template-columns:1fr 1fr;gap:16px}.clock{border-right:0}.hero-right{grid-column:1/-1;padding-top:14px;border-top:1px solid rgba(148,163,184,.22)}.dashboard{grid-template-columns:1fr}.task-panel{height:400px;min-height:400px;max-height:400px}.module-grid{grid-template-columns:repeat(4,minmax(100px,1fr))}.kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:660px){.app-shell{width:calc(100% - 18px)}.welcome-grid{grid-template-columns:1fr;padding:16px 18px}.clock{text-align:left;border:0;border-top:1px solid rgba(148,163,184,.24);padding:13px 0 0}.hero-right{grid-column:auto}.task-panel{height:370px;min-height:370px;max-height:370px}.module-grid{grid-template-columns:repeat(3,minmax(86px,1fr));column-gap:8px;row-gap:20px}.module-icon-tile{width:82px;height:82px}.workspace-datetime,.workspace-user .user-copy{display:none}}
@media(max-width:430px){.user-box .user-copy{display:none}.quick-apps{grid-template-columns:1fr 1fr}.quick-app-btn{min-height:60px;padding:8px}.module-grid{grid-template-columns:repeat(2,minmax(92px,1fr))}.module-title,.module-en{max-width:112px}}

/* V6.1 Dynamic Module Registry */
.it-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.primary-action{background:#177800!important;color:#fff!important;border-color:#177800!important}.primary-action:hover{background:#126300!important;color:#fff!important}.registry-note{margin:0 0 12px;padding:10px 12px;border:1px solid #d9e8d4;border-radius:10px;background:#f5fbf3;color:#3f5f39;font-size:.68rem}.registry-warning{margin:0 0 12px;padding:10px 12px;border:1px solid #fed7aa;border-radius:10px;background:#fff7ed;color:#9a3412;font-size:.68rem}.table-action{border:1px solid var(--line);background:#fff;border-radius:8px;padding:6px 9px;font-size:.65rem;font-weight:800;cursor:pointer}.table-action:hover{border-color:#fb923c;color:var(--orange2)}
.module-modal{position:fixed;inset:0;z-index:20000;background:rgba(15,23,42,.48);display:grid;place-items:center;padding:18px}.module-modal-card{width:min(980px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;box-shadow:0 24px 80px rgba(15,23,42,.28);border:1px solid #e2e8f0}.module-modal-head{position:sticky;top:0;z-index:2;background:#fff;display:flex;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #e8edf3}.module-modal-head h3{margin:0;color:#0f172a;font-size:1.05rem}.module-modal-head p{margin:4px 0 0;color:#64748b;font-size:.68rem}.modal-close{border:0;background:#f1f5f9;border-radius:10px;width:36px;height:36px;font-size:1.3rem;cursor:pointer;color:#475569}.module-form{padding:18px 20px 20px}.module-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 14px}.form-field{display:grid;gap:5px}.form-field.span-2{grid-column:1/-1}.form-field>span{font-size:.62rem;font-weight:800;color:#475569}.form-field small{font-weight:500;color:#94a3b8}.form-field input,.form-field select,.form-field textarea{width:100%;border:1px solid #dce3eb;border-radius:9px;background:#fff;color:#0f172a;padding:9px 10px;font-size:.72rem;outline:none}.form-field textarea{resize:vertical;min-height:60px}.form-field input:focus,.form-field select:focus,.form-field textarea:focus{border-color:#22a447;box-shadow:0 0 0 3px rgba(34,164,71,.10)}.form-field input[readonly]{background:#f8fafc;color:#64748b}.form-hint{margin-top:12px;padding:10px 12px;border-radius:9px;background:#f8fafc;border:1px solid #e8edf3;color:#64748b;font-size:.65rem;line-height:1.5}.editor-error{margin-top:12px;padding:10px 12px;border-radius:9px;background:#fff1f2;border:1px solid #fecdd3;color:#be123c;font-size:.68rem}.module-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:16px}
@media(max-width:720px){.module-form-grid{grid-template-columns:1fr}.form-field.span-2{grid-column:auto}.module-modal{padding:8px}.module-modal-card{width:100%;max-height:96vh}.it-actions{justify-content:flex-start}.it-head{display:block}.it-actions{margin-top:10px}}

/* =========================================================
   V6.1 WORKSPACE MINIMAL HEADER
   ========================================================= */

.workspace-title,
.workspace-sub,
.workspace-datetime{
  display:none !important;
}

.workspace-top{
  min-height:48px;
  padding:6px 10px;
}

.workspace-icon-btn{
  width:36px;
  height:36px;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:9px;
}

.workspace-icon-btn svg{
  width:19px;
  height:19px;
  display:block;
}

.workspace-left{
  gap:0;
}

.workspace-actions{
  gap:8px;
}

/* =========================================================
   V6.1 HOME HEADER COMPACT — 2026-10-04
   ========================================================= */

/* Hide module search but keep DOM for JS compatibility */
.search{
  display:none !important;
}

/* Reduce overall welcome/header height */
.welcome{
  min-height:104px;
}

.welcome-grid{
  min-height:104px;
  padding:11px 26px;
  gap:22px;
}

/* Left welcome block */
.eyebrow{
  font-size:.62rem;
}

.welcome-name{
  font-size:1.55rem;
  margin-top:1px;
}

.welcome-msg{
  margin-top:2px;
  font-size:.75rem;
}

.welcome-en{
  font-size:.61rem;
}

/* Clock block */
.clock{
  padding:2px 22px;
}

.clock-time{
  font-size:2.05rem;
  line-height:1;
}

.solar{
  margin-top:6px;
  font-size:.73rem;
}

.lunar{
  margin-top:3px;
  font-size:.62rem;
}

/* Right slogan/user area no longer needs search row */
.hero-right{
  gap:0;
  justify-content:center;
}

.slogan-row{
  min-height:72px;
}

.slogan{
  font-size:.88rem;
}

.user-box{
  align-self:center;
}

/* Compact top/bottom spacing */
.app-shell{
  padding-top:10px;
}

@media(max-width:950px){
  .welcome{
    min-height:auto;
  }

  .welcome-grid{
    min-height:auto;
  }
}

@media(max-width:660px){
  .welcome-grid{
    padding:13px 16px;
  }
}


/* =========================================================
   HTK HOME FOOTER V1
   ========================================================= */

.htk-home-footer{
  width:100%;
  margin-top:30px;
  border-top:1px solid #e2e8f0;
}

.htk-home-footer-inner{
  min-height:54px;
  padding:14px 4px 8px;

  display:flex;
  align-items:center;
  justify-content:space-between;

  gap:18px;

  color:#667085;
  font-size:.72rem;
}

.htk-footer-links{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
}

.htk-footer-links a{
  color:#536273;
  text-decoration:none;
  transition:color .15s ease;
}

.htk-footer-links a:hover{
  color:#1f7a12;
  text-decoration:underline;
}

.htk-footer-links span{
  color:#c0c7d0;
}

@media(max-width:640px){

  .htk-home-footer-inner{
    flex-direction:column;
    align-items:flex-start;
    gap:7px;
  }

}

