:root{--ink:#17231f;--ink-2:#34443d;--muted:#74817b;--cream:#f7f2e9;--paper:#fffefb;--line:#e7dfd5;--green:#195542;--green-2:#347b60;--lime:#c8ed46;--amber:#ffb83e;--coral:#ff745d;--violet:#8c67d7;--cyan:#36bebc;--red:#b54b43;--blue:#4c7785;--shadow:0 12px 32px rgba(27,43,36,.08);--radius:18px;--font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:var(--cream);color:var(--ink);font-family:var(--font);font-size:14px}.app-shell{display:flex;min-height:100vh}.sidebar{position:fixed;inset:0 auto 0 0;width:252px;background:var(--ink);color:#fff;display:flex;flex-direction:column;padding:26px 18px;z-index:30}.brand{display:flex;gap:12px;align-items:center;padding:0 8px 28px}.brand-mark{width:40px;height:40px;border:1px solid rgba(255,255,255,.22);border-radius:12px;display:grid;place-content:center;grid-template-columns:repeat(3,7px);gap:2px;transform:rotate(-8deg)}.brand-mark span{width:7px;height:20px;background:var(--lime);border-radius:2px}.brand-mark span:nth-child(2){height:27px;align-self:end}.brand-mark span:nth-child(3){height:15px;align-self:end}.brand strong{font-size:16px;display:block}.brand small,.local-badge small{display:block;color:#96a39d;margin-top:4px}.nav-list{display:flex;flex-direction:column;gap:5px}.nav-item{appearance:none;border:0;background:transparent;color:#aeb8b3;border-radius:10px;padding:12px 13px;display:flex;align-items:center;gap:12px;text-align:left;cursor:pointer;font:inherit;width:100%;transition:.18s}.nav-item:hover,.nav-item.active{background:rgba(255,255,255,.08);color:#fff}.nav-item.active{box-shadow:inset 3px 0 var(--lime)}.nav-icon{width:22px;text-align:center;font-size:18px}.nav-count{margin-left:auto;background:var(--lime);color:var(--ink);min-width:24px;padding:2px 7px;border-radius:999px;text-align:center;font-size:11px}.sidebar-footer{margin-top:auto}.local-badge{border-top:1px solid rgba(255,255,255,.12);margin-top:12px;padding:22px 10px 0;display:flex;gap:10px;align-items:flex-start}.local-badge>span,.save-status>span:first-child{width:8px;height:8px;border-radius:50%;background:#7ed696;box-shadow:0 0 0 4px rgba(126,214,150,.12);margin-top:4px}.local-badge strong{font-size:12px}.main-area{width:calc(100% - 252px);margin-left:252px;min-width:0}.topbar{height:94px;background:rgba(245,243,237,.9);backdrop-filter:blur(12px);position:sticky;top:0;z-index:20;border-bottom:1px solid rgba(215,214,206,.8);display:flex;align-items:center;justify-content:space-between;padding:0 38px}.eyebrow{letter-spacing:.12em;font-size:10px;font-weight:800;color:var(--green-2);margin:0 0 7px}.topbar h1{font-family:Georgia,serif;font-size:28px;margin:0;font-weight:500}.top-actions,.page-tools,.transaction-toolbar{display:flex;align-items:center;gap:12px}.save-status{display:flex;align-items:center;gap:8px;color:var(--muted);font-size:12px;margin-right:8px}.save-status>span:first-child{margin:0;width:7px;height:7px}.content{padding:32px 38px 60px;max-width:1600px;margin:auto}.view{display:none;animation:fade .2s ease}.view.active{display:block}@keyframes fade{from{opacity:.4;transform:translateY(4px)}}.button{border:1px solid transparent;border-radius:10px;padding:11px 16px;font:700 13px var(--font);cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.18s;text-decoration:none}.button:hover{transform:translateY(-1px)}.button-primary{background:var(--green);color:#fff}.button-primary:hover{background:#204c3b}.button-light{background:#fff;color:var(--ink)}.button-ghost{background:transparent;border-color:var(--line);color:var(--ink)}.button-danger{background:#fff3f1;border-color:#efd2ce;color:var(--red)}.icon-button{border:0;background:transparent;font-size:24px;cursor:pointer;color:inherit}.mobile-menu{display:none}.hero-panel{background:linear-gradient(110deg,#1b3329,#2c6049);border-radius:22px;color:#fff;padding:34px 38px;display:flex;align-items:center;justify-content:space-between;box-shadow:var(--shadow);position:relative;overflow:hidden}.hero-panel:after{content:"";position:absolute;width:280px;height:280px;border:1px solid rgba(201,236,136,.2);border-radius:45% 55% 58% 42%;right:12%;top:-130px;transform:rotate(24deg)}.hero-tag{color:var(--lime);font-weight:800;letter-spacing:.15em;font-size:10px}.hero-panel h2{font:500 28px Georgia,serif;margin:10px 0 8px}.hero-panel p{color:#c5d0ca;margin:0}.hero-panel .button{position:relative;z-index:1}.metric-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.metric-grid.compact{grid-template-columns:repeat(3,1fr)}.metric-card{background:var(--paper);border:1px solid var(--line);border-radius:15px;padding:20px;display:flex;align-items:flex-start;justify-content:space-between;min-height:112px}.metric-card .metric-icon{width:38px;height:38px;border-radius:10px;background:#edf3ee;color:var(--green);display:grid;place-items:center;font-size:18px}.metric-card span{color:var(--muted);font-size:12px}.metric-card strong{display:block;font:500 24px Georgia,serif;margin-top:9px}.metric-card small{display:block;color:var(--green-2);margin-top:6px;font-size:10px}.panel{background:var(--paper);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 1px 1px rgba(20,36,29,.02)}.dashboard-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:18px;margin-bottom:18px}.dashboard-grid>.panel{padding:24px}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}.panel-heading h3,.section-title h3,.settings-card h3,.modal h3{font-size:16px;margin:0}.subtle,.page-lead{color:var(--muted);font-size:12px}.text-button{border:0;background:transparent;color:var(--green-2);font-weight:700;cursor:pointer}.chart-legend{display:flex;gap:18px;font-size:11px;color:var(--muted);justify-content:flex-end}.chart-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}.legend-revenue{background:var(--green-2)}.legend-expense{background:#d4b785}.bar-chart{height:210px;display:flex;align-items:flex-end;gap:14px;padding:25px 4px 0;border-bottom:1px solid var(--line)}.bar-group{height:100%;flex:1;display:flex;justify-content:center;align-items:flex-end;gap:4px;position:relative}.bar-group .bar{width:min(22px,32%);border-radius:5px 5px 0 0;min-height:2px;position:relative}.bar.revenue{background:var(--green-2)}.bar.expense{background:#d4b785}.bar-group label{position:absolute;bottom:-22px;font-size:10px;color:var(--muted);white-space:nowrap}.empty-chart{margin:auto;color:var(--muted);align-self:center;text-align:center}.attention-list{display:flex;flex-direction:column}.attention-item{display:grid;grid-template-columns:36px 1fr auto;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.attention-item:last-child{border:0}.attention-icon{width:34px;height:34px;border-radius:9px;background:#fff3df;color:#b97922;display:grid;place-items:center}.attention-item strong{display:block;font-size:12px}.attention-item small{color:var(--muted);font-size:10px}.attention-value{font-weight:800;color:var(--red);font-size:11px}.view-dashboard>.panel{padding:24px}table{border-collapse:collapse;width:100%;min-width:760px}th{text-align:left;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);font-size:9px;font-weight:800;padding:12px 15px;border-bottom:1px solid var(--line)}td{padding:14px 15px;border-bottom:1px solid #eeece6;font-size:12px;vertical-align:middle}tbody tr:last-child td{border-bottom:0}.table-wrap{overflow:auto}.product-cell{display:flex;align-items:center;gap:11px}.product-avatar{width:38px;height:38px;background:#e8eee9;color:var(--green);border-radius:10px;display:grid;place-items:center;font-weight:900}.product-cell strong{display:block}.product-cell small{color:var(--muted);font-size:10px}.status{display:inline-flex;align-items:center;gap:5px;border-radius:99px;padding:5px 9px;font-size:10px;font-weight:800}.status:before{content:"";width:5px;height:5px;border-radius:50%;background:currentColor}.status.good{color:#347553;background:#edf8f0}.status.low{color:#b27520;background:#fff5e3}.status.out{color:#ab4b44;background:#fff0ef}.calculator-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.65fr);gap:20px;align-items:start}.calculator-form{padding:28px}.section-title{display:flex;gap:13px;align-items:center;margin:3px 0 18px}.section-title:not(:first-child){margin-top:32px;padding-top:28px;border-top:1px solid var(--line)}.section-title>span{width:32px;height:32px;border-radius:50%;background:var(--ink);color:var(--lime);display:grid;place-items:center;font-weight:800;font-size:10px}.section-title p{margin:4px 0 0;color:var(--muted);font-size:11px}.form-grid{display:grid;gap:14px}.form-grid.cols-2{grid-template-columns:repeat(2,1fr)}.form-grid.cols-3{grid-template-columns:repeat(3,1fr)}.field{display:block}.field>span{display:block;font-weight:700;font-size:11px;margin-bottom:8px}.field input,.field select,.field textarea,.search-box input{width:100%;border:1px solid #dcdcd4;background:#fff;border-radius:9px;padding:11px 12px;color:var(--ink);font:13px var(--font);outline:none;transition:.15s}.field input:focus,.field select:focus,.field textarea:focus,.search-box:focus-within{border-color:var(--green-2);box-shadow:0 0 0 3px rgba(61,122,94,.1)}.field textarea{resize:vertical}.input-suffix{position:relative}.input-suffix input{padding-right:42px}.input-suffix>span{position:absolute;right:12px;top:50%;transform:translateY(-50%);color:var(--muted);font-size:11px}.cost-lines{display:flex;flex-direction:column;gap:10px}.cost-line{display:grid;grid-template-columns:minmax(160px,1fr) minmax(110px,.4fr) minmax(100px,.4fr) 32px;gap:9px;align-items:end;background:#f7f7f2;border:1px solid #e7e6df;padding:11px;border-radius:11px}.cost-line .line-cost{padding:11px 3px;font-weight:800;font-size:12px;text-align:right}.remove-line{border:0;background:transparent;color:#9a726e;font-size:19px;cursor:pointer;padding:8px}.add-line{border:1px dashed #bfc9c1;background:#f4f8f4;color:var(--green);border-radius:9px;padding:10px 14px;font-weight:700;cursor:pointer;margin-top:10px}.form-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.cost-summary{position:sticky;top:115px;overflow:hidden}.summary-head{padding:24px 24px 0}.price-display{background:var(--ink);color:#fff;padding:24px;margin-top:18px}.price-display strong{display:block;font:500 34px Georgia,serif;color:var(--lime)}.price-display span{font-size:11px;color:#aebbb5}.cost-breakdown{padding:18px 24px 4px}.cost-breakdown>div{display:flex;justify-content:space-between;padding:9px 0;color:var(--muted);font-size:11px}.cost-breakdown strong{color:var(--ink)}.cost-breakdown .total{border-top:1px solid var(--line);padding-top:15px;margin-top:4px;font-size:12px}.per-unit-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 24px 18px}.per-unit-grid>div{background:#f2f4ef;border-radius:10px;padding:12px}.per-unit-grid span{display:block;color:var(--muted);font-size:9px}.per-unit-grid strong{display:block;margin-top:5px}.selling-price-field{margin:0 24px 18px}.formula-note{font-size:9px;color:var(--muted);line-height:1.5;padding:14px 24px;margin:0;background:#f7f5ef;border-top:1px solid var(--line)}.page-tools,.transaction-toolbar{justify-content:space-between;margin-bottom:18px;flex-wrap:wrap}.search-box{height:40px;min-width:260px;border:1px solid var(--line);background:#fff;border-radius:10px;padding:0 11px;display:flex;align-items:center;gap:7px}.search-box input{border:0;padding:0;box-shadow:none!important}.filter-tabs{display:flex;background:#e9e8e1;padding:4px;border-radius:10px}.filter-tabs button{border:0;background:transparent;border-radius:7px;padding:8px 12px;color:var(--muted);font:700 11px var(--font);cursor:pointer}.filter-tabs button.active{background:#fff;color:var(--ink);box-shadow:0 2px 6px rgba(0,0,0,.05)}.inventory-summary{display:flex;gap:12px;margin-bottom:18px}.summary-chip{background:#fff;border:1px solid var(--line);border-radius:10px;padding:11px 15px}.summary-chip span{color:var(--muted);font-size:10px}.summary-chip strong{margin-left:8px}.table-panel{overflow:hidden}.row-actions{display:flex;gap:3px;justify-content:flex-end}.row-actions button{border:0;background:transparent;color:var(--muted);cursor:pointer;padding:6px;border-radius:6px;font-size:15px}.row-actions button:hover{background:#eeeee8;color:var(--ink)}.stock-control{display:flex;align-items:center;gap:4px}.stock-control button{border:1px solid var(--line);background:#fff;width:24px;height:24px;border-radius:6px;cursor:pointer}.stock-control strong{min-width:24px;text-align:center}.color-dot{width:13px;height:13px;border-radius:50%;display:inline-block;border:2px solid #fff;box-shadow:0 0 0 1px #ccc;margin-right:7px;vertical-align:-2px}.stock-bar{width:92px;height:5px;background:#e8e7e0;border-radius:9px;overflow:hidden;margin-top:6px}.stock-bar i{height:100%;display:block;background:var(--green-2);border-radius:9px}.stock-bar i.low{background:var(--amber)}.transaction-toolbar>div{display:flex;gap:8px}.settings-grid{display:grid;grid-template-columns:1.1fr .9fr;gap:18px}.settings-card{padding:26px}.settings-card .button{margin-top:18px}.backup-actions{display:flex;gap:10px;flex-wrap:wrap}.file-button input{display:none}.backup-info{display:flex;justify-content:space-between;border-top:1px solid var(--line);padding-top:17px;margin-top:20px;color:var(--muted);font-size:11px}.backup-info strong{color:var(--ink)}.danger-card{grid-column:1/-1;border-color:#ead1ce;background:#fffaf9}.toast-stack{position:fixed;right:24px;bottom:24px;z-index:100;display:flex;flex-direction:column;gap:9px}.toast{background:var(--ink);color:#fff;padding:13px 16px;border-radius:10px;box-shadow:var(--shadow);min-width:250px;animation:toast .25s ease}.toast.success{border-left:4px solid var(--lime)}.toast.error{border-left:4px solid #ef7b72}@keyframes toast{from{transform:translateY(10px);opacity:0}}dialog{border:0;padding:0;background:transparent}dialog::backdrop{background:rgba(14,25,20,.56);backdrop-filter:blur(3px)}.modal form{background:var(--paper);border-radius:18px;width:min(560px,calc(100vw - 32px));padding:25px;box-shadow:0 25px 80px rgba(0,0,0,.22)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:22px}.modal-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:22px}.modal .form-grid{margin-bottom:14px}.confirm-modal{text-align:center}.confirm-modal form{width:min(400px,calc(100vw - 32px))}.confirm-icon{width:45px;height:45px;background:#fff0ee;color:var(--red);border-radius:50%;display:grid;place-items:center;margin:0 auto 15px;font-weight:900}.confirm-modal p{color:var(--muted);line-height:1.6}.confirm-modal .modal-actions{justify-content:center}.empty-state{text-align:center;padding:36px!important;color:var(--muted)}.empty-state strong{display:block;color:var(--ink);margin-bottom:6px}.money-positive{color:var(--green-2);font-weight:800}.money-negative{color:var(--red);font-weight:800}
.product-visual{width:48px;height:48px;position:relative;flex:0 0 auto}.product-visual .product-avatar{width:48px;height:48px;border:0;padding:0;overflow:hidden;cursor:pointer}.product-visual img{width:100%;height:100%;object-fit:cover;display:block}.image-nav{position:absolute;top:50%;transform:translateY(-50%);width:18px;height:24px;border:0;background:rgba(23,35,31,.78);color:#fff;cursor:pointer;opacity:0;transition:.15s;font-size:10px;padding:0}.product-visual:hover .image-nav{opacity:1}.image-nav.prev{left:0;border-radius:0 6px 6px 0}.image-nav.next{right:0;border-radius:6px 0 0 6px}.image-count{position:absolute;right:3px;bottom:3px;background:rgba(23,35,31,.78);color:#fff;border-radius:99px;font-size:8px;padding:2px 5px;pointer-events:none}.gallery-modal .gallery-shell{background:var(--paper);border-radius:20px;width:min(760px,calc(100vw - 28px));padding:25px;box-shadow:0 25px 80px rgba(0,0,0,.25)}.gallery-stage{height:min(52vh,440px);background:#eeeee8;border-radius:14px;overflow:hidden;display:grid;place-items:center;position:relative}.gallery-stage img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain;object-position:center;display:block;margin:auto}.gallery-empty{text-align:center;color:var(--muted);padding:30px}.gallery-empty span{display:grid;place-items:center;width:58px;height:58px;border-radius:16px;background:#fff;margin:0 auto 12px;font-size:25px}.gallery-empty strong{display:block;color:var(--ink);margin-bottom:6px}.gallery-toolbar{display:flex;justify-content:space-between;gap:10px;margin:12px 0}.gallery-toolbar>div{display:flex;gap:7px}.gallery-toolbar .button{padding:9px 12px}.gallery-thumbs{display:flex;gap:8px;overflow:auto;padding-bottom:4px;margin-bottom:14px}.gallery-thumb{width:64px;height:54px;border:2px solid transparent;border-radius:9px;padding:0;overflow:hidden;background:#eee;cursor:pointer;flex:0 0 auto}.gallery-thumb.active{border-color:var(--green)}.gallery-thumb img{width:100%;height:100%;object-fit:cover}.image-dropzone{border:1px dashed #aebdb3;background:#f4f8f4;border-radius:12px;padding:18px;display:flex;align-items:center;gap:12px;cursor:pointer}.image-dropzone:hover{border-color:var(--green)}.image-dropzone input{display:none}.image-dropzone strong{display:block}.image-dropzone small{display:block;color:var(--muted);margin-top:3px}.upload-icon{width:38px;height:38px;border-radius:10px;background:var(--green);color:#fff;display:grid;place-items:center;font-size:20px;flex:0 0 auto}.storage-note{color:var(--muted);font-size:9px;line-height:1.5;margin:10px 0 0}.image-dropzone.loading{opacity:.55;pointer-events:none}
@media(max-width:1100px){.metric-grid{grid-template-columns:repeat(2,1fr)}.dashboard-grid{grid-template-columns:1fr}.calculator-layout{grid-template-columns:1fr}.cost-summary{position:static}.settings-grid{grid-template-columns:1fr}.danger-card{grid-column:auto}.form-grid.cols-3{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.sidebar{transform:translateX(-100%);transition:.22s}.sidebar.open{transform:translateX(0);box-shadow:20px 0 70px rgba(0,0,0,.25)}.main-area{width:100%;margin-left:0}.mobile-menu{display:block}.topbar{height:78px;padding:0 16px;gap:10px}.topbar h1{font-size:22px}.topbar .eyebrow,.save-status{display:none}.top-actions .button{padding:10px;font-size:0}.top-actions .button:after{content:"＋";font-size:18px}.content{padding:18px 14px 40px}.hero-panel{padding:26px;display:block}.hero-panel h2{font-size:24px}.hero-panel .button{margin-top:20px}.metric-grid,.metric-grid.compact{grid-template-columns:1fr 1fr;gap:9px}.metric-card{padding:15px;min-height:95px}.metric-card strong{font-size:19px}.dashboard-grid>.panel,.view-dashboard>.panel,.calculator-form{padding:18px}.form-grid.cols-2,.form-grid.cols-3{grid-template-columns:1fr}.cost-line{grid-template-columns:1fr 1fr 30px}.cost-line .field:first-child{grid-column:1/-1}.cost-line .line-cost{display:none}.page-tools{align-items:stretch}.page-tools .search-box{order:3;width:100%}.filter-tabs{overflow:auto}.transaction-toolbar>div:last-child{width:100%}.transaction-toolbar .button{flex:1}.inventory-summary{overflow:auto}.modal .form-grid.cols-2{grid-template-columns:1fr}.bar-chart{height:180px}}
@media(max-width:430px){.metric-grid,.metric-grid.compact{grid-template-columns:1fr}.top-actions{display:none}.per-unit-grid{grid-template-columns:1fr}.brand{padding-bottom:18px}.gallery-stage{height:42vh}.gallery-toolbar{display:block}.gallery-toolbar>div{margin-bottom:8px}.gallery-toolbar .button{width:100%}.image-dropzone{align-items:flex-start}.image-dropzone small{line-height:1.4}}

/* IN gì BÁN đó — colorful 3D workshop identity */
.hero-panel{background-image:linear-gradient(90deg,rgba(9,45,34,.98) 0%,rgba(9,45,34,.86) 38%,rgba(9,45,34,.18) 72%),url("assets/nhum-3d-hero.jpg");background-size:cover;background-position:center;border-radius:22px;padding:38px;min-height:230px}.hero-panel:after{inset:auto auto -30px 32%;width:150px;height:12px;border:0;border-radius:99px;background:linear-gradient(90deg,var(--coral),var(--lime),var(--cyan),var(--violet));filter:blur(14px);opacity:.65}.hero-copy{max-width:500px;position:relative;z-index:1}.hero-panel h2{font-size:36px}.hero-panel p{color:#d7e4de;line-height:1.55;max-width:470px}.hero-panel .button{align-self:flex-end}.metric-card:nth-child(4n+1) .metric-icon{background:#e9f6ef;color:var(--green)}.metric-card:nth-child(4n+2) .metric-icon{background:#fff1dd;color:#c2711d}.metric-card:nth-child(4n+3) .metric-icon{background:#e5f7f7;color:#168b8a}.metric-card:nth-child(4n+4) .metric-icon{background:#f0eafb;color:#7650bd}.account-button{border:1px solid var(--line);background:rgba(255,255,255,.72);border-radius:12px;padding:6px 10px 6px 6px;display:flex;align-items:center;gap:8px;cursor:pointer;color:var(--ink);text-align:left}.account-button strong{display:block;font-size:11px;max-width:150px;overflow:hidden;text-overflow:ellipsis}.account-button small{display:block;color:var(--muted);font-size:9px;margin-top:2px}.account-avatar{width:30px;height:30px;border-radius:9px;background:linear-gradient(135deg,var(--coral),var(--violet));color:#fff;display:grid;place-items:center;font-weight:900;flex:0 0 auto}.cloud-actions{display:flex;gap:8px;flex-wrap:wrap}.auth-modal form{position:relative;width:min(440px,calc(100vw - 28px));padding:30px}.auth-brand{display:flex;align-items:center;gap:10px;margin-bottom:26px}.auth-brand .brand-mark{background:var(--ink);border:0}.auth-brand strong,.auth-brand small{display:block}.auth-brand small{color:var(--muted);margin-top:3px}.auth-close{position:absolute;right:20px;top:18px}.auth-intro{color:var(--muted);line-height:1.55;margin:8px 0 20px}.auth-submit{width:100%;margin-top:8px}.auth-switch{display:block;margin:16px auto 0}.auth-user-panel{border-top:1px solid var(--line);margin-top:22px;padding-top:20px}.account-big{display:flex;align-items:center;gap:12px;margin-bottom:16px}.account-big .account-avatar{width:44px;height:44px;border-radius:13px}.account-big strong,.account-big small{display:block}.account-big small{color:var(--muted);margin-top:4px}.auth-user-panel .button{width:100%;margin-top:8px}.local-badge.cloud>span{background:var(--cyan);box-shadow:0 0 0 4px rgba(54,190,188,.15)}.local-badge.syncing>span{background:var(--amber);animation:pulse 1s infinite}@keyframes pulse{50%{opacity:.35}}
@media(max-width:760px){.hero-panel{padding:28px;min-height:300px;background-image:linear-gradient(180deg,rgba(9,45,34,.94) 0%,rgba(9,45,34,.72) 48%,rgba(9,45,34,.1) 100%),url("assets/nhum-3d-hero.jpg");background-position:60% center}.hero-panel h2{font-size:32px}.hero-copy{max-width:100%}.hero-panel .button{margin-top:80px}.account-button{display:none}}

/* Rounded, even typography and aligned numerals */
body,button,input,select,textarea{font-family:ui-rounded,"SF Pro Rounded","Arial Rounded MT Bold","Nunito Sans",Inter,system-ui,sans-serif;font-variant-numeric:tabular-nums lining-nums}.topbar h1,.hero-panel h2,.metric-card strong,.price-display strong{font-family:ui-rounded,"SF Pro Rounded","Arial Rounded MT Bold",system-ui,sans-serif;font-weight:750;letter-spacing:-.025em}.topbar h1{font-size:27px}.metric-card strong{line-height:1.15}.metric-card span,.metric-card small,th,td{letter-spacing:.005em}.money-positive,.money-negative,.cost-breakdown strong,.per-unit-grid strong,td{font-variant-numeric:tabular-nums lining-nums}.privacy-toggle{border:0;cursor:pointer;font:800 17px ui-rounded,system-ui}.private-metric strong{letter-spacing:.08em}

/* Storefront */
.storefront-hero{background:linear-gradient(120deg,#fff7e8,#edf8ef 55%,#eaf8f7);border:1px solid var(--line);border-radius:20px;padding:28px 30px;display:flex;align-items:end;justify-content:space-between;gap:20px;margin-bottom:16px;position:relative;overflow:hidden}.storefront-hero:after{content:"";position:absolute;width:150px;height:150px;border-radius:42% 58% 65% 35%;background:linear-gradient(135deg,var(--coral),var(--amber),var(--lime));right:26%;top:-105px;opacity:.25}.storefront-hero h2{font-size:25px;margin:0 0 8px;letter-spacing:-.03em}.storefront-hero p:last-child{color:var(--muted);margin:0}.storefront-hero .search-box{min-width:320px;position:relative;z-index:1}.store-toolbar{display:flex;align-items:center;justify-content:space-between;margin:14px 0;color:var(--muted);font-size:11px}.store-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.store-card{background:var(--paper);border:1px solid var(--line);border-radius:18px;overflow:hidden;transition:.2s;box-shadow:0 4px 18px rgba(23,35,31,.04)}.store-card:hover{transform:translateY(-3px);box-shadow:var(--shadow)}.store-image{height:210px;background:linear-gradient(135deg,#e9f5ed,#f5ece4);position:relative;display:grid;place-items:center;overflow:hidden}.store-image>img{width:100%;height:100%;object-fit:cover}.store-placeholder{font-size:48px;font-weight:900;color:rgba(25,85,66,.28)}.store-card .status{position:absolute;left:12px;top:12px;backdrop-filter:blur(6px)}.store-image-nav{position:absolute;top:50%;transform:translateY(-50%);width:34px;height:34px;border:0;border-radius:50%;background:rgba(255,255,255,.9);color:var(--ink);box-shadow:0 4px 12px rgba(0,0,0,.12);cursor:pointer;opacity:0;transition:.15s}.store-card:hover .store-image-nav{opacity:1}.store-image-nav.prev{left:10px}.store-image-nav.next{right:10px}.store-image .image-count{right:10px;bottom:10px;font-size:9px}.store-body{padding:17px}.store-meta{color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.08em}.store-body h3{font-size:15px;margin:7px 0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.store-price{display:flex;align-items:end;justify-content:space-between;margin-bottom:14px}.store-price strong{font-size:19px;color:var(--green)}.store-price span{font-size:10px;color:var(--muted)}.store-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.store-actions .button{padding:9px 10px;font-size:11px}.store-empty{grid-column:1/-1;background:var(--paper);border:1px dashed var(--line);border-radius:16px;text-align:center;padding:60px;color:var(--muted)}
@media(max-width:1200px){.store-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:900px){.store-grid{grid-template-columns:repeat(2,1fr)}.storefront-hero{align-items:stretch;flex-direction:column}.storefront-hero .search-box{min-width:0;width:100%}}
@media(max-width:520px){.store-grid{grid-template-columns:1fr}.store-image{height:260px}.store-toolbar{align-items:flex-start;gap:10px;flex-direction:column}}

/* Authentication gate: the application never appears before whitelist validation. */
.auth-locked,.login-mode{overflow:hidden;background:#10251e}.auth-locked .app-shell,.login-mode .app-shell,.public-mode .app-shell{display:none!important}.public-mode .login-gate,.public-mode .app-shell,.login-mode .public-shop,.auth-unlocked .login-gate,.auth-unlocked .public-shop{display:none!important}.login-gate{position:fixed;inset:0;z-index:10000;display:grid;grid-template-columns:minmax(320px,1.1fr) minmax(420px,.9fr);min-height:100dvh;background:#10251e}.gate-visual{background-image:linear-gradient(115deg,rgba(10,39,30,.12),rgba(10,39,30,.55)),url("assets/nhum-3d-hero.jpg");background-size:cover;background-position:center;position:relative}.gate-visual:after{content:"";position:absolute;inset:auto 8% 7%;height:10px;border-radius:99px;background:linear-gradient(90deg,var(--coral),var(--amber),var(--lime),var(--cyan),var(--violet));filter:blur(13px);opacity:.9}.gate-card{background:var(--paper);padding:clamp(32px,6vw,88px);display:flex;flex-direction:column;justify-content:center;box-shadow:-30px 0 80px rgba(0,0,0,.2)}.gate-card .auth-brand{margin-bottom:42px}.gate-card h1{margin:7px 0 12px;font-size:clamp(30px,4vw,48px);line-height:1.05;letter-spacing:-.045em}.gate-intro{color:var(--muted);line-height:1.65;margin:0 0 26px;max-width:520px}.gate-submit{width:100%;margin-top:16px;padding:14px}.gate-message{min-height:20px;margin:16px 0 0;color:var(--muted);font-size:11px;font-weight:700}.gate-message.error{color:var(--red)}.gate-message.success{color:var(--green)}.gate-footnote{display:block;color:var(--muted);line-height:1.55;border-top:1px solid var(--line);margin-top:22px;padding-top:18px}.gate-card input{font-size:15px;padding:13px 14px}.gate-submit:disabled{opacity:.65;cursor:wait}.gate-back{margin-top:16px;align-self:flex-start}
@media(max-width:820px){.login-gate{grid-template-columns:1fr;background-image:linear-gradient(rgba(11,38,30,.7),rgba(11,38,30,.86)),url("assets/nhum-3d-hero.jpg");background-size:cover;background-position:center}.gate-visual{display:none}.gate-card{align-self:center;margin:18px;border-radius:22px;padding:32px 25px;box-shadow:0 25px 80px rgba(0,0,0,.32)}.gate-card .auth-brand{margin-bottom:28px}.gate-card h1{font-size:32px}}

/* Public storefront — sanitized read-only catalog */
.public-shop{min-height:100vh;background:#f5f3ed;color:var(--ink)}.public-header{height:78px;padding:0 clamp(18px,5vw,70px);display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.92);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20;backdrop-filter:blur(12px)}.public-header .auth-brand{margin:0}.public-hero{min-height:390px;padding:70px clamp(22px,7vw,100px);display:flex;align-items:center;background-image:linear-gradient(90deg,rgba(7,40,30,.96),rgba(7,40,30,.7) 48%,rgba(7,40,30,.12)),url("assets/nhum-3d-hero.jpg");background-size:cover;background-position:center;color:#fff}.public-hero>div{max-width:650px}.public-hero h1{font-size:clamp(38px,6vw,70px);line-height:.98;letter-spacing:-.055em;margin:12px 0 22px}.public-hero p:last-child{color:#d8e4df;line-height:1.65;max-width:520px}.public-content{max-width:1380px;margin:auto;padding:44px clamp(16px,5vw,65px) 70px}.public-toolbar{display:flex;justify-content:space-between;align-items:end;gap:20px;margin-bottom:24px}.public-toolbar h2{font-size:30px;margin:0 0 5px}.public-toolbar p{color:var(--muted);margin:0}.public-store-grid .store-actions{display:none}.public-store-grid .store-card{background:#fff}.public-footer{padding:25px;text-align:center;background:var(--ink);color:#aebbb5}.public-footer .text-button{color:var(--lime);margin-left:15px}@media(max-width:700px){.public-header{height:70px}.public-header .auth-brand small{display:none}.public-header .button{padding:10px 12px}.public-hero{min-height:330px;padding-top:48px}.public-toolbar{align-items:stretch;flex-direction:column}.public-toolbar .search-box{width:100%;min-width:0}.public-footer .text-button{display:block;margin:10px auto 0}}

/* Cloud edit history */
.audit-card{grid-column:1/-1}.audit-card .button{margin-top:0}.history-list{display:flex;flex-direction:column;border-top:1px solid var(--line);margin-top:18px}.history-row{display:grid;grid-template-columns:72px minmax(180px,1fr) minmax(220px,1.3fr) auto;gap:14px;align-items:center;padding:14px 4px;border-bottom:1px solid var(--line)}.history-row:last-child{border-bottom:0}.history-revision{font-weight:900;color:var(--green)}.history-main strong,.history-main small{display:block}.history-main small,.history-summary,.history-empty{color:var(--muted);font-size:10px;line-height:1.5}.history-empty{padding:25px;text-align:center}.history-shell{background:var(--paper);border-radius:18px;width:min(760px,calc(100vw - 28px));padding:26px;box-shadow:0 25px 80px rgba(0,0,0,.25)}.history-meta{background:#f2f4ef;border-radius:12px;padding:14px;display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:16px}.history-meta span{display:block;color:var(--muted);font-size:9px}.history-meta strong{display:block;margin-top:4px;font-size:11px}.change-list{max-height:45vh;overflow:auto;border:1px solid var(--line);border-radius:12px}.change-item{padding:12px 14px;border-bottom:1px solid var(--line);font-size:11px}.change-item:last-child{border-bottom:0}.change-item b{display:inline-block;min-width:52px}.change-item small{display:block;color:var(--muted);margin:4px 0 0 56px}.change-add b{color:var(--green)}.change-update b{color:#b27520}.change-delete b{color:var(--red)}
@media(max-width:760px){.history-row{grid-template-columns:62px 1fr}.history-summary{grid-column:1/-1}.history-row .button{grid-column:1/-1}.history-meta{grid-template-columns:1fr}.history-shell{padding:20px}}

/* ===== Motion layer: 3D tilt, transitions, ambient light — fx.js drives the JS side ===== */
body{perspective:1400px}
.content,.public-content{transform-style:preserve-3d}

/* View switch: cinematic 3D swing-in instead of a flat fade */
.view{transform-origin:50% 30%}
.view.fx-view-enter{animation:fxViewIn .55s cubic-bezier(.16,1,.3,1)}
@keyframes fxViewIn{0%{opacity:0;transform:perspective(1200px) rotateX(8deg) translateY(26px) scale(.97)}100%{opacity:1;transform:none}}

/* Scroll reveal */
.fx-reveal{opacity:0;transform:translateY(22px) scale(.98);transition:opacity .6s cubic-bezier(.16,1,.3,1),transform .6s cubic-bezier(.16,1,.3,1)}
.fx-reveal.fx-in{opacity:1;transform:none}

/* Tilt targets: smooth spring-back + soft depth shadow + cursor glow */
.store-card,.metric-card,.panel,.hero-panel{transition:transform .35s cubic-bezier(.16,1,.3,1),box-shadow .35s;will-change:transform}
.store-card:hover,.metric-card:hover{box-shadow:0 22px 46px rgba(23,35,31,.16)}
.store-card,.metric-card{position:relative;isolation:isolate}
.store-card:before,.metric-card:before{content:"";position:absolute;inset:0;border-radius:inherit;background:radial-gradient(circle at var(--glow-x,50%) var(--glow-y,50%),rgba(255,255,255,.55),transparent 60%);opacity:0;transition:opacity .3s;pointer-events:none;z-index:1}
.store-card:hover:before,.metric-card:hover:before{opacity:.55}
.store-image{transform:translateZ(18px)}
.store-body{transform:translateZ(10px)}

/* Ambient cursor-follow auras on hero-style banners */
.hero-panel,.storefront-hero,.public-hero,.gate-visual{position:relative}
.hero-panel:before,.storefront-hero:before,.public-hero:before,.gate-visual:before{content:"";position:absolute;inset:0;background:radial-gradient(420px circle at var(--aura-x,50%) var(--aura-y,20%),rgba(200,237,70,.22),transparent 62%);opacity:0;transition:opacity .35s;pointer-events:none;z-index:0}
.hero-panel:hover:before,.storefront-hero:hover:before,.public-hero:hover:before,.gate-visual:hover:before{opacity:1}
.storefront-hero:before,.public-hero:before{background:radial-gradient(420px circle at var(--aura-x,50%) var(--aura-y,20%),rgba(140,103,215,.18),transparent 62%)}

/* Slow ambient gradient drift on the hero to feel alive without distracting */
.hero-panel{background-size:120% 120%;animation:fxHeroDrift 14s ease-in-out infinite alternate}
@keyframes fxHeroDrift{from{background-position:0% 50%}to{background-position:100% 50%}}

/* Buttons: tactile press + ripple */
.button,.nav-item,.add-line{position:relative;overflow:hidden}
.button:active{transform:translateY(0) scale(.97)}
.button-primary{background-image:linear-gradient(135deg,var(--green),var(--green-2));background-size:160% 160%;transition:background-position .4s,transform .18s}
.button-primary:hover{background-position:100% 0}
.fx-ripple{position:absolute;width:10px;height:10px;margin:-5px;border-radius:50%;background:rgba(255,255,255,.55);transform:scale(0);pointer-events:none;animation:fxRipple .55s ease-out forwards}
@keyframes fxRipple{to{transform:scale(18);opacity:0}}

/* Nav item active state: smoother slide feel */
.nav-item{transition:background .25s,transform .2s,color .2s}
.nav-item:hover{transform:translateX(2px)}

/* Price number: subtle count-up pop when it changes */
#suggested-price{transition:transform .25s cubic-bezier(.34,1.56,.64,1)}

@media(prefers-reduced-motion:reduce){.hero-panel{animation:none}.fx-reveal{opacity:1;transform:none;transition:none}.view.fx-view-enter{animation:none}}
@media(max-width:760px){.store-card,.metric-card,.panel,.hero-panel{transform:none!important}}

/* Motion.dev layer: particle canvas + WebGL shader backdrops */
.fx-particles{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;mix-blend-mode:screen}
.fx-shader-bg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:0;mix-blend-mode:soft-light}
.hero-panel,.public-hero,.gate-visual,.storefront-hero{isolation:isolate}
.hero-panel>*:not(.fx-particles):not(.fx-shader-bg):not(.fx-hero3d),.public-hero>*:not(.fx-particles):not(.fx-shader-bg):not(.fx-hero3d),.gate-visual>*:not(.fx-particles):not(.fx-shader-bg):not(.fx-hero3d),.storefront-hero>*:not(.fx-hero3d){position:relative;z-index:1}
@media(max-width:760px){.fx-particles,.fx-shader-bg{display:none}}

/* Live Three.js scene: printer + filament spools + mini toys, right side of the storefront hero */
.fx-hero3d{position:absolute;top:0;right:0;width:56%;height:100%;pointer-events:none;z-index:0}
.public-hero .fx-hero3d{width:48%}
@media(max-width:900px){.fx-hero3d{display:none}}

/* Ô màu vật liệu: mảng màu lớn để nhận diện nhanh, tên màu vẫn hiển thị rõ. */
.color-shape{width:92px;height:48px;border-radius:14px;border:3px solid rgba(255,255,255,.92);box-shadow:0 0 0 1px rgba(24,47,39,.2),0 7px 16px rgba(24,47,39,.1);margin-bottom:9px}
.color-name{display:block;max-width:132px;line-height:1.25}
#materials-table td:nth-child(3){min-width:150px}

/* Cover carousel: chỉ crossfade nhẹ, không zoom/bay ảnh. */
.public-hero#public-cover{background:#063324;position:relative}
.cover-slides,.cover-slide{position:absolute;inset:0}
.cover-slide{background-size:cover;background-position:center;opacity:0;transition:opacity 1.1s ease}
.cover-slide:after{content:"";position:absolute;inset:0;background:linear-gradient(95deg,rgba(6,37,28,.96),rgba(6,37,28,.72) 47%,rgba(6,37,28,.12))}
.cover-slide.active{opacity:1}
.public-hero-copy{position:relative;z-index:2;max-width:650px}
.cover-dots{position:absolute;z-index:3;left:clamp(22px,7vw,100px);bottom:24px;display:flex;gap:8px}
.cover-dots button{width:9px;height:9px;padding:0;border:0;border-radius:99px;background:rgba(255,255,255,.42);cursor:pointer;transition:width .25s ease,background-color .25s ease}
.cover-dots button.active{width:30px;background:#fff}
@media(prefers-reduced-motion:reduce){.cover-slide{transition:none}}
@media(max-width:700px){.cover-slide{background-position:62% center}.cover-dots{bottom:16px}}
