@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');
:root{font-family:'DM Sans',Inter,system-ui,sans-serif;color-scheme:dark;--bg:#090f1d;--panel:#111b2d;--panel2:#18243a;--line:#26344d;--text:#edf3ff;--muted:#94a4bf;--blue:#517cff;--accent:#7d62ff;--green:#39d6a0;--shadow:0 18px 45px #0003}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text);font-size:14px}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--blue);outline-offset:2px}button:disabled{opacity:.5;cursor:not-allowed}.app{display:flex;min-height:100vh}.sidebar{width:258px;flex:none;background:#0d1525;border-right:1px solid var(--line);padding:26px 15px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:flex;align-items:center;gap:12px;padding:0 11px 30px;font-size:22px;font-weight:800;letter-spacing:-1px}.brand small{display:block;color:#8997b1;font-size:9px;letter-spacing:2px;margin-top:4px}.logo{width:42px;height:42px;border-radius:13px;display:grid;place-items:center;color:white;background:linear-gradient(135deg,#4d7bff,#9b5bff);font-size:25px;font-weight:800;box-shadow:0 8px 25px #4d7bff44}.nav-label{color:#62728d;font-size:10px;font-weight:800;letter-spacing:2px;padding:18px 14px 10px}.nav{background:transparent;color:#9cabc2;border:0;border-radius:12px;width:100%;padding:14px;text-align:left;display:flex;align-items:center;gap:14px;font-weight:650;font-size:13px;margin-bottom:4px;transition:.18s}.nav:hover{background:#1b2840;color:white}.nav.active{background:linear-gradient(110deg,#4269e9,#6d55d8);color:white;box-shadow:0 7px 24px #526af044}.sidebar-bottom{margin-top:auto}.online{color:#63d9ac;font-size:11px;padding:14px}.profile{display:flex;align-items:center;gap:10px;padding:13px;border-top:1px solid var(--line)}.profile small{display:block;color:#8292ac;margin-top:3px}.avatar{width:34px;height:34px;border-radius:12px;background:#283d65;display:grid;place-items:center}.logout{border:0;background:none;color:#9eabc1;padding:13px;text-align:left}.main{flex:1;min-width:0;padding:30px 35px 60px;max-width:1600px;margin:auto}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:30px;gap:15px}.eyebrow{color:#7593ff;font-size:10px;letter-spacing:2px;font-weight:800}.topbar h1{font-size:29px;letter-spacing:-1px;margin:7px 0 0}.top-actions{display:flex;align-items:center;gap:12px}.date{color:var(--muted);font-size:12px}.pill{background:#14392e;color:#57e2ac;border-radius:99px;padding:10px 14px;font-size:11px}.theme-toggle{background:var(--panel2);border:1px solid var(--line);border-radius:10px;padding:10px;color:var(--text)}.hero{border:1px solid #506be655;background:radial-gradient(circle at 88% 10%,#6b59c355,transparent 34%),linear-gradient(115deg,#1c3163,#17223e);border-radius:20px;padding:28px 30px;margin-bottom:24px;display:flex;align-items:center;justify-content:space-between;gap:20px}.hero h2{font-size:26px;letter-spacing:-.8px;margin:9px 0}.hero p{color:#b8c7e3;margin:0}.cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin-bottom:26px}.card,.panel,.product-tile,.table-tile{background:var(--panel);border:1px solid var(--line);border-radius:17px;box-shadow:var(--shadow)}.card{padding:24px}.value{font-size:28px;font-weight:800;letter-spacing:-1px;margin:16px 0 8px}.muted{color:var(--muted)}.section-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:22px 0 15px}.section-title h2{font-size:18px;margin:0}.panel{padding:22px;overflow:auto}.panel h3{margin:0 0 20px;font-size:17px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:15px}.product-tile{padding:20px;display:flex;flex-direction:column;align-items:flex-start;gap:11px;text-align:left;color:var(--text);min-height:145px}.product-tile strong{font-size:15px}.product-tile .price{font-size:18px;font-weight:800;color:#8da7ff;margin-top:auto}.product-tile.add:hover,.table-tile:hover{border-color:#617cff;transform:translateY(-2px);transition:.2s}.table-tile{min-height:126px;padding:20px;color:var(--text);display:flex;flex-direction:column;justify-content:space-between;text-align:left}.table-tile strong{font-size:16px}.table-tile small{color:var(--green)}.table-tile.busy{background:linear-gradient(140deg,#292035,var(--panel));border-color:#805d78}.table-tile.busy small{color:#ffb0b8}.data-table{width:100%;border-collapse:collapse;text-align:left;min-width:650px}.data-table th{color:#8192af;font-size:10px;letter-spacing:1px;padding:14px;border-bottom:1px solid var(--line)}.data-table td{padding:16px 14px;border-bottom:1px solid var(--line);font-size:12px}.data-table tr:last-child td{border-bottom:0}.status{display:inline-block;padding:7px 10px;border-radius:30px;background:#4b3520;color:#ffc57e}.status.paid{background:#153d33;color:#5ce4b0}.primary,.secondary{border-radius:11px;padding:11px 16px;font-weight:750;border:1px solid transparent}.primary{background:linear-gradient(110deg,#4c75ff,#785af0);color:white;box-shadow:0 7px 20px #4f69ff33}.secondary{background:var(--panel2);color:var(--text);border-color:var(--line)}.secondary:hover{border-color:#6683ff}.link{border:0;background:transparent;color:#89a7ff;padding:5px}.full{width:100%}.sales-layout{display:grid;grid-template-columns:minmax(0,1fr) 335px;gap:20px;align-items:start}.sales-layout>.panel{position:sticky;top:20px}.cart-line{display:flex;justify-content:space-between;gap:10px;padding:13px 0;border-bottom:1px solid var(--line);font-size:12px}.cart-total{display:flex;justify-content:space-between;font-size:18px;font-weight:800;margin:24px 0}.form-row{display:grid;grid-template-columns:2fr 1.2fr 1fr auto;gap:12px;align-items:end}label{display:block;color:var(--muted);font-size:12px;font-weight:600;margin:12px 0}input,select{display:block;width:100%;margin-top:7px;padding:12px 13px;border-radius:10px;border:1px solid var(--line);background:var(--panel2);color:var(--text)}.empty{text-align:center;color:var(--muted);padding:30px}.kitchen-ticket{border-top:3px solid #718aff}.toast{display:none;position:fixed;bottom:26px;right:26px;background:#314675;color:white;border:1px solid #7791ff;border-radius:12px;padding:16px 24px;z-index:99;box-shadow:var(--shadow)}.auth-layout{min-height:100vh;display:grid;grid-template-columns:1fr 470px;align-items:center;gap:8%;padding:7%;background:radial-gradient(circle at 20% 30%,#263a77,transparent 35%),var(--bg)}.auth-brand h1{font-size:46px;letter-spacing:-2px}.auth-brand h1 span{color:#8a9fff}.auth-brand h2{font-size:36px;max-width:540px;letter-spacing:-1px}.auth-brand p,.auth-points{color:#a8b9d6;line-height:1.9}.auth-card{background:var(--panel);padding:42px;border-radius:22px;border:1px solid var(--line);box-shadow:var(--shadow)}.auth-card h2{font-size:25px}.auth-card label{margin:18px 0}.switch{margin-top:22px;text-align:center;color:var(--muted)}.error{color:#ff9caa;margin-top:12px}.settings-panel{max-width:700px}.settings-panel hr,.kitchen-ticket hr{border:0;border-top:1px solid var(--line);margin:24px 0}[hidden]{display:none!important}
:root[data-theme=light]{color-scheme:light;--bg:#f3f6fc;--panel:#fff;--panel2:#f1f4fa;--line:#dce3f0;--text:#17233a;--muted:#6e7e98;--shadow:0 12px 35px #20304e0b}:root[data-theme=light] .sidebar{background:#fff}:root[data-theme=light] .nav:hover{background:#eef2fc;color:#17233a}:root[data-theme=light] .hero{color:white}
@media(max-width:1050px){.sidebar{width:76px;padding:20px 9px}.sidebar .brand>div:not(.logo),.sidebar .nav span,.sidebar .nav-label,.sidebar-bottom{display:none}.sidebar .brand{padding:0 8px 25px}.nav{justify-content:center;font-size:20px}.cards{grid-template-columns:repeat(2,1fr)}.sales-layout{grid-template-columns:1fr}.sales-layout>.panel{position:static}}@media(max-width:650px){.app{display:block}.sidebar{width:100%;height:auto;position:static;display:flex;flex-direction:row;overflow-x:auto;padding:10px;gap:5px}.sidebar .brand{padding:0 12px 0 0}.sidebar .nav{min-width:46px;margin:0}.main{padding:18px}.topbar{align-items:flex-start}.topbar h1{font-size:23px}.top-actions .date,.top-actions .pill{display:none}.cards{gap:9px}.card{padding:15px}.value{font-size:21px}.hero{padding:20px;display:block}.hero h2{font-size:22px}.hero button{margin-top:18px}.form-row{grid-template-columns:1fr}.auth-layout{grid-template-columns:1fr;padding:22px}.auth-brand h1{font-size:30px}.auth-brand h2{font-size:23px}.auth-card{padding:24px}}

/* CTNPOS Enterprise v4 */
.business-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(260px,1fr);gap:20px}.business-form{display:grid;gap:14px}.business-form label,#logo-form label{display:grid;gap:8px}.business-form textarea{min-height:90px;padding:12px;border-radius:12px;background:var(--surface,#18243a);color:inherit;border:1px solid #526078}.business-logo{max-width:200px;max-height:160px;object-fit:contain;margin:16px 0;border-radius:14px}.logo-placeholder{height:145px;display:grid;place-items:center;border:2px dashed #718096;border-radius:16px;margin:16px 0;font-weight:800;letter-spacing:.3em}.status.cancelled{color:#ef9b9b;background:rgba(239,68,68,.12)}.data-table button{margin:3px}.panel{overflow-wrap:anywhere}@media(max-width:850px){.business-layout{grid-template-columns:1fr}}

/* CTNPOS Ultra visual system */
:root{--bg:#080d1c;--panel:#121b30;--panel2:#1b2944;--line:#263857;--blue:#4478ff;--accent:#5b4cf6;--shadow:0 16px 48px #03091b55}body{background:radial-gradient(ellipse at 90% -20%,#1d286344,transparent 50%),var(--bg)}.sidebar{width:272px;background:linear-gradient(180deg,#0d1428,#0a1122);padding:24px 13px}.brand{padding:4px 10px 28px}.brand-logo-image{width:100%;max-width:213px;height:72px;object-fit:contain;object-position:left center}.auth-logo-image{display:block;width:min(100%,460px);height:auto;object-fit:contain;margin-bottom:30px}.auth-brand h2{font-size:clamp(26px,3vw,46px)}.nav{border:1px solid transparent;border-radius:12px;padding:13px 14px}.nav.active{background:linear-gradient(105deg,#2752ce55,#4433c755);border-color:#5678fc55;box-shadow:inset 3px 0 #648cff;color:#fff}.nav:hover{background:#202f4b;color:#fff}.main{padding-top:37px}.topbar{padding-bottom:19px;border-bottom:1px solid var(--line)}.topbar h1{font-size:32px;font-weight:800}.card,.panel,.product-tile,.table-tile{border:1px solid #34456588;background:linear-gradient(155deg,var(--panel),#111b30);box-shadow:0 14px 35px #00000020}.card{position:relative;overflow:hidden}.card:after{content:'';position:absolute;right:-40px;top:-45px;width:115px;height:115px;border-radius:50%;background:#527aff12}.value{color:#f3f7ff;font-size:30px}.primary{background:linear-gradient(110deg,#2872f4,#5944f5);box-shadow:0 8px 24px #305ef244}.hero{border-radius:23px;background:radial-gradient(circle at 87% 20%,#4f52ef55,transparent 37%),linear-gradient(110deg,#1d3262,#182342);border:1px solid #5a77ee55}.product-tile:hover,.table-tile:hover{box-shadow:0 14px 32px #2c4aff24}.auth-layout{background:radial-gradient(circle at 15% 25%,#223d8544,transparent 42%),#080d1c}.auth-card{border:1px solid #344a72}.sidebar-bottom .profile{background:#17243b;border-radius:12px}.data-table tr:hover td{background:#ffffff05} :root[data-theme=light] .value{color:#16233b}:root[data-theme=light] .card,:root[data-theme=light] .panel,:root[data-theme=light] .product-tile,:root[data-theme=light] .table-tile{background:#fff}:root[data-theme=light] .sidebar{background:#fff}:root[data-theme=light] .nav:hover{color:#17233a;background:#eef2ff}@media(max-width:1050px){.sidebar{width:78px}.brand-logo-image{width:50px;height:43px;object-fit:cover;object-position:left}.sidebar .brand{padding:0 0 22px}.sidebar .nav span{display:none}}@media(max-width:650px){.sidebar{width:100%;height:auto}.brand-logo-image{width:72px;height:45px;object-fit:cover}.main{padding:16px}.topbar h1{font-size:25px}}

/* v5.1: compact sidebar branding, no overlay or layout expansion */
.sidebar .brand{height:66px;min-height:66px;padding:5px 10px 14px;overflow:hidden;flex:0 0 auto;max-width:100%}
.sidebar .brand-logo-image{display:block;width:136px!important;max-width:100%!important;height:44px!important;max-height:44px!important;object-fit:contain!important;object-position:left center!important;flex:none}
@media(max-width:1050px){.sidebar .brand{height:56px;min-height:56px;padding:4px 3px 12px;justify-content:center}.sidebar .brand-logo-image{width:48px!important;height:34px!important;object-fit:contain!important;object-position:left center!important}}
@media(max-width:650px){.sidebar .brand{height:46px;min-height:46px;min-width:86px;padding:2px 7px 2px 0;justify-content:flex-start}.sidebar .brand-logo-image{width:82px!important;height:32px!important;object-fit:contain!important}}

/* CTNPOS v5.2: independently scrollable, accessible sidebar */
@media (min-width:651px){
 .sidebar{overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#4c6087 transparent;min-height:0;}
 .sidebar::-webkit-scrollbar{width:7px}
 .sidebar::-webkit-scrollbar-thumb{background:#425679;border-radius:10px}
 .sidebar .brand{flex-shrink:0}
 .sidebar .nav,.sidebar .nav-label{flex-shrink:0}
 .sidebar-bottom{flex-shrink:0}
}
@media(max-width:650px){.sidebar{overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain}.sidebar .brand{flex-shrink:0}}

/* CTNPOS Studio v6: original premium operations UI inspired by supplied layout */
:root{--bg:#f5f7fb;--panel:#fff;--panel2:#f3f5fa;--line:#e7eaf1;--text:#1d2639;--muted:#7c879c;--blue:#615df5;--accent:#6366f1;--green:#10b981;--shadow:0 12px 40px #1e2b4b0d;color-scheme:light}
:root[data-theme=dark]{--bg:#0d1322;--panel:#151e30;--panel2:#1d2940;--line:#293650;--text:#eff3ff;--muted:#a2aec5;--blue:#7776ff;--accent:#6768f6;--green:#34d399;color-scheme:dark}
body{background:var(--bg);color:var(--text)}.app{min-height:100vh}.sidebar{background:var(--panel);border-color:var(--line);padding:15px 11px;width:256px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#a7adc4 transparent;box-shadow:4px 0 24px #19243a06}.sidebar .brand{height:72px;min-height:72px;padding:8px 8px 17px;justify-content:flex-start;overflow:hidden}.sidebar .brand-logo-image{width:175px!important;height:51px!important;max-width:100%!important;object-fit:contain!important;object-position:left center!important}.side-workspace{display:flex;gap:10px;align-items:center;border:1px solid var(--line);background:var(--panel2);padding:12px;border-radius:13px;margin:0 5px 12px}.workspace-dot{color:#20bd85}.side-workspace strong,.side-workspace small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:170px}.side-workspace small{font-size:10px;color:var(--muted);margin-top:3px}.sidebar .nav-label{color:var(--muted);padding:16px 12px 8px;letter-spacing:1.2px}.sidebar-links{flex:1}.sidebar .nav{padding:11px 12px;border-radius:10px;color:var(--muted);gap:11px;font-size:13px;margin-bottom:3px}.sidebar .nav:hover{background:var(--panel2);color:var(--text)}.sidebar .nav.active{background:#eeedff;color:#5654df;box-shadow:none}.nav-symbol{width:22px;font-size:18px;text-align:center}.sidebar-bottom{margin-top:16px}.sidebar .profile{border-color:var(--line)}.sidebar .logout{color:var(--muted)}.main{padding:0 28px 24px;max-width:none;background:var(--bg)}.topbar{height:82px;padding:0 3px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center;gap:12px}.topbar-brand{display:flex;align-items:center;gap:14px;min-width:0}.topbar-logo img{width:124px;height:42px;object-fit:contain}.topbar-divider{height:30px;width:1px;background:var(--line)}.topbar-caption strong,.topbar-caption small{display:block;white-space:nowrap}.topbar-caption strong{font-size:15px}.topbar-caption small{font-size:10px;color:var(--muted);margin-top:3px}.top-actions{display:flex;align-items:center;gap:9px}.top-actions button,.icon-action{border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:12px;padding:11px 15px;font-weight:700;white-space:nowrap}.top-actions .quick-pos{background:#efefff;color:#5552e6;border-color:#e3e2ff}.top-actions .open-launcher{background:#615df5;color:white;border-color:#615df5;box-shadow:0 7px 18px #615df52a}.top-actions .date{font-size:12px;color:var(--muted)}.workspace-banner{display:flex;align-items:center;gap:12px;background:var(--panel);border:1px solid var(--line);border-radius:15px;margin:20px 0;padding:15px 18px;color:var(--muted)}.workspace-banner button{margin-left:auto;border:0;background:#f0efff;color:#5e5ce6;border-radius:9px;padding:9px 13px;font-weight:700;cursor:pointer}.workspace-status{color:#10a77a;font-weight:800}.app-footer{display:flex;justify-content:space-between;color:var(--muted);font-size:11px;padding:28px 2px}.panel,.stat,.card{border-color:var(--line);box-shadow:var(--shadow)}.launcher-open{overflow:hidden}.launcher-overlay[hidden]{display:none!important}.launcher-overlay{position:fixed;inset:0;z-index:9999;background:#090e1e91;display:flex;align-items:center;justify-content:center;padding:22px;backdrop-filter:blur(5px)}.launcher-panel{width:min(1220px,100%);height:min(820px,95vh);display:flex;flex-direction:column;background:var(--panel);border-radius:23px;overflow:hidden;box-shadow:0 25px 90px #05081755;color:var(--text)}.launcher-top{display:flex;align-items:flex-start;justify-content:space-between;padding:26px 30px 15px;gap:20px}.launcher-eyebrow{font-size:11px;color:#6c68e8;font-weight:800;letter-spacing:1.4px}.launcher-top h2{font-size:26px;margin:6px 0}.launcher-top p{margin:0;color:var(--muted)}.launcher-close{border:1px solid var(--line);background:var(--panel2);border-radius:11px;padding:12px 18px;color:var(--text);font-weight:700}.launcher-search{margin:5px 30px 18px;border:1px solid #b9b7ff;border-radius:13px;display:flex;align-items:center;gap:12px;padding:11px 16px;box-shadow:0 0 0 3px #6a65ff0e}.launcher-search span{font-size:24px;color:var(--muted)}.launcher-search input{flex:1;min-width:0;border:0;outline:none;background:transparent;color:var(--text);font-size:15px}.launcher-search kbd{background:var(--panel2);border:1px solid var(--line);border-radius:6px;padding:3px 7px;color:var(--muted)}.launcher-body{display:grid;grid-template-columns:225px 1fr;min-height:0;flex:1;border-top:1px solid var(--line)}.launcher-categories{background:var(--panel2);padding:20px 12px;overflow:auto}.launcher-group-title{font-size:10px;font-weight:800;letter-spacing:1.5px;color:var(--muted);padding:12px}.launcher-categories button{display:block;width:100%;text-align:left;padding:14px 12px;border:0;background:transparent;border-radius:11px;color:var(--muted);font-weight:700}.launcher-categories button:hover,.launcher-categories button.selected{background:#e9e8ff;color:#5752df}.launcher-results{padding:12px 25px 35px;overflow:auto}.launcher-section{margin-bottom:20px}.launcher-section[hidden],.launcher-card[hidden]{display:none!important}.launcher-section h3{font-size:11px;letter-spacing:1.4px;color:var(--muted);margin:18px 0 12px}.launcher-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.launcher-card{min-height:138px;display:flex;align-items:flex-start;flex-direction:column;gap:12px;text-align:left;border:1px solid var(--line);border-radius:16px;background:var(--panel);color:var(--text);padding:17px;position:relative;transition:transform .15s,border-color .15s,box-shadow .15s}.launcher-card:hover{transform:translateY(-2px);border-color:#9893ff;box-shadow:0 10px 25px #5b5be719}.launcher-icon{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#eeedff;color:#615df5;font-size:23px}.launcher-info strong,.launcher-info small{display:block}.launcher-info strong{font-size:14px}.launcher-info small{color:var(--muted);margin-top:6px;font-size:11px;line-height:1.4}.launcher-star{position:absolute;right:14px;top:12px;font-size:19px;color:#a5aabc}.launcher-star.is-favorite{color:#e7aa20}.sidebar-collapsed .sidebar{width:86px}.sidebar-collapsed .sidebar .nav span:not(.nav-symbol),.sidebar-collapsed .side-workspace,.sidebar-collapsed .nav-label,.sidebar-collapsed .profile,.sidebar-collapsed .logout{display:none}.sidebar-collapsed .sidebar .brand-logo-image{width:58px!important;object-fit:cover!important;object-position:left!important}.sidebar-collapsed .sidebar .nav{justify-content:center}.sidebar-collapsed .sidebar .nav-symbol{font-size:21px}
:root[data-theme=dark] .sidebar .nav.active,:root[data-theme=dark] .launcher-categories button.selected,:root[data-theme=dark] .launcher-categories button:hover{background:#34315b;color:#c8c6ff}:root[data-theme=dark] .workspace-banner button,:root[data-theme=dark] .top-actions .quick-pos,:root[data-theme=dark] .launcher-icon{background:#34315b;color:#c8c6ff}
@media(max-width:1050px){.sidebar{width:220px}.sidebar .brand-logo-image{width:155px!important}.main{padding:0 17px 20px}.topbar-logo{display:none}.launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.top-actions .date{display:none}}
@media(max-width:650px){.app{display:block}.sidebar{width:100%;height:auto;max-height:115px;position:relative;overflow-x:auto;overflow-y:hidden;padding:8px}.sidebar .brand,.side-workspace,.sidebar .nav-label,.sidebar-bottom{display:none}.sidebar-links{display:flex;gap:5px;width:max-content}.sidebar .nav{width:auto;white-space:nowrap}.sidebar .nav span{display:inline}.sidebar .nav-symbol{display:inline}.main{padding:0 12px 20px}.topbar{height:68px}.topbar-caption small,.top-actions .theme-toggle span,.top-actions .quick-pos,.workspace-banner>span:not(.workspace-status){display:none}.top-actions button{padding:9px}.workspace-banner{margin:12px 0}.launcher-overlay{padding:0}.launcher-panel{width:100%;height:100dvh;border-radius:0}.launcher-top{padding:17px}.launcher-top h2{font-size:20px}.launcher-search{margin:5px 17px 12px}.launcher-body{display:block}.launcher-categories{display:flex;overflow-x:auto;padding:8px;gap:5px}.launcher-categories .launcher-group-title{display:none}.launcher-categories button{white-space:nowrap;width:auto;padding:10px}.launcher-results{height:100%;padding:10px 15px 120px}.launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.launcher-card{padding:12px;min-height:130px}.app-footer span{display:none}}

/* CTNPOS Studio 6.1 — light, refined operating console */
:root[data-theme="light"]{--bg:#f7f8fc;--panel:#fff;--border:#e7e9f2;--text:#172033;--muted:#8790a4}
:root[data-theme="light"] .sidebar{background:#fff!important;border-right:1px solid #e9ebf2!important}
:root[data-theme="light"] .topbar{background:#fff!important;border-bottom:1px solid #eceef4!important}
:root[data-theme="light"] .nav{border-radius:13px!important}
:root[data-theme="light"] .nav.active{background:#ecebff!important;color:#514de5!important}
:root[data-theme="light"] .panel,:root[data-theme="light"] .card{background:#fff!important;border:1px solid #e8eaf2!important;border-radius:18px!important;box-shadow:0 4px 22px rgba(24,31,65,.035)!important}
:root[data-theme="light"] .launcher-panel{background:#fff!important}
:root[data-theme="light"] .launcher-card{border-radius:18px!important;box-shadow:0 5px 20px rgba(22,30,75,.035)!important}
.brand-logo-image{max-width:138px!important;max-height:44px!important;object-fit:contain!important}
.sidebar-links{overflow-y:auto;min-height:0;scrollbar-width:thin}
.sidebar{overflow-y:auto;scrollbar-width:thin}
[hidden]{display:none!important}


/* CTNPOS Studio 7.0 — cohesive light-first interface with responsive dark theme */
:root{color-scheme:light;--bg:#f7f8fc;--panel:#fff;--panel2:#f4f6fb;--line:#e7e9f1;--text:#1b2135;--muted:#788398;--blue:#625cf4;--accent:#625cf4;--green:#14b981;--shadow:0 10px 32px rgba(31,39,76,.055)}
body{background:var(--bg);color:var(--text);font-family:Inter,'DM Sans',system-ui,sans-serif}button,input,select,textarea{font-family:inherit}
.sidebar{background:#fff;border-color:var(--line);box-shadow:2px 0 20px #202b4405;padding:18px 12px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:#d8dbea transparent;z-index:5}
.brand{padding:8px 12px 20px}.brand-logo-image{width:148px!important;height:43px!important;object-fit:contain!important;object-position:left center!important;max-width:100%!important}
.sidebar-links{overflow:visible!important;flex:initial!important}.side-workspace{background:#f6f7fc;border:1px solid #e9ebf3;border-radius:15px;padding:13px;margin:0 4px 15px}.nav-label{color:#98a0b0;font-size:10px;letter-spacing:1.4px}.nav{color:#596579;border-radius:11px;margin:2px 0;padding:12px 13px;font-weight:650}.nav:hover{background:#f4f3ff;color:#514ce6}.nav.active{background:#eeedff;color:#554eea}.nav-symbol{background:#f1f2fa;color:#655ff0;border-radius:10px;display:inline-grid;place-items:center;width:32px;height:32px;flex:none}.nav.active .nav-symbol{background:#625cf4;color:#fff}
.sidebar-bottom{background:#fff;border-top:1px solid var(--line);margin-top:16px;padding-top:14px}.main{background:#f8f9fc;min-width:0}.topbar{background:#fff;border-bottom:1px solid var(--line);box-shadow:none;position:sticky;top:0;z-index:4}.topbar-logo img{max-height:28px!important;max-width:120px!important;object-fit:contain}.topbar-caption small{color:#9299a8}.top-actions button{border-radius:12px}.open-launcher,.quick-pos{background:#625cf4!important;color:white!important;border-color:#625cf4!important}.theme-toggle,.icon-action{background:#f6f7fa!important;color:#414c62!important;border:1px solid #e8eaf2!important}
.workspace-banner{background:#fff;border:1px solid var(--line);border-radius:15px;color:#626c80;box-shadow:var(--shadow)}.workspace-status{color:#10a977!important}.hero{background:linear-gradient(110deg,#f0efff 0%,#fff 72%)!important;border:1px solid #e6e5fc!important;border-radius:20px!important;box-shadow:none!important;color:#20263a!important}.hero h2{color:#20263a!important}.hero p,.hero .eyebrow{color:#6e74a0!important}
.panel,.card,.product-tile,.table-tile{background:#fff!important;color:#20263a!important;border:1px solid #e8eaf2!important;border-radius:17px!important;box-shadow:var(--shadow)!important}.panel h3,.card strong{color:#20263a}.muted{color:#7b8496!important}.value{color:#252b42!important}.primary{background:#625cf4!important;border-color:#625cf4!important;color:#fff!important;border-radius:11px!important}.secondary{background:#f5f6fb!important;color:#434e64!important;border:1px solid #e7e9f1!important;border-radius:11px!important}.data-table th{background:#f7f8fc;color:#818a9d}.data-table td{border-color:#edf0f6;color:#364258}.data-table tr:hover td{background:#fafaff}
input,select,textarea{background:#fff;color:#20283a;border:1px solid #dfe3ee;border-radius:10px;padding:11px 12px;max-width:100%}input:focus,select:focus,textarea:focus{outline:3px solid #625cf426;border-color:#625cf4}
.launcher-overlay{background:#10162a77;backdrop-filter:blur(7px)}.launcher-panel{background:#f8f9fc;color:#20263a;border:1px solid #e7eaf4;box-shadow:0 24px 100px #10162a3b}.launcher-top,.launcher-search{background:#fff}.launcher-card{background:#fff;color:#22283c;border:1px solid #e7e9f2;border-radius:17px;box-shadow:0 4px 20px #1b2c5108}.launcher-card:hover{border-color:#8d87ff;box-shadow:0 12px 30px #5c57e522;transform:translateY(-2px)}.launcher-categories{background:#f5f6fb}.launcher-categories button.selected{background:#eae9ff;color:#5952df}.launcher-icon{background:#ecebff;color:#625cf4;border-radius:13px}.launcher-info small{color:#8490a3}.launcher-section h3,.launcher-group-title{color:#8992a3}
.ctn-dialog-open{overflow:hidden}.ctn-modal-backdrop{position:fixed;inset:0;z-index:9999;display:grid;place-items:center;background:#11192c9c;backdrop-filter:blur(6px);padding:18px;animation:ctn-fade .16s ease}.ctn-modal{width:min(100%,520px);max-height:min(90vh,850px);overflow:auto;background:#fff;color:#1e2639;border-radius:23px;box-shadow:0 30px 100px #060b1c55;border:1px solid #f1f1f6;animation:ctn-pop .2s ease}.ctn-modal-head{padding:28px 30px 14px;display:flex;justify-content:space-between;align-items:start;gap:16px}.ctn-modal-kicker{font-size:10px;font-weight:800;letter-spacing:1.7px;color:#625cf4}.ctn-modal-head h2{margin:8px 0;font-size:23px;letter-spacing:-.7px}.ctn-modal-head p{margin:0;color:#80899b;line-height:1.5;white-space:pre-line;overflow-wrap:anywhere}.ctn-close{background:#f3f4f8;border:0;border-radius:11px;font-size:24px;color:#7a8294;width:36px;height:36px;flex:none}.ctn-modal-fields{padding:12px 30px 22px;display:grid;gap:16px}.ctn-field{display:grid;gap:8px;font-size:13px;font-weight:700;color:#434c62}.ctn-field input,.ctn-field select,.ctn-field textarea{width:100%;font-weight:500;font-size:14px}.ctn-modal-actions{padding:19px 30px 26px;border-top:1px solid #eef0f5;display:flex;justify-content:flex-end;gap:10px}.ctn-modal-actions button{padding:12px 19px;border-radius:11px;font-weight:700;border:1px solid #e6e8f0}.ctn-cancel{background:#f6f7fb;color:#556078}.ctn-save{background:#625cf4;color:#fff;border-color:#625cf4!important}.ctn-save.ctn-danger{background:#e34756;border-color:#e34756!important}@keyframes ctn-fade{from{opacity:0}to{opacity:1}}@keyframes ctn-pop{from{transform:translateY(12px) scale(.985)}to{transform:translateY(0) scale(1)}}
body.dark,body[data-theme="dark"]{color-scheme:dark;--bg:#0d1425;--panel:#172238;--panel2:#202c44;--line:#2c3950;--text:#eaf0ff;--muted:#a3b0c8;background:#0d1425;color:#eaf0ff}
body.dark .sidebar,body.dark .topbar,body.dark .panel,body.dark .card,body.dark .product-tile,body.dark .table-tile,body.dark .workspace-banner,body.dark .sidebar-bottom,body.dark .launcher-top,body.dark .launcher-search,body.dark .launcher-card,body.dark .ctn-modal,body[data-theme="dark"] .sidebar,body[data-theme="dark"] .topbar,body[data-theme="dark"] .panel,body[data-theme="dark"] .card,body[data-theme="dark"] .product-tile,body[data-theme="dark"] .table-tile,body[data-theme="dark"] .ctn-modal{background:#172238!important;color:#eaf0ff!important;border-color:#2c3950!important}
body.dark .main,body[data-theme="dark"] .main{background:#0d1425}body.dark .hero,body[data-theme="dark"] .hero{background:linear-gradient(110deg,#242d55,#172238)!important;color:#f1f4ff!important;border-color:#343f65!important}body.dark .hero h2,body.dark .panel h3,body.dark .value,body.dark .card strong,body[data-theme="dark"] .hero h2,body[data-theme="dark"] .panel h3{color:#f1f4ff!important}body.dark .nav{color:#b6c1d4}body.dark .nav.active{background:#302f60;color:#e7e5ff}body.dark input,body.dark select,body.dark textarea,body.dark .ctn-close,body[data-theme="dark"] input,body[data-theme="dark"] select,body[data-theme="dark"] textarea{background:#202c44;color:#f1f4ff;border-color:#36455d}body.dark .ctn-modal-head h2,body.dark .ctn-field{color:#f1f4ff}
@media(max-width:900px){.sidebar{max-height:100vh}.ctn-modal{max-height:90dvh}.ctn-modal-head{padding:22px 20px 10px}.ctn-modal-fields{padding:10px 20px 18px}.ctn-modal-actions{padding:16px 20px 22px}.topbar-logo{display:none}}

html[data-theme="dark"]{color-scheme:dark;--bg:#0d1425;--panel:#172238;--panel2:#202c44;--line:#2c3950;--text:#eaf0ff;--muted:#a3b0c8}html[data-theme="dark"] body{background:#0d1425;color:#eaf0ff}html[data-theme="dark"] .main{background:#0d1425}html[data-theme="dark"] .sidebar,html[data-theme="dark"] .topbar,html[data-theme="dark"] .panel,html[data-theme="dark"] .card,html[data-theme="dark"] .product-tile,html[data-theme="dark"] .table-tile,html[data-theme="dark"] .workspace-banner,html[data-theme="dark"] .ctn-modal,html[data-theme="dark"] .launcher-card{background:#172238!important;color:#eaf0ff!important;border-color:#2c3950!important}html[data-theme="dark"] .hero{background:linear-gradient(110deg,#242d55,#172238)!important}html[data-theme="dark"] .hero h2,html[data-theme="dark"] .panel h3,html[data-theme="dark"] .value,html[data-theme="dark"] .ctn-modal-head h2,html[data-theme="dark"] .ctn-field{color:#f1f4ff!important}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#202c44;color:#f1f4ff;border-color:#36455d}


/* CTNPOS ATELIER 7.1 — authoritative semantic themes. No mixed light/dark surfaces. */
html,html[data-theme="light"]{color-scheme:light;--bg:#f5f7fc;--panel:#ffffff;--panel2:#f5f7fc;--line:#e5eaf3;--text:#17233b;--muted:#66758e;--blue:#5858e9;--accent:#5858e9;--green:#087e58;--shadow:0 5px 24px rgba(22,35,67,.045);--sidebar-bg:#ffffff;--header-bg:#ffffff;--soft:#f1f3fb;--soft-text:#33435e;--row-hover:#f7f8ff;--accent-soft:#ececff;--accent-ink:#4745ce;--table-head:#f3f5fa;--border-strong:#d6ddeb;--danger-bg:#fff1f1;--danger-ink:#b52d3c}
html[data-theme="dark"]{color-scheme:dark;--bg:#0e1424;--panel:#182238;--panel2:#222e47;--line:#34415a;--text:#edf2ff;--muted:#b2bfd4;--blue:#a29bff;--accent:#a29bff;--green:#58e1ad;--shadow:0 9px 28px rgba(0,0,0,.16);--sidebar-bg:#141e31;--header-bg:#182238;--soft:#25324b;--soft-text:#e5ecfc;--row-hover:#23314b;--accent-soft:#302e60;--accent-ink:#d1ccff;--table-head:#222e47;--border-strong:#485976;--danger-bg:#4a2635;--danger-ink:#ffc2ca}
html body{background:var(--bg)!important;color:var(--text)!important;font-family:'DM Sans',Inter,system-ui,sans-serif;line-height:1.5}
html .app{background:var(--bg)!important;align-items:stretch}
html .sidebar{background:var(--sidebar-bg)!important;color:var(--text)!important;border-right:1px solid var(--line)!important;box-shadow:none!important;width:266px;padding:19px 12px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:var(--border-strong) transparent}
html .sidebar .brand{padding:7px 14px 21px}
html .brand-logo-image{width:144px!important;height:43px!important;max-width:144px!important;max-height:43px!important;object-fit:contain!important;object-position:left center!important}
html .side-workspace{background:var(--soft)!important;border:1px solid var(--line)!important;color:var(--text)!important;border-radius:14px;padding:12px 13px;margin:0 4px 15px}
html .side-workspace strong,html .profile strong{color:var(--text)!important}
html .side-workspace small,html .profile small{color:var(--muted)!important}
html .nav-label{color:var(--muted)!important;letter-spacing:1.15px;font-size:10px}
html .sidebar-links{overflow:visible!important;min-height:unset!important;flex:initial!important}
html .nav{color:var(--soft-text)!important;border:1px solid transparent!important;background:transparent!important;border-radius:12px;padding:11px 12px;min-height:48px;box-shadow:none!important;font-size:13px;letter-spacing:0}
html .nav:hover{background:var(--soft)!important;color:var(--text)!important}
html .nav.active{background:var(--accent-soft)!important;color:var(--accent-ink)!important;border-color:transparent!important}
html .nav-symbol{background:var(--soft)!important;color:var(--accent-ink)!important;border-radius:9px;min-width:32px;width:32px;height:32px}
html .nav.active .nav-symbol{background:#625cf4!important;color:white!important}
html .sidebar-bottom{background:var(--sidebar-bg)!important;border-top:1px solid var(--line)!important;color:var(--text)!important}
html .avatar{background:var(--accent-soft)!important;color:var(--accent-ink)!important}
html .logout{color:var(--muted)!important}
html .main{background:var(--bg)!important;max-width:none!important;padding:0 26px 36px!important;margin:0!important}
html .topbar{background:var(--header-bg)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-top:0!important;border-radius:0 0 17px 17px!important;box-shadow:none!important;min-height:76px;height:auto;padding:12px 20px!important;margin-bottom:22px!important}
html .topbar-caption strong{color:var(--text)!important;font-size:15px}
html .topbar-caption small,html .date{color:var(--muted)!important}
html .topbar-logo img{width:95px;max-height:26px;object-fit:contain}
html .topbar-divider{background:var(--line)!important}
html .theme-toggle,html .icon-action{background:var(--soft)!important;color:var(--soft-text)!important;border:1px solid var(--line)!important;box-shadow:none!important}
html .quick-pos,html .open-launcher{background:#5957e9!important;color:white!important;border:1px solid #5957e9!important;box-shadow:0 4px 12px rgba(89,87,233,.14)!important}
html .workspace-banner{background:var(--panel)!important;color:var(--soft-text)!important;border:1px solid var(--line)!important;border-radius:15px!important;box-shadow:none!important;margin:0 0 22px!important;padding:13px 18px!important}
html .workspace-banner button{background:var(--accent-soft)!important;color:var(--accent-ink)!important}
html .workspace-status{color:var(--green)!important}
html .hero{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:19px!important;box-shadow:var(--shadow)!important;padding:24px 27px!important}
html .hero h2{color:var(--text)!important;font-size:23px!important;line-height:1.3}
html .hero p,html .hero .eyebrow{color:var(--muted)!important}
html .cards{gap:14px!important;margin-bottom:25px}
html .card,html .panel,html .product-tile,html .table-tile{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:17px!important;box-shadow:var(--shadow)!important}
html .card{padding:23px!important;min-height:139px}
html .card .muted,html .muted,html .panel .muted{color:var(--muted)!important}
html .value{color:var(--text)!important;font-size:29px!important;line-height:1.2;overflow-wrap:anywhere}
html .panel h3,html .card strong,html .product-tile strong,html .section-title h2{color:var(--text)!important}
html .panel{padding:20px!important;overflow-x:auto!important;overflow-y:visible!important}
html .data-table{color:var(--text)!important;min-width:760px;border-collapse:separate;border-spacing:0}
html .data-table thead th{background:var(--table-head)!important;color:var(--soft-text)!important;font-size:11px!important;font-weight:800!important;letter-spacing:.55px!important;border-bottom:1px solid var(--line)!important;padding:14px 15px!important}
html .data-table tbody td{color:var(--text)!important;border-bottom:1px solid var(--line)!important;padding:15px!important;font-size:12px!important;vertical-align:middle;line-height:1.65}
html .data-table tbody tr:hover td{background:var(--row-hover)!important}
html .data-table tbody tr:last-child td{border-bottom:0!important}
html .data-table .link{color:var(--accent-ink)!important;font-weight:800!important}
html .data-table button.secondary{background:var(--soft)!important;color:var(--soft-text)!important;border:1px solid var(--line)!important;padding:8px 11px!important;font-size:11px!important;white-space:nowrap;margin:3px 4px 3px 0!important;box-shadow:none!important}
html .data-table button.secondary:hover{background:var(--accent-soft)!important;color:var(--accent-ink)!important;border-color:var(--accent)!important}
html .status{background:var(--soft)!important;color:var(--soft-text)!important;font-weight:700!important}
html .status.paid{background:color-mix(in srgb,var(--green) 14%,var(--panel))!important;color:var(--green)!important}
html .status.cancelled{background:var(--danger-bg)!important;color:var(--danger-ink)!important}
html .primary{background:#5957e9!important;color:#fff!important;border:1px solid #5957e9!important;box-shadow:none!important}
html .secondary{background:var(--soft)!important;color:var(--soft-text)!important;border:1px solid var(--line)!important;box-shadow:none!important}
html .product-tile .price{color:var(--accent-ink)!important}
html .table-tile small{color:var(--green)!important}
html .table-tile.busy{background:var(--danger-bg)!important;border-color:var(--line)!important}
html .table-tile.busy small{color:var(--danger-ink)!important}
html label,html .ctn-field{color:var(--soft-text)!important}
html input,html select,html textarea{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--border-strong)!important}
html input::placeholder,html textarea::placeholder{color:var(--muted)!important;opacity:1}
html input:focus,html select:focus,html textarea:focus{outline:3px solid color-mix(in srgb,var(--accent) 18%,transparent)!important;border-color:var(--accent)!important}
html .launcher-panel,html .launcher-top,html .launcher-search,html .launcher-card,html .ctn-modal{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
html .launcher-results{background:var(--bg)!important}
html .launcher-categories{background:var(--soft)!important;color:var(--soft-text)!important}
html .launcher-categories button{color:var(--soft-text)!important}
html .launcher-categories button.selected{background:var(--accent-soft)!important;color:var(--accent-ink)!important}
html .launcher-info strong,html .launcher-top h2,html .ctn-modal-head h2{color:var(--text)!important}
html .launcher-info small,html .launcher-top p,html .ctn-modal-head p{color:var(--muted)!important}
html .launcher-section h3,html .launcher-group-title{color:var(--muted)!important}
html .launcher-icon{background:var(--accent-soft)!important;color:var(--accent-ink)!important}
html .ctn-modal-actions{border-color:var(--line)!important}
html .ctn-cancel,html .ctn-close{background:var(--soft)!important;color:var(--soft-text)!important;border-color:var(--line)!important}
html .ctn-save{background:#5957e9!important;color:#fff!important}
html .ctn-modal-kicker{color:var(--accent-ink)!important}
html .auth-layout{background:var(--bg)!important}
html .auth-card{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line)!important}
html .auth-brand h2{color:var(--text)!important}
html .auth-brand p,html .auth-points{color:var(--muted)!important}
html .app-footer{color:var(--muted)!important}
html .toast{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--accent)!important}
html .sidebar-collapsed .sidebar{width:82px}
@media(max-width:1050px){html .sidebar{width:218px}html .main{padding:0 17px 25px!important}html .cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){html .app{display:block}html .sidebar{width:100%!important;height:auto!important;max-height:90px!important;position:relative!important;overflow-x:auto!important;overflow-y:hidden!important;padding:8px!important}html .sidebar-links{display:flex!important;gap:4px;min-width:max-content}html .sidebar .nav{width:auto!important;min-height:43px!important;white-space:nowrap}html .main{padding:0 12px 25px!important}html .topbar{min-height:66px!important;padding:9px 11px!important}html .topbar-caption small,html .topbar-logo,html .date{display:none!important}html .workspace-banner{padding:10px 12px!important}html .workspace-banner>span:not(.workspace-status){display:none!important}html .cards{gap:9px!important}html .card{padding:15px!important;min-height:118px}html .value{font-size:22px!important}html .hero{padding:18px!important}html .launcher-panel{border-radius:0!important}html .launcher-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* v9: public authentication dark theme */
body:has(.auth-layout){background:radial-gradient(ellipse at 17% 23%,#1a2a65 0%,#0c1532 39%,#070d1c 83%)!important;color:#eef2ff!important;}
body:has(.auth-layout) .auth-layout{background:transparent!important;}
body:has(.auth-layout) .auth-brand h2{color:#fff!important;}
body:has(.auth-layout) .auth-brand p,body:has(.auth-layout) .auth-points{color:#aebde0!important;}
body:has(.auth-layout) .auth-card{background:#121c35!important;border:1px solid #314164!important;box-shadow:0 22px 70px #0006!important;color:#eef2ff!important;}
body:has(.auth-layout) .auth-card h2,body:has(.auth-layout) .auth-card label{color:#f3f6ff!important;}
body:has(.auth-layout) .auth-card input{background:#0b1429!important;border:1px solid #3b4c70!important;color:#fff!important;}
body:has(.auth-layout) .auth-card .muted,body:has(.auth-layout) .switch{color:#acbad5!important;}
body:has(.auth-layout) .contact-link{color:#a9a5ff!important;font-weight:750;text-decoration:none;}
body:has(.auth-layout) .contact-link:hover{text-decoration:underline;}
