/* iOS 18-inspired grouped administration. Scoped to management surfaces. */
.mg-page,.mg-form{--mg-ink:#1c1c1e;--mg-secondary:#63636b;--mg-line:#e5e5ea;--mg-blue:#007aff;--mg-green:#168064;color:var(--mg-ink)}
.mg-page{min-width:0}.mg-page .page-head{margin-bottom:22px}.mg-page .page-head .eyebrow{color:var(--mg-green);font-size:12px;letter-spacing:.04em;font-weight:600}.mg-page .page-head p{max-width:670px;font-size:14px;line-height:1.7;color:var(--mg-secondary)}
.mg-context{display:flex;align-items:flex-start;gap:10px;padding:14px 17px;margin-bottom:24px;background:#eaf5f0;border:1px solid #d8eae2;border-radius:16px;color:#47665a;font-size:12px;line-height:1.75}.mg-context .icon{flex-shrink:0;width:18px;height:18px;margin-top:2px;color:var(--mg-green)}.mg-context strong{color:#1e5e49;font-weight:600;margin-right:10px}
.mg-tabs{display:flex;align-items:center;gap:4px;width:fit-content;max-width:100%;padding:5px;margin-bottom:24px;border-radius:15px;background:#e9e9ef;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:none}.mg-tabs::-webkit-scrollbar{display:none}.mg-tabs button{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;flex-shrink:0;border:1px solid transparent;border-radius:11px;padding:10px 15px;background:transparent;color:var(--mg-secondary);font-size:14px;font-weight:550;white-space:nowrap;box-shadow:none;transition:background .2s,color .2s,box-shadow .2s,transform .16s}.mg-tabs button.active{background:#fff;border-color:#e1e1e7;color:var(--mg-blue);box-shadow:0 2px 6px #1c1c1e0a}.mg-tabs button:active:not(:disabled){transform:scale(.98)}.mg-tabs .icon{width:18px;height:18px}.mg-tabs small{min-width:23px;padding:2px 6px;border-radius:7px;background:#dcdce4;color:#62626b;font-size:12px;font-weight:550;line-height:1.5;font-variant-numeric:tabular-nums}.mg-tabs button.active small{background:#eaf3ff;color:#0066d6}
.mg-content{animation:mg-enter .26s cubic-bezier(.2,.75,.3,1) both}.mg-page .panel{border:1px solid var(--mg-line);border-radius:21px;background:#fff;box-shadow:0 2px 12px #1c1c1e03;overflow:hidden;min-width:0}.mg-page .panel-head{align-items:flex-start;padding:24px;gap:20px;border-bottom:1px solid #efeff3}.mg-page .panel-head h2{color:var(--mg-ink);font-size:19px;font-weight:650;letter-spacing:-.4px;margin:0}.mg-page .panel-head small{display:block;max-width:650px;color:var(--mg-secondary);line-height:1.75;font-size:12px;margin-top:7px}.mg-page .actions{display:flex;gap:9px;flex-shrink:0}.mg-page button{min-height:44px;border-radius:11px;font-size:14px}.mg-page button.primary{background:var(--mg-blue);border-color:var(--mg-blue);color:#fff}.mg-page button.primary:hover:not(:disabled){background:#0069df;border-color:#0069df}.mg-page .actions button{padding:10px 14px;white-space:nowrap}
.mg-filters{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:18px 24px;border-bottom:1px solid #efeff3;background:#fff}.mg-search{display:flex;flex:1 1 230px;max-width:340px;gap:9px;align-items:center;min-height:44px;padding:0 13px;background:#f2f2f7;border:1px solid transparent;border-radius:11px;transition:background .2s,border-color .2s}.mg-search:focus-within{background:#fff;border-color:#007aff;outline:3px solid #007aff18}.mg-search .icon{color:#797984;width:18px;height:18px;flex-shrink:0}.mg-page .mg-search input{min-width:0;width:100%;min-height:42px;padding:0;background:transparent;border:0;outline:0;box-shadow:none;font-size:14px;color:var(--mg-ink)}.mg-page input::placeholder,.mg-form input::placeholder,.mg-form textarea::placeholder{color:#85858e}.mg-filters select{min-height:44px;max-width:260px;border:1px solid var(--mg-line);border-radius:11px;padding:10px 34px 10px 13px;background-color:#fff;color:var(--mg-ink);font-size:14px}.mg-filters>button{padding:10px 18px;color:var(--mg-blue);background:#f0f6ff;border:1px solid #e1ecff}.mg-result-count{margin-left:auto;color:var(--mg-secondary);font-size:12px;white-space:nowrap}
.mg-table{overflow:auto;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:#c7c7d0 transparent}.mg-table table{width:100%;font-size:14px;border-collapse:collapse}.mg-table th,.mg-table td{padding:18px 24px;vertical-align:middle;text-align:left}.mg-table th{background:#fafafd;color:#72727c;font-size:12px;font-weight:550;white-space:nowrap;border-bottom:1px solid var(--mg-line)}.mg-table td{color:#37373e;border-bottom:1px solid #efeff3;line-height:1.6;font-variant-numeric:tabular-nums}.mg-table tr:last-child td{border-bottom:0}.mg-table tbody tr{transition:background .18s ease}.mg-table tbody tr:hover{background:#fafbfe}.mg-table td>small,.mg-person small{display:block;margin-top:5px;color:var(--mg-secondary);font-size:12px;line-height:1.6}.mg-table .mg-wrap{white-space:normal;min-width:155px;max-width:330px;line-height:1.7;overflow-wrap:anywhere}.mg-table .mg-name{color:var(--mg-ink);font-weight:600;font-size:14px}.mg-person{display:flex;gap:11px;align-items:center}.mg-person>div{min-width:0}.mg-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:#eaf5f0;color:#217358;flex-shrink:0;font-size:12px;font-weight:600}.mg-table tbody tr:nth-child(3n+2) .mg-avatar{color:#4264a8;background:#edf2fc}.mg-table tbody tr:nth-child(3n) .mg-avatar{color:#8863a1;background:#f4edf8}
.mg-row-actions{display:flex;gap:7px;flex-wrap:nowrap}.mg-row-actions button{min-height:44px;padding:9px 12px;border:1px solid transparent;background:#f0f6ff;color:#0065d0;font-size:13px;white-space:nowrap}.mg-row-actions button:hover:not(:disabled){background:#e5efff}.mg-row-actions .mg-muted-action{color:#a34b32;background:#fff3ed}.mg-row-actions .mg-muted-action:hover:not(:disabled){background:#ffe9de}.mg-row-actions button:disabled{color:#8c8c95;background:#f3f3f7;opacity:.65}.mg-page .badge{padding:5px 9px;border-radius:8px;font-size:12px;line-height:1.5;font-weight:500}.mg-page .badge.green{color:#177153;background:#eaf6ef}.mg-page .badge.orange{color:#996517;background:#fff4dc}.mg-page .badge.gray{color:#686872;background:#f0f0f5}.mg-muted-label{color:var(--mg-secondary);font-size:12px}.mg-meta{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin-top:7px}.mg-meta small{margin-top:0}.mg-count{font-variant-numeric:tabular-nums;color:var(--mg-green);font-size:22px;font-weight:650}
.mg-form{font-size:14px}.mg-form .form-grid{column-gap:18px;row-gap:21px}.mg-form .field,.mg-import-upload .field{color:#37373e;font-size:14px;font-weight:550;gap:8px}.mg-form .field small,.mg-import-upload .field small{line-height:1.75;color:var(--mg-secondary);font-size:12px;font-weight:400}.mg-form .notice{margin-bottom:24px;border-radius:13px;border:1px solid #e1eaf5;background:#f2f7fd;color:#526579;font-size:12px;line-height:1.8}.mg-form .notice .icon{color:#5082be}.mg-form .check{display:flex;align-items:flex-start;gap:10px;font-size:12px;line-height:1.8;font-weight:400}.mg-form .check input{flex:0 0 auto;margin-top:3px}.mg-form .check span{min-width:0}.mg-form fieldset{min-width:0;border:0;padding:0;margin:0}
.mg-form input,.mg-form select,.mg-form textarea,.mg-import-upload input:not([type="checkbox"]):not([type="file"]),.mg-import-upload select,.mg-import-upload textarea{width:100%;min-height:46px;border:1px solid #dedee6;border-radius:11px;background:#fafafd;color:var(--mg-ink);font-size:14px;padding:11px 13px;box-sizing:border-box;transition:border-color .2s,background .2s,box-shadow .2s}.mg-form input:focus,.mg-form select:focus,.mg-form textarea:focus,.mg-import-upload input:focus,.mg-import-upload select:focus,.mg-import-upload textarea:focus{border-color:var(--mg-blue);background:#fff;box-shadow:0 0 0 3px #007aff14;outline:0}.mg-form input[readonly],.mg-form input:disabled,.mg-form select:disabled{background:#f0f0f5;color:#73737c}.mg-form textarea{min-height:96px;resize:vertical}.mg-form input[type="checkbox"],.mg-import-upload input[type="checkbox"]{width:19px;min-height:19px;height:19px;padding:0;border-radius:5px;accent-color:var(--mg-blue)}.mg-form .mg-subhead{grid-column:1/-1;margin:3px 0 -5px;font-size:14px;font-weight:600;color:var(--mg-ink)}
.mg-synthetic{display:flex;align-items:flex-start;gap:10px;padding:14px 15px;border:1px solid #f1e4c6;background:#fffbf1;border-radius:12px;color:#856825;font-size:12px;line-height:1.8}.mg-synthetic input{flex-shrink:0;margin-top:3px}.mg-checklist{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;max-height:230px;overflow-y:auto;padding:11px;border:1px solid var(--mg-line);border-radius:12px;background:#fafafd}.mg-checklist label{display:flex;align-items:flex-start;gap:9px;font-size:14px;line-height:1.6;padding:9px;color:#45454d;border-radius:8px}.mg-checklist label:has(input:checked){background:#edf5ff}.mg-checklist input{flex-shrink:0;margin-top:3px}.mg-checklist strong{font-size:14px;font-weight:500;display:block}.mg-checklist small{display:block;font-size:12px;color:var(--mg-secondary);margin-top:3px}.mg-form .mg-fixed-value{padding:13px 15px;background:#f2f2f7;border:1px solid #e7e7ee;border-radius:11px;color:var(--mg-secondary);font-size:12px;line-height:1.8;font-weight:400}.mg-form .mg-preview-trigger{margin-top:23px;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.mg-form .mg-preview-trigger button{min-height:44px;font-size:14px;padding:10px 15px;border-radius:11px;color:#0065d0;background:#eef5ff;border:1px solid #d9e8ff}.mg-inline-result{margin-top:17px;border-radius:12px;border:1px solid #d7eadd;background:#f0f8f2;padding:15px;font-size:12px;line-height:1.8;color:#376d4c}.mg-inline-result.is-error{border-color:#f0d9ce;background:#fff5ef;color:#9b5033}.mg-inline-result strong{display:block;margin-bottom:6px;font-size:14px;font-weight:600}.mg-inline-result ul{padding-left:18px;margin:8px 0 0}.mg-inline-result li{margin-top:6px}
.mg-import-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(260px,.7fr);align-items:start;gap:22px;margin-bottom:22px}.mg-import-upload{padding:24px}.mg-import-upload .field{display:flex;flex-direction:column;margin-bottom:20px}.mg-import-steps{display:flex;gap:18px;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid #ededf2;background:#fafafd}.mg-import-steps span{display:flex;align-items:center;gap:8px;color:#7c7c86;font-size:12px;white-space:nowrap}.mg-import-steps b{display:grid;place-items:center;width:25px;height:25px;border-radius:50%;color:#777782;background:#e9e9f0;font-size:12px;font-weight:600}.mg-import-steps .is-current{color:#0069d9;font-weight:600}.mg-import-steps .is-current b{background:#007aff;color:#fff}.mg-import-steps .is-done b{background:#e0f0e8;color:#168064}
.mg-file-drop{display:flex;flex-direction:column;align-items:center;text-align:center;gap:12px;background:#f7faff;border:1px dashed #b9d2f5;border-radius:16px;padding:24px 20px;margin-bottom:24px}.mg-upload-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;color:#007aff;background:#e5f0ff}.mg-upload-icon .icon{width:23px;height:23px}.mg-file-drop>strong{font-size:16px;font-weight:600;color:#28364d}.mg-file-drop>span:not(.mg-upload-icon){color:var(--mg-secondary);font-size:12px;line-height:1.8}.mg-file-drop input{border:0;background:none;padding:0;max-width:100%;min-height:44px;font-size:12px;color:var(--mg-secondary)}.mg-file-drop input::file-selector-button{min-height:44px;border:1px solid #d8e2f1;border-radius:10px;background:#fff;color:#0067d8;padding:10px 13px;margin-right:10px;font:inherit;cursor:pointer}.mg-file-drop>button{color:#007aff;border:0;background:transparent;font-size:12px}.mg-import-upload .mg-import-source{width:100%;min-height:175px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:13px;line-height:1.8}.mg-import-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin-top:20px}.mg-import-actions button{padding:11px 17px;font-size:14px}.mg-import-help{padding:24px}.mg-help-heading{display:flex;gap:9px;align-items:center;margin-bottom:21px}.mg-help-heading .icon{color:#007aff;width:20px;height:20px}.mg-import-help h3{font-size:16px;margin:0;font-weight:600;color:var(--mg-ink)}.mg-import-help ol{padding-left:20px;color:var(--mg-secondary);font-size:12px;line-height:1.85;margin:0}.mg-import-help li{padding-left:5px;margin-bottom:21px}.mg-import-help li::marker{color:#007aff;font-weight:600}.mg-import-help strong{display:block;color:#3c3c44;font-size:14px;font-weight:550;margin-bottom:5px}.mg-import-help .notice{font-size:12px;line-height:1.8;border-radius:12px;background:#f2f2f7;color:var(--mg-secondary);border:1px solid #e7e7ef}
.mg-import-summary{display:flex;gap:30px;flex-wrap:wrap;padding:18px 24px;border-bottom:1px solid var(--mg-line);background:#fafafd}.mg-import-summary span{font-size:12px;color:var(--mg-secondary)}.mg-import-summary strong{color:var(--mg-green);font-size:26px;font-weight:650;margin-right:6px;font-variant-numeric:tabular-nums}.mg-import-summary .is-error strong{color:#b36537}.mg-import-errors{color:#a65335!important;white-space:normal;line-height:1.8;min-width:180px;max-width:350px}.mg-preview-footer{padding:20px 24px;display:flex;justify-content:space-between;align-items:center;gap:20px;border-top:1px solid var(--mg-line);background:#fafafd}.mg-preview-footer p{font-size:12px;color:var(--mg-secondary);line-height:1.8;max-width:580px;margin:0}.mg-preview-footer button{padding:10px 16px;flex-shrink:0}.mg-account-status{display:inline-flex;align-items:center;gap:6px}.mg-empty,.mg-table .empty{padding:52px 24px;text-align:center;color:var(--mg-secondary);font-size:14px;line-height:1.8}.mg-identity-note{padding:14px 16px;border:1px solid #f1e4c6;border-radius:12px;background:#fffbf1;color:#856825;font-size:12px;line-height:1.8;margin-bottom:20px}.mg-settings-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.mg-form .mg-hidden{display:none}.mg-page>.footer{margin-top:24px;color:#73737e;font-size:12px}.mg-page :is(button,input,select,textarea):focus-visible,.mg-table:focus-visible{outline:3px solid #007aff55;outline-offset:3px}
@keyframes mg-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:1400px){.mg-table th,.mg-table td{padding-top:20px;padding-bottom:20px}}
@media(max-width:1100px){.mg-import-layout{grid-template-columns:1fr;gap:20px}.mg-import-help ol{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}.mg-import-help li{margin-bottom:0}.mg-page .panel-head{flex-wrap:wrap}}
@media(max-width:760px){.mg-page .page-head{margin-bottom:18px}.mg-page .page-head p{max-width:none;font-size:14px}.mg-context{font-size:12px;padding:13px 14px;margin-bottom:20px;border-radius:14px}.mg-context strong{display:block;margin:0 0 2px}.mg-tabs{width:100%;margin-bottom:20px;border-radius:14px}.mg-tabs button{font-size:13px;padding:10px 12px;gap:7px}.mg-tabs .icon{width:17px;height:17px}.mg-tabs small{font-size:12px}.mg-page .panel{border-radius:18px}.mg-page .panel-head{padding:20px 18px;gap:16px}.mg-page .panel-head h2{font-size:18px}.mg-page .panel-head>.actions{width:100%;flex-wrap:wrap}.mg-page .panel-head .actions button{flex:1}.mg-filters{padding:16px 18px;gap:10px}.mg-search{max-width:none;flex-basis:100%}.mg-page .mg-search input,.mg-filters select{font-size:16px}.mg-filters select{flex:1;min-width:0;max-width:none}.mg-result-count{flex-basis:100%;margin:2px 0 0}.mg-table th,.mg-table td{padding:16px 18px}.mg-table td{font-size:14px}.mg-table .mg-name{white-space:nowrap}.mg-row-actions button{min-height:44px}.mg-import-layout{gap:18px}.mg-import-steps{padding:16px 18px;gap:7px}.mg-import-steps span{gap:6px;font-size:12px}.mg-import-steps b{width:22px;height:22px}.mg-import-upload{padding:20px 18px}.mg-file-drop{padding:21px 16px}.mg-import-help{padding:22px 18px}.mg-import-help ol{display:block}.mg-import-help li{margin-bottom:18px}.mg-import-source{font-size:14px}.mg-import-actions button{min-height:46px}.mg-import-summary{padding:16px 18px;gap:25px}.mg-preview-footer{padding:18px;flex-direction:column;align-items:stretch;gap:15px}.mg-preview-footer button{min-height:46px}.mg-checklist{grid-template-columns:1fr}.mg-form input:not([type="checkbox"]),.mg-form select,.mg-form textarea,.mg-import-upload input:not([type="checkbox"]):not([type="file"]),.mg-import-upload select,.mg-import-upload textarea{font-size:16px}.mg-form .check{font-size:12px}.mg-form .form-grid{column-gap:14px;row-gap:19px}.mg-settings-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.mg-content{animation:none}.mg-tabs button,.mg-table tbody tr,.mg-search,.mg-form input,.mg-form select,.mg-form textarea,.mg-import-upload input,.mg-import-upload select,.mg-import-upload textarea{transition:none}.mg-tabs button:active:not(:disabled){transform:none}}
