.mg-note{margin-top:18px}.mg-gap{margin-top:18px}.mg-pad{padding:20px 23px}.mg-wide-dialog{max-width:880px}.mg-table .btn{margin-right:5px}.mg-table strong{font-weight:650}.mg-subhead{font-size:14px;margin:24px 0 14px}.mg-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;padding:20px;background:var(--bg);border:1px solid var(--border);border-radius:9px}.mg-detail-grid small{display:block;color:var(--muted);font-size:10px;margin-bottom:6px}.mg-detail-grid strong{display:block;font-size:12px;overflow-wrap:anywhere}.mg-rates-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:22px}.mg-owner-list>div:last-child{padding:0 15px 15px}.mg-owner-list button{width:100%;display:flex;align-items:center;justify-content:space-between;padding:15px;border:1px solid transparent;background:none;border-radius:8px;color:var(--ink);text-align:left}.mg-owner-list button.active{background:var(--accent);border-color:var(--border)}.mg-owner-list button strong{font-size:12px}.mg-owner-list button small{font-size:10px;color:var(--muted)}.mg-rate-list{padding:0 23px}.mg-rate-row{display:grid;grid-template-columns:1fr 220px;gap:25px;padding:19px 0;border-bottom:1px solid var(--border)}.mg-rate-row:last-child{border:0}.mg-rate-row strong{font-size:12px}.mg-rate-row p{font-size:10px;line-height:1.7;color:var(--muted);margin-top:5px}.mg-rate-row label{display:flex;align-items:center;justify-content:flex-end;gap:9px}.mg-rate-row input{width:120px;text-align:right}.mg-rate-row label span{font-size:10px;color:var(--muted);width:70px}.mg-form-footer{display:flex;justify-content:flex-end;gap:9px;align-items:center;padding:18px 23px;flex-wrap:wrap;border-top:1px solid var(--border)}.mg-totals{padding:18px 23px;background:var(--bg)}.mg-totals>div{display:flex;justify-content:space-between;gap:20px;padding:7px 0;font-size:12px}.mg-totals>div.total{border-top:1px solid var(--border);padding-top:15px;margin-top:7px}.mg-totals strong{font-size:20px;color:var(--strong)}.mg-monthbar{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 22px;flex-wrap:wrap}.mg-monthbar input{font-size:13px;font-weight:650;max-width:170px}.mg-two-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.mg-bars{padding:0 23px 22px}.mg-bars>div{display:grid;grid-template-columns:115px 1fr 100px;gap:14px;align-items:center;margin:17px 0;font-size:11px}.mg-bars b{text-align:right;font-size:11px}.mg-periodbar{display:flex;align-items:end;gap:12px;padding:0 23px 20px;flex-wrap:wrap}.mg-periodbar .form-field{gap:5px}.mg-periodbar .form-field label{font-size:10px;color:var(--muted)}.mg-periodbar .form-field .control{height:36px}.mg-periodbar>.segmented{margin-left:auto}.mg-trend{padding:5px 22px 18px}.mg-trend svg{width:100%;height:220px;overflow:visible}.mg-line{stroke:var(--strong);fill:none;stroke-width:2.4;stroke-linejoin:round;stroke-linecap:round}.mg-line.secondary{stroke:var(--faint);stroke-width:1.5;stroke-dasharray:4 5}.mg-trend text{fill:var(--muted);font-size:10px}.mg-schedule-list{display:grid;gap:14px}.mg-schedule{display:flex;align-items:center;gap:20px;padding:23px}.mg-schedule-info{background:none;border:0;text-align:left;color:var(--ink);flex:1;padding:0}.mg-schedule-info strong{font-size:14px;display:block;margin-bottom:6px}.mg-schedule-info span{font-size:11px;display:block;color:var(--muted)}.mg-schedule-info small{font-size:10px;color:var(--faint)}.mg-schedule>.toggle{flex-shrink:0}.mg-schedule>div{display:flex;gap:8px;flex-wrap:wrap}.mg-check{display:flex;align-items:center;gap:8px;font-size:12px;margin:7px 0}.mg-mail-preview{border:1px solid var(--border);margin-top:22px;background:var(--surface);padding:25px}.mg-mail-preview>header{border-bottom:2px solid var(--strong);padding-bottom:17px;margin-bottom:20px}.mg-mail-preview>header>b{font-size:13px;letter-spacing:1px;color:var(--strong)}.mg-mail-preview h2{font-size:21px;margin:18px 0 6px}.mg-mail-preview p{font-size:11px;color:var(--muted)}.mg-mail-preview>footer{font-size:10px;color:var(--muted);margin-top:20px}.mg-template-list{padding:0 23px 22px}.mg-template-list>article{display:flex;align-items:center;gap:20px;border:1px solid var(--border);border-radius:9px;padding:17px;margin-bottom:12px}.mg-template-open{flex:1;min-width:0;border:0;background:none;color:var(--ink);padding:0;text-align:left}.mg-template-open strong{display:block;font-size:13px}.mg-template-open small{display:block;font-size:10px;color:var(--muted);margin:5px 0}.mg-template-open p{font-size:10px;line-height:1.8;color:var(--muted)}.mg-template-list>article>div{display:flex;flex-direction:column;gap:8px;flex-shrink:0}.mg-import-dialog{max-width:1120px}.mg-import-steps{display:flex;justify-content:space-between;gap:12px;border-bottom:1px solid var(--border);padding-bottom:20px;margin-bottom:25px}.mg-import-steps>span{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--faint)}.mg-import-steps b{height:25px;width:25px;display:grid;place-items:center;background:var(--soft);border-radius:50%;font-size:11px}.mg-import-steps .active{color:var(--strong);font-weight:650}.mg-import-steps .active b,.mg-import-steps .done b{background:var(--strong);color:var(--surface)}.mg-upload{display:flex;align-items:center;justify-content:center;flex-direction:column;position:relative;border:1px dashed var(--muted);border-radius:10px;padding:36px;background:var(--bg);margin-top:20px;overflow:hidden;cursor:pointer}.mg-upload input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}.mg-upload strong{font-size:15px}.mg-upload small{font-size:11px;color:var(--muted);margin-top:7px}.mg-inline{display:flex;align-items:end;gap:10px;flex-wrap:wrap;margin-top:15px}.mg-inline>.form-field{min-width:220px}.mg-csv-text{height:140px!important;font:11px/1.8 monospace!important;padding:12px!important;resize:vertical;white-space:pre}.mg-template-save{display:flex;align-items:end;gap:10px;padding-top:20px}.mg-template-save>.form-field{flex:1}.mg-cell-input{min-width:105px;max-width:190px;font-size:10px;height:33px}.mg-error{font-size:10px;color:var(--red);white-space:normal;min-width:150px;display:block}.mg-import-done{padding:40px;text-align:center}.mg-import-done>.icon{width:55px;height:55px;border-radius:50%;padding:15px;background:var(--accent);color:var(--strong);margin:auto}.mg-import-done h3{font-size:23px;margin:20px 0 10px}.mg-import-done p{font-size:13px;color:var(--muted)}.mg-provider-naver{background:#03c75a;color:#fff}.mg-provider-coupang{background:#e94d3e;color:#fff}.mg-provider-cafe24{background:#3163c9;color:#fff}.mg-steps-list{padding:0 30px 23px 50px;font-size:12px;line-height:1.8;color:var(--muted)}.mg-steps-list li{margin:15px 0}.mg-steps-list p{font-size:11px}.mg-erp-select{display:flex;gap:9px;flex-wrap:wrap;margin-bottom:20px}.mg-tab{border:0;background:none;color:var(--muted);padding:12px 1px;border-bottom:2px solid transparent;font-size:12px;white-space:nowrap}.mg-tab.active{color:var(--strong);border-color:var(--strong);font-weight:700}.mg-fake-key{padding:18px;background:var(--bg);border:1px solid var(--border);border-radius:9px;margin-top:20px}.mg-fake-key small{display:block;font-size:10px;color:var(--muted);margin-bottom:8px}.mg-fake-key code{font-size:13px;overflow-wrap:anywhere}.mg-code{background:var(--bg);border:1px solid var(--border);padding:20px;border-radius:9px;font-size:12px;overflow:auto;margin-top:20px}.mg-rule{padding:0 23px 23px}.mg-rule ol{padding:0 0 0 28px;margin:20px 0}.mg-rule li{font-size:12px;line-height:1.9;margin:13px 0;padding-left:8px}.mg-table td small{max-width:230px;overflow:hidden;text-overflow:ellipsis}.mg-note code{font-size:11px}
@media(max-width:1100px){.mg-rates-layout{grid-template-columns:180px minmax(0,1fr);gap:16px}.mg-rate-row{grid-template-columns:1fr 190px;gap:15px}.mg-rate-row input{width:105px}.mg-two-grid{grid-template-columns:1fr}.mg-bars>div{grid-template-columns:100px 1fr 95px}}
@media(max-width:800px){.mg-rates-layout{grid-template-columns:1fr}.mg-owner-list>div:last-child{display:flex;overflow:auto;gap:5px;padding-bottom:12px}.mg-owner-list button{min-width:145px;padding:12px}.mg-owner-list .panel-head{padding-bottom:10px}.mg-rate-list{padding:0 17px}.mg-rate-row{grid-template-columns:1fr;gap:10px;padding:17px 0}.mg-rate-row label{justify-content:flex-start}.mg-rate-row input{width:150px}.mg-detail-grid{padding:16px;gap:17px 12px}.mg-detail-grid strong{font-size:11px}.mg-pad{padding:17px}.mg-totals{padding:17px}.mg-bars{padding:0 17px 18px}.mg-bars>div{grid-template-columns:90px 1fr 90px;gap:10px;font-size:10px}.mg-bars b{font-size:10px}.mg-periodbar{padding:0 17px 17px;gap:9px}.mg-periodbar .form-field{flex:1;min-width:125px}.mg-periodbar>.segmented{width:100%;margin:0;justify-content:space-around}.mg-trend{padding:5px 14px 10px}.mg-trend svg{height:160px}.mg-schedule{padding:18px;gap:12px;flex-wrap:wrap}.mg-schedule-info{min-width:180px}.mg-schedule>div{width:100%;justify-content:flex-end}.mg-template-list{padding:0 17px 17px}.mg-template-list>article{align-items:start;padding:14px;gap:12px}.mg-template-open strong{font-size:12px}.mg-template-open p{font-size:9px}.mg-template-list>article>div .btn{font-size:10px;padding:0 9px}.mg-import-steps{gap:8px;flex-wrap:wrap}.mg-import-steps>span{font-size:10px;gap:5px}.mg-import-steps b{width:20px;height:20px;font-size:9px}.mg-upload{padding:28px 15px}.mg-upload strong{font-size:14px}.mg-template-save{flex-direction:column;align-items:stretch}.mg-import-done{padding:25px 10px}.mg-import-done h3{font-size:20px}.mg-wide-dialog .form-grid{grid-template-columns:1fr}.mg-wide-dialog .form-field.full{grid-column:auto}.mg-rule{padding:0 17px 17px}.mg-rule li{font-size:11px}.mg-steps-list{padding-left:37px;padding-right:20px}.mg-table td small{max-width:180px}}

.source-layout .dialog.mg-wide-dialog{max-width:min(880px,96vw)}.source-layout .dialog.mg-import-dialog{max-width:min(1120px,96vw)}
@media(max-width:800px){.source-layout .dialog.mg-wide-dialog,.source-layout .dialog.mg-import-dialog{max-width:96vw}}
/* Source-observed reports and billing. */
.mg-clickable{text-align:left;border:1px solid var(--border);background:var(--surface);color:var(--ink);display:flex;flex-direction:column;gap:14px}.mg-clickable>span{font-size:12px;color:var(--muted)}.mg-clickable>strong{font-size:27px;font-weight:700}.mg-clickable strong small{font-size:11px;margin-left:5px;font-weight:400}.mg-clickable>small{font-size:10px;color:var(--muted)}.mg-source-filters{display:flex;align-items:end;gap:12px;padding:17px 23px;flex-wrap:wrap}.mg-source-filters>input{min-width:220px;max-width:360px;flex:1}.mg-source-filters .form-field{min-width:155px}.mg-source-total{border-top:1px solid var(--border);padding:15px 20px;font-size:11px;font-weight:600;color:var(--muted)}.mg-source-selection{padding:13px 20px;display:flex;align-items:center;gap:10px;background:var(--accent);font-size:12px}.mg-month-chart{height:215px;display:flex;align-items:end;padding:20px 24px;gap:14px}.mg-month-chart>button{border:0;background:none;padding:0;flex:1;min-width:20px;color:var(--muted)}.mg-month-bars{height:145px;display:block;position:relative;margin:0 auto 9px;width:70%;max-width:70px}.mg-month-bars i,.mg-month-bars b{position:absolute;bottom:0;left:0;width:100%;display:block;background:color-mix(in srgb,#d4a83c 20%,transparent);border-radius:3px 3px 0 0;min-height:0}.mg-month-bars b{width:58%;left:21%;background:#d4a83c}.mg-month-chart small{font-size:11px}.mg-due-card{border:1px solid var(--border);border-radius:8px;width:100%;padding:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--surface);color:var(--ink);margin-bottom:10px;text-align:left}.mg-due-card>span,.mg-due-card>b{font-size:12px}.mg-due-card>small{font-size:10px;color:var(--muted)}.mg-due-card>strong{font-size:14px}.mg-due-card:has(>small)>small{width:100%}.mg-zone-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;padding:0 23px 23px}.mg-zone-card{border:1px solid var(--border);border-radius:10px;padding:18px;text-align:left;background:var(--surface);color:var(--ink)}.mg-zone-card>b{font:700 12px monospace;color:var(--strong)}.mg-zone-card h3{font-size:13px;margin:8px 0 5px}.mg-zone-card>small{font-size:10px;color:var(--muted)}.mg-zone-card>p{display:flex;justify-content:space-between;gap:9px;font-size:10px;color:var(--muted);margin:17px 0 7px}.mg-zone-card>p strong{color:var(--ink);font-size:11px}.mg-zone-card>i{display:block;height:6px;background:var(--soft);border-radius:3px;overflow:hidden}.mg-zone-card em{display:block;background:var(--strong);height:100%}.mg-zone-card>i:last-child em{background:var(--muted)}.mg-line.returns{stroke:var(--muted);stroke-width:1.5;stroke-dasharray:2 3}.mg-carrier-guide{font-size:11px;color:var(--muted);margin-top:20px;padding:16px;background:var(--bg);border-radius:8px}.mg-carrier-guide summary{font-size:12px;font-weight:600;color:var(--ink);cursor:pointer}.mg-carrier-guide ol{padding-left:18px;line-height:1.9}.mg-carrier-guide a{text-decoration:underline}.mg-table th .btn{font-size:11px;height:auto;border:0;padding:0;background:none;color:inherit}.mg-upload:has(input:focus-visible){outline:2px solid var(--strong)}
@media(max-width:1100px){.mg-zone-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.mg-zone-grid{grid-template-columns:1fr;padding:0 17px 17px}.mg-month-chart{padding:15px 17px;gap:7px;height:200px}.mg-month-chart small{font-size:10px}.mg-month-bars{width:85%}.mg-source-filters{padding:14px 17px;gap:9px}.mg-source-filters>input{max-width:none;min-width:100%}.mg-source-filters .form-field{width:100%}.mg-source-selection{flex-wrap:wrap;padding:13px 17px}.mg-source-total{padding:13px 17px;font-size:10px}.mg-due-card{padding:12px}.mg-due-card>span,.mg-due-card>b{font-size:11px}.mg-due-card>strong{font-size:13px}}.mg-owner-scope{display:flex;align-items:center;gap:12px;padding:12px 16px;margin-bottom:20px;background:var(--accent);border:1px solid var(--border);border-radius:8px;font-size:12px}.mg-owner-scope>span{color:var(--muted);flex:1}
/* Source-observed carrier integration layout. */
.source-layout .mg-carrier-page .page-heading{align-items:flex-end;margin-bottom:20px}
.mg-carrier-page .page-heading>div:first-child{min-width:0;max-width:900px}
.mg-carrier-page .full-panel{margin-bottom:20px}
.source-layout .mg-carrier-page .panel-head{padding:12px 16px;border-bottom:1px solid var(--border)}
.mg-tracker-title{min-height:26.25px;display:flex;align-items:center;gap:8px}
.mg-tracker-title img{width:24px;height:24px;padding:3px;object-fit:contain;border:1px solid var(--border);border-radius:6px;background:#fff}
.mg-carrier-connect-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;padding:16px}
.mg-carrier-credentials,.mg-carrier-help{min-width:0}
.mg-carrier-credentials form{margin-top:12px}
.mg-carrier-fields{display:grid;gap:12px}
.source-layout .mg-carrier-fields .control{height:32px;min-height:32px;font-size:13.5px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.source-layout .mg-carrier-fields label{font-size:13px;font-weight:500;color:var(--muted);margin-bottom:5px}
.mg-carrier-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.source-layout .mg-carrier-actions .btn{height:32px;min-height:32px;padding:0 12px}
.mg-carrier-help{border:1px solid var(--border);border-radius:8px;background:var(--soft);padding:14px;font-size:13px;line-height:1.65}
.mg-carrier-help>strong{display:block;color:var(--muted);font-size:12px;font-weight:600;margin-bottom:10px}
.mg-carrier-help ol{margin:0;padding-left:16px;color:var(--ink)}
.mg-carrier-help li+li{margin-top:4px}
.mg-carrier-help-links{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:12px;color:var(--muted)}
.mg-carrier-help-links a{display:inline-flex;align-items:center;gap:4px;text-decoration:underline;text-underline-offset:2px}
.mg-carrier-help-links .icon{width:12px;height:12px}
.mg-carrier-help p{font-size:12px;color:var(--faint);line-height:1.65;margin:12px 0 0}
.mg-carrier-query-list{list-style:none;margin:0;padding:0}
.mg-carrier-query-list li{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:10px 16px;min-height:41px}
.mg-carrier-query-list li+li{border-top:1px solid var(--border)}
.mg-carrier-query-list li>span:first-child{display:flex;align-items:center;gap:12px;min-width:0}
.mg-carrier-query-list .icon{width:16px;height:16px;flex-shrink:0;color:var(--muted)}
.mg-carrier-query-empty{color:var(--muted);font-size:13px}
.mg-carrier-issuance{padding:16px;font-size:13.5px;line-height:1.75;color:var(--muted)}
.mg-carrier-issuance a{text-decoration:underline;text-underline-offset:2px}
@media(max-width:1023px){.mg-carrier-connect-grid{grid-template-columns:minmax(0,1fr);gap:16px}.mg-carrier-page .page-heading{align-items:flex-start}.mg-carrier-page .page-heading>div:first-child{width:100%}}

.source-layout .mg-carrier-page .panel-title{font-size:14.5px;font-weight:600;line-height:21.75px}

.source-layout .mg-carrier-page .page-subtitle{max-width:672px;font-size:14px;line-height:22.75px;margin-top:6px}
.source-layout .mg-carrier-page .panel-sub{font-size:12.5px;line-height:18.75px;margin-top:4px}
.mg-required{color:var(--source-text-red,#c4423d)}
.source-layout .dialog.mg-template-dialog{max-width:min(672px,96vw);width:672px}.mg-template-dialog .dialog-body{padding:20px 24px}.mg-template-dialog .form-grid{grid-template-columns:1fr;gap:18px}.mg-template-intro{font-size:13px;line-height:21px;color:var(--muted);margin:0 0 20px}.mg-template-dialog .form-field>label{font-size:13px;font-weight:500;color:var(--muted)}.mg-template-dialog .control{height:32px;font-size:13.5px}.mg-template-dialog .segmented{display:inline-flex;padding:2px;border-radius:6px;background:var(--soft);align-self:flex-start}.mg-template-dialog .segmented button{height:27px;padding:0 12px;font-size:12px;border:0;border-radius:5px;background:transparent;color:var(--muted)}.mg-template-dialog .segmented button.active{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0000000d}.mg-template-map{gap:0}.mg-template-map-head,.mg-template-map>label{display:grid!important;grid-template-columns:minmax(90px,1fr) minmax(0,1.6fr);gap:16px;align-items:center}.mg-template-map-head{padding:7px 0;border-bottom:1px solid var(--border);font-size:12px;color:var(--muted)}.mg-template-map>label{padding:6px 0;margin:0!important;font-size:13px!important;font-weight:400!important;color:var(--ink)!important}.mg-template-map>label>.control{width:100%;min-width:0}
@media(max-width:640px){.mg-template-dialog .dialog-body{padding:18px 16px}.mg-template-map-head,.mg-template-map>label{grid-template-columns:minmax(85px,1fr) minmax(0,1.5fr);gap:10px}}
.source-layout .dialog.mg-schedule-drawer,.dialog.mg-schedule-drawer{position:fixed;inset:0 0 0 auto;width:520px;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;display:flex;flex-direction:column}.mg-schedule-drawer .dialog-body{min-height:0;flex:1;overflow:auto;padding:20px 24px}.mg-schedule-drawer .dialog-header,.mg-schedule-drawer .dialog-footer{padding:18px 24px;flex-shrink:0}.mg-schedule-drawer .form-grid{grid-template-columns:1fr;gap:24px}.mg-schedule-drawer .form-field{min-width:0}.mg-schedule-drawer .form-field>label{font-size:13px;font-weight:500;color:var(--muted)}.mg-schedule-reports{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mg-schedule-report{display:flex;align-items:flex-start;gap:8px;border:1px solid var(--border);border-radius:7px;background:transparent;color:var(--ink);text-align:left;padding:11px;font:inherit;min-width:0}.mg-schedule-report.active{border-color:var(--ink);background:var(--soft)}.mg-schedule-report b{display:block;font-size:13px;line-height:20px;font-weight:500}.mg-schedule-report small{display:block;font-size:11px;line-height:17px;color:var(--faint);margin-top:2px}.mg-schedule-report>i{width:13px;height:13px;border:1px solid var(--faint);border-radius:50%;flex-shrink:0;margin-top:3px}.mg-schedule-report.active>i{border:4px solid var(--ink);background:var(--surface)}.mg-schedule-drawer .segmented{display:inline-flex;align-self:flex-start;padding:2px;background:var(--soft);border-radius:6px}.mg-schedule-drawer .segmented button{height:27px;padding:0 12px;font-size:12px;border:0;border-radius:5px;background:transparent;color:var(--muted)}.mg-schedule-drawer .segmented button.active{background:var(--surface);color:var(--ink);box-shadow:0 1px 3px #0000000d}.mg-schedule-when{display:flex;gap:12px;margin-top:8px}.mg-schedule-when>.form-field{flex:1}.mg-schedule-drawer .control{height:32px;font-size:13px}.mg-form-help{font-size:11.5px;line-height:18px;color:var(--faint);margin:6px 0 0}.mg-email-chips{display:flex;flex-wrap:wrap;gap:5px;min-height:36px;padding:5px 7px;border:1px solid var(--border);border-radius:6px}.mg-email-chips>span{display:flex;align-items:center;gap:5px;max-width:100%;font-size:12px;background:var(--soft);border-radius:4px;padding:2px 6px;color:var(--ink);overflow-wrap:anywhere}.mg-email-chips>span>button{background:none;border:0;padding:0;display:flex;color:var(--muted)}.mg-email-chips .icon{width:11px;height:11px}.mg-email-chips>.control{border:0;box-shadow:none;height:24px;min-width:140px;flex:1;padding:0 3px;background:transparent}
@media(max-width:520px){.mg-schedule-drawer .dialog-body{padding:18px 16px}.mg-schedule-drawer .dialog-header,.mg-schedule-drawer .dialog-footer{padding-left:16px;padding-right:16px}.mg-schedule-report{padding:10px 8px;gap:6px}}
.source-layout .dialog.mg-api-dialog{width:512px;max-width:min(512px,96vw)}.mg-api-dialog .dialog-body{padding:20px 24px}.mg-api-dialog .form-grid{grid-template-columns:1fr;gap:14px}.mg-api-dialog .control{height:32px;font-size:13.5px}.mg-api-dialog .form-field>label{font-size:13px;line-height:20px;color:var(--muted);font-weight:500}.mg-api-dialog .mg-check{align-items:flex-start;line-height:19px;font-size:12.5px;margin:7px 0}.mg-api-dialog .mg-check>input{margin-top:3px;flex-shrink:0}.mg-api-dialog .mg-form-help{margin-top:-5px}.mg-api-dialog .form-field .mg-form-help{margin-top:5px}
.source-layout .dialog.mg-bill-drawer,.dialog.mg-bill-drawer{position:fixed;inset:0 0 0 auto;width:560px;max-width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;display:flex;flex-direction:column}.mg-bill-drawer .dialog-body{min-height:0;flex:1;overflow:auto;padding:20px 24px}.mg-bill-drawer .dialog-header,.mg-bill-drawer .dialog-footer{padding:18px 24px;flex-shrink:0}.mg-bill-drawer .mg-detail-grid{padding:0;background:transparent;border:0;border-radius:0;margin-bottom:24px;gap:18px}.mg-bill-drawer .mg-detail-grid small{font-size:12px;margin-bottom:5px}.mg-bill-drawer .mg-detail-grid strong{font-size:13px;font-weight:500}.mg-bill-drawer .mg-totals{background:transparent;padding:16px 0}.mg-bill-drawer .mg-totals strong{font-size:20px;color:var(--ink)}.mg-bill-print{display:flex;justify-content:flex-end;margin-bottom:16px}.mg-bill-drawer .mg-table td,.mg-bill-drawer .mg-table th{font-size:12px;padding:8px 7px}.mg-bill-drawer .mg-table td:first-child{white-space:normal}
.mg-rate-copy{position:relative;display:inline-block}.mg-rate-copy-menu{position:absolute;right:0;top:calc(100% + 5px);width:220px;z-index:25;border:1px solid var(--border);border-radius:6px;background:var(--surface);box-shadow:0 5px 18px #00000016;padding:5px}.mg-rate-copy-menu>.btn{display:block;width:100%;height:32px;text-align:left;border:0;background:transparent;box-shadow:none;justify-content:flex-start;font-size:13px}.mg-rate-copy-menu>.btn:hover{background:var(--soft)}
.mg-pending-emphasis,.mg-due-card>strong,.mg-due-card>span{color:var(--source-text-orange,#c4610b)}

/* Match the observed 32x18 source switch without changing other modules. */
.source-layout .mg-schedule>.toggle{width:32px;min-width:32px;height:18px;min-height:18px;padding:2px;border-radius:9999px;flex-shrink:0}.source-layout .mg-schedule>.toggle::after{width:14px;height:14px;box-shadow:none}

/* API overview cards and log controls observed on the original service. */
.source-layout .mg-api-summary{gap:12px}.mg-api-summary-card{height:101.75px;min-width:0;padding:12px 16px;text-align:left;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--ink)}.mg-api-summary-card:hover{background:var(--soft)}.mg-api-summary-card>span{display:block;color:var(--muted);font-size:12.5px;line-height:18.75px}.mg-api-summary-card>strong{display:block;font-size:22px;line-height:33px;font-weight:600;margin-top:4px}.mg-api-summary-card>small{display:block;font-size:12px;line-height:18px;color:var(--faint)}.mg-api-summary-card>small.mg-api-errors{color:var(--source-text-red,#c4423d)}.mg-api-log-filters{display:flex;align-items:center;gap:12px;margin-bottom:16px;flex-wrap:wrap}.mg-api-log-filters .control{height:32px;max-width:240px;font-size:13.5px}.mg-api-log-filters>label{display:flex;align-items:center;gap:6px;font-size:13px}.mg-api-webhooks-empty{padding:48px 20px;text-align:center}.mg-api-webhooks-empty>strong{display:block;font-size:15px}.mg-api-webhooks-empty>p{font-size:13px;color:var(--muted);margin:8px 0 16px}.source-layout .dialog.mg-api-dialog .dialog-header h2{font-size:16px;line-height:24px}

.mg-api-summary-card{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start}
/* v10 source report schedule form dimensions only; other management dialogs retain their own geometry. */
.source-layout .dialog.mg-schedule-drawer{border:0}
.source-layout .dialog.mg-schedule-drawer>.dialog-header{display:flex;align-items:center;min-height:49px;padding:12px 20px;border-bottom:1px solid var(--border)}
.source-layout .dialog.mg-schedule-drawer>.dialog-header h2{font-size:15px;line-height:22.5px;font-weight:600;margin:0}
.source-layout .dialog.mg-schedule-drawer>.dialog-header .icon-btn{width:24px;min-width:24px;height:24px;min-height:24px;padding:0;border-radius:6px}
.source-layout .dialog.mg-schedule-drawer>.dialog-body{padding:16px 20px;min-height:0;flex:1;overflow:auto;scrollbar-width:thin}
.source-layout .dialog.mg-schedule-drawer>.dialog-footer{display:flex;align-items:center;min-height:57px;padding:12px 20px;border-top:1px solid var(--border)}
.source-layout .mg-schedule-drawer .form-field>label{font-size:12.5px;line-height:18.75px;font-weight:400;margin-bottom:4px}
.source-layout .mg-schedule-drawer .mg-schedule-report{padding:10px 12px;gap:8px}
.source-layout .mg-schedule-drawer .mg-schedule-report b{font-size:13.5px;line-height:20.25px;font-weight:500}
.source-layout .mg-schedule-drawer .mg-schedule-report small{font-size:11px;line-height:16.5px;margin-top:2px}
.source-layout .mg-schedule-drawer .segmented button{height:28px;padding:0 10px;font-size:13px;line-height:19.5px}
.source-layout .mg-schedule-drawer .mg-email-chips>.control{height:24px;min-height:24px}
.source-layout .mg-schedule-drawer input.mg-schedule-time{width:128px;min-width:128px;height:32px;min-height:32px;font-size:13px}
.source-layout .mg-schedule-drawer select.mg-schedule-monthday{width:112px;min-width:112px;height:32px;min-height:32px;font-size:13px}
.mg-schedule-weekdays{display:flex;align-items:center;flex-wrap:wrap;gap:4px}
.source-layout .mg-schedule-drawer .mg-schedule-weekdays>button{display:grid;place-items:center;width:32px;min-width:32px;height:32px;padding:0;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);font-size:13px;line-height:19.5px}
.source-layout .mg-schedule-drawer .mg-schedule-weekdays>button.active{border-color:var(--ink);color:var(--ink);font-weight:500}
.source-layout .mg-schedule-drawer .form-field{gap:0}
.source-layout .mg-schedule-drawer .mg-schedule-when{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:8px}
.source-layout .mg-schedule-drawer .mg-form-help{font-size:12px;line-height:18px;margin-top:8px}
/* Charts observed in the original reports: metric colors are independent of UI ink. */
.mg-report-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;margin-bottom:16px}
.mg-report-grid>.panel{margin:0;min-width:0}
.source-layout .mg-outbound-report>.full-panel{margin-bottom:16px}
.source-layout .mg-outbound-report .panel-head{padding:12px 16px;border-bottom:1px solid var(--border)}
.source-layout .mg-outbound-report .panel-title{font-size:14.5px;line-height:21.75px;font-weight:600}
.source-layout .mg-outbound-report .panel-sub{font-size:12.5px;line-height:18.75px;margin-top:2px}
.source-layout .mg-bars.mg-rank-bars{padding:16px;min-width:0}
.source-layout .mg-rank-bars>.mg-rank-row{display:block;margin:0;font-size:13px;line-height:19.5px}
.source-layout .mg-rank-bars>.mg-rank-row+.mg-rank-row{margin-top:10px}
.mg-rank-row>div:first-child{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:4px;min-width:0}
.mg-rank-row>div:first-child>span:first-child{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-rank-value{white-space:nowrap;font-weight:400;font-variant-numeric:tabular-nums;color:var(--ink)}
.mg-rank-value>small{font-size:11.5px;line-height:17.25px;color:var(--faint);margin-left:6px}
.mg-rank-track{height:6px;border-radius:999px;background:var(--soft);overflow:hidden}
.mg-rank-track>i{display:block;height:100%;border-radius:inherit;max-width:100%}
.source-layout .mg-trend.mg-trend-v12{padding:16px;min-width:0}
.mg-trend-legend{display:flex;flex-wrap:wrap;gap:4px 16px;margin-bottom:12px;font-size:12px;line-height:18px;color:var(--muted)}
.mg-trend-legend>span{display:inline-flex;align-items:center;gap:6px}
.mg-trend-legend i{display:block;width:18px;height:2px;border-radius:1px}
.mg-trend-frame{display:flex;gap:8px;min-width:0}
.mg-trend-y{position:relative;width:36px;flex-shrink:0;height:180px;font-size:10.5px;color:var(--faint);text-align:right;font-variant-numeric:tabular-nums}
.mg-trend-y>span{position:absolute;right:0;transform:translateY(-50%)}
.mg-trend-plot{position:relative;height:180px;flex:1;min-width:0}
.mg-trend-plot>i{position:absolute;left:0;right:0;border-top:1px dashed var(--border)}
.mg-trend-plot>i:nth-child(3){border-top-style:solid}
.source-layout .mg-trend.mg-trend-v12 .mg-trend-plot>svg{position:absolute;inset:0;width:100%;height:180px;overflow:visible}
.mg-trend-x{position:relative;margin:6px 0 0 44px;height:16px;font-size:10.5px;color:var(--faint);font-variant-numeric:tabular-nums}
.mg-trend-x>span{position:absolute;white-space:nowrap;transform:translateX(-50%)}
.mg-trend-x>span.first{transform:none}.mg-trend-x>span.last{transform:translateX(-100%)}
.mg-hour-chart,.mg-column-chart{padding:16px;min-width:0}
.mg-hour-cells{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:3px}
.mg-hour-cell{min-width:0}.mg-hour-cell>i{display:block;height:40px;border:1px solid var(--border);border-radius:4px;background:var(--source-side,var(--soft))}
.mg-hour-cell>i[style]{border-color:transparent}
.mg-hour-cell>span{display:block;text-align:center;font-size:10px;line-height:15px;margin-top:4px;color:var(--faint)}
.mg-hour-caption{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-top:8px;font-size:12px;line-height:18px;color:var(--muted)}
.mg-hour-caption>span:last-child,.mg-hour-caption i{display:inline-flex;align-items:center;gap:2px}
.mg-hour-caption>span:last-child{gap:6px}.mg-hour-caption b{display:block;width:10px;height:10px;border-radius:2px}
.mg-column-plot{display:flex;align-items:flex-end;gap:3px}.mg-column-plot>div{display:flex;align-items:flex-end;min-width:0;height:100%;flex:1}
.mg-column-plot i{display:block;width:100%;border-radius:3px 3px 0 0}.mg-column-labels{display:flex;gap:3px;margin-top:6px;color:var(--faint);font-size:10.5px;line-height:15.75px}
.mg-column-labels>span{flex:1;min-width:0;text-align:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.source-layout .mg-zone-card>i>em,.source-layout .mg-zone-card>i:last-child>em{background:#5e9c7f}
@media(min-width:640px){.mg-hour-cells{grid-template-columns:repeat(24,minmax(0,1fr))}}
@media(min-width:1024px){.mg-report-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.mg-report-grid-wide{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr)}}

/* v15 billing aging chart: source 12px stack and responsive legend only. */
.mg-billing-aging{padding:16px;min-width:0}.mg-billing-aging-track{display:flex;width:100%;height:12px;overflow:hidden;border-radius:999px;background:var(--soft)}.mg-billing-aging-track>i{display:block;height:100%;border-right:1px solid var(--surface);flex-shrink:0}.mg-billing-aging-track>i:last-child{border-right:0}.mg-billing-aging-legend{display:grid;grid-template-columns:minmax(0,1fr);gap:6px 16px;list-style:none;padding:0;margin:12px 0 0;min-width:0}.mg-billing-aging-legend>li{display:flex;align-items:center;gap:8px;font-size:13px;line-height:19.5px;min-width:0}.mg-billing-aging-legend>li>i{display:block;width:10px;height:10px;border-radius:3px;flex:0 0 10px}.mg-billing-aging-legend>li>span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mg-billing-aging-legend b{font-weight:400;white-space:nowrap;font-variant-numeric:tabular-nums}.mg-billing-aging-legend small{font-size:11.5px;line-height:17.25px;margin-left:6px;color:var(--faint)}
@media(min-width:640px){.mg-billing-aging-legend{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Source invoice detail: one definition row per fact, header print, totals in the line table. */
.source-layout button.mg-bill-status-card{display:block;width:100%;min-width:0;text-align:left;font:inherit;color:inherit;cursor:pointer;transition:background .15s}
.source-layout button.mg-bill-status-card:hover{background:var(--hover,var(--soft))}
.mg-billing-chart-summary{display:flex;align-items:center;flex-wrap:wrap;gap:4px 16px;margin:0 16px 16px;border-top:1px solid var(--border);padding-top:12px;color:var(--muted);font-size:12px;line-height:18px}
.mg-billing-chart-summary b{font-weight:600;color:var(--ink);font-variant-numeric:tabular-nums}
.source-layout .mg-billing-chart-summary>.btn.mg-billing-month-link{height:auto;min-height:0;padding:0 6px;border:0;border-radius:4px;background:none;color:var(--ink);font-size:12px;line-height:18px;font-weight:400;text-decoration:underline;text-decoration-color:#d9d7d1;text-underline-offset:2px;white-space:nowrap}
.source-layout .panel-head .mg-billing-details-link{display:inline-flex;align-items:center;gap:2px;height:auto;min-height:0;border:0;border-radius:6px;background:none;padding:4px 6px;font-size:12.5px;line-height:18.75px;font-weight:400;color:var(--muted);text-decoration:none;white-space:nowrap}.source-layout .panel-head .mg-billing-details-link:hover{background:var(--hover,var(--soft));color:var(--ink)}
.source-layout .panel-head .mg-billing-details-link>.icon{width:14px;height:14px}
.mg-bill-drawer .dialog-header,.mg-bill-drawer .dialog-footer{padding:12px 20px;gap:8px}.mg-bill-drawer .dialog-header h2{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:22.5px;font-weight:600}.mg-bill-drawer .dialog-header>.btn{flex-shrink:0}.mg-bill-drawer .dialog-body{padding:16px 20px}.mg-bill-drawer .dialog-footer:empty{display:none}.mg-bill-info{display:grid;grid-template-columns:minmax(84px,auto) minmax(0,1fr);gap:8px 16px;margin:0 0 20px;font-size:13.5px;line-height:20.25px}.mg-bill-info>div{display:contents}.mg-bill-info dt{color:var(--muted)}.mg-bill-info dd{min-width:0;margin:0;overflow-wrap:anywhere;color:var(--ink)}.mg-bill-number{font-family:ui-monospace,Consolas,monospace;font-size:12.5px}.mg-bill-lines{min-width:0;border:1px solid var(--border);border-radius:8px;overflow:auto}.mg-bill-lines .mg-table{min-width:340px;width:100%;border-collapse:collapse}.mg-bill-drawer .mg-bill-lines :is(td,th){font-size:13px;line-height:19.5px;padding:8px 12px}.mg-bill-drawer .mg-bill-lines th{font-size:12px;font-weight:500}.mg-bill-lines :is(td,th):not(:first-child){text-align:right;font-variant-numeric:tabular-nums}.mg-bill-lines tbody td:nth-child(3){color:var(--muted)}.mg-bill-lines tfoot{border-top:1px solid var(--border);background:var(--soft)}.mg-bill-lines tfoot td:first-child{color:var(--muted)}.mg-bill-drawer .mg-bill-lines tfoot td{padding-top:0;padding-bottom:0}.mg-bill-drawer .mg-bill-lines tfoot tr:first-child td{padding-top:8px}.mg-bill-drawer .mg-bill-lines tfoot tr:last-child td{padding-bottom:8px}.mg-bill-lines tfoot .total td{font-weight:600;color:var(--strong)}.mg-bill-largest{margin:20px 0 0;font-size:12.5px;line-height:18.75px;color:var(--muted)}.mg-bill-largest>b{font-weight:500;color:var(--ink)}

/* Source-observed draft/issued/paid billing detail and comparison flow. */
.mg-bill-draft-note{margin:16px 0 0;font-size:12.5px;line-height:19px;color:var(--muted)}
.mg-bill-comparison{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 20px;min-width:0}
.mg-bill-comparison>div{min-width:0;padding:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface)}
.mg-bill-comparison :is(span,small){display:block;font-size:12px;line-height:18px;color:var(--muted)}
.mg-bill-comparison strong{display:block;max-width:100%;margin:6px 0 2px;font-size:20px;line-height:28px;font-weight:700;letter-spacing:-.02em;color:var(--strong);font-variant-numeric:tabular-nums;white-space:nowrap;overflow-wrap:normal;word-break:normal;overflow-x:auto}
.mg-bill-change{font-weight:400;color:var(--ink)}
.mg-bill-change.is-less{color:var(--muted)}
.mg-bill-lines.has-comparison .mg-table{min-width:560px}
.mg-bill-confirm-copy{margin:0;font-size:14px;line-height:22px;color:var(--ink);overflow-wrap:anywhere}

/* Reuse the existing provider assets in mall cards and dialog titles. */
.integration-logo.mg-mall-logo{background:var(--surface);padding:3px;border:1px solid var(--border)}.mg-mall-logo>img{display:block;width:100%;height:100%;object-fit:contain}.mg-mall-dialog .dialog-header h2{display:flex;min-width:0;align-items:center;gap:8px}.mg-mall-provider-image{display:block;width:24px;height:24px;flex-shrink:0;object-fit:contain}

/* Mall configuration uses the source's full-height right drawer on PC and mobile. */
.source-layout #overlay-root .dialog-wrap:has(>.mg-mall-drawer){align-items:stretch;justify-content:flex-end;padding:0;backdrop-filter:none}
.source-layout #overlay-root .dialog.mg-mall-drawer{display:flex;flex-direction:column;width:min(620px,100%);max-width:100%;height:100vh;height:100dvh;max-height:100vh;max-height:100dvh;margin:0;border-radius:0;overflow:hidden}
.source-layout #overlay-root .mg-mall-drawer>.dialog-header{flex-shrink:0;min-height:49px;padding:12px 20px;gap:12px;border-bottom:1px solid var(--border)}
.source-layout #overlay-root .mg-mall-drawer>.dialog-header h2{flex:1;min-width:0;margin:0;font-size:15px;line-height:22.5px;font-weight:600;white-space:nowrap}
.mg-mall-dialog-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.source-layout #overlay-root .mg-mall-drawer>.dialog-header>.icon-btn{width:24px;height:24px;min-width:24px;min-height:24px;padding:0;border-radius:6px}
.source-layout #overlay-root .mg-mall-drawer>.dialog-body{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:16px 20px;scrollbar-width:thin}
.source-layout #overlay-root .mg-mall-drawer>.dialog-footer{flex-shrink:0;display:flex;align-items:center;flex-wrap:wrap;min-height:57px;padding:12px 20px;border-top:1px solid var(--border)}
.mg-mall-drawer input[role=switch]{appearance:none;-webkit-appearance:none;position:relative;display:inline-block;width:32px;height:18px;min-width:32px;min-height:18px;margin:0;padding:0;border:0;border-radius:999px;background:var(--border);box-shadow:none;cursor:pointer;flex-shrink:0;vertical-align:middle}
.mg-mall-drawer input[role=switch]::before{content:"";position:absolute;top:2px;left:2px;width:14px;height:14px;border-radius:50%;background:var(--surface);box-shadow:0 1px 2px #0002;transition:transform .15s}
.mg-mall-drawer input[role=switch]:checked{background:var(--ink)}
.mg-mall-drawer input[role=switch]:checked::before{transform:translateX(14px)}
.mg-mall-drawer input[role=switch]:focus-visible{outline:2px solid var(--primary);outline-offset:3px}
