/* Luxury Emerald Green Theme - Dien Thanh Vu */
:root{font-family:Arial,"Segoe UI",sans-serif;color:#12261b;background:#f3f7f4;font-size:16px}*{box-sizing:border-box}body{margin:0}main{max-width:1200px;margin:0 auto;padding:24px}header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:14px}h1{font-size:22px;letter-spacing:.025em;margin:0 0 7px;color:#0e462a}header p{margin:0;font-size:14px;color:#4c6655}header p.live{color:#14603e}button,input{font:inherit}button{cursor:pointer;border:1px solid #b5d5c2;border-radius:5px;background:white;color:#135232;padding:9px 14px;font-weight:600}button:hover{background:#e8f4ed}button:disabled{cursor:default;opacity:.55}.instruction{font-size:14px;margin:12px 0 17px;color:#3b5c47}#notice{padding:12px 15px;background:#fff8e6;border:1px solid #e2d39b;color:#6b4a00;border-radius:5px;font-size:14px;line-height:1.5;margin:12px 0}.table-wrap{overflow:auto;border:1px solid #b7d1c1;border-radius:5px;max-height:calc(100vh - 210px);background:#fff}table{width:100%;min-width:920px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:14px}.col-a{width:64px}.col-b{width:190px}.col-price{width:60px}.col-c{width:146px}.col-d{width:74px}.col-f{width:258px}.col-g{width:105px}.col-h{width:103px}th,td{border-right:1px solid #d4e2d8;border-bottom:1px solid #d4e2d8;padding:7px 8px;line-height:1.2;height:36px;overflow-wrap:anywhere}th:last-child,td:last-child{border-right:0}thead{position:sticky;top:0;z-index:3}th{text-align:left}.letters th{text-align:center;background:#e3f0e8;color:#28573a;font-size:12px;height:25px;padding:4px}.labels th{background:#186c42;color:#fff;height:49px;font-size:14px;border-color:#135936}.labels th:nth-child(6){background:#248553}th:nth-child(1),td:nth-child(1),th:nth-child(3),td:nth-child(3),th:nth-child(5),td:nth-child(5),th:nth-child(7),td:nth-child(7){text-align:center}th:nth-child(4),td:nth-child(4),th:nth-child(8),td:nth-child(8){text-align:right}td:nth-child(4),td:nth-child(5),td:nth-child(8){font-variant-numeric:tabular-nums;white-space:nowrap}td:nth-child(2),td:nth-child(3){white-space:nowrap}td:nth-child(5){font-weight:700;background:#fff7c9}tbody#summary{position:sticky;top:74px;z-index:2}#summary td{background:#fff8c5!important;font-weight:700;border-bottom:3px solid #8e9e94;height:43px}#summary td:nth-child(6),#summary td:nth-child(8){color:#cb2424}#rows tr:nth-child(even) td:nth-child(6),#rows tr:nth-child(even) td:nth-child(7),#rows tr:nth-child(even) td:nth-child(8){background-color:#f2f7f4}#rows td:nth-child(6){padding:3px 5px}.entry{display:flex;gap:5px;align-items:center}.entry input{width:0;min-width:0;flex:1;padding:5px 7px;border:1px solid #9dc8ae;background:#fff;border-radius:3px;font-size:14px;color:#142338;height:29px}.entry input:focus{outline:2px solid #186c42;outline-offset:0}.entry button{padding:5px 9px;font-size:13px;height:29px;background:#e5f3eb;color:#135232;border-color:#aed2be}.locked{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:28px;padding:3px}.lock-icon{flex:none;width:11px;height:10px;border:1.4px solid #6b8273;border-radius:2px;position:relative;margin:3px 4px 0}.lock-icon:before{content:"";position:absolute;width:5px;height:5px;border:1.4px solid #6b8273;border-bottom:0;border-radius:4px 4px 0 0;top:-6px;left:1.5px}.locked.empty{color:#64756b;font-size:13px}footer{display:flex;justify-content:space-between;gap:16px;font-size:12px;color:#5a6e61;padding-top:12px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);background:#0c331f;color:white;border-radius:6px;padding:14px 20px;max-width:90vw;z-index:10;box-shadow:0 4px 24px rgba(0,0,0,0.25);line-height:1.4}#empty{padding:40px;text-align:center;color:#5a6e61}:focus-visible{outline:2px solid #186c42;outline-offset:3px}@media(max-width:600px){main{padding:14px 10px}h1{font-size:18px}header{gap:10px}header p{font-size:12px}header button{font-size:13px;padding:8px 11px}.instruction{line-height:1.5;font-size:13px}.table-wrap{max-height:calc(100dvh - 220px)}footer{flex-direction:column;gap:5px}.col-f{width:240px}}

[hidden]{display:none!important}.login-panel{max-width:410px;margin:12vh auto;background:white;padding:32px;border:1px solid #c8ddd0;border-radius:10px}.login-panel p{color:#4c6655;line-height:1.5}.login-panel button{width:100%;background:#186c42;color:white;margin-top:12px}label{display:flex;flex-direction:column;gap:7px;font-size:14px;font-weight:600;margin-bottom:16px}label input,label select{border:1px solid #b5d5c2;border-radius:5px;padding:10px;background:white;color:#142338;font:inherit;font-weight:400;min-width:0}label small{font-weight:400;color:#587363}#login-error{color:#b32a32}nav{display:flex;justify-content:space-between;align-items:center;gap:15px;flex-wrap:wrap;border-bottom:1px solid #cee0d5;padding-bottom:16px;margin-bottom:24px}.tabs,.account,.actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}.tabs button{border:0;background:transparent;color:#3b5c47;padding:10px 12px}.tabs button.active{background:#e3f1e8;color:#125230;font-weight:700}.account{font-size:13px}.account button{font-size:13px}.tool-grid{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:20px;align-items:start}.panel{border:1px solid #c6ddd0;border-radius:6px;background:white;padding:20px}.panel h2{font-size:17px;margin:0 0 20px}.panel button[type=submit],#tool-confirm{background:#186c42;color:white;border-color:#135936}#tool-confirm{width:100%;margin-top:12px}#tool-status{padding:12px;background:#e9f5ee;color:#145232;font-size:14px;line-height:1.5;min-height:45px}.muted{font-size:13px;color:#53695b;line-height:1.5}.small-table{overflow:auto;max-height:65vh;border:1px solid #c9ded2;border-radius:4px}.small-table table{min-width:0;table-layout:auto;background:white}.small-table th{background:#135936;color:white;white-space:nowrap;padding:12px 10px}.small-table td{padding:10px;text-align:left;white-space:nowrap;font-weight:400;background:white}.small-table td:nth-child(4){font-weight:400;background:white}.small-table thead{position:sticky;top:0}.result-table th:nth-child(2),.result-table td:nth-child(2){text-align:center}.result-table th:nth-child(3),.result-table td:nth-child(3){text-align:right}.result-table th:nth-child(4),.result-table td:nth-child(4){text-align:center}.result-table tfoot th,.result-table tfoot td{background:#fff7c9;color:#172c45;font-weight:700}.filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap}.filters label{min-width:140px;margin:0}.filters button{height:40px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin:22px 0}.metrics div{background:#fff;border:1px solid #c6ddd0;border-radius:6px;padding:16px;color:#4c6655;font-size:14px}.metrics strong{display:block;font-size:30px;color:#125230;margin-top:8px}.report-table{min-width:1400px!important;font-size:13px}.report-table td{white-space:normal;min-width:75px}.report-table td:nth-child(1){min-width:160px}.report-table td:nth-child(5){min-width:140px}.report-table td:nth-child(6){text-align:right}.report-table td:nth-child(8){min-width:130px}.report-table .event-success{color:#197a47}.report-table .event-uncertain,.report-table .event-failed{color:#ae3737}.user-table button{font-size:12px;padding:5px 9px;margin:2px}.user-table .danger{color:#b52b32;background:#fff4f4}.check-label{flex-direction:row;align-items:center}.check-label input{width:17px;height:17px}#report-more{margin-top:15px}@media(max-width:750px){.tool-grid{grid-template-columns:1fr}.login-panel{margin:8vh 16px;padding:25px}.tabs button{padding:9px;font-size:13px}nav{margin-bottom:18px;gap:10px}.panel{padding:16px}.metrics{gap:8px}.metrics div{padding:12px}.metrics strong{font-size:24px}.filters{gap:10px}.filters label{flex:1;min-width:130px}.table-wrap{max-height:calc(100dvh - 290px)}}

.order-guide{border:1px solid #c6ded0;border-left:4px solid #186c42;border-radius:7px;padding:14px 18px;background:#f9fdfa;margin:14px 0}.order-guide>div{display:flex;gap:20px;align-items:center;flex-wrap:wrap}.order-guide strong{color:#0e462a;font-size:16px}.order-guide span{color:#2a573b;font-size:14px;font-weight:600}.order-guide ol{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:12px 0;padding-left:20px;font-size:13px;line-height:1.5}.order-guide p{margin:8px 0 0;border-top:1px solid #d2e4d8;padding-top:9px;font-size:13px;color:#4e6071}.order-guide a{color:#186c42;font-weight:600;text-decoration:none}.selection-tools,.copy-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:12px}.selection-tools span,.copy-toolbar span{font-size:12px;color:#4c6655}.selection-tools button,.copy-toolbar button{font-size:13px;padding:7px 11px}.table-wrap td{user-select:none;cursor:cell}.table-wrap td input{user-select:text;cursor:text}.table-wrap td.cell-selected{box-shadow:inset 0 0 0 1px #186c42;background-image:linear-gradient(#186c4226,#186c4226)!important}.table-wrap:focus{outline:none}#settings-form{max-width:640px}@media(max-width:750px){.order-guide ol{grid-template-columns:1fr 1fr}.order-guide{padding:12px}.order-guide>div{gap:7px}.table-wrap{max-height:60vh}}

/* Shared TOOL 4 moves between this desktop dock and its dedicated page. */
.sheet-main,#tool-widget,#page-tool,.tool-grid>.panel{min-width:0}.mobile-table-hint{display:none}
@media(min-width:1200px){
main.with-tool-dock{max-width:1820px;padding:24px 28px}#sheet-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,360px);gap:24px;align-items:start}#tool-dock{position:sticky;top:20px;max-height:calc(100vh - 40px);overflow:auto;border:1px solid #c6ddd0;border-radius:8px;background:#fff;box-shadow:0 3px 16px rgba(18,66,40,0.05);padding:16px}
#tool-dock header{margin:0 0 12px}#tool-dock h1{font-size:17px}#tool-dock header p{font-size:12px;line-height:1.5}#tool-dock .tool-grid{grid-template-columns:1fr;gap:12px}#tool-dock .panel{padding:0;border:0;box-shadow:none}#tool-dock #tool-form{display:grid;grid-template-columns:minmax(0,1fr) 90px;column-gap:10px}#tool-dock #tool-form>label{font-size:12px;gap:5px;margin-bottom:10px}#tool-dock #tool-form>label:nth-child(3),#tool-dock #tool-form>.actions,#tool-dock #tool-form>p,#tool-dock #tool-confirm{grid-column:1/-1}#tool-dock label input{padding:9px;font-size:14px;width:100%}#tool-dock #tool-status{margin:10px 0 0;padding:9px;min-height:0;font-size:12px}#tool-dock #tool-confirm{margin-top:9px;font-size:13px;padding:10px}#tool-dock .muted{font-size:11px;margin:9px 0 0;line-height:1.45}#tool-dock .actions button{font-size:12px;padding:7px 10px}#tool-dock .copy-toolbar{border-top:1px solid #dbe8e0;padding-top:12px;margin-bottom:8px;justify-content:space-between;gap:5px}#tool-dock .copy-toolbar span{font-size:11px}#tool-dock .small-table{max-height:34vh}#tool-dock .result-table{font-size:12px}#tool-dock .result-table th,#tool-dock .result-table td{padding:8px 5px}#tool-dock .result-table th:first-child,#tool-dock .result-table td:first-child{text-align:left}#tool-dock .result-table td:last-child{white-space:nowrap}
.with-tool-dock .table-wrap table{min-width:875px}.with-tool-dock .col-a{width:64px}.with-tool-dock .col-b{width:160px}.with-tool-dock .col-price{width:55px}.with-tool-dock .col-c{width:125px}.with-tool-dock .col-d{width:60px}.with-tool-dock .col-f{width:210px}.with-tool-dock .col-g{width:92px}.with-tool-dock .col-h{width:90px}.with-tool-dock .labels th{font-size:12px}.with-tool-dock .order-guide ol{gap:8px;font-size:12px}.with-tool-dock .order-guide>div{gap:10px}.with-tool-dock .selection-tools span{flex-basis:100%}
}
@media(max-width:1199px){#sheet-layout{display:block}#tool-dock{display:none!important}}
@media(max-width:750px){
main{width:100%;padding:12px}nav{gap:10px;padding-bottom:12px;margin-bottom:16px}.tabs{display:flex;flex-wrap:nowrap;overflow-x:auto;width:100%;gap:4px;padding-bottom:4px;-webkit-overflow-scrolling:touch}.tabs button{white-space:nowrap;flex:none;min-height:42px;padding:10px}.account{width:100%;justify-content:space-between}.account button{min-height:40px}header{align-items:center}header p{line-height:1.45}h1{font-size:19px}.order-guide{margin:10px 0}.order-guide strong{font-size:14px}.order-guide span{font-size:13px}.order-guide ol{font-size:12px;gap:8px 15px;line-height:1.55}.order-guide p{line-height:1.6}.instruction{margin-bottom:10px}.selection-tools{display:none}.mobile-table-hint{display:block;font-size:12px;color:#4c6655;margin:8px 0}.table-wrap{max-width:100%;max-height:62dvh;-webkit-overflow-scrolling:touch}.table-wrap td{cursor:auto}.table-wrap .entry input{font-size:16px;height:36px}.table-wrap .entry button{height:36px}.tool-grid{grid-template-columns:minmax(0,1fr);gap:14px}.panel{padding:16px}label input,label select{font-size:16px;min-height:44px;width:100%}.panel button,.filters button{min-height:44px}#tool-widget header p{font-size:13px;line-height:1.5}#tool-widget .result-table{font-size:12px}#tool-widget .result-table th,#tool-widget .result-table td{padding:9px 5px}#tool-widget .copy-toolbar{justify-content:space-between}#tool-widget .small-table{max-height:55dvh}.filters{align-items:stretch}.filters label{min-width:calc(50% - 10px)}.filters button{width:100%}.metrics div{font-size:12px}.metrics strong{font-size:23px}.user-table td{white-space:normal;overflow-wrap:anywhere}#settings-form{max-width:100%}#toast{bottom:14px;font-size:13px;width:max-content;max-width:calc(100vw - 24px)}
}

.tool-selection-tools{display:flex;gap:7px;flex-wrap:wrap;margin:9px 0 6px}.tool-selection-tools button{font-size:12px;padding:7px 9px}#tool-selection-status{margin:6px 0 10px!important;font-size:11px}#tool-table-wrap:focus-visible{outline:2px solid #186c42;outline-offset:2px}#tool-dock .tool-selection-tools{gap:5px}#tool-dock .tool-selection-tools button{font-size:11px;padding:6px 8px}#tool-table-wrap .cell-selected{box-shadow:inset 0 0 0 1px #186c42;background-image:linear-gradient(#186c422e,#186c422e)!important}@media(pointer:fine){#tool-table-wrap tbody td,#tool-table-wrap tfoot td,#tool-table-wrap tfoot th{user-select:none;cursor:cell}}

.touch-range-wrap{position:relative}.touch-range-toolbar{display:none;gap:8px;align-items:center;flex-wrap:wrap;margin:10px 0}.touch-range-toolbar button{min-height:44px;padding:10px 14px;font-size:14px}.touch-range-toolbar button[aria-pressed=true]{background:#186c42;color:white;border-color:#135936}.touch-range-hint{flex-basis:100%;font-size:12px;line-height:1.5;color:#4c6655}.range-handle{position:absolute;z-index:8;transform:translate(-50%,-50%);width:44px;height:44px;min-height:44px;padding:0;border:0;background:transparent!important;touch-action:none;cursor:grab;border-radius:50%;-webkit-user-select:none;user-select:none}.range-handle:after{content:"";position:absolute;inset:11px;border-radius:50%;background:#186c42;border:2px solid white;box-shadow:0 1px 5px rgba(18,66,40,0.4)}.range-handle:active:after{background:#135936}.touch-selecting table,.touch-selecting table *{-webkit-user-select:none!important;user-select:none!important;-webkit-touch-callout:none!important}.touch-selecting td input,.touch-selecting td button{pointer-events:none}.touch-selecting td.cell-selected,.touch-selecting th.cell-selected{background-image:linear-gradient(#186c422e,#186c422e)!important;box-shadow:inset 0 0 0 1px #186c42!important}
@media(any-pointer:coarse),(max-width:750px){.touch-range-toolbar{display:flex}.tool-selection-tools,#tool-selection-status{display:none}#tool-dock .touch-range-toolbar button{min-height:44px;font-size:13px}.touch-range-wrap:not(.touch-selecting) td{-webkit-user-select:none;user-select:none}.mobile-table-hint{margin-bottom:5px}}
#toast{pointer-events:none}
.touch-range-toolbar button{touch-action:manipulation}

/* The page can scroll its entire introduction away before the mobile grid fills
   the screen. Keep this viewport-sized even when only a few rows are loaded. */
@media(max-width:750px){
  main{padding-left:8px;padding-right:8px}
  .table-wrap{height:calc(100vh - var(--grid-toolbar-height,80px));height:calc(100dvh - var(--grid-toolbar-height,80px));max-height:none;border-radius:3px;overscroll-behavior-y:contain}
  .table-wrap table{min-width:656px;font-size:12px}
  .table-wrap .col-a{width:38px}.table-wrap .col-b{width:132px}.table-wrap .col-price{width:44px}
  .table-wrap .col-c{width:108px}.table-wrap .col-d{width:46px}
  .table-wrap .col-f{width:166px}.table-wrap .col-g{width:56px}.table-wrap .col-h{width:66px}
  .table-wrap th,.table-wrap td{padding:3px 4px;height:30px;line-height:1.15}
  .table-wrap .letters th{height:18px;padding:2px;font-size:10px}
  .table-wrap .labels th{height:30px;padding:3px 2px;font-size:10px;white-space:nowrap}
  .table-wrap #summary{top:48px}.table-wrap #summary td{height:28px;padding:3px 4px}
  .table-wrap #rows td:nth-child(6){padding:1px 3px}
  .table-wrap .entry{gap:3px}.table-wrap .entry input{font-size:16px;height:26px;padding:2px 4px}
  .table-wrap .entry button{font-size:11px;height:28px;padding:3px 6px}
  .table-wrap .locked{min-height:26px;padding:2px 0;gap:3px;font-size:12px}
  .instruction{font-size:12px;margin:8px 0}.mobile-table-hint{font-size:11px;margin:5px 0}
  .touch-range-toolbar{gap:6px;margin:6px 0}.touch-range-toolbar button{font-size:12px;padding:8px 11px}
  .touch-range-hint{font-size:11px}
  .sheet-main>.touch-range-toolbar{position:sticky;top:0;z-index:9;background:#f3f7f4;margin:0;padding:6px 0;box-shadow:0 1px 0 #cee0d5}
  #tool-widget .result-table th,#tool-widget .result-table td{height:28px;padding:5px 4px;line-height:1.15}
}
.selection-total{display:block;padding:9px 12px;border:1px solid #93c8aa;border-radius:6px;background:#e4f6eb;color:#185a35;font-weight:700;font-size:14px;font-variant-numeric:tabular-nums}.touch-range-toolbar>.selection-total{flex-basis:100%}.desktop-selection-total{position:fixed;bottom:18px;right:24px;z-index:15;box-shadow:0 2px 12px rgba(18,66,40,0.15)}@media(any-pointer:coarse),(max-width:750px){.desktop-selection-total{display:none}.touch-range-toolbar>.selection-total{font-size:13px;padding:7px 10px}}

/* Registration and Approval UI additions */
.auth-tabs{display:flex;gap:0;margin-bottom:18px;border-bottom:2px solid #e1eee6}
.auth-tabs button{flex:1;border:0;background:transparent;padding:11px 8px;font-weight:600;font-size:14px;color:#4c6655;border-bottom:2px solid transparent;margin-bottom:-2px;border-radius:0;cursor:pointer;transition:all .15s}
.auth-tabs button.active{color:#186c42;border-bottom-color:#186c42;background:rgba(24,108,66,0.06)}
.auth-switch{text-align:center;margin-top:14px;font-size:13px}
.auth-switch a{color:#186c42;text-decoration:none;font-weight:600}
.auth-switch a:hover{text-decoration:underline}
.auth-msg-success{padding:12px;border-radius:6px;background:#e3f5eb;color:#135936;border:1px solid #c2e8d3;font-size:13px;line-height:1.45;margin-top:12px}
#register-error{color:#b32a32;font-size:13px;margin-top:8px}
.badge-pending{display:inline-block;padding:3px 9px;border-radius:12px;font-size:11px;font-weight:700;background:#fff3cd;color:#856404;border:1px solid #ffeeba}
.badge-active{display:inline-block;padding:3px 9px;border-radius:12px;font-size:11px;font-weight:600;background:#d4edda;color:#155724;border:1px solid #c3e6cb}
.user-table button.btn-approve{background:#28a745;color:white;border-color:#218838;font-weight:700;margin-right:4px}
.user-table button.btn-approve:hover{background:#218838}
