/* ==========================================================================
   Mighty Memes design system. Loaded after Bootstrap 5.
   1 Tokens  2 Base  3 App shell  4 Components  5 Memes  6 Editors  7 Auth  8 Utilities
   ========================================================================== */

/* 1 ---------- Tokens ---------- */
:root {
    color-scheme: light;
    --mm-brand: #e50027;
    --mm-brand-strong: #c20021;
    --mm-brand-soft: #fff0f2;
    --mm-brand-ink: #e50027;        /* brand as text or an icon; needs to lighten on dark surfaces */
    --mm-link: #c20021;
    --mm-link-hover: #e50027;
    --mm-chart-1: #e50027;
    --mm-chart-1-hover: #c20021;
    --mm-chart-2: #3b5bdb;
    --mm-chart-2-hover: #2f4ac0;

    --mm-ink: #121826;
    --mm-ink-2: #1b2333;
    --mm-ink-3: #2a3448;
    --mm-ink-text: #c6cede;

    --mm-bg: #f5f6f8;
    --mm-surface: #ffffff;
    --mm-surface-2: #f9fafb;
    --mm-border: #e4e7ec;
    --mm-border-strong: #cfd4dc;
    --mm-hover: #f2f4f7;
    --mm-active: #eaecf0;
    --mm-media: #eef0f3;
    --mm-topbar-bg: rgba(255, 255, 255, .88);
    --mm-loader-bg: rgba(255, 255, 255, .6);
    --mm-placeholder: #98a2b3;

    --mm-text: #101828;
    --mm-text-2: #475467;
    --mm-text-3: #667085;

    --mm-success: #067647;
    --mm-success-soft: #ecfdf3;
    --mm-success-border: #abefc6;
    --mm-danger: #b42318;
    --mm-danger-soft: #fef3f2;
    --mm-danger-border: #fecdca;
    --mm-warning: #b54708;
    --mm-warning-soft: #fffaeb;

    --mm-radius-sm: 8px;
    --mm-radius: 12px;
    --mm-radius-lg: 16px;

    --mm-shadow-xs: 0 1px 2px rgba(16, 24, 40, .05);
    --mm-shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --mm-shadow-md: 0 8px 20px -6px rgba(16, 24, 40, .12), 0 2px 6px rgba(16, 24, 40, .05);
    --mm-shadow-lg: 0 24px 48px -12px rgba(16, 24, 40, .22);
    --mm-ring: 0 0 0 3px rgba(229, 0, 39, .18);

    --mm-sidebar-w: 288px;
    --mm-rail-w: 76px;
    --mm-form-w: 720px;
    --mm-topbar-h: 68px;
    --mm-ease: cubic-bezier(.2, .7, .3, 1);

    /* Bootstrap re-theme */
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --bs-body-color: var(--mm-text);
    --bs-body-bg: var(--mm-bg);
    --bs-body-font-size: .9375rem;
    --bs-border-color: var(--mm-border);
    --bs-link-color: var(--mm-link);
    --bs-link-hover-color: var(--mm-link-hover);
    --bs-primary: var(--mm-brand);
    --bs-primary-rgb: 229, 0, 39;
}

/* Dark theme: only values change here. Components read the tokens, so they need no dark variants. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --mm-brand-soft: #3a1520;
    --mm-brand-ink: #ff7088;
    --mm-link: #ff7088;
    --mm-link-hover: #ff94a6;
    --mm-chart-1: #f0304f;
    --mm-chart-1-hover: #ff4d67;
    --mm-chart-2: #5f82f8;
    --mm-chart-2-hover: #7c9cff;

    --mm-ink: #0b101a;
    --mm-ink-2: #172030;
    --mm-ink-3: #263247;

    --mm-bg: #0f1520;
    --mm-surface: #182130;
    --mm-surface-2: #1e2839;
    --mm-border: #2c3749;
    --mm-border-strong: #414e63;
    --mm-hover: #263247;
    --mm-active: #2f3c52;
    --mm-media: #121a27;
    --mm-topbar-bg: rgba(24, 33, 48, .88);
    --mm-loader-bg: rgba(15, 21, 32, .6);
    --mm-placeholder: #8592a6;

    --mm-text: #f2f4f7;
    --mm-text-2: #c3cbd8;
    --mm-text-3: #9ba7b8;

    --mm-success: #75e0a7;
    --mm-success-soft: #10291f;
    --mm-success-border: #17553a;
    --mm-danger: #fda29b;
    --mm-danger-soft: #331a1a;
    --mm-danger-border: #6b2a26;
    --mm-warning: #fec84b;
    --mm-warning-soft: #30260f;

    --mm-shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
    --mm-shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
    --mm-shadow-md: 0 8px 20px -6px rgba(0, 0, 0, .55);
    --mm-shadow-lg: 0 24px 48px -12px rgba(0, 0, 0, .7);
    --mm-ring: 0 0 0 3px rgba(255, 112, 136, .3);
}
.mm-no-transition, .mm-no-transition *, .mm-no-transition *::before, .mm-no-transition *::after { transition: none !important; }

/* 2 ---------- Base ---------- */
html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    line-height: 1.5;
    color: var(--mm-text);
    background: var(--mm-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { color: var(--mm-text); font-weight: 600; letter-spacing: -.01em; }
a { color: var(--bs-link-color); text-decoration: none; }
a:hover { color: var(--bs-link-hover-color); }
img { max-width: 100%; }
:focus-visible { outline: 2px solid var(--mm-brand); outline-offset: 2px; }

.mm-icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; }
.hide { display: none !important; }

/* 3 ---------- App shell ---------- */
.mm-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    width: var(--mm-sidebar-w);
    display: flex;
    flex-direction: column;
    color: var(--mm-ink-text);
    background: var(--mm-ink);
    transition: width .22s var(--mm-ease), transform .22s var(--mm-ease);
}

.mm-brand {
    display: flex;
    align-items: center;
    height: var(--mm-topbar-h);
    padding: 0 20px;
    flex: none;
    overflow: hidden;
}
.mm-brand-full { height: 34px; width: auto; max-width: none; }
.mm-brand-mark { height: 36px; width: 36px; display: none; }

.mm-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 12px 16px;
    scrollbar-width: thin;
    scrollbar-color: var(--mm-ink-3) transparent;
}
.mm-nav-list, .mm-subnav { list-style: none; margin: 0; padding: 0; }
.mm-nav-list > li { margin-bottom: 2px; }

.mm-nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 9px 12px;
    border: 0;
    border-radius: var(--mm-radius-sm);
    color: var(--mm-ink-text);
    background: none;
    font: inherit;
    font-weight: 500;
    font-size: .9rem;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.mm-nav-link .mm-icon { width: 20px; height: 20px; }
.mm-nav-link:hover { color: #fff; background: var(--mm-ink-2); }
.mm-nav-link:focus-visible { outline-color: #fff; outline-offset: -2px; }
.mm-nav-link.is-active { color: #fff; background: var(--mm-brand); box-shadow: 0 6px 14px -6px rgba(229, 0, 39, .7); }
.mm-nav-label { flex: 1; overflow: hidden; text-overflow: ellipsis; }
.mm-nav-caret { width: 16px !important; height: 16px !important; opacity: .7; transition: transform .2s var(--mm-ease); }

.mm-nav-group.is-open > .mm-nav-link { color: #fff; }
.mm-nav-group.is-open .mm-nav-caret { transform: rotate(180deg); }
.mm-nav-group.has-active > .mm-nav-link { color: #fff; }

.mm-subnav-wrap { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .22s var(--mm-ease); }
.mm-nav-group.is-open > .mm-subnav-wrap { grid-template-rows: 1fr; }
.mm-subnav { overflow: hidden; min-height: 0; margin-left: 21px; border-left: 1px solid var(--mm-ink-3); }
.mm-nav-group.is-open .mm-subnav { margin-top: 2px; margin-bottom: 6px; }

.mm-subnav-link {
    display: block;
    padding: 7px 12px;
    margin-left: 8px;
    border-radius: 6px;
    color: var(--mm-ink-text);
    font-size: .85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color .15s, color .15s;
}
.mm-subnav-link:hover { color: #fff; background: var(--mm-ink-2); }
.mm-subnav-link.is-active { color: #fff; background: var(--mm-ink-3); font-weight: 600; }
.mm-subnav-heading {
    padding: 10px 12px 4px 20px;
    color: #8390a6;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.mm-sidebar-foot { flex: none; padding: 14px 20px 16px; border-top: 1px solid var(--mm-ink-2); }
.mm-sidebar-foot-logo { display: block; width: 148px; margin-bottom: 10px; }
.mm-social { display: flex; gap: 6px; }
.mm-social a {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: var(--mm-ink-text);
    background: var(--mm-ink-2);
    transition: background-color .15s, color .15s;
}
.mm-social a:hover { color: #fff; background: var(--mm-ink-3); }
.mm-social .mm-icon { width: 15px; height: 15px; }

.mm-main {
    min-height: 100vh;
    margin-left: var(--mm-sidebar-w);
    transition: margin-left .22s var(--mm-ease);
}

.mm-topbar {
    position: sticky;
    top: 0;
    z-index: 1020;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: var(--mm-topbar-h);
    padding: 10px 24px;
    background: var(--mm-topbar-bg);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid var(--mm-border);
}
.mm-topbar-toggle, .mm-iconbtn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: none;
    border: 1px solid transparent;
    border-radius: var(--mm-radius-sm);
    color: var(--mm-text-2);
    background: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}
.mm-topbar-toggle:hover, .mm-iconbtn:hover { color: var(--mm-text); background: var(--mm-hover); }
.mm-topbar-toggle .mm-icon { width: 22px; height: 22px; }

.mm-theme-sun { display: none; }
:root[data-theme="dark"] .mm-theme-sun { display: inline-block; }
:root[data-theme="dark"] .mm-theme-moon { display: none; }
.mm-theme-toggle .mm-icon { width: 20px; height: 20px; }
:root[data-theme="dark"] .mm-sidebar { border-right: 1px solid var(--mm-border); }
:root[data-theme="dark"] .mm-hero { border: 1px solid var(--mm-border); }

.mm-topbar-title { min-width: 0; flex: 1; }
.mm-topbar-title h1 {
    margin: 0;
    font-size: 1.125rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mm-crumbs { display: flex; flex-wrap: wrap; gap: 4px; margin: 1px 0 0; padding: 0; list-style: none; font-size: .78rem; color: var(--mm-text-3); }
.mm-crumbs li { display: flex; align-items: center; gap: 4px; }
.mm-crumbs li + li::before { content: "/"; color: var(--mm-border-strong); }
.mm-crumbs a { color: var(--mm-text-3); }
.mm-crumbs a:hover { color: var(--mm-text); }

.mm-topbar-actions { display: flex; align-items: center; gap: 8px; flex: none; }
.mm-tutorial {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    color: var(--mm-text-2);
    background: var(--mm-surface);
    font-size: .85rem;
    font-weight: 500;
    transition: border-color .15s, color .15s;
}
.mm-tutorial:hover { color: var(--mm-brand-ink); border-color: var(--mm-border-strong); }

.mm-userchip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px 4px 4px;
    border-radius: 999px;
    color: var(--mm-text);
    transition: background-color .15s;
}
.mm-userchip:hover { color: var(--mm-text); background: var(--mm-hover); }
.mm-avatar {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, var(--mm-brand), #8a0a2a);
    font-size: .8rem;
    font-weight: 600;
}
.mm-userchip-text { display: flex; flex-direction: column; line-height: 1.2; }
.mm-userchip-name { font-size: .85rem; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mm-userchip-plan { font-size: .72rem; color: var(--mm-text-3); }

.mm-content { padding: 24px; max-width: 1600px; animation: mm-fade .28s var(--mm-ease); }
@keyframes mm-fade { from { opacity: 0; } to { opacity: 1; } }

.mm-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1035;
    background: rgba(16, 24, 40, .5);
    opacity: 0;
    visibility: hidden;
    transition: opacity .22s, visibility .22s;
}

/* Icon rail (desktop, collapsed) */
.mm-rail .mm-sidebar { width: var(--mm-rail-w); }
.mm-rail .mm-main { margin-left: var(--mm-rail-w); }
.mm-rail .mm-brand { padding: 0; justify-content: center; }
.mm-rail .mm-brand-full,
.mm-rail .mm-nav-label,
.mm-rail .mm-nav-caret,
.mm-rail .mm-subnav-wrap,
.mm-rail .mm-sidebar-foot { display: none; }
.mm-rail .mm-brand-mark { display: block; }
.mm-rail .mm-nav-link { justify-content: center; padding: 11px; }

/* Off-canvas drawer below lg: content is never pushed or squeezed */
@media (max-width: 991.98px) {
    .mm-sidebar { transform: translateX(-100%); box-shadow: none; }
    .mm-main { margin-left: 0; }
    .mm-nav-open .mm-sidebar { transform: none; box-shadow: var(--mm-shadow-lg); }
    .mm-nav-open .mm-backdrop { opacity: 1; visibility: visible; }
    .mm-nav-open { overflow: hidden; }
    .mm-topbar { padding: 8px 14px; }
    .mm-content { padding: 16px; }
    .mm-crumbs { display: none; }
    .mm-userchip { padding: 2px; }
    .mm-userchip-text { display: none; }

    /* The rail preference only applies on desktop */
    .mm-rail .mm-sidebar { width: var(--mm-sidebar-w); }
    .mm-rail .mm-main { margin-left: 0; }
    .mm-rail .mm-brand { padding: 0 20px; justify-content: flex-start; }
    .mm-rail .mm-brand-full { display: block; }
    .mm-rail .mm-brand-mark { display: none; }
    .mm-rail .mm-nav-label, .mm-rail .mm-nav-caret { display: block; }
    .mm-rail .mm-subnav-wrap { display: grid; }
    .mm-rail .mm-sidebar-foot { display: block; }
    .mm-rail .mm-nav-link { justify-content: flex-start; padding: 9px 12px; }
}
@media (max-width: 575.98px) {
    .mm-tutorial span { display: none; }
    .mm-tutorial { width: 36px; padding: 0; justify-content: center; }
}

/* 4 ---------- Components ---------- */

/* Buttons */
.btn {
    --bs-btn-border-radius: var(--mm-radius-sm);
    --bs-btn-font-weight: 500;
    --bs-btn-font-size: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { box-shadow: var(--mm-ring); outline: 0; }

.btn-primary, .btn-generate, .btn-empty, .btn-lic, .btn-login, .btn-sub, .mm-btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mm-brand);
    --bs-btn-border-color: var(--mm-brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--mm-brand-strong);
    --bs-btn-hover-border-color: var(--mm-brand-strong);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--mm-brand-strong);
    --bs-btn-active-border-color: var(--mm-brand-strong);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--mm-brand);
    --bs-btn-disabled-border-color: var(--mm-brand);
    box-shadow: var(--mm-shadow-xs);
}

.btn-secondary, .btn-next, .btn-theme-2, .mm-btn-dark {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--mm-ink-2);
    --bs-btn-border-color: var(--mm-ink-2);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--mm-ink);
    --bs-btn-hover-border-color: var(--mm-ink);
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--mm-ink);
    --bs-btn-active-border-color: var(--mm-ink);
}

.btn-cancel, .btn-reset, .btn-outline-secondary, .mm-btn-ghost {
    --bs-btn-color: var(--mm-text-2);
    --bs-btn-bg: var(--mm-surface);
    --bs-btn-border-color: var(--mm-border-strong);
    --bs-btn-hover-color: var(--mm-text);
    --bs-btn-hover-bg: var(--mm-hover);
    --bs-btn-hover-border-color: var(--mm-border-strong);
    --bs-btn-active-color: var(--mm-text);
    --bs-btn-active-bg: var(--mm-active);
    --bs-btn-active-border-color: var(--mm-border-strong);
}

.btn-success, .btn-set, .btn-theme-3 {
    --bs-btn-color: #fff;
    --bs-btn-bg: #067647;
    --bs-btn-border-color: #067647;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #05603a;
    --bs-btn-hover-border-color: #05603a;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #05603a;
    --bs-btn-active-border-color: #05603a;
}

.btn-danger {
    --bs-btn-bg: #d92d20;
    --bs-btn-border-color: #d92d20;
    --bs-btn-hover-bg: var(--mm-danger);
    --bs-btn-hover-border-color: var(--mm-danger);
    --bs-btn-active-bg: var(--mm-danger);
    --bs-btn-active-border-color: var(--mm-danger);
}

/* Square icon actions on cards */
.mm-action-btn, .btn-dow, .btn-del, .btn-edit {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm);
    color: var(--mm-text-2);
    background: var(--mm-surface);
    cursor: pointer;
    transition: background-color .15s, color .15s, border-color .15s;
}
.btn-dow:hover, .btn-edit:hover { color: var(--mm-text); background: var(--mm-hover); border-color: var(--mm-border-strong); }
.btn-del:hover { color: var(--mm-danger); background: var(--mm-danger-soft); border-color: var(--mm-danger-border); }

/* Forms */
.form-label, .cust-label { margin-bottom: 6px; color: var(--mm-text); font-size: .875rem; font-weight: 500; display: block; }
.form-control, .form-select {
    --bs-border-radius: var(--mm-radius-sm);
    min-height: 40px;
    color: var(--mm-text);
    background-color: var(--mm-surface);
    border-color: var(--mm-border-strong);
    box-shadow: var(--mm-shadow-xs);
    font-size: .9rem;
    transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { min-height: 84px; line-height: 1.5; }
.form-control::placeholder { color: var(--mm-placeholder); }
.form-control:focus, .form-select:focus { color: var(--mm-text); background-color: var(--mm-surface); }
.form-control:disabled, .form-control[readonly], .form-select:disabled { color: var(--mm-text-3); background-color: var(--mm-surface-2); }
.form-control::file-selector-button { color: var(--mm-text-2); background-color: var(--mm-surface-2); }
.form-control:hover:not(:disabled):not([readonly])::file-selector-button { background-color: var(--mm-hover); }
.form-check-input:not(:checked) { background-color: var(--mm-surface); }
.form-control:focus, .form-select:focus { border-color: var(--mm-brand); box-shadow: var(--mm-ring); }
.form-control[type="file"] { padding: 7px 10px; }
.form-control-color { padding: 4px; width: 56px; }
.form-check-input { border-color: var(--mm-border-strong); }
.form-check-input:checked { background-color: var(--mm-brand); border-color: var(--mm-brand); }
.form-check-input:focus { border-color: var(--mm-brand); box-shadow: var(--mm-ring); }
.input-group-text { background: var(--mm-surface-2); border-color: var(--mm-border-strong); color: var(--mm-text-3); font-size: .85rem; }
.mm-field-error, .field-error { display: block; margin-top: 5px; color: var(--mm-danger); font-size: .8rem; }
.mm-field-error:empty, .field-error:empty { display: none; }
label.error { display: block; margin-top: 5px; color: var(--mm-danger); font-size: .8rem; font-weight: 500; }

/* Cards */
.card, .mm-card {
    --bs-card-border-color: var(--mm-border);
    --bs-card-border-radius: var(--mm-radius);
    --bs-card-inner-border-radius: 11px;
    --bs-card-bg: var(--mm-surface);
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow-xs);
}
/* Layout rule: every page starts at the same left edge. Forms use one fixed width; lists and tables fill the page. */
.mm-form-card { max-width: var(--mm-form-w); }
.mm-card-pad { padding: 20px; }
@media (min-width: 768px) { .mm-card-pad { padding: 24px; } }
.mm-card-title { margin: 0 0 2px; font-size: 1rem; }
.mm-card-sub { margin: 0 0 18px; color: var(--mm-text-3); font-size: .85rem; }
.mm-card + .mm-card { margin-top: 16px; }
.mm-editor > .mm-card, .mm-settings > .mm-card { margin-top: 0; }

.mm-section-title { margin: 28px 0 12px; color: var(--mm-text); font-size: .95rem; font-weight: 600; }
.mm-section-title:first-child { margin-top: 0; }

.mm-page-intro { margin: 0 0 18px; color: var(--mm-text-2); font-size: .92rem; max-width: 70ch; }

/* List toolbar */
.mm-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.mm-search { position: relative; flex: 1 1 260px; max-width: 460px; }
.mm-search .mm-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--mm-text-3); pointer-events: none; }
.mm-search .form-control { padding-left: 36px; padding-right: 84px; }
.mm-search .btn { position: absolute; right: 4px; top: 4px; bottom: 4px; min-height: 0; padding: 0 12px; font-size: .82rem; }
.mm-toolbar .form-select { flex: 0 1 auto; width: auto; min-width: 128px; }
.mm-toolbar-spacer { flex: 1 1 auto; }
@media (max-width: 575.98px) {
    .mm-search { flex-basis: 100%; max-width: none; }
    .mm-toolbar-spacer { display: none; }
    .mm-toolbar .form-select { flex: 1 1 40%; }
}

/* Tables */
.mm-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.mm-table { width: 100%; margin: 0; border-collapse: collapse; font-size: .875rem; }
.mm-table th {
    padding: 11px 16px;
    color: var(--mm-text-3);
    background: var(--mm-surface-2);
    border-bottom: 1px solid var(--mm-border);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
    white-space: nowrap;
}
.mm-table th.is-sortable { cursor: pointer; user-select: none; }
.mm-table th.is-sortable:hover { color: var(--mm-text); }
.mm-table th[aria-sort="ascending"]::after { content: " \2191"; }
.mm-table th[aria-sort="descending"]::after { content: " \2193"; }
.mm-table td { padding: 12px 16px; border-bottom: 1px solid var(--mm-border); vertical-align: middle; color: var(--mm-text-2); }
.mm-table tbody tr:last-child td { border-bottom: 0; }
.mm-table tbody tr { transition: background-color .12s; }
.mm-table tbody tr:hover { background: var(--mm-surface-2); }
.mm-table-empty { padding: 44px 16px !important; color: var(--mm-text-3) !important; text-align: center; }
.mm-cell-strong { color: var(--mm-text); font-weight: 500; }

/* Badges */
.mm-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    color: var(--mm-text-2);
    background: var(--mm-hover);
    font-size: .75rem;
    font-weight: 500;
    white-space: nowrap;
}
.mm-badge .mm-icon { width: 13px; height: 13px; }
.mm-badge-success { color: var(--mm-success); background: var(--mm-success-soft); }
.mm-badge-danger { color: var(--mm-danger); background: var(--mm-danger-soft); }
.mm-badge-warning { color: var(--mm-warning); background: var(--mm-warning-soft); }

/* Alerts */
.mm-alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--mm-radius-sm); font-size: .875rem; border: 1px solid transparent; }
.mm-alert .mm-icon { margin-top: 2px; }
.mm-alert-danger { color: var(--mm-danger); background: var(--mm-danger-soft); border-color: var(--mm-danger-border); }
.mm-alert-success { color: var(--mm-success); background: var(--mm-success-soft); border-color: var(--mm-success-border); }
.mm-alert a { color: inherit; text-decoration: underline; }

/* Empty state */
.mm-empty { display: flex; flex-direction: column; align-items: center; padding: 56px 20px; text-align: center; background: var(--mm-surface); border: 1px dashed var(--mm-border-strong); border-radius: var(--mm-radius); }
.mm-empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 16px; border-radius: 50%; color: var(--mm-brand-ink); background: var(--mm-brand-soft); }
.mm-empty-icon .mm-icon { width: 26px; height: 26px; }
.mm-empty h2 { margin: 0 0 6px; font-size: 1.05rem; }
.mm-empty p { max-width: 44ch; margin: 0 0 18px; color: var(--mm-text-3); font-size: .9rem; }

/* Pagination */
.pagination { --bs-pagination-border-radius: var(--mm-radius-sm); gap: 4px; flex-wrap: wrap; margin: 0; }
.page-link {
    min-width: 36px;
    padding: 6px 10px;
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius-sm) !important;
    color: var(--mm-text-2);
    background: var(--mm-surface);
    font-size: .85rem;
    font-weight: 500;
    text-align: center;
}
.page-link:hover { color: var(--mm-text); background: var(--mm-hover); border-color: var(--mm-border-strong); }
.page-link:focus { box-shadow: var(--mm-ring); }
.page-item.active .page-link { color: #fff; background: var(--mm-brand); border-color: var(--mm-brand); }
.page-item.disabled .page-link { color: var(--mm-text-3); background: transparent; border-color: transparent; }
.mm-pagination { display: flex; justify-content: flex-end; margin-top: 20px; }

/* Loader overlay */
.mm-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    background: var(--mm-loader-bg);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.mm-spinner { width: 40px; height: 40px; border: 3px solid var(--mm-border); border-top-color: var(--mm-brand); border-radius: 50%; animation: mm-spin .75s linear infinite; }
@keyframes mm-spin { to { transform: rotate(360deg); } }

/* Result dialog used by editors (#rt) */
.mm-dialog-backdrop { position: fixed; inset: 0; z-index: 1900; display: none; background: rgba(16, 24, 40, .5); }
.mm-dialog { position: absolute; top: 50%; left: 50%; width: min(400px, calc(100vw - 32px)); overflow: hidden; transform: translate(-50%, -50%); background: var(--mm-surface); border-radius: var(--mm-radius); box-shadow: var(--mm-shadow-lg); }
.mm-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; color: #fff; background: #067647; }
.mm-dialog-head h4 { margin: 0; color: inherit; font-size: 1rem; }
.mm-dialog-close { padding: 0 4px; color: inherit; font-size: 1.4rem; line-height: 1; cursor: pointer; }
.mm-dialog-body { padding: 18px 16px; color: var(--mm-text-2); }

/* Modals, toasts, SweetAlert */
.modal { --bs-modal-bg: var(--mm-surface); --bs-modal-color: var(--mm-text); --bs-modal-header-border-color: var(--mm-border); --bs-modal-footer-border-color: var(--mm-border); }
:root[data-theme="dark"] .btn-close { filter: invert(1) grayscale(1) brightness(1.6); }
:root[data-theme="dark"] .form-select { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%239ba7b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); }
:root[data-theme="dark"] .text-muted { color: var(--mm-text-3) !important; }
code { color: var(--mm-link); }
.modal-content { border: 0; border-radius: var(--mm-radius-lg); box-shadow: var(--mm-shadow-lg); overflow: hidden; }
.modal-header { border-bottom-color: var(--mm-border); }
.modal-footer { border-top-color: var(--mm-border); }
.swal2-popup { color: var(--mm-text) !important; background: var(--mm-surface) !important; border-radius: var(--mm-radius-lg) !important; font-family: var(--bs-body-font-family) !important; }
.swal2-title { color: var(--mm-text) !important; font-size: 1.2rem !important; }
.swal2-html-container { font-size: .95rem !important; color: var(--mm-text-2) !important; }
.swal2-styled { border-radius: var(--mm-radius-sm) !important; font-size: .9rem !important; font-weight: 500 !important; }
#toast-container > div { border-radius: var(--mm-radius-sm) !important; box-shadow: var(--mm-shadow-md) !important; opacity: 1 !important; font-size: .875rem; }
#toast-container > .toast-warning { background-color: #dc6803 !important; }
#toast-container > .toast-error { background-color: #d92d20 !important; }
#toast-container > .toast-success { background-color: #067647 !important; }

/* Upgrade prompt */
.mm-upgrade { padding: 56px 20px; text-align: center; background: var(--mm-surface); border: 1px solid var(--mm-border); border-radius: var(--mm-radius-lg); box-shadow: var(--mm-shadow-sm); }
.mm-upgrade-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; margin-bottom: 16px; border-radius: 50%; color: var(--mm-brand-ink); background: var(--mm-brand-soft); }
.mm-upgrade-icon .mm-icon { width: 28px; height: 28px; }
.mm-upgrade h2 { margin-bottom: 8px; font-size: 1.25rem; }
.mm-upgrade p { max-width: 52ch; margin: 0 auto 20px; color: var(--mm-text-2); }

/* Dashboard */
.mm-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding: 26px 28px;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(120% 160% at 100% 0, #7d0a26 0, transparent 55%), var(--mm-ink);
    border-radius: var(--mm-radius-lg);
}
.mm-hero h2 { margin: 0 0 6px; color: #fff; font-size: 1.4rem; font-weight: 700; }
.mm-hero p { max-width: 58ch; margin: 0 0 16px; color: #d0d5dd; font-size: .925rem; }
.mm-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-hero-link { --bs-btn-color: #fff; --bs-btn-border-color: rgba(255, 255, 255, .3); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: rgba(255, 255, 255, .1); --bs-btn-hover-border-color: rgba(255, 255, 255, .5); --bs-btn-active-color: #fff; --bs-btn-active-bg: rgba(255, 255, 255, .15); }
.mm-hero-dismiss { position: absolute; top: 12px; right: 12px; color: #d0d5dd; }
.mm-hero-dismiss:hover { color: #fff; background: rgba(255, 255, 255, .12); }

.mm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 14px; }
@media (max-width: 575.98px) { .mm-stat:last-child:nth-child(odd) { grid-column: 1 / -1; } }
.mm-stat { padding: 18px 20px; background: var(--mm-surface); border: 1px solid var(--mm-border); border-radius: var(--mm-radius); box-shadow: var(--mm-shadow-xs); }
.mm-stat-label { display: flex; align-items: center; gap: 8px; color: var(--mm-text-3); font-size: .82rem; font-weight: 500; }
.mm-stat-value { margin-top: 6px; color: var(--mm-text); font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }

.mm-chart { position: relative; height: 300px; }
.mm-chart-note { margin: 10px 0 0; color: var(--mm-text-3); font-size: .85rem; text-align: center; }

.mm-actions { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.mm-action {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    color: var(--mm-text);
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow-xs);
    transition: border-color .15s, box-shadow .18s var(--mm-ease), transform .18s var(--mm-ease);
}
.mm-action:hover { color: var(--mm-text); border-color: var(--mm-border-strong); box-shadow: var(--mm-shadow-md); transform: translateY(-2px); }
.mm-action-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; color: var(--mm-brand-ink); background: var(--mm-brand-soft); }
.mm-action-icon .mm-icon { width: 20px; height: 20px; }
.mm-action-title { display: block; font-size: .9rem; font-weight: 600; line-height: 1.3; }
.mm-action-hint { display: block; margin-top: 1px; color: var(--mm-text-3); font-size: .78rem; line-height: 1.35; }
.mm-action-go { margin-left: auto; color: var(--mm-border-strong); transition: color .15s, transform .15s; }
.mm-action:hover .mm-action-go { color: var(--mm-text-3); transform: translateX(2px); }

/* Prose pages */
.mm-prose { max-width: 76ch; padding: 24px; color: var(--mm-text-2); background: var(--mm-surface); border: 1px solid var(--mm-border); border-radius: var(--mm-radius); }
@media (min-width: 768px) { .mm-prose { padding: 32px 36px; } }
.mm-prose h1 { margin: 0 0 16px; font-size: 1.4rem; }
.mm-prose p { margin-bottom: 14px; line-height: 1.65; }
.mm-prose .bold { margin-top: 22px; margin-bottom: 6px; color: var(--mm-text); font-weight: 600; }
.mm-prose ul { padding-left: 20px; line-height: 1.65; }

/* Help videos */
.mm-videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
@media (max-width: 400px) { .mm-videos { grid-template-columns: 1fr; } }
.mm-video { overflow: hidden; background: var(--mm-surface); border: 1px solid var(--mm-border); border-radius: var(--mm-radius); box-shadow: var(--mm-shadow-xs); }
.mm-video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--mm-ink); }
.mm-video h2 { margin: 0; padding: 12px 14px; font-size: .9rem; }

/* 5 ---------- Memes ---------- */
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
@media (max-width: 575.98px) { .mm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

.mm-tile {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    color: var(--mm-text);
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: var(--mm-radius);
    box-shadow: var(--mm-shadow-xs);
    transition: box-shadow .18s var(--mm-ease), transform .18s var(--mm-ease), border-color .15s;
}
a.mm-tile:hover, .mm-tile:hover { color: var(--mm-text); border-color: var(--mm-border-strong); box-shadow: var(--mm-shadow-md); transform: translateY(-2px); }
.mm-tile-media { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--mm-media); }
.mm-tile-media img { display: block; width: 100%; height: 100%; object-fit: contain; }
.mm-tile-cta {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    opacity: 0;
    color: #fff;
    background: rgba(18, 24, 38, .5);
    font-size: .85rem;
    font-weight: 600;
    transition: opacity .15s;
}
.mm-tile:hover .mm-tile-cta, .mm-tile:focus-visible .mm-tile-cta { opacity: 1; }
.mm-tile-body { display: flex; flex-direction: column; gap: 3px; padding: 11px 12px; min-width: 0; }
.mm-tile-title { font-size: .875rem; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mm-tile-meta { color: var(--mm-text-3); font-size: .78rem; }
.mm-tile-actions { display: flex; gap: 6px; margin-top: 8px; }

/* Upload */
.mm-dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 200px;
    padding: 28px 20px;
    border: 2px dashed var(--mm-border-strong);
    border-radius: var(--mm-radius);
    color: var(--mm-text-2);
    background: var(--mm-surface-2);
    text-align: center;
    transition: border-color .15s, background-color .15s, transform .15s;
}
.mm-dropzone:hover, .mm-dropzone.draging { border-color: var(--mm-brand); background: var(--mm-brand-soft); }
.mm-dropzone input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.mm-dropzone-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 4px; border-radius: 50%; color: var(--mm-brand-ink); background: var(--mm-surface); box-shadow: var(--mm-shadow-sm); }
.mm-dropzone-title { color: var(--mm-text); font-weight: 600; }
.mm-dropzone-hint { color: var(--mm-text-3); font-size: .82rem; }
.mm-form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }
.statusbar { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 12px; padding: 10px 12px; background: var(--mm-surface-2); border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm); font-size: .82rem; text-align: left; }
.statusbar .filename { flex: 1 1 60%; min-width: 0; color: var(--mm-text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.statusbar .filesize { color: var(--mm-text-3); }
.statusbar .progressBar { flex: 1 1 100%; height: 18px; overflow: hidden; background: var(--mm-border); border-radius: 999px; }
.statusbar .progressBar > div { height: 100%; width: 0; color: #fff; background: var(--mm-brand); font-size: .7rem; line-height: 18px; text-align: center; }

/* 6 ---------- Editors ---------- */
.mm-editor { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 20px; align-items: start; }
@media (max-width: 991.98px) { .mm-editor { grid-template-columns: minmax(0, 1fr); } .mm-editor-canvas-first { order: -1; } }
.mm-editor-preview { position: sticky; top: calc(var(--mm-topbar-h) + 16px); }
@media (max-width: 991.98px) { .mm-editor-preview { position: static; } }
.mm-canvas-wrap { max-width: 100%; overflow: auto; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm); background: var(--mm-media); }
.mm-canvas-wrap canvas { display: block; }
.mm-hint { display: flex; gap: 7px; margin-bottom: 10px; color: var(--mm-text-3); font-size: .82rem; }
.mm-hint .mm-icon { margin-top: 2px; }
.mm-boxes { display: grid; gap: 12px; padding: 14px; background: var(--mm-surface-2); border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm); }
.mm-boxes .form-label { margin-bottom: 4px; }
.emoji-picker { display: flex; flex-wrap: wrap; gap: 2px; max-height: 128px; overflow-y: auto; padding: 8px; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm); background: var(--mm-surface); }
.emoji-picker img { width: 32px; height: 32px; padding: 2px; border-radius: 6px; cursor: pointer; transition: background-color .12s, transform .12s; }
.emoji-picker img:hover { background: var(--mm-hover); transform: scale(1.12); }
.button-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.color-picker-container { display: flex; align-items: center; gap: 10px; }
.color-picker-label { margin: 0; font-size: .875rem; font-weight: 500; }
#colorPicker { width: 42px; height: 42px; padding: 3px; border: 1px solid var(--mm-border-strong); border-radius: var(--mm-radius-sm); background: var(--mm-surface); cursor: pointer; }
.sample-memes-container { display: flex; flex-wrap: wrap; gap: 8px; }
.sample-meme-img { width: 96px; height: 96px; object-fit: cover; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm); cursor: pointer; transition: border-color .15s, transform .15s; }
.sample-meme-img:hover { border-color: var(--mm-brand); transform: translateY(-1px); }

.text-setting-con { margin: 16px 0; border: 1px solid var(--mm-border); border-radius: var(--mm-radius-sm); overflow: hidden; }
.text-setting-head { padding: 10px 14px; color: var(--mm-text); background: var(--mm-surface-2); border-bottom: 1px solid var(--mm-border); font-size: .875rem; font-weight: 600; }
.text-setting-mid { padding: 14px; }
.text-setting-mid label { color: var(--mm-text-2); font-size: .85rem; }
.text-setting-mid .label-width { width: 72px; flex: none; }
.text-setting-mid .label-width-2 { width: 96px; flex: none; }
.text-setting-mid .input-group { max-width: 150px; }

/* Settings */
.mm-settings { display: grid; gap: 16px; max-width: var(--mm-form-w); }
.mm-field-row { display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 6px 16px; margin-bottom: 12px; }
.mm-field-row label { margin: 0; font-size: .875rem; font-weight: 500; }
@media (max-width: 575.98px) { .mm-field-row { grid-template-columns: minmax(0, 1fr); } }

/* Bulk column mapping */
.mm-account-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.mm-account-tile { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; color: var(--mm-text); border: 1px solid var(--mm-border); border-radius: var(--mm-radius); font-size: .875rem; font-weight: 500; transition: border-color .15s, box-shadow .18s; }
.mm-account-tile:hover { color: var(--mm-text); border-color: var(--mm-brand); box-shadow: var(--mm-shadow-md); }
.mm-account-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--mm-media); }

/* 7 ---------- Auth ---------- */
.mm-auth { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); min-height: 100vh; background: var(--mm-surface); }
.mm-auth-aside {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    padding: 40px 48px;
    color: #fff;
    background: radial-gradient(90% 70% at 0 100%, #7d0a26 0, transparent 70%), var(--mm-ink);
}
.mm-auth-logo { height: 40px; width: auto; }
.mm-auth-pitch h1 { margin: 0 0 14px; color: #fff; font-size: clamp(1.6rem, 2.6vw, 2.25rem); font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.mm-auth-pitch ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; color: #d0d5dd; }
.mm-auth-pitch li { display: flex; gap: 10px; }
.mm-auth-pitch .mm-icon { margin-top: 3px; color: #ff8fa3; }
.mm-auth-vendor img { width: 150px; opacity: .85; }
.mm-auth-main > .mm-theme-toggle { position: absolute; top: 16px; right: 16px; }
.mm-auth-main { position: relative; display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.mm-auth-card { width: 100%; max-width: 400px; animation: mm-fade .3s var(--mm-ease); }
.mm-auth-card h2 { margin: 0 0 6px; font-size: 1.5rem; font-weight: 700; letter-spacing: -.015em; }
.mm-auth-sub { margin: 0 0 24px; color: var(--mm-text-3); font-size: .925rem; }
.mm-auth-field { margin-bottom: 14px; }
.mm-input-icon { position: relative; }
.mm-input-icon > .mm-icon { position: absolute; left: 12px; top: 12px; color: var(--mm-text-3); pointer-events: none; }
.mm-input-icon .form-control { min-height: 44px; padding-left: 38px; }
.mm-auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; font-size: .875rem; }
.mm-auth-card .btn-lg, .mm-auth-submit { width: 100%; min-height: 44px; font-size: .95rem; font-weight: 600; }
.mm-auth-foot { margin: 20px 0 0; color: var(--mm-text-3); font-size: .875rem; text-align: center; }
.mm-auth-alert { margin-top: 14px; }
.mm-auth-linkbtn { padding: 0; border: 0; color: var(--bs-link-color); background: none; font-size: .875rem; cursor: pointer; }
.mm-auth-linkbtn:hover { color: var(--bs-link-hover-color); }
@media (max-width: 899.98px) {
    .mm-auth { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
    .mm-auth-aside { padding: 18px 20px; }
    .mm-auth-pitch, .mm-auth-vendor { display: none; }
    .mm-auth-logo { height: 30px; }
    .mm-auth-main { align-items: flex-start; padding: 28px 20px 40px; }
}

/* Error page */
.mm-error { display: grid; place-items: center; min-height: 100vh; padding: 24px; text-align: center; }
.mm-error-code { color: var(--mm-brand-ink); font-size: 3.5rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.mm-error h1 { margin: 12px 0 8px; font-size: 1.4rem; }
.mm-error p { max-width: 44ch; margin: 0 auto 20px; color: var(--mm-text-2); }

/* 8 ---------- Utilities ---------- */
.fw-600 { font-weight: 600; }
.mm-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
