/* Portal-wide responsive layout. */
html,body{max-width:100%;overflow-x:clip}
.portal-header,.portal-menu-shell,.portal-quickbar,.workspace,.dashboard,.data-card,.form-grid,.purchase-lines,.purchase-line{min-width:0;max-width:100%}
.portal-header .portal-quickbar{margin-left:0!important}
.portal-header .portal-quickbar>div{min-width:0;max-width:100%;flex-wrap:wrap;overflow:visible}
.workspace>*,.dashboard>*,.data-card>*,.form-grid>*,.purchase-line>*{min-width:0;max-width:100%}
.workspace input,.workspace select,.workspace textarea,.workspace button{min-width:0;max-width:100%}
.workspace-title,.detail-head,.search-form,.editor-actions,.invoice-actions,.production-heading{flex-wrap:wrap}
.purchase-line.purchase-detailed{grid-template-columns:minmax(220px,2fr) repeat(3,minmax(90px,1fr))}
.data-card table{min-width:0}
.data-card th,.data-card td{overflow-wrap:anywhere}
@media(max-width:1000px){
  .purchase-line.purchase-detailed{grid-template-columns:minmax(210px,1.6fr) minmax(120px,1fr)}
  .portal-header{height:auto;min-height:82px;flex-wrap:wrap;padding-top:12px;padding-bottom:12px}
  .portal-header nav{margin-left:20px;flex-wrap:wrap}
}
@media(max-width:760px){
  .workspace,.dashboard{width:calc(100% - 24px);margin:32px auto}
  .workspace-title,.detail-head{gap:14px}
  .search-form{width:100%;flex-direction:column}
  .search-form input,.search-form select,.search-form .button{width:100%}
  .purchase-line.purchase-detailed{grid-template-columns:minmax(0,1fr)}
  .data-card{overflow:visible}
  .responsive-table,.responsive-table tbody,.responsive-table tr,.responsive-table td{display:block;width:100%}
  .responsive-table{border:0}
  .responsive-table thead{display:none}
  .responsive-table tr{margin:0 0 14px;padding:9px 12px;border:1px solid var(--line);border-radius:12px;background:#fff}
  .responsive-table td{display:grid;grid-template-columns:minmax(105px,38%) minmax(0,1fr);gap:10px;padding:8px 0;border-bottom:1px solid #edf1ef;text-align:left!important}
  .responsive-table td:last-child{border-bottom:0}
  .responsive-table td:before{content:attr(data-label);font-size:.7rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}
  .responsive-table td[colspan]{grid-template-columns:1fr}
  .responsive-table td[colspan]:before{display:none}
  .portal-quickbar>div{justify-content:flex-start}
}
@media(max-width:430px){
  .responsive-table td{grid-template-columns:1fr;gap:4px}
  .data-card{padding:13px}
  .workspace{width:calc(100% - 16px)}
}

/* Terminal matching the compact workflow of the legacy platform. */
@font-face{font-family:RanexTerminalIcons;src:url("../fonts/fontawesome-webfont-oCXdUj9.woff2") format('woff2');font-weight:400;font-style:normal;font-display:block}
.legacy-pos-header [class^="icon-"],.legacy-pos [class^="icon-"],.workspace [class^="icon-"]{display:inline-block;font-family:RanexTerminalIcons!important;font-style:normal;font-weight:400;line-height:1;text-rendering:auto;-webkit-font-smoothing:antialiased}
.icon-building-o:before{content:"\f0f7"}.icon-cog:before{content:"\f013"}.icon-desktop:before{content:"\f108"}.icon-keyboard-o:before{content:"\f11c"}.icon-plus:before{content:"\f067"}.icon-ticket:before{content:"\f145"}.icon-key:before{content:"\f084"}.icon-bank:before{content:"\f19c"}.icon-address-card-o:before{content:"\f2bc"}.icon-check:before{content:"\f00c"}.icon-shopping-cart:before{content:"\f07a"}.icon-refresh:before{content:"\f021"}.icon-times:before{content:"\f00d"}.icon-print:before{content:"\f02f"}.icon-filter:before{content:"\f0b0"}
.visually-hidden{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
.legacy-pos-header{position:relative;z-index:30;height:62px;display:flex;align-items:center;padding:0 24px;background:#29ad86;color:#fff;box-shadow:0 1px 0 rgba(0,0,0,.08)}
.legacy-pos-location{min-width:0;display:flex;align-items:center;gap:9px;color:#fff;text-decoration:none;font-size:.95rem;font-weight:750;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.legacy-pos-location i{font-size:1rem}
.legacy-pos-header nav{height:100%;margin-left:auto;display:flex;gap:0}
.legacy-pos-header nav a{width:50px;height:100%;display:grid;place-items:center;color:#fff;text-decoration:none;font-size:1.25rem;border-left:1px solid rgba(255,255,255,.1)}
.legacy-pos-header nav a:hover,.legacy-pos-header nav a.active{background:rgba(0,72,56,.2)}
.legacy-pos{width:100%;min-height:calc(100vh - 62px);padding:14px 16px 72px;background:#fff;color:#252525}
.legacy-pos-toolbar{width:100%;display:grid;grid-template-columns:minmax(430px,1.55fr) minmax(300px,.9fr) 116px;gap:28px;align-items:center;padding:0 0 38px;border-bottom:1px solid #ddd}
.legacy-pos-client-group{min-width:0;display:grid;grid-template-columns:minmax(160px,1fr) auto;align-items:center}
.legacy-pos .pos-client-search{min-width:0;margin:0}
.legacy-pos .pos-client-search select,.legacy-pos-coupon input{width:100%;height:48px;min-width:0;padding:0 13px;border:1px solid #d4d4d4;border-radius:0;background:#fff;color:#333;font:inherit}
.legacy-icon-actions,.legacy-pos-order-actions{display:flex;align-items:center}
.legacy-icon-actions a,.legacy-pos-order-actions a,.legacy-pos-coupon button,.legacy-pos-coupon a{width:52px;height:48px;flex:0 0 52px;display:grid;place-items:center;border:1px solid #d4d4d4;border-left:0;border-radius:0;background:#fff;color:#5f6462;text-decoration:none;font-size:1.22rem;cursor:pointer}
.legacy-icon-actions a:hover,.legacy-pos-order-actions a:hover,.legacy-pos-coupon button:hover,.legacy-pos-coupon a:hover{background:#f1f4f2;color:#117258}
.legacy-icon-actions .disabled,.legacy-pos-order-actions .disabled{pointer-events:none;opacity:.35}
.legacy-pos-coupon{min-width:0;display:grid;grid-template-columns:minmax(135px,1fr) 52px 52px;margin:0}
.legacy-pos-order-actions a:first-child{border-left:1px solid #d4d4d4}
.legacy-pos-content{min-height:calc(100vh - 245px);display:flex;align-items:flex-start;justify-content:center;padding:34px 12px}
.legacy-pos-content .terminal-camera-actions{position:absolute;right:18px;top:144px;display:flex;align-items:center;gap:8px}
.legacy-pos-content .terminal-camera-actions .button,.legacy-pos-content .terminal-camera-actions .danger-button{width:38px;height:38px;padding:0;border-radius:3px;box-shadow:none;font-size:0}
.legacy-pos-content .terminal-camera-actions .button:after{content:"▣";font-size:1rem}
.legacy-pos-content .terminal-camera-actions .danger-button:after{content:"×";font-size:1rem}
.legacy-pos-content .terminal-camera{width:min(620px,100%)}
.legacy-pos-content .terminal-coupon{width:min(520px,100%)}
.legacy-pos .pos-client-summary{margin:18px 0 0}
.legacy-pos-footer{position:fixed;z-index:40;left:0;right:0;bottom:0;width:100%;max-width:none;height:56px;margin:0;padding:0;display:grid;grid-template-columns:176px minmax(0,1fr) 166px;gap:0;background:#fff;border-top:1px solid #d4d4d4;box-shadow:0 -4px 15px rgba(0,0,0,.05)}
.legacy-pos-footer a{text-decoration:none}
.legacy-pos-clear,.legacy-pos-ready{display:flex;align-items:center;justify-content:center;gap:10px;font-weight:800}
.legacy-pos-clear{color:#555;border-right:1px solid #ddd}
.legacy-pos-clear i{font-size:1.1rem}
.legacy-pos-total{display:flex;align-items:center;justify-content:flex-end;padding:0 24px;font-size:1.35rem;font-weight:750;color:#333}
.legacy-pos-ready{background:#ed8b2d;color:#fff;font-size:1rem}
.legacy-pos-ready:hover{background:#d9781c}
@media(max-width:1050px){
  .legacy-pos-toolbar{grid-template-columns:minmax(0,1fr) auto;gap:14px}
  .legacy-pos-client-group{grid-column:1/-1}
  .legacy-pos-coupon{grid-column:1}
  .legacy-pos-order-actions{grid-column:2}
}
@media(max-width:650px){
  .legacy-pos-header{height:56px;padding:0 12px}
  .legacy-pos-header nav a{width:43px;font-size:1.05rem}
  .legacy-pos-location{font-size:.82rem}
  .legacy-pos{min-height:calc(100vh - 56px);padding:10px 10px 64px}
  .legacy-pos-toolbar{gap:10px;padding-bottom:22px}
  .legacy-pos-client-group{grid-template-columns:minmax(80px,1fr) auto}
  .legacy-icon-actions a,.legacy-pos-order-actions a,.legacy-pos-coupon button,.legacy-pos-coupon a{width:44px;height:44px;flex-basis:44px;font-size:1.05rem}
  .legacy-pos .pos-client-search select,.legacy-pos-coupon input{height:44px;padding:0 8px;font-size:.82rem}
  .legacy-pos-coupon{grid-template-columns:minmax(80px,1fr) 44px 44px}
  .legacy-pos-content{min-height:calc(100vh - 215px);padding:26px 4px}
  .legacy-pos-content .terminal-camera-actions{position:absolute;right:10px;top:176px;width:auto;margin:0}
  .legacy-pos-footer{height:54px;grid-template-columns:72px minmax(0,1fr) 142px}
  .legacy-pos-clear b{display:none}
  .legacy-pos-total{padding:0 12px;font-size:1.05rem}
  .legacy-pos-ready{font-size:.9rem}
}
@media(max-width:390px){
  .legacy-pos{padding-left:6px;padding-right:6px}
  .legacy-pos-header nav a{width:38px}
  .legacy-icon-actions a,.legacy-pos-order-actions a,.legacy-pos-coupon button,.legacy-pos-coupon a{width:40px;flex-basis:40px}
  .legacy-pos-coupon{grid-template-columns:minmax(70px,1fr) 40px 40px}
  .legacy-pos-footer{grid-template-columns:62px minmax(0,1fr) 132px}
}

/* Compact, neutral visual system for the entire authenticated portal. */
.portal-header{background:#fff;color:#202725;border-bottom:1px solid #d7ddda}
.portal-identity-row{width:100%;height:56px;padding:0 22px;gap:16px}
.portal-header .portal-identity-row .brand img{width:132px}
.portal-context{padding-left:16px;color:#5d6864;font-size:.78rem}
.portal-account{gap:14px}
.portal-user,.portal-logout{font-size:.8rem}
.portal-menu-shell{background:#17634f}
.portal-nav{width:100%;min-height:44px;padding:0 16px}
.portal-nav>a,.portal-nav-group>summary{min-height:44px;padding:0 15px;font-size:.8rem!important}
.portal-nav-group>summary:after{font-size:.72rem}
.portal-dropdown{min-width:220px;padding:5px;border-radius:0;box-shadow:0 8px 18px rgba(18,48,40,.14)}
.portal-dropdown a{padding:9px 10px;border-radius:2px;font-size:.8rem}
.portal-dropdown-columns{grid-template-columns:repeat(2,minmax(180px,1fr));min-width:470px;gap:8px 14px;padding:10px}
.portal-dropdown-columns section{display:grid;align-content:start}
.portal-dropdown-columns section>b{padding:6px 10px 4px;color:#17634f;font-size:.66rem;letter-spacing:.08em;text-transform:uppercase}
.portal-nav-group:nth-of-type(4)>.portal-dropdown-columns,.portal-nav-group:nth-of-type(5)>.portal-dropdown-columns{left:auto;right:0}
.portal-quickbar{background:#f7f8f7;border-bottom:1px solid #d7ddda}
.portal-header .portal-quickbar>div{width:100%;min-height:46px;padding:0 16px;gap:0}
.portal-quickbar a{min-width:86px;height:46px;padding:5px 12px;border-right:1px solid #dde2df;color:#36423e;background:transparent}
.portal-quickbar a:first-child{border-left:1px solid #dde2df}
.portal-quickbar a:hover{background:#fff;color:#17634f}
.portal-quickbar a span{font-family:RanexTerminalIcons!important;font-style:normal;font-weight:400;font-size:0!important;line-height:1}
.portal-quickbar a span:before{font-size:1rem}
.portal-quickbar a:nth-child(1) span:before{content:"\f120"}
.portal-quickbar a:nth-child(2) span:before{content:"\f007"}
.portal-quickbar a:nth-child(3) span:before{content:"\f07a"}
.portal-quickbar a:nth-child(4) span:before{content:"\f022"}
.portal-quickbar a:nth-child(5) span:before{content:"\f0f5"}
.portal-quickbar a:nth-child(6) span:before{content:"\f145"}
.portal-quickbar a:nth-child(7) span:before{content:"\f0d6"}
.portal-quickbar a:nth-child(8) span:before{content:"\f0ec"}
.portal-quickbar a b{font-size:.67rem;line-height:1.1}

.workspace,.dashboard{width:calc(100% - 32px);max-width:1400px;margin:22px auto}
.workspace h1,.dashboard h1,.workspace h2,.dashboard h2{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;letter-spacing:-.02em}
.workspace h1{font-size:clamp(1.65rem,2.4vw,2.35rem);margin:.25rem 0}
.workspace h2,.data-card h2{font-size:1.15rem}
.workspace-title,.detail-head{margin:12px 0 16px;align-items:center}
.workspace-title p,.detail-head p{margin:3px 0 0;font-size:.86rem}
.eyebrow{font-size:.66rem;letter-spacing:.1em}
.button,.danger-button{min-height:36px;padding:9px 14px;border-radius:3px;box-shadow:none;font-size:.8rem}
.button:hover{transform:none}
.data-card{padding:16px;border-color:#d7ddda;border-radius:4px;box-shadow:none}
.detail-section{margin:12px 0}
.data-card th,.data-card td{padding:9px 8px}
.section-tabs,.status-tabs{margin-bottom:12px}
.section-tabs a,.status-tabs a{padding:7px 11px;border-radius:3px;font-size:.78rem}
.form-grid{gap:11px 14px}
.form-grid input,.form-grid select,.form-grid textarea,.stack-form input,.stack-form select,.stack-form textarea{padding:9px 10px;border-radius:3px}
.notice{margin:10px 0;padding:10px 12px;border-radius:3px;font-size:.82rem}
.sticky-actions,.order-submit{bottom:6px;margin:12px 0;padding:9px 11px;border-radius:3px;box-shadow:0 4px 12px rgba(25,59,50,.1)}

.operational-dashboard{margin-top:16px;margin-bottom:16px}
.dashboard-heading{min-height:48px;align-items:center;gap:18px}
.dashboard-heading h1{margin:2px 0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:1.55rem;line-height:1.15;letter-spacing:-.025em}
.dashboard-heading p{font-size:.78rem}
.dashboard-heading .button{padding:9px 13px}
.dashboard-metrics{gap:1px;margin:12px 0;background:#d7ddda;border:1px solid #d7ddda}
.dashboard-metrics>a{min-height:72px;padding:10px 13px;border:0;border-radius:0;background:#fff}
.dashboard-metrics strong{font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;font-size:1.45rem;line-height:1.1}
.dashboard-metrics span{margin:2px 0;font-size:.76rem}
.dashboard-metrics small{font-size:.68rem}
.operational-dashboard>.card-heading{min-height:30px;margin-top:8px;align-items:center}
.operational-dashboard>.card-heading h2{margin:1px 0;font-size:1rem}
.operational-dashboard>.card-heading a{font-size:.75rem}
.dashboard-split{grid-template-columns:minmax(0,1.7fr) minmax(360px,1fr);gap:10px;margin-top:12px}
.dashboard-split>.data-card{min-height:150px}
.dashboard-split .card-heading{align-items:center}
.dashboard-split .card-heading h2{margin:2px 0;font-size:1.05rem}
.dashboard-orders>a{padding:8px 0;font-size:.78rem}
.dashboard-orders span{margin-top:2px;font-size:.72rem}
.dashboard-actions{padding:12px;border:1px solid #d7ddda;border-radius:4px;background:#fff;color:#202725;display:grid;grid-template-columns:1fr 1fr;gap:6px}
.dashboard-actions>.eyebrow{grid-column:1/-1;color:#17634f}
.dashboard-actions>a{margin:0;padding:9px 10px;border:1px solid #e0e5e2;border-radius:3px;background:#fafbfa}
.dashboard-actions>a:hover{border-color:#aebbb5;background:#fff}
.dashboard-actions strong{font-size:.78rem}
.dashboard-actions span{margin-top:2px;color:#69736f;font-size:.68rem}
.empty-state{padding:15px;border-radius:3px;font-size:.8rem}
.dashboard-grid{gap:1px;margin-top:12px;background:#d7ddda;border:1px solid #d7ddda}
.dashboard-grid article{padding:14px;border:0;border-radius:0}

@media(max-width:850px){
  .portal-identity-row{width:100%;height:52px;padding:0 12px}
  .portal-header .portal-identity-row .brand img{width:120px}
  .portal-menu-toggle{width:100%;min-height:42px;padding:0 14px;font-size:.8rem}
  .portal-nav{padding:5px 8px 9px}
  .portal-nav>a,.portal-nav-group>summary{min-height:38px;padding:0 10px;border-radius:2px}
  .portal-dropdown-columns{grid-template-columns:1fr;min-width:0;gap:3px;padding:5px}
  .portal-dropdown-columns section>b{padding:8px 10px 3px;color:#cfe9df}
  .portal-header .portal-quickbar>div{padding:0;display:grid;grid-template-columns:repeat(4,1fr)}
  .portal-quickbar a{width:auto;min-width:0;height:43px;padding:4px;border-bottom:1px solid #dde2df}
  .workspace,.dashboard{width:calc(100% - 18px);margin:14px auto}
  .dashboard-heading{align-items:flex-start;gap:8px}
  .dashboard-heading h1{font-size:1.28rem}
  .dashboard-heading .button{align-self:flex-start}
  .dashboard-split{grid-template-columns:1fr}
}
@media(max-width:520px){
  .dashboard-metrics{grid-template-columns:1fr 1fr}
  .dashboard-metrics>a{min-height:58px;padding:7px 9px}
  .dashboard-metrics strong{font-size:1.25rem}
  .dashboard-metrics span{margin:1px 0;font-size:.7rem}
  .dashboard-metrics small{font-size:.63rem}
  .dashboard-split>.data-card{min-height:0;padding:12px}
  .dashboard-actions{padding:9px;gap:5px}
  .dashboard-actions>a{padding:7px 8px}
  .dashboard-actions{grid-template-columns:1fr 1fr}
  .dashboard-grid{grid-template-columns:1fr}
}

/* Coupon register: legacy feature parity in the clean portal style. */
.registry-actions{display:flex;align-items:center;gap:6px}.button-secondary{border:1px solid #cfd7d3;background:#fff;color:#26332f}.button-secondary:hover{background:#f3f5f4}.compact-summary{grid-template-columns:repeat(5,1fr);margin:8px 0}.compact-summary a{padding:8px 12px;background:#fff;text-decoration:none}.compact-summary strong{font-family:Inter,ui-sans-serif,system-ui;font-size:1.2rem}.compact-summary span{font-size:.68rem}.registry-filter{margin:8px 0}.registry-filter>summary{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #d7ddda;background:#f7f8f7;cursor:pointer;font-size:.76rem;font-weight:750;list-style:none}.registry-filter>summary::-webkit-details-marker{display:none}.registry-filter .admin-filters{margin-top:6px;display:grid;grid-template-columns:repeat(6,minmax(120px,1fr)) auto auto;gap:8px;align-items:end}.registry-filter label{display:grid;gap:4px;font-size:.68rem;font-weight:750}.registry-filter input,.registry-filter select{width:100%;height:34px;padding:6px 8px;border:1px solid #cfd7d3;border-radius:2px;background:#fff;font:inherit}.coupon-table-card{padding:0}.coupon-register-table{font-size:.74rem}.coupon-register-table th,.coupon-register-table td{padding:7px 6px}.coupon-register-table code{font-size:.7rem}.row-actions{display:flex;align-items:center;gap:5px;flex-wrap:wrap}.row-actions a,.row-actions button{padding:5px 7px;border:1px solid #d7ddda;background:#f7f8f7;color:#24473d;text-decoration:none;font:inherit;font-weight:700;cursor:pointer}.row-actions .link-danger{color:#9b342b}.registry-batch{position:sticky;bottom:0;z-index:8;min-height:46px;margin-top:6px;padding:6px 8px;display:flex;align-items:center;gap:6px;border:1px solid #d7ddda;background:rgba(255,255,255,.97)}.registry-batch select{height:34px;padding:5px 8px;border:1px solid #cfd7d3}.registry-batch span{margin-left:auto;color:#66716d;font-size:.72rem}
@media(max-width:1000px){.registry-filter .admin-filters{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.compact-summary{grid-template-columns:repeat(2,1fr)}.registry-actions{width:100%}.registry-filter .admin-filters{grid-template-columns:1fr 1fr}.registry-batch{flex-wrap:wrap}.registry-batch span{width:100%;margin:0}.coupon-register-table .row-actions{align-items:stretch;flex-direction:column}}
@media(max-width:430px){.registry-filter .admin-filters{grid-template-columns:1fr}.registry-actions .button{flex:1}}
