/* Shared sizing: keep overflow in the component that owns it. */
.main,.content,.panel,.panel-heading>div,.op-body,.integration-body,.form-grid>*,.profile-grid>*{min-width:0}
.form-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
input,select,textarea{max-width:100%;min-width:0}
textarea{resize:vertical}
.page-heading>div,.onboarding>div,.connection-row>div{min-width:0}
.page-heading h1,.panel-heading h2,.ticket p,.report-row,.connection-row,.onboarding p{overflow-wrap:anywhere}
.page-heading,.panel-heading,.detail-actions,.connection-row{flex-wrap:wrap}
.detail-actions>a,.detail-actions>button{max-width:100%;white-space:normal}
.panel-heading>.tile{align-self:flex-start}
.table-wrap{max-width:100%;overscroll-behavior-x:contain}
.table-wrap table{min-width:560px}
.op-body pre{max-width:100%;white-space:pre;overflow:auto}
.op-body .info-note,.integration-body .info-note{overflow-wrap:anywhere}
.packages{grid-template-columns:repeat(3,minmax(0,1fr))}
.package{min-width:0}
.price b{white-space:nowrap}
.history-row>strong{flex-shrink:0}
.sidebar>.logo,.workspace,.nav-label,.sidebar-bottom{flex-shrink:0}
.sidebar nav{flex:1 1 auto;overscroll-behavior:contain;scrollbar-width:thin}
.menu-toggle{display:none}
dialog{max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain}
dialog .form-grid,.item-row{min-width:0}
.ticket>div{flex-wrap:wrap;gap:10px}
.ticket-thread .ticket{padding:18px 0}
#toast{overflow-wrap:anywhere}

@media(min-width:961px) and (max-height:760px){
 .sidebar{padding-top:20px;padding-bottom:18px}
 .workspace{padding-top:16px;padding-bottom:14px;margin-top:14px}
 .sidebar-bottom{gap:12px;padding-top:12px}
 .mini-balance{padding:12px}
 .mini-balance b{margin:5px 0 8px}
}

@media(max-width:960px){
 .sidebar{position:relative;inset:auto;width:100%;height:auto;padding:14px 20px;display:flex;flex-direction:row;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:0 12px;border-right:0;border-bottom:1px solid var(--line)}
 .sidebar>.logo{padding:0;font-size:27px;line-height:36px}
 .workspace,.nav-label{display:none}
 .menu-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:9px 13px;border:1px solid var(--line);border-radius:8px;background:#fff;color:var(--ink);font-size:12px;font-weight:600}
 .menu-toggle svg{width:20px;height:20px}
 .sidebar nav{display:none;flex:none;width:100%;margin:14px 0 0;padding:8px 0;max-height:min(55dvh,440px);overflow:auto}
 .sidebar.menu-open nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .sidebar nav button{justify-content:flex-start;width:100%;min-width:0;min-height:46px;margin:0;padding:11px 10px;gap:9px;font-size:12px;line-height:1.4;white-space:normal;overflow-wrap:anywhere}
 .sidebar nav button>.nav-icon{width:20px;height:20px;flex-basis:20px}
 .sidebar nav .nav-icon svg{width:20px;height:20px}
 .sidebar-bottom{display:none;flex:none;width:100%;margin:12px 0 0;padding:10px 0 0;border-top:1px solid var(--line)}
 .sidebar.menu-open .sidebar-bottom{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px}
 .sidebar-bottom .mini-balance{display:none}
 .sidebar-bottom>a,.sidebar-bottom>button{padding:10px 0;font-size:12px;min-height:40px}
 .main{margin-left:0;min-height:calc(100dvh - 71px)}
 .topbar{height:auto;min-height:64px;padding:12px 22px;gap:12px;display:grid;grid-template-columns:minmax(0,1fr) minmax(110px,180px) auto}
 .breadcrumb{max-width:none;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
 #store-selector{width:100%;max-width:none;min-width:0;margin:0;font-size:12px}
 .topbar>div{gap:10px}
 .environment{display:none}
 .content{padding:26px 22px 36px}
 .credits-grid{grid-template-columns:minmax(0,1fr);gap:22px}
 .profile-grid{grid-template-columns:minmax(0,1fr);gap:20px}
 .page-heading{gap:14px}
 .page-heading>button{flex-shrink:0}
 .toolbar{flex-wrap:wrap}
 .toolbar input{flex:1 1 200px}
 .toolbar select{max-width:none;flex:1 1 140px}
 .toolbar>button{flex:0 1 auto}
 .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
 .stat strong{font-size:28px}
 .onboarding{align-items:flex-start;flex-wrap:wrap;padding:24px;gap:16px}
 .onboarding button{margin-top:0}
 footer{padding:20px 22px;gap:10px;flex-wrap:wrap}
}

@media(max-width:600px){
 .sidebar{padding:12px 16px}
 .topbar{padding:12px 16px;grid-template-columns:minmax(0,1fr) 32px;gap:8px 12px}
 .breadcrumb{grid-column:1;grid-row:1;font-size:11px}
 #store-selector{grid-column:1;grid-row:2;padding:9px 10px;min-height:38px}
 .topbar>div{grid-column:2;grid-row:1 / 3;justify-content:center}
 .content{padding:22px 16px 32px}
 .page-heading h1{font-size:26px;line-height:1.2}
 .page-heading p{font-size:12px}
 .page-heading>.primary{width:100%;font-size:12px;padding:12px 15px}
 .panel-heading{min-height:0;padding:20px 18px;gap:10px}
 .panel-heading h2{font-size:21px}
 .panel-heading>div{flex:1 1 160px}
 .panel-heading .text-button{margin-left:0;min-height:36px}
 .balance{padding:24px;min-height:184px}
 .balance-art{right:-65px}
 .balance>div:not(.balance-art){flex-wrap:wrap}
 .packages{grid-template-columns:repeat(2,minmax(0,1fr));padding:25px 18px;gap:23px 14px}
 .package{padding:18px 8px 14px;min-height:157px}
 .package>strong{font-size:30px}
 .price b{font-size:15px}
 .popular-label{left:9px;transform:none;font-size:7px;padding:3px 5px}
 .discount{right:-5px;padding:3px 5px;font-size:8px}
 .info-note{margin:0 18px 18px}
 .info-note.standalone{margin:0 0 20px}
 .op-body,.integration-body,.profile-body{padding:18px}
 .form-grid{grid-template-columns:minmax(0,1fr);gap:0}
 .item-row{grid-template-columns:minmax(0,1fr);gap:0}
 .form-grid label,.item-row label{margin:12px 0}
 .op-tabs{gap:7px}
 .op-tabs button{flex:1 1 120px;min-height:42px;white-space:normal}
 .op-tabs span{flex:1 1 80px;line-height:1.5}
 .detail-actions{flex-wrap:wrap}
 .detail-actions>button,.detail-actions>a{flex:1 1 135px;min-height:43px}
 .toolbar{padding:16px;gap:10px}
 .toolbar input,.toolbar select{flex-basis:100%;min-height:42px}
 .toolbar>button{flex:1 1 120px;min-height:42px}
 .stat{padding:16px}
 .stat>span{display:none}
 .stat small{line-height:1.5;font-size:11px}
 .stat strong{font-size:24px;margin-top:10px}
 .ticket{padding:20px 18px}
 .connection-row{gap:12px;align-items:flex-start}
 .connection-row>button{min-height:42px}
 .report-row{padding:9px 0;gap:8px 14px;justify-content:space-between}
 .report-row span{overflow-wrap:anywhere}
 .report-row meter{min-width:100px}
 dialog{width:calc(100% - 24px);margin:auto;padding:26px 19px 22px;border-radius:12px}
 dialog h2{font-size:24px;overflow-wrap:anywhere}
 input,select,textarea{font-size:16px}
 .primary,.secondary{min-height:44px}
 dialog .checkout-price{font-size:36px}
 .check-line{align-items:flex-start}
 .check-line input{flex-shrink:0;margin-top:1px}
 .tracking{padding:28px 18px}
 .tracking>.logo{margin-bottom:38px}
 .tracking h1{font-size:32px}
 .tracking-panel{padding:20px}
 .history-list{max-height:none}
 footer{padding:20px 16px}
}

@media(max-width:359px){
 .sidebar>.logo{font-size:23px}
 .menu-toggle{padding:9px 10px}
 .sidebar.menu-open nav{grid-template-columns:minmax(0,1fr)}
 .packages{padding-left:13px;padding-right:13px;gap:23px 11px}
 .price b{font-size:14px}
 .stat{padding:13px}
}

.inline-status summary{cursor:pointer;list-style:none;display:inline-flex;align-items:center;gap:8px}.inline-status summary::-webkit-details-marker{display:none}.inline-event-form{min-width:220px;max-width:280px;padding:14px 0;display:grid;gap:10px}.inline-event-form label{display:grid;gap:7px;font-size:12px}.inline-event-form select{width:100%;min-height:40px}.inline-event-form button{min-height:40px}

/* Shipment cards and accessible stage picker. */
.shipment-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,320px),1fr));gap:18px;padding:20px;min-width:0}
.shipment-card{padding:20px;border:1px solid #dce5ee;border-radius:12px;background:#fff;min-width:0;box-shadow:0 2px 8px #17314704}
.shipment-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;margin-bottom:22px}.shipment-card-head b{font-size:15px;color:#173147;overflow-wrap:anywhere}.shipment-card small{display:block;color:#76869a;font-size:12px;line-height:1.6;margin-top:4px}.shipment-more{border:0;background:transparent;color:#173147;font-size:25px;line-height:1;min-width:32px;min-height:32px;padding:0}
.shipment-card-person{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.shipment-card-person strong{font-size:15px;color:#173147}.shipment-status{display:inline-flex;align-items:center;gap:6px;padding:9px 10px;border-radius:12px;background:#eaf0f6;color:#536880;font-size:11px;font-weight:600;line-height:1.35;flex-shrink:0}.shipment-status-0,.shipment-status-4{background:#e8f5e5;color:#247e3b}.shipment-status-1{background:#fff3da;color:#9b680e}.shipment-status-2,.shipment-status-3{background:#e9f5fc;color:#26709b}
.update-stage-button{display:flex;align-items:center;justify-content:center;gap:12px;width:100%;min-height:48px;border:1.5px solid #12a89f;border-radius:8px;background:white;color:#079c96;font-size:14px;font-weight:700;padding:10px 14px}.update-stage-button:hover{background:#eaf9f7}.update-stage-button svg{width:21px;height:21px;flex-shrink:0}.update-stage-button svg:last-child{margin-left:auto;width:18px}.update-stage-button svg:first-child{margin-left:auto}.shipment-detail-link{display:flex;align-items:center;gap:12px;border:0;background:none;color:#173147;padding:16px 0 0;font-size:13px}.shipment-detail-link span{font-size:24px;line-height:20px}
#modal.stage-sheet{width:min(540px,calc(100% - 32px));padding:28px 26px 0;max-height:85dvh;overflow:auto;overscroll-behavior:contain;border-radius:18px}.stage-sheet h2{font-size:26px;letter-spacing:-.5px;margin:8px 0}.stage-editor-subtitle{font-size:14px;color:#64748b;margin:0 0 10px}.stage-order-code{font-size:11px;color:#8190a3;margin:0 30px 20px 0}.stage-options{border:0;padding:0;margin:0;display:grid;gap:0}.stage-option{display:flex!important;align-items:center;gap:13px;padding:14px 0!important;margin:0!important;cursor:pointer;font-size:14px!important;color:#173147;line-height:1.45;border-bottom:1px solid #f1f4f7}.stage-option input{appearance:auto!important;accent-color:#13a79f;width:21px!important;min-width:21px;height:21px;flex:0 0 21px;margin:0;padding:0;box-shadow:none}.stage-option:has(input:checked){color:#079c96;font-weight:600}.stage-extra{margin:18px 0;color:#64748b;font-size:13px}.stage-extra summary{cursor:pointer;padding:10px 0}.stage-extra label{margin-top:14px;display:grid;gap:8px}.stage-save{position:sticky;bottom:0;background:#fff;padding:16px 0 22px;margin-top:10px}.stage-save button{min-height:48px;font-size:15px}.sheet-handle{display:none}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:600px){#content:has(#shipment-table)>.panel{border:0;background:transparent;box-shadow:none;overflow:visible}#content:has(#shipment-table) .toolbar{background:transparent;padding:0 0 18px;border:0}#content:has(#shipment-table) .toolbar input,#content:has(#shipment-table) .toolbar select{background:white}#content:has(#shipment-table) .shipment-cards{padding:0;gap:16px;grid-template-columns:minmax(0,1fr)}.shipment-card{padding:18px 16px}.shipment-card-person{gap:8px}.shipment-status{font-size:10px;padding:8px}.shipment-card-head b{font-size:14px}#modal.stage-sheet{margin:auto 0 0;width:100%;max-width:100%;max-height:88dvh;border-radius:22px 22px 0 0;padding:28px 22px 0}.sheet-handle{display:block;position:absolute;top:10px;left:calc(50% - 18px);width:36px;height:5px;border-radius:5px;background:#c9cfd6}.stage-sheet .close{top:22px;right:18px}.stage-sheet h2{font-size:25px}}
