/* Mumtaz green and gold. ERP warning/error colours retain their meaning. */
:root, [data-theme="light"] { --mg-green:#075b3d; --mg-green-dark:#063f2d; --mg-gold:#c79a35; --primary:#075b3d; --primary-color:#075b3d; --btn-primary:#075b3d; --btn-primary-hover:#063f2d; --btn-primary-active:#063f2d; }
.btn-primary { background-color:var(--mg-green); border-color:var(--mg-green); color:#fff; }
.btn-primary:hover, .btn-primary:focus { background-color:var(--mg-green-dark); border-color:var(--mg-green-dark); }
.mg-home { max-width:1240px; margin:0 auto; padding:16px 24px 24px; color:var(--text-color,#193d2d); }
.mg-home-header { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:center; gap:16px; padding:12px 0 22px; border-bottom:3px solid var(--mg-gold); }
.mg-home-logo { width:220px; max-width:60%; padding:7px; background:#fff; border-radius:8px; }
.mg-header-tools { margin-left:auto; display:flex; gap:10px; align-items:flex-start; }
.mg-account summary { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.mg-administration { position:relative; }
.mg-administration summary { padding:9px 13px; border:1px solid var(--border-color,#dce5dd); border-radius:8px; background:var(--card-bg,#fff); cursor:pointer; }
.mg-admin-options { position:absolute; z-index:30; right:0; width:245px; max-width:80vw; padding:8px; background:var(--card-bg,#fff); border:1px solid var(--border-color,#dce5dd); border-radius:8px; box-shadow:0 8px 25px #0002; }
.mg-admin-options button,.mg-admin-options a { display:block; border:0; border-radius:4px; text-align:left; padding:10px 12px; width:100%; background:none; color:var(--text-color,#193d2d); }
.mg-admin-options button:hover,.mg-admin-options a:hover { background:var(--control-bg,#edf4ee); }
.mg-breadcrumbs { display:flex; flex-wrap:wrap; gap:14px; align-items:center; margin:24px 0; color:var(--text-muted,#59675e); font-size:13px; }
.mg-breadcrumbs button { background:none; border:0; padding:5px 0; color:var(--text-color,#193d2d); }
.mg-home-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:28px; }
.mg-home-heading h1 { font-size:28px; line-height:1.3; font-weight:600; margin:0 0 8px; overflow-wrap:anywhere; }
.mg-home-heading p { color:var(--text-muted,#59675e); margin:0; overflow-wrap:anywhere; }
.mg-context-badge { padding:6px 10px; font-size:12px; border-radius:6px; background:var(--control-bg,#edf4ee); white-space:nowrap; }
.mg-business-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:16px; margin:32px 0 48px; }
.mg-business { display:flex; flex-direction:column; align-items:center; gap:14px; padding:26px 14px; text-align:center; border:1px solid var(--border-color,#dce5dd); border-radius:12px; background:var(--card-bg,#fff); color:var(--text-color,#193d2d); text-decoration:none !important; }
.mg-business-icon { display:grid; place-items:center; width:62px; height:62px; border-radius:17px; background:var(--mg-green); color:#fff; }
.mg-business-icon svg { width:30px; height:30px; }
.mg-business strong { font-size:15px; overflow-wrap:anywhere; }
.mg-business-meta { font-size:12px; color:var(--text-muted,#59675e); }
.mg-business:hover,.mg-activity:hover { border-color:var(--mg-gold); color:var(--text-color,#193d2d); background:var(--control-bg,#edf4ee); }
.mg-activity-section { margin-top:28px; }
.mg-activity-section h2 { display:flex; align-items:center; gap:14px; font-size:15px; margin:0 0 14px; font-weight:600; }
.mg-activity-section h2::after { content:""; height:1px; flex:1; background:var(--border-color,#dce5dd); }
.mg-activity-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.mg-activity { display:flex; align-items:center; gap:12px; min-width:0; min-height:74px; padding:16px; border:1px solid var(--border-color,#dce5dd); border-radius:9px; background:var(--card-bg,#fff); color:var(--text-color,#193d2d); text-align:left; }
.mg-activity strong { font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.mg-activity-icon { width:24px; height:24px; flex:0 0 24px; color:var(--mg-green); }
.mg-activity-icon svg { width:24px; height:24px; }
.mg-stage-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:12px; }
.mg-stage { display:flex; flex-direction:column; align-items:flex-start; gap:6px; min-height:128px; padding:16px; border:1px solid var(--border-color,#dce5dd); border-radius:12px; background:var(--card-bg,#fff); color:var(--text-color,#193d2d); text-align:left; font:inherit; }
button.mg-stage:hover { border-color:var(--mg-gold); background:var(--control-bg,#edf4ee); }
.mg-stage-due { border:2px solid var(--mg-gold); }
.mg-stage-head { display:flex; align-items:center; gap:8px; font-size:13px; font-weight:600; color:var(--text-muted,#59675e); }
.mg-stage-no { display:grid; place-items:center; width:24px; height:24px; border-radius:999px; background:var(--mg-green); color:#fff; font-size:13px; }
.mg-stage-count { font-size:40px; font-weight:600; line-height:1; font-variant-numeric:tabular-nums; }
.mg-stage-note { font-size:13px; color:var(--text-muted,#59675e); }
.mg-stage-alert { color:var(--text-color,#193d2d); font-weight:600; padding:2px 8px; border-radius:6px; background:color-mix(in srgb,#c0392b 16%,var(--card-bg,#fff)); }
.mg-home button:focus-visible,.mg-home a:focus-visible,.mg-home summary:focus-visible { outline:3px solid var(--mg-gold); outline-offset:3px; }
.mg-action-choice { display:block; width:100%; margin:10px 0; padding:12px; text-align:left; }
.mg-choice-search { margin:4px 0 8px; }
.mg-choice-list { max-height:min(60vh,520px); overflow-y:auto; padding-right:4px; }
.mg-choice-list .mg-action-choice:first-of-type { margin-top:2px; }
.mg-home-footer { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; margin-top:38px; padding-top:18px; border-top:1px solid var(--border-color,#dce5dd); color:var(--text-muted,#59675e); font-size:12px; }
.mg-state { color:var(--text-muted,#59675e); padding:22px 0; }
[data-theme="dark"] { --mg-gold:#dfb451; }
[data-theme="dark"] .mg-activity-icon { color:#a7d9bf; }
@media(max-width:1000px) { .mg-business-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } .mg-activity-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:600px) { .mg-home { padding:8px 0 24px; } .mg-home-heading { flex-wrap:wrap; } .mg-home-heading h1 { font-size:24px; } .mg-business-grid,.mg-activity-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; } .mg-activity { flex-direction:column; align-items:flex-start; padding:14px; } .mg-business { padding:22px 10px; } .mg-home-logo { width:185px; } }
@media print { .mg-header-tools,.mg-home-footer button { display:none; } }
