:root {
    --mmc-ink: #232844;
    --mmc-muted: #5d6480;
    --mmc-line: #dddff0;
    --mmc-paper: #f7f7fd;
    --mmc-active: #ece9ff;
}
body { background: #ffffff; color: var(--mmc-ink); }
.mmc-top {
    min-height: 68px;
    padding: .8rem clamp(1rem, 3vw, 2rem);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
    background: white;
    border-bottom: 1px solid var(--mmc-line);
}
.mmc-brand { color: var(--mmc-ink); font-weight: 750; letter-spacing: -.025em; font-size: 1.2rem; }
.mmc-quiet { background: none; border: 0; padding: .25rem .5rem; color: var(--mmc-muted); text-decoration: underline; }
.mmc-account, .mmc-actions, .mmc-company-picker { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.mmc-shell { display: grid; grid-template-columns: 13rem minmax(0, 1fr); min-height: calc(100vh - 68px); }
.mmc-nav {
    background: white;
    font-family: 'Poppins', sans-serif;
    border-right: 1px solid var(--mmc-line);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: .22rem;
    padding: 1.6rem .8rem;
}
.mmc-nav a { color: var(--mmc-muted); padding: .7rem .85rem; border-radius: 10px; font-size: 14px; font-weight: 400; }
.mmc-nav a:hover, .mmc-nav a[aria-current] { color: var(--mmc-ink); background: var(--mmc-active); }
.mmc-nav a[aria-current] { font-weight: 500; }
.mmc-main { width: 100%; max-width: 94rem; padding: clamp(1rem, 3vw, 2.5rem); margin-inline: auto; }
.mmc-public { display: block; }
.mmc-public .mmc-main { max-width: 40rem; }
.mmc-main h1 { font-weight: 750; letter-spacing: -.04em; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.mmc-main h2 { font-size: 1.15rem; font-weight: 720; letter-spacing: -.02em; }
.mmc-heading { display: flex; gap: 1rem; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 1.25rem; }
.mmc-heading p, .mmc-muted { color: var(--mmc-muted); }
.mmc-heading p { margin: .2rem 0 0; }
.mmc-section-head { margin-bottom: .6rem; }
.mmc-section-head h2 { margin: 0; }
/* Cards that share a row share a height (design_language_playful.md §5.5), so a
   short card never sits beside a tall one with its shadow ending early. The case
   grid is the exception: its tracks are page columns holding stacks of cards,
   not a row of sibling cards. */
.mmc-metrics, .mmc-grid, .mmc-case-grid { display: grid; gap: .9rem; align-items: stretch; }
.mmc-case-grid { align-items: start; }
.mmc-metrics { grid-template-columns: repeat(auto-fit,minmax(min(100%,10rem),1fr)); gap: .75rem; }
.mmc-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,19rem),1fr)); }
.mmc-case-grid { grid-template-columns: minmax(17rem, 1fr) minmax(25rem, 1.45fr); }
.mmc-main .mmc-card { margin-bottom: .95rem; padding: clamp(1rem, 2vw, 1.35rem); border-radius: 16px; }
.mmc-metrics .mmc-card { min-height: 6.5rem; }
.mmc-metrics .mmc-card span { color: var(--mmc-muted); font-weight: 600; }
.mmc-metrics strong { display: block; font-size: 1.75rem; }
.mmc-form { display: grid; gap: .75rem; justify-items: start; max-width: 40rem; }
.mmc-field { display: grid; gap: .26rem; align-items: start; width: 100%; margin: 0; font-weight: 600; }
.mmc-company-picker { align-items: end; }
.mmc-company-picker .mmc-field { width: auto; min-width: 10rem; }
.mmc-quiet:focus-visible, .mmc-nav a:focus-visible, .mmc-main summary:focus-visible { outline: 2px solid #5643b5; outline-offset: 3px; }
.mmc-main legend { font-size: 1rem; font-weight: 650; }
.mmc-check { display: block; margin-block: .35rem; }
.mmc-back { display: inline-block; margin: .1rem 0 .85rem; }
.mmc-disclosure { border-top: 1px solid var(--mmc-line); padding: .68rem 0; }
.mmc-main summary { cursor: pointer; font-weight: 700; }
.mmc-main details[open] > summary { margin-bottom: .8rem; }
.mmc-status { display: inline-block; padding: .2rem .5rem; border-radius: 6px; background: #eeebff; color: #42318a; white-space: nowrap; font-weight: 700; }
.mmc-status-due { background: #fff0d4; color: #754100; }
.mmc-status-complete { background: #def6e9; color: #1b5c3b; }
.mmc-due-label { display: block; margin-top: .25rem; font-size: .85rem; color: #754100; }
.mmc-next { margin-top: .75rem; }
.mmc-facts { display: grid; grid-template-columns: minmax(6rem,.8fr) minmax(0,1fr); gap: .4rem .6rem; margin-bottom: 0; }
.mmc-facts dd { margin: 0; overflow-wrap: anywhere; }
.mmc-pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.mmc-timeline { margin: .5rem 0 0; padding: 0 0 0 .85rem; list-style: none; border-left: 2px solid var(--mmc-line); }
.mmc-timeline li { position: relative; margin: 0; padding: 0 0 1.1rem .45rem; }
.mmc-timeline li::before { position: absolute; width: .55rem; height: .55rem; background: #7461d2; border-radius: 50%; content: ''; left: -1.19rem; top: .35rem; }
.mmc-timeline li:last-child { padding-bottom: 0; }
.mmc-timeline p { margin: .2rem 0; }
.mmc-timeline-head { display: flex; flex-wrap: wrap; gap: .2rem .8rem; justify-content: space-between; }
.mmc-timeline-head time { color: var(--mmc-muted); }
.mmc-key { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .65rem; }
.mmc-main pre { white-space: pre-wrap; overflow-wrap: anywhere; padding: .75rem; background: var(--mmc-paper); border-radius: 8px; }
@media (max-width: 1100px) { .mmc-case-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
    .mmc-shell { display: block; }
    .mmc-nav { flex-direction: row; overflow-x: auto; padding: .45rem .55rem; border: 0; border-bottom: 1px solid var(--mmc-line); }
    .mmc-nav a { white-space: nowrap; }
}
.mmc-team { list-style: none; padding: 0; margin: .75rem 0; }
.mmc-team li { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .75rem; align-items: center; padding: .7rem 0; border-top: 1px solid var(--mmc-line); }
.mmc-team span, .mmc-team small { display: block; }
.mmc-retrieval-form { width: 100%; max-width: 55rem; }
.mmc-retrieval-form > fieldset, .mmc-retrieval-form > details { width: 100%; }
.mmc-retrieval-form fieldset { display: grid; gap: .75rem; }
.mmc-retrieval-form legend { margin-bottom: .5rem; }
.mmc-request-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .75rem; }
.mmc-company-address, .mmc-employee-address { display: grid; gap: .75rem; width: 100%; min-width: 0; }
.mmc-address-fields { display: grid; gap: .75rem; }
/*
 * Popups follow design_language_playful.md the way Furloop's playful modals do
 * (furloop-playful.css "modals", views/order/_styles_playful.php): a hero-shadow
 * sticker that sits straight, a band header and footer ruled in ink, a capsule
 * close button, mono uppercase labels, and sections split by a soft hairline.
 */
.mmc-request-dialog {
    width: min(55rem, calc(100vw - 2rem));
    max-height: calc(100dvh - 2rem);
    margin: auto;
    padding: 0;
    color: var(--pl-ink);
    background: var(--pl-card);
    border: var(--pl-border);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow-hero);
    font-family: var(--pl-body);
    overflow-y: auto;
}
.mmc-request-dialog[open] { animation: mmc-dialog-in .42s var(--pl-decel) both; }
@keyframes mmc-dialog-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.mmc-request-dialog::backdrop { background: rgb(38 32 26 / 45%); }
.mmc-dialog-content { padding: 0 22px 22px; }
.mmc-dialog-header {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
    margin: 0 -22px 20px;
    padding: 15px 22px;
    background: var(--pl-band);
    border-bottom: var(--pl-border);
}
.mmc-main .mmc-dialog-header h2 {
    margin: 0;
    font-family: var(--pl-display);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--pl-ink);
}
.mmc-dialog-close {
    flex: none;
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: var(--pl-ink);
    background: var(--pl-card);
    border: var(--pl-border);
    border-radius: 999px;
    box-shadow: var(--pl-shadow-xs);
    cursor: pointer;
    transition: transform .1s ease, box-shadow .1s ease, background-color .1s ease;
}
.mmc-dialog-close svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.mmc-dialog-close:hover { background: var(--pl-rose); }
.mmc-dialog-close:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--pl-ink); }
.mmc-dialog-close:focus-visible { outline: 3px solid var(--pl-accent); outline-offset: 2px; }

.mmc-request-dialog .mmc-retrieval-form { gap: 16px; max-width: none; }
.mmc-request-dialog .mmc-retrieval-form > fieldset + fieldset,
.mmc-request-dialog .mmc-retrieval-form > fieldset + .mmc-disclosure,
.mmc-request-dialog .mmc-employee-address {
    margin-top: 8px;
    padding-top: 22px;
    border-top: var(--pl-rule);
}
.mmc-request-dialog fieldset { gap: 16px; }
.mmc-request-dialog .mmc-request-fields,
.mmc-request-dialog .mmc-address-fields { gap: 16px 18px; }
/* Floated, as Bootstrap's reboot does, so the browser stops drawing the legend
   across the fieldset's top border — that would hide the section hairline. */
.mmc-main .mmc-request-dialog legend {
    float: left;
    width: 100%;
    padding: 0;
    margin: 0;
    font-family: var(--pl-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
    color: var(--pl-ink);
}
.mmc-request-dialog .mmc-field {
    gap: 7px;
    color: var(--pl-ink-2);
    font-family: var(--pl-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.mmc-request-dialog .mmc-field .form-control,
.mmc-request-dialog .mmc-field .form-select { letter-spacing: normal; text-transform: none; }
/* The theme fades read-only controls to 60%, which greys the ink outline. The
   autofilled company address keeps full-strength ink and reads as locked through
   the band fill instead (furloop-playful.css .form-control[readonly]). */
.mmc-main .mmc-request-dialog .form-control[readonly] { opacity: 1; cursor: default; }
.mmc-request-dialog .mmc-muted {
    max-width: var(--pl-measure);
    margin: 0;
    color: var(--pl-ink-2);
    font-size: 13px;
    line-height: 1.55;
}
.mmc-dialog-content > .mmc-muted { margin-bottom: 18px; }
.mmc-dialog-shortcut { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 22px; padding-bottom: 20px; border-bottom: var(--pl-rule); }
.mmc-request-dialog .mmc-dialog-shortcut .mmc-muted { margin: 0; }
.mmc-dialog-content > .mmc-disclosure { margin-top: 22px; }
.mmc-dialog-content > .mmc-disclosure + .mmc-disclosure { margin-top: 0; padding-top: 18px; }
/* The person search: a capsule input with a result list that drops below it as
   a card. Rows highlight in the butter row tone; the chosen row carries a tick. */
.mmc-person-picker { display: grid; gap: 7px; }
.mmc-person-picker[hidden] { display: none; }
.mmc-combobox { position: relative; }
.mmc-combobox .form-control { padding-right: 46px; }
.mmc-combobox-clear {
    position: absolute;
    top: 50%;
    right: 9px;
    transform: translateY(-50%);
    display: inline-grid;
    place-items: center;
    width: 26px;
    height: 26px;
    padding: 0;
    color: var(--pl-ink);
    background: var(--pl-card);
    border: var(--pl-hair);
    border-radius: 999px;
    cursor: pointer;
}
.mmc-combobox-clear[hidden] { display: none; }
.mmc-combobox-clear svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; }
.mmc-combobox-clear:hover { background: var(--pl-rose); }
.mmc-combobox-clear:focus-visible { outline: 3px solid var(--pl-accent); outline-offset: 2px; }
.mmc-combobox-list {
    position: absolute;
    z-index: 5;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 280px;
    margin: 0;
    padding: 6px;
    overflow-y: auto;
    list-style: none;
    background: var(--pl-card);
    border: var(--pl-border);
    border-radius: var(--pl-radius);
    box-shadow: var(--pl-shadow);
}
.mmc-combobox-list[hidden] { display: none; }
.mmc-combobox-list [role="option"] {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
    padding: 9px 12px 9px 32px;
    position: relative;
    border-radius: 10px;
    color: var(--pl-ink);
    cursor: pointer;
}
.mmc-combobox-list [role="option"] strong { font-weight: 600; font-size: 14px; }
.mmc-combobox-list [role="option"] span { font-family: var(--pl-mono); font-size: 12px; color: var(--pl-ink-3); }
.mmc-combobox-list [role="option"]:hover,
.mmc-combobox-list [role="option"].is-active { background: var(--pl-row-hover); }
.mmc-combobox-list [role="option"].is-active { box-shadow: inset 0 0 0 1.5px var(--pl-ink); }
.mmc-combobox-list [aria-selected="true"]::before {
    content: "✓";
    position: absolute;
    left: 12px;
    font-weight: 700;
}
.mmc-combobox-list .mmc-combobox-new {
    margin-top: 6px;
    font: 700 14px/1.2 var(--pl-display);
}
.mmc-combobox-list .mmc-combobox-new::after {
    content: "";
    position: absolute;
    left: 6px;
    right: 6px;
    top: -4px;
    border-top: var(--pl-rule);
}
.mmc-combobox-empty { padding: 10px 12px; font-size: 13px; color: var(--pl-ink-2); }
.mmc-request-dialog .mmc-muted a { color: var(--pl-ink); text-decoration-color: var(--pl-accent); text-decoration-thickness: 2px; text-underline-offset: 3px; }

/* §6.10 — the disclosure is a ghost capsule with a mono arrow that flips open. */
.mmc-request-dialog .mmc-disclosure { padding: 22px 0 0; border-top: var(--pl-rule); margin-top: 8px; }
.mmc-request-dialog .mmc-disclosure > summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    list-style: none;
    background: var(--pl-paper);
    border: var(--pl-border);
    border-radius: 999px;
    box-shadow: var(--pl-shadow-sm);
    font: 700 14px/1.2 var(--pl-display);
    color: var(--pl-ink);
    user-select: none;
    transition: transform .1s ease, box-shadow .1s ease, background-color .1s ease;
}
.mmc-request-dialog .mmc-disclosure > summary::-webkit-details-marker { display: none; }
.mmc-request-dialog .mmc-disclosure > summary::after {
    content: "↓";
    font-family: var(--pl-mono);
    transition: transform .16s ease;
}
.mmc-request-dialog .mmc-disclosure[open] > summary::after { transform: rotate(180deg); }
.mmc-request-dialog .mmc-disclosure > summary:hover { background: var(--pl-sun); }
.mmc-request-dialog .mmc-disclosure > summary:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--pl-ink); }
.mmc-main .mmc-request-dialog .mmc-disclosure > summary:focus-visible { outline: 3px solid var(--pl-accent); outline-offset: 3px; }
.mmc-request-dialog .mmc-disclosure[open] > summary { margin-bottom: 18px; }
.mmc-request-dialog .mmc-disclosure > .mmc-field + .mmc-field,
.mmc-request-dialog .mmc-disclosure .mmc-form { margin-top: 16px; }
.mmc-request-dialog .mmc-disclosure ul { padding-left: 1.1rem; margin: 0 0 4px; }

.mmc-request-dialog .mmc-actions { margin-top: 8px; gap: 10px; }
.mmc-request-dialog .mmc-dialog-footer {
    justify-self: stretch;
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 8px -22px -22px;
    padding: 14px 22px;
    background: var(--pl-band);
    border-top: var(--pl-border);
}
body:has(.mmc-request-dialog[open]) { overflow: hidden; }
@media (max-width: 480px) {
    .mmc-request-dialog { width: calc(100vw - 1.25rem); max-height: calc(100dvh - 1.25rem); }
    .mmc-dialog-content { padding: 0 16px 16px; }
    .mmc-dialog-header { margin: 0 -16px 16px; padding: 12px 16px; }
    .mmc-main .mmc-dialog-header h2 { font-size: 20px; }
    .mmc-request-dialog .mmc-dialog-footer { margin: 8px -16px -16px; padding: 12px 16px; }
}
@media (prefers-reduced-motion: reduce) {
    .mmc-request-dialog[open] { animation: none; }
    .mmc-dialog-close, .mmc-request-dialog .mmc-disclosure > summary,
    .mmc-request-dialog .mmc-disclosure > summary::after { transition: none; }
}

.mmc-main.furloop-settings-page { padding: 0; min-height: 0; }
.mmc-main .furloop-settings-page { min-height: 0; }
