/* =====================================================================
   MentorMakers.pk — Flat design layer (Phase 4, 2026-10-12)
   Loads after mm2026.css. Restrained, flat product UI: solid colours,
   1px borders instead of shadows, small radii, no decorative gradients,
   system fonts (no third-party font request). Remove this file to roll back.
   ===================================================================== */

:root {
    /* colour */
    --mm-primary: #4F46E5;          /* 6.3:1 with white text */
    --mm-primary-hover: #4338CA;
    --mm-primary-soft: #EEF2FF;
    --mm-primary-2: #4F46E5;
    --mm-grad: #4F46E5;             /* old gradient token, now solid */
    --mm-ink: #111827;
    --mm-ink-2: #1F2937;
    --mm-text: #374151;
    --mm-muted: #5B6472;            /* 5.9:1 on white */
    --mm-faint: #9CA3AF;
    --mm-bg: #F7F8FA;
    --mm-surface: #FFFFFF;
    --mm-soft: #F3F4F6;
    --mm-line: #E3E6EB;
    --mm-line-2: #EEF0F3;
    --mm-ok: #15803D;
    --mm-warn: #B45309;
    --mm-err: #B91C1C;
    /* shape */
    --mm-r-sm: 6px;
    --mm-r: 8px;
    --mm-r-lg: 12px;
    --mm-shadow: none;
    --mm-shadow-lg: 0 8px 24px rgba(17, 24, 39, .10);   /* only for floating panels (menus, dialogs) */
    /* type: system UI fonts, no web-font download */
    --mm-font: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mm-font-head: var(--mm-font);
    --mm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    /* spacing scale */
    --mm-s1: 4px; --mm-s2: 8px; --mm-s3: 12px; --mm-s4: 16px; --mm-s5: 24px; --mm-s6: 32px; --mm-s7: 48px;
    /* legacy names */
    --mm-hero: #1E1B4B;             /* the one dark surface used for page heroes */
    --gradient: #4F46E5;            /* legacy gradient token, now solid */
    --primary: #4F46E5; --text: #111827; --muted: #5B6472; --border: #E3E6EB; --bg: #F7F8FA;
}

body { font-family: var(--mm-font); background: var(--mm-bg); color: var(--mm-ink); font-size: 16px; line-height: 1.55; }
h1, h2, h3, h4 { font-family: var(--mm-font-head); color: var(--mm-ink); letter-spacing: -.01em; font-weight: 700; }
code, pre, kbd, .mmt-mono { font-family: var(--mm-mono); }
:focus-visible { outline: 2px solid var(--mm-primary); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* ---------- surfaces ---------- */
.card { border: 1px solid var(--mm-line); border-radius: var(--mm-r-lg); box-shadow: none; background: var(--mm-surface); }

/* ---------- buttons: solid, no lift ---------- */
.btn, .mmh-cta, .mmd-auth a.is-primary, .nav-cta-btn, .upload-dropzone .dz-btn {
    background: var(--mm-primary); color: #fff; border: 1px solid var(--mm-primary); border-radius: var(--mm-r);
    box-shadow: none; transform: none; font-weight: 600; transition: background-color .12s ease, border-color .12s ease;
}
.btn:hover, .mmh-cta:hover, .mmd-auth a.is-primary:hover, .nav-cta-btn:hover, .upload-dropzone .dz-btn:hover {
    background: var(--mm-primary-hover); border-color: var(--mm-primary-hover); transform: none; box-shadow: none;
}
.btn:disabled, .btn[aria-disabled="true"] { background: #C7CBD3; border-color: #C7CBD3; color: #fff; cursor: not-allowed; }
.btn-secondary, .btn.btn-secondary { background: #fff; color: var(--mm-ink-2); border: 1px solid var(--mm-line); }
.btn-secondary:hover, .btn.btn-secondary:hover { background: var(--mm-soft); color: var(--mm-ink); border-color: #CDD2DA; }
.btn-danger { background: #B91C1C !important; border-color: #B91C1C !important; }

/* ---------- form controls ---------- */
input[type=text], input[type=email], input[type=number], input[type=url], input[type=password], input[type=date],
input[type=time], input[type=search], input[type=tel], textarea, select {
    border: 1px solid #CDD2DA; border-radius: var(--mm-r); background: #fff; min-height: 40px;
}
input:focus, textarea:focus, select:focus { border-color: var(--mm-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
input:disabled, textarea:disabled, select:disabled { background: var(--mm-soft); color: var(--mm-muted); }
.errors, .mm-tool-alert { border-radius: var(--mm-r); }
.status { border-radius: var(--mm-r); }

/* ---------- header and menus: solid, flat ---------- */
.mmh { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
.mmh-brand-mark, .brand .mark { background: var(--mm-primary); box-shadow: none; border-radius: var(--mm-r); }
.mmh-new { background: var(--mm-primary-soft); color: var(--mm-primary); }
.mmh-avatar { background: var(--mm-primary); }
.mmh-notif-h { background: #fff; color: var(--mm-ink); border-bottom: 1px solid var(--mm-line); }
.mmm-promo, .mms-ai, .mmd-promo { background: var(--mm-soft); color: var(--mm-ink); border: 1px solid var(--mm-line); box-shadow: none; }
.mmm-promo *, .mms-ai *, .mmd-promo * { color: inherit; }
.mmm-promo h3 span { background: var(--mm-primary-soft); color: var(--mm-primary); }
.brand span.accent { background: none; -webkit-text-fill-color: currentColor; color: var(--mm-primary); }

/* ---------- footer ---------- */
.mmf { background: #111827; }
.mmf::before { display: none; }

/* =====================================================================
   TOOL PAGE: two columns (category nav + task). Secondary content below.
   ===================================================================== */
.tp { grid-template-columns: 232px minmax(0, 1fr); gap: 32px; }
.tp-right { display: none; }  /* no longer rendered; kept for cached markup */
.tp-nav-search { border-radius: var(--mm-r); }
.tp-nav a.tp-nav-cat, .tp-nav button.tp-nav-cat { border-radius: var(--mm-r); font-weight: 500; color: var(--mm-text); padding: 7px 8px; }
.tp-nav a.tp-nav-cat:hover { background: var(--mm-soft); color: var(--mm-ink); }
.tp-nav .tp-nav-group.is-current > .tp-nav-cat { color: var(--mm-ink); font-weight: 700; }
.tp-nav .tp-nav-cat .mmm-ic { width: 24px; height: 24px; border-radius: 6px; }
.tp-nav-list { display: block; border-left: 1px solid var(--mm-line); margin-left: 19px; padding: 2px 0 8px 10px; }
.tp-nav-list a { font-weight: 500; font-size: .86rem; padding: 5px 8px; border-radius: 6px; color: var(--mm-text); }
.tp-nav-list a:hover { background: var(--mm-soft); color: var(--mm-ink); }
.tp-nav-list a.is-current { background: var(--mm-primary-soft); color: var(--mm-primary); font-weight: 600; }
.tp-nav-list a.tp-nav-all { color: var(--mm-primary); }
.tp-pro { background: #fff; border: 1px solid var(--mm-line); border-radius: var(--mm-r-lg); }
.tp-pro p { color: var(--mm-muted); }

.tp-act { border-radius: var(--mm-r); font-weight: 600; }
.tp-act:hover { border-color: #CDD2DA; color: var(--mm-ink); background: var(--mm-soft); }

.tp-head { gap: 14px; margin-bottom: 16px; align-items: center; }
.tp-head-ic { width: 48px; height: 48px; border-radius: 10px; background: var(--mm-primary); box-shadow: none; }
.tp-head-ic svg { width: 26px; height: 26px; }
.tp-head h1 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); margin: 0 0 4px; }
.tp-head p { margin: 0; font-size: 1rem; color: var(--mm-muted); max-width: 72ch; }
.tp-badges { margin-top: 8px; }
.tp-badge { border-radius: 999px; font-weight: 600; color: var(--mm-text); background: #fff; border: 1px solid var(--mm-line); text-decoration: none; }
.tp-badge svg { color: #B45309; }

/* the task area: dominant, plain */
.tp-work { border-radius: var(--mm-r-lg); box-shadow: none; padding: 24px; border: 1px solid var(--mm-line); }
.tp-work form label { font-weight: 600; color: var(--mm-ink-2); }
.tp-work form button[type=submit], .tp-work form .btn[type=submit] { border-radius: var(--mm-r); padding: 13px 20px; font-weight: 600; }
.tp-work .upload-dropzone { border-radius: var(--mm-r-lg); border: 2px dashed #CDD2DA; background: #FAFBFC; }
.tp-work .upload-dropzone:hover, .tp-work .upload-dropzone.dragover { border-color: var(--mm-primary); background: var(--mm-primary-soft); }

/* trust facts: one quiet row under the task */
.tp-feats { gap: 0; margin-top: 12px; border: 1px solid var(--mm-line); border-radius: var(--mm-r-lg); background: #fff; overflow: hidden; }
.tp-feat { border: 0; border-radius: 0; padding: 14px 16px; background: transparent; gap: 10px; }
.tp-feat + .tp-feat { border-left: 1px solid var(--mm-line); }
.tp-feat-ic { width: 28px; height: 28px; border-radius: 6px; background: var(--mm-soft) !important; color: var(--mm-text) !important; }
.tp-feat-ic svg { width: 16px; height: 16px; }
.tp-feat b { font-size: .86rem; font-weight: 600; }
.tp-feat span { font-size: .8rem; }
@media (max-width: 1180px) {
    .tp-feat:nth-child(3) { border-left: 0; }
    .tp-feat:nth-child(n+3) { border-top: 1px solid var(--mm-line); }
}

/* secondary sections below the task */
.tp-after { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 24px; }
.tp-card { border-radius: var(--mm-r-lg); box-shadow: none; padding: 18px 20px; }
.tp-card h2 { font-size: 1.05rem; margin: 0 0 10px; }
.tp-steps li { padding: 6px 0; font-size: .92rem; }
.tp-steps li::before { width: 24px; height: 24px; border-radius: 6px; background: var(--mm-soft); color: var(--mm-ink-2); font-weight: 700; font-size: .8rem; }
.tp-rel a { border-radius: var(--mm-r); padding: 8px; }
.tp-rel a:hover { background: var(--mm-soft); }
.tp-rel b { font-weight: 600; font-size: .9rem; }
.tp-rel span { max-width: none; }
.tp-card-h a { font-weight: 600; }
.tp-ai-line { margin: 16px 0 0; font-size: .9rem; color: var(--mm-muted); }
.tp-ai-line a { font-weight: 600; }

.tp-below .card, .tp-below .tool-fullwidth-section { border-radius: var(--mm-r-lg); box-shadow: none; }
.tool-faq-item { border-radius: var(--mm-r); }

@media (max-width: 1279px) {
    .tp { grid-template-columns: 210px minmax(0, 1fr); gap: 24px; }
    .tp-left { display: block; }
}
@media (max-width: 1023px) {
    .tp { grid-template-columns: minmax(0, 1fr); }
    .tp-left { display: none; }
    .tp-after { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .tp-work { padding: 16px; border-radius: var(--mm-r); }
    .tp-feats { grid-template-columns: minmax(0, 1fr); }
    .tp-feat + .tp-feat { border-left: 0; border-top: 1px solid var(--mm-line); }
    .tp-head-ic { display: none; }
}

/* ---------- other decorative gradients, now flat ---------- */
.hm-why, .hm-intro, .hm-proof-card, .hm-why2, .hm-directory-total, .hm-dir-category {
    background: #fff !important; box-shadow: none !important; border-color: var(--mm-line) !important; border-radius: var(--mm-r-lg) !important;
}
.hm-proof-card::after { display: none; }
.mmf { background: #111827; background-image: none; }

/* =====================================================================
   Upload dropzone and processing overlay (moved from inline layout styles)
   ===================================================================== */
.upload-dropzone {
    position: relative; border: 2px dashed #CDD2DA !important; border-radius: var(--mm-r-lg) !important;
    background: #FAFBFC !important; padding: 36px 24px !important; transition: border-color .15s ease, background-color .15s ease !important;
}
.upload-dropzone:hover { border-color: var(--mm-primary) !important; }
.upload-dropzone.dragover { border-color: var(--mm-primary) !important; border-style: solid !important; background: var(--mm-primary-soft) !important; }
.upload-dropzone.has-file { border-color: var(--mm-ok) !important; border-style: solid !important; background: #F6FBF7 !important; }
.upload-dropzone .dz-btn { border-radius: var(--mm-r) !important; padding: 12px 26px !important; font-size: .98rem !important; box-shadow: none !important; transform: none !important; }
.upload-dropzone .dz-sub { margin-top: 10px !important; font-size: .88rem !important; color: var(--mm-muted); }
.upload-dropzone .dz-filename:empty { display: none !important; }
.upload-dropzone .dz-filename {
    display: inline-flex !important; align-items: center; gap: 8px; background: #fff; border: 1px solid #B7DFC3; border-radius: 999px;
    padding: 6px 14px !important; margin-top: 12px !important; color: #166534 !important; font-size: .86rem !important;
}
.upload-dropzone .dz-filename::before {
    content: ''; width: 16px; height: 16px; flex-shrink: 0;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2315803D" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><path d="M20 6L9 17l-5-5"/></svg>') center/contain no-repeat;
}
.upload-dropzone::before { border-radius: var(--mm-r-lg) !important; }

.processing-overlay { background: rgba(17, 24, 39, .55) !important; }
.processing-box { position: relative; overflow: hidden; width: min(420px, calc(100vw - 40px)); border-radius: var(--mm-r-lg) !important; padding: 36px 32px 30px !important; box-shadow: var(--mm-shadow-lg) !important; }
.processing-spinner { width: 48px !important; height: 48px !important; border: 4px solid #E5E7EB !important; border-top-color: var(--mm-primary) !important; margin-bottom: 18px !important; animation: mm-spin .8s linear infinite !important; }
.tpx-steps { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 18px 0 12px; }
.tpx-step { display: flex; align-items: center; gap: 7px; font-size: .76rem; font-weight: 600; color: var(--mm-faint); }
.tpx-step .tpx-step-dot { width: 22px; height: 22px; border-radius: 50%; background: var(--mm-soft); border: 1px solid var(--mm-line); display: flex; align-items: center; justify-content: center; font-size: .68rem; color: var(--mm-muted); }
.tpx-step.active { color: var(--mm-primary); }
.tpx-step.active .tpx-step-dot { background: var(--mm-primary); border-color: var(--mm-primary); color: #fff; }
.tpx-step-line { width: 24px; height: 1px; background: var(--mm-line); }
.tpx-bar { height: 4px; border-radius: 999px; background: var(--mm-soft); overflow: hidden; position: relative; margin-top: 4px; }
.tpx-bar::after { content: ''; position: absolute; inset: 0; width: 40%; background: var(--mm-primary); animation: tpx-slide 1.3s ease-in-out infinite; }
@keyframes tpx-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }
.tpx-status { margin-top: 12px; font-size: .86rem; font-weight: 500; color: var(--mm-text); min-height: 1.3em; }

/* =====================================================================
   HOMEPAGE (home.blade.php keeps its inline layout; these win by specificity)
   ===================================================================== */
body .mh-hero { padding-top: 40px; }
body .mh-hero h1 { font-weight: 700; letter-spacing: -.02em; color: var(--mm-ink); }
body .mh-search { border: 1px solid #CDD2DA; border-radius: var(--mm-r-lg); box-shadow: none; }
body .mh-search:focus-within { border-color: var(--mm-primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .18); }
body .mh-search button { border-radius: var(--mm-r); background: var(--mm-primary); box-shadow: none; }
body .mh-quick a { border-radius: 999px; box-shadow: none; border: 1px solid var(--mm-line); background: #fff; }
body .mh-all { background: var(--mm-primary); border-radius: var(--mm-r); box-shadow: none; font-weight: 600; transition: background-color .12s ease; }
body .mh-all:hover, body .mh-all:active { background: var(--mm-primary-hover); transform: none; box-shadow: none; }
body .mh-all:hover svg { transform: none; }
body .mh-all .mh-all-n { background: rgba(255, 255, 255, .18); }
body .mh-bigcard, body .mh-cg, body .mh-card { border-radius: var(--mm-r-lg); box-shadow: none; border-color: var(--mm-line); }
body .mh-bigcard:hover, body .mh-bigcard:focus-visible, body .mh-cg:hover, body .mh-cg:focus-visible, body .mh-card:hover {
    background: #fff; border-color: #B9BFCA; box-shadow: none; transform: none;
}
body .mh-asst-demo { background: var(--mm-soft); border: 1px solid var(--mm-line); border-radius: var(--mm-r-lg); }
body .mh-msg.me { background: var(--mm-primary); }
body .mh-faq[open] { box-shadow: none; border-color: #B9BFCA; }
body .hm-tool:hover, body .hm-cat:hover, body .hm-post:hover, body .hm-dir-tool-card:hover { transform: none; box-shadow: none; border-color: #B9BFCA; }
body .hm-trust, body .hm-why { background: #fff; border-color: var(--mm-line); }
body .hm-pin { background: var(--mm-primary); box-shadow: none; }
body .hm-pin:hover { transform: none; box-shadow: none; background: var(--mm-primary-hover); }
body .hm-pin::after, body .hm-pin::before { display: none; }
body .hm-cta-main { background: #111827; border-radius: var(--mm-r-lg); }
body .hm-post-img { background: var(--mm-primary-soft); }
body .hm-hero h1 span { background: none; -webkit-text-fill-color: currentColor; color: var(--mm-primary); }

/* decorative circles from older styles */
.tp-ai::after, .cat-hero::after, .devdocs-hero::after, .hm-why::before, .hm-why2::before { display: none !important; }
.cat-hero, .devdocs-hero, .hcx-hero, .ai-hero, .au-brand, .hm-cta-main, .rox-out, .ppx-out, .prx-out, .sox-form { background: var(--mm-hero) !important; }
.cat-hero, .devdocs-hero, .hcx-hero, .ai-hero, .rox-out, .ppx-out, .prx-out, .sox-form { border-radius: var(--mm-r-lg) !important; }

/* =====================================================================
   Ads: clearly labelled, separated from controls, space reserved (CLS)
   ===================================================================== */
.mm-ad-slot { margin: 28px auto; text-align: center; max-width: 100%; }
.mm-ad-label { display: block; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; color: var(--mm-faint); margin-bottom: 4px; }
.mm-ad-adsense.mm-ad-auto { min-height: 120px; }
.mm-ad-adsense.mm-ad-horizontal { min-height: 100px; }
.mm-ad-adsense.mm-ad-rectangle { min-height: 280px; }
.mm-ad-after-tool { margin-top: 32px; padding-top: 8px; }
