/* ============================================================
   Masteqa design system  (mq.css)
   Modern charcoal/amber template. Scoped under .mq so it can
   coexist with the legacy site.css during the migration.
   Two contexts:
     .mq            base (marketing / public)
     .mq.mq-auth    dark centered shell for auth screens
     .mq.mq-app     light "app" surface for admin / self-service
   ============================================================ */

:root {
    --mq-navy: #16181d;
    --mq-navy-2: #1f232b;
    --mq-blue: #c2410c;
    --mq-blue-bright: #ea580c;
    --mq-teal: #f5a524;
    --mq-green: #5cc98b;
    --mq-violet: #b45309;
    --mq-ink: #1a2236;
    --mq-slate: #5a6478;
    --mq-line: #e6e9f0;
    --mq-bg: #f7f9fc;
    --mq-card: #ffffff;
    --mq-danger: #e0495b;
    /* primary button fill (amber → orange) + readable dark text */
    --mq-btn-1: #f5a524;
    --mq-btn-2: #ff7a45;
    --mq-on-btn: #2a1a02;
    --mq-amber-bright: #ffc05a;
    --mq-orange: #ff7a45;
    --mq-radius: 16px;
    --mq-radius-sm: 10px;
    --mq-shadow: 0 10px 30px rgba(15, 16, 20, 0.08);
    --mq-shadow-lg: 0 24px 60px rgba(15, 16, 20, 0.16);
}

/* ---------- base ---------- */
.mq, body.mq { box-sizing: border-box; }
.mq *, .mq *::before, .mq *::after { box-sizing: border-box; }

body.mq {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, sans-serif;
    color: var(--mq-ink);
    background: var(--mq-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
body.mq > footer, body.mq > .mq-footer { margin-top: auto; }

.mq h1, .mq h2, .mq h3, .mq h4, .mq h5 {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.15;
    margin: 0;
}
.mq a { text-decoration: none; color: inherit; }

.mq-wrap {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}
.mq-main { flex: 1 0 auto; }

/* ---------- buttons ---------- */
.mq .mq-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--mq-radius-sm);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    transition: all .18s ease;
    cursor: pointer;
    border: 1px solid transparent;
    white-space: nowrap;
    text-decoration: none;
}
.mq .mq-btn-primary {
    background: linear-gradient(135deg, var(--mq-btn-1) 0%, var(--mq-btn-2) 100%);
    color: var(--mq-on-btn);
    box-shadow: 0 6px 18px rgba(245, 165, 36, .35);
}
.mq .mq-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(245, 165, 36, .45); color: var(--mq-on-btn); }
.mq .mq-btn-ghost { background: transparent; color: var(--mq-ink); border-color: var(--mq-line); }
.mq .mq-btn-ghost:hover { border-color: var(--mq-blue); color: var(--mq-blue); }
.mq .mq-btn-light { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.28); }
.mq .mq-btn-light:hover { background: rgba(255,255,255,.2); color: #fff; }
.mq .mq-btn-white { background: #fff; color: var(--mq-navy); }
.mq .mq-btn-white:hover { transform: translateY(-1px); color: var(--mq-navy); box-shadow: var(--mq-shadow-lg); }
.mq .mq-btn-danger { background: transparent; color: var(--mq-danger); border-color: #f1c2c8; }
.mq .mq-btn-danger:hover { background: var(--mq-danger); color: #fff; border-color: var(--mq-danger); }
.mq .mq-btn-block { width: 100%; justify-content: center; }
.mq .mq-btn-lg { padding: 13px 26px; font-size: 15px; }
.mq .mq-btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }

/* ---------- badges / tags ---------- */
.mq .mq-tag {
    display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .05em;
    text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
}
.mq .mq-tag-live { color: #b45309; background: #fdeccf; }
.mq .mq-tag-yes { color: #1a8f5a; background: #e4f6ec; }
.mq .mq-tag-no { color: #9a5b16; background: #fdeede; }

/* ---------- alerts ---------- */
.mq .mq-alert {
    border-radius: var(--mq-radius-sm);
    padding: 13px 18px;
    font-size: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
    white-space: pre-line;
}
.mq .mq-alert i { margin-right: 8px; }
.mq .mq-alert-danger { background: #fdecee; border-color: #f6cdd3; color: #b3283a; }
.mq .mq-alert-success { background: #e7f7ee; border-color: #c4ebd4; color: #18794e; }
.mq .mq-alert-info { background: #eef1f5; border-color: #d9dde4; color: #475063; }

/* ============================================================
   Public top nav  (.mq-nav)
   ============================================================ */
.mq-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--mq-line);
}
.mq-nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.mq-brand { display: flex; align-items: center; gap: 10px; }
.mq-brand img { height: 34px; width: auto; }
.mq-links { display: flex; align-items: center; gap: 6px; }
.mq-links a.mq-link {
    padding: 8px 16px; border-radius: 9px; font-size: 14px; font-weight: 500;
    color: var(--mq-slate); transition: all .18s ease;
}
.mq-links a.mq-link:hover { color: var(--mq-ink); background: #f1f2f5; }
.mq-burger { display: none; background: none; border: 0; font-size: 22px; color: var(--mq-ink); cursor: pointer; }

/* ============================================================
   App top nav  (.mq-appnav)  — dark bar for admin pages
   ============================================================ */
.mq-appnav { background: linear-gradient(120deg, var(--mq-navy) 0%, var(--mq-navy-2) 100%); color: #fff; }
.mq-appnav-inner { display: flex; align-items: center; justify-content: space-between; min-height: 64px; gap: 16px; flex-wrap: wrap; padding: 10px 0; }
.mq-appnav .mq-org { display: flex; flex-direction: column; line-height: 1.25; }
.mq-appnav .mq-org b { font-family: 'Space Grotesk', sans-serif; font-size: 16px; color: #fff; }
.mq-appnav .mq-org span { font-size: 12px; color: #9aa1ad; }
.mq-appnav .mq-org img.mq-applogo { height: 28px; }
.mq-appnav-menu { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.mq-appnav-menu a.mq-navlink {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 15px; border-radius: 9px; font-size: 14px; font-weight: 500;
    color: #d3d7df; transition: all .18s ease;
}
.mq-appnav-menu a.mq-navlink:hover { background: rgba(255,255,255,.1); color: #fff; }
.mq-appnav-menu a.mq-navlink.active { background: rgba(255,255,255,.14); color: #fff; }

/* dropdown (works with Bootstrap toggle) */
.mq-appnav .dropdown-toggle.mq-userbtn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 7px 14px; border-radius: 9px; font-size: 14px; font-weight: 500;
    color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
}
.mq-appnav .dropdown-toggle.mq-userbtn img { height: 16px; filter: brightness(0) invert(1); }
.mq-appnav .dropdown-menu {
    border: 1px solid var(--mq-line); border-radius: 12px; box-shadow: var(--mq-shadow-lg);
    padding: 6px; font-size: 14px; margin-top: 8px;
}
.mq-appnav .dropdown-item { border-radius: 8px; padding: 8px 12px; color: var(--mq-ink); }
.mq-appnav .dropdown-item:hover { background: #f1f2f5; color: var(--mq-blue); }

/* ============================================================
   Footer  (.mq-footer)
   ============================================================ */
.mq-footer { background: #101216; color: #9aa1ad; padding: 56px 0 30px; }
.mq-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.mq-footer img { height: 30px; filter: brightness(0) invert(1); opacity: .92; margin-bottom: 14px; }
.mq-footer .f-about { font-size: 14px; max-width: 280px; color: #8c93a0; }
.mq-footer h5 { color: #fff; font-family: 'Space Grotesk', sans-serif; font-size: 14px; font-weight: 600; letter-spacing: .03em; margin: 0 0 16px; text-transform: uppercase; }
.mq-footer ul { list-style: none; padding: 0; margin: 0; }
.mq-footer ul li { margin-bottom: 10px; }
.mq-footer ul li a { font-size: 14px; color: #9aa1ad; transition: color .15s ease; }
.mq-footer ul li a:hover { color: #fff; }
.mq-footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08); margin-top: 44px; padding-top: 22px;
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
    font-size: 13px; color: #767d8a;
}
.mq-footer-bottom .soc a { color: #9aa1ad; margin-left: 16px; font-size: 16px; transition: color .15s ease; }
.mq-footer-bottom .soc a:hover { color: #fff; }

/* ============================================================
   Dev-server notice banner
   ============================================================ */
.mq-notice {
    background: #fff7ed; border-bottom: 1px solid #fde2c4; color: #9a5b16;
    font-size: 13.5px; text-align: center; padding: 9px 24px;
}
.mq-notice i { margin-right: 7px; }
.mq-notice a { color: #9a5b16; font-weight: 600; text-decoration: underline; }

/* ============================================================
   Hero (marketing)
   ============================================================ */
.mq-hero {
    position: relative; overflow: hidden; color: #fff;
    background:
        radial-gradient(1100px 480px at 78% -10%, rgba(245,165,36,.24), transparent 60%),
        radial-gradient(900px 520px at 8% 110%, rgba(255,122,69,.22), transparent 55%),
        linear-gradient(160deg, var(--mq-navy) 0%, var(--mq-navy-2) 100%);
}
.mq-hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: 84px 0 92px; }
.mq-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: #f6d49a; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
    padding: 7px 14px; border-radius: 999px;
}
.mq-hero h1 { font-size: clamp(36px, 5vw, 58px); font-weight: 700; margin: 22px 0 0; letter-spacing: -.02em; }
.mq-grad {
    background: linear-gradient(100deg, #ffc05a 0%, #ff9466 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.mq-hero p.mq-sub { font-size: 18px; color: #c7cdd8; max-width: 540px; margin: 22px 0 32px; }
.mq-hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.mq-hero-meta { display: flex; gap: 28px; margin-top: 40px; padding-top: 28px; border-top: 1px solid rgba(255,255,255,.12); }
.mq-hero-meta div span.n { display: block; font-family: 'Space Grotesk', sans-serif; font-size: 26px; font-weight: 700; color: #fff; }
.mq-hero-meta div span.l { font-size: 13px; color: #9aa1ad; }

.mq-hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 22px; box-shadow: var(--mq-shadow-lg); backdrop-filter: blur(6px); }
.mq-hero-card .mq-row { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); margin-bottom: 12px; }
.mq-hero-card .mq-row:last-child { margin-bottom: 0; }
.mq-hero-card .ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: grid; place-items: center; font-size: 16px; color: #fff; }
.mq-hero-card .ic.b { background: linear-gradient(135deg, #f5a524, #ffc05a); }
.mq-hero-card .ic.t { background: linear-gradient(135deg, #ff7a45, #ff9466); }
.mq-hero-card .ic.p { background: linear-gradient(135deg, #f5a524, #ff7a45); }
.mq-hero-card .tx b { display: block; font-size: 14px; color: #fff; font-weight: 600; }
.mq-hero-card .tx span { font-size: 12.5px; color: #9aa1ad; }
.mq-hero-card .chk { margin-left: auto; color: #ffc05a; font-size: 18px; }

/* ============================================================
   Generic sections + feature cards
   ============================================================ */
.mq-section { padding: 88px 0; }
.mq-section-head { text-align: center; max-width: 660px; margin: 0 auto 52px; }
.mq-kick { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--mq-blue); }
.mq-section-head h2 { font-size: clamp(28px, 3.4vw, 40px); font-weight: 700; margin: 12px 0 14px; letter-spacing: -.02em; }
.mq-section-head p { color: var(--mq-slate); font-size: 16.5px; margin: 0; }

.mq-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.mq-card {
    background: var(--mq-card); border: 1px solid var(--mq-line); border-radius: var(--mq-radius);
    padding: 30px; box-shadow: var(--mq-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mq-card:hover { transform: translateY(-4px); box-shadow: var(--mq-shadow-lg); border-color: #f6dcb4; }
.mq-ic { width: 52px; height: 52px; border-radius: 13px; display: grid; place-items: center; font-size: 21px; color: #fff; margin-bottom: 18px; }
.mq-ic.c-blue { background: linear-gradient(135deg, #f5a524, #ffc05a); }
.mq-ic.c-teal { background: linear-gradient(135deg, #ff7a45, #ff9466); }
.mq-ic.c-violet { background: linear-gradient(135deg, #b45309, #f5a524); }
.mq-ic.c-green { background: linear-gradient(135deg, #ff7a45, #ffab73); }
.mq-card h3 { font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.mq-card ul { list-style: none; padding: 0; margin: 0; }
.mq-card ul li { margin-bottom: 11px; }
.mq-card ul li a { display: inline-flex; align-items: center; gap: 9px; font-size: 14.5px; color: var(--mq-ink); font-weight: 500; transition: color .15s ease, gap .15s ease; }
.mq-card ul li a:hover { color: var(--mq-blue); gap: 12px; }
.mq-card ul li a i { font-size: 11px; color: var(--mq-blue); }
.mq-card ul li.soon { color: var(--mq-slate); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; margin: 16px 0 9px; }
.mq-card ul li a.muted { color: var(--mq-slate); }
.mq-card ul li a.muted i { color: #b9bcc4; }

/* Deploy strip */
.mq-deploy {
    margin-top: 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    background: linear-gradient(120deg, #1f232b 0%, #2a2f3a 100%); border-radius: var(--mq-radius);
    padding: 30px 36px; color: #fff; box-shadow: var(--mq-shadow);
}
.mq-deploy .d-l { display: flex; align-items: center; gap: 18px; }
.mq-deploy .mq-ic { margin-bottom: 0; }
.mq-deploy h3 { font-size: 20px; color: #fff; margin-bottom: 4px; }
.mq-deploy p { margin: 0; font-size: 14px; color: #b6bcc7; }

/* CTA band */
.mq-cta {
    background:
        radial-gradient(700px 300px at 50% -40%, rgba(245,165,36,.22), transparent 60%),
        linear-gradient(160deg, var(--mq-navy) 0%, var(--mq-navy-2) 100%);
    color: #fff; text-align: center; padding: 80px 24px;
}
.mq-cta h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; letter-spacing: -.02em; }
.mq-cta p { color: #c7cdd8; font-size: 17px; max-width: 520px; margin: 16px auto 30px; }
.mq-cta .mq-hero-actions { justify-content: center; }

/* ============================================================
   Pricing
   ============================================================ */
.mq-pricing-head { text-align: center; padding: 70px 24px 10px; }
.mq-pricing-head h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 700; letter-spacing: -.02em; }
.mq-pricing-head p { color: var(--mq-slate); font-size: 17px; margin: 14px 0 0; }
.mq-pricing { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; padding-bottom: 40px; }
.mq-price-card {
    background: var(--mq-card); border: 1px solid var(--mq-line); border-radius: var(--mq-radius);
    padding: 28px 26px; display: flex; flex-direction: column; box-shadow: var(--mq-shadow);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.mq-price-card:hover { transform: translateY(-4px); box-shadow: var(--mq-shadow-lg); border-color: #f6dcb4; }
.mq-price-card.featured { border-color: var(--mq-blue); box-shadow: 0 18px 44px rgba(245,165,36,.22); }
.mq-price-card .tier { font-family: 'Space Grotesk', sans-serif; font-size: 20px; font-weight: 600; }
.mq-price-card .price { font-family: 'Space Grotesk', sans-serif; font-size: 30px; font-weight: 700; margin: 14px 0 2px; }
.mq-price-card .price small { font-size: 14px; font-weight: 500; color: var(--mq-slate); }
.mq-price-card .blurb { font-size: 13.5px; color: var(--mq-slate); min-height: 40px; margin-bottom: 18px; }
.mq-price-card ul { list-style: none; padding: 0; margin: 18px 0 0; }
.mq-price-card ul li { font-size: 13.5px; padding: 7px 0 7px 26px; position: relative; border-top: 1px solid var(--mq-line); }
.mq-price-card ul li:first-child { border-top: 0; }
.mq-price-card ul li::before { content: "\f00c"; font-family: "Font Awesome 5 Free"; font-weight: 900; color: var(--mq-teal); position: absolute; left: 0; top: 7px; font-size: 12px; }
.mq-pop { display: inline-block; align-self: flex-start; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--mq-on-btn); background: linear-gradient(135deg, var(--mq-btn-1), var(--mq-btn-2)); padding: 3px 10px; border-radius: 999px; margin-bottom: 12px; }

/* ============================================================
   Auth shell (.mq-auth) + auth card
   ============================================================ */
.mq.mq-auth {
    background:
        radial-gradient(900px 500px at 80% -10%, rgba(245,165,36,.20), transparent 60%),
        radial-gradient(800px 500px at 5% 110%, rgba(255,122,69,.20), transparent 55%),
        linear-gradient(160deg, var(--mq-navy) 0%, var(--mq-navy-2) 100%);
}
.mq-auth-shell { flex: 1 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 20px; }
.mq-auth-logo { margin-bottom: 26px; }
.mq-auth-logo img { height: 40px; filter: brightness(0) invert(1); }

/* white auth card — works on dark (.mq-auth) and light (.mq-app) backgrounds */
.mq-authcard {
    width: 100%; max-width: 440px; background: #fff; border-radius: var(--mq-radius);
    box-shadow: var(--mq-shadow-lg); overflow: hidden; border: 1px solid var(--mq-line);
}
.mq-authcard.wide { max-width: 560px; }
.mq-authcard-head { padding: 28px 32px 20px; border-bottom: 1px solid var(--mq-line); }
.mq-authcard-head h3 { font-size: 22px; font-weight: 600; }
.mq-authcard-head .sub { font-size: 13px; color: var(--mq-slate); margin-top: 4px; display: block; }
.mq-authcard-body { padding: 26px 32px 30px; }
.mq-authcard-foot { padding: 18px 32px; border-top: 1px solid var(--mq-line); text-align: center; font-size: 14px; color: var(--mq-slate); }
.mq-authcard-foot a { color: var(--mq-blue); font-weight: 600; }
.mq-authcard-foot a:hover { text-decoration: underline; }

/* ============================================================
   Forms
   ============================================================ */
.mq-field { margin-bottom: 16px; }
.mq-field > label { display: block; font-size: 13px; font-weight: 600; color: var(--mq-ink); margin-bottom: 7px; }
.mq .mq-input, .mq-app .form-control, .mq-authcard .form-control {
    width: 100%; height: 46px; padding: 10px 14px; font-size: 14px; font-family: 'Poppins', sans-serif;
    color: var(--mq-ink); background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius-sm);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.mq .mq-input:focus, .mq-app .form-control:focus, .mq-authcard .form-control:focus {
    outline: 0; border-color: var(--mq-blue); box-shadow: 0 0 0 3px rgba(234,88,12,.18);
}
.mq .mq-input::placeholder, .mq-authcard .form-control::placeholder { color: #98a2b6; }
.mq textarea.mq-input { height: auto; min-height: 110px; resize: vertical; }

/* input with leading icon */
.mq-input-icon { position: relative; }
.mq-input-icon > i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #98a2b6; font-size: 14px; pointer-events: none; }
.mq-input-icon > .mq-input, .mq-input-icon > input.form-control { padding-left: 40px; }

/* sub-domain entry (input + .masteqa.com suffix) */
.mq-subdomain { display: flex; align-items: stretch; }
.mq-subdomain .mq-input, .mq-subdomain input.form-control { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.mq-subdomain .suffix {
    display: flex; align-items: center; padding: 0 14px; font-size: 14px; color: var(--mq-slate);
    background: #f1f4f9; border: 1px solid var(--mq-line); border-left: 0;
    border-top-right-radius: var(--mq-radius-sm); border-bottom-right-radius: var(--mq-radius-sm); white-space: nowrap;
}
.mq-or { text-align: center; font-size: 12px; font-weight: 600; letter-spacing: .08em; color: var(--mq-slate); text-transform: uppercase; margin: 14px 0; position: relative; }
.mq-or::before, .mq-or::after { content: ""; position: absolute; top: 50%; width: 42%; height: 1px; background: var(--mq-line); }
.mq-or::before { left: 0; } .mq-or::after { right: 0; }

.mq-check { display: flex; align-items: center; gap: 9px; font-size: 14px; margin: 6px 0 14px; }
.mq-check input { width: 17px; height: 17px; }

.mq-form-actions { display: flex; gap: 12px; margin-top: 22px; }
.mq-form-actions.end { justify-content: flex-end; }

/* MFA method rows (choose how to receive a code) */
.mq-mfa-row { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-top: 1px solid var(--mq-line); }
.mq-mfa-row:first-of-type { border-top: 0; }
.mq-mfa-row .mq-mfa-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 10px; display: grid; place-items: center; color: var(--mq-on-btn); font-size: 15px; background: linear-gradient(135deg, var(--mq-btn-1), var(--mq-btn-2)); }
.mq-mfa-row .mq-mfa-tx { flex: 1; min-width: 0; }
.mq-mfa-row .mq-mfa-tx b { display: block; font-size: 13px; font-weight: 600; }
.mq-mfa-row .mq-mfa-tx span { font-size: 12.5px; color: var(--mq-slate); word-break: break-word; }
.mq-muted { color: var(--mq-slate); font-size: 14px; }

/* ============================================================
   App surface (.mq-app) — admin / self-service
   ============================================================ */
.mq.mq-app { background: var(--mq-bg); }
.mq-app-main { flex: 1 0 auto; padding: 36px 0 64px; }

/* page header (title + action) */
.mq-page-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.mq-page-head h2 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.mq-page-head .sub { font-size: 13px; color: var(--mq-slate); margin-top: 3px; }
.mq-page-head .actions { display: flex; gap: 10px; }

/* generic app card / panel */
.mq-panel { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); box-shadow: var(--mq-shadow); }
.mq-panel-head { padding: 18px 24px; border-bottom: 1px solid var(--mq-line); display: flex; align-items: center; justify-content: space-between; }
.mq-panel-head h3 { font-size: 17px; font-weight: 600; }
.mq-panel-body { padding: 24px; }

/* ---------- tables ---------- */
.mq-table-wrap { background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); box-shadow: var(--mq-shadow); overflow: hidden; }
.mq-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mq-table thead th {
    background: #f4f7fb; text-align: left; padding: 14px 18px; font-family: 'Space Grotesk', sans-serif;
    font-size: 13px; font-weight: 600; color: var(--mq-slate); border-bottom: 1px solid var(--mq-line);
    white-space: nowrap;
}
.mq-table tbody td { padding: 13px 18px; border-bottom: 1px solid #eef1f6; color: var(--mq-ink); vertical-align: middle; }
.mq-table tbody tr:last-child td { border-bottom: 0; }
.mq-table tbody tr { transition: background .12s ease; }
.mq-table tbody tr:hover { background: #f7f9fc; }
.mq-table a.mq-rowlink { color: var(--mq-blue); font-weight: 600; }
.mq-table a.mq-rowlink:hover { text-decoration: underline; }
.mq-table .mq-num { text-align: center; }

/* ============================================================
   Status / message pages (centered)
   ============================================================ */
.mq-status-shell { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 60px 20px; min-height: 62vh; }
.mq-status-card { width: 100%; max-width: 520px; background: #fff; border: 1px solid var(--mq-line); border-radius: var(--mq-radius); box-shadow: var(--mq-shadow-lg); padding: 44px 40px; text-align: center; }
.mq-status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 28px; margin: 0 auto 20px; }
.mq-status-icon.ok { background: #e4f6ec; color: #1a8f5a; }
.mq-status-icon.warn { background: #fdeede; color: #b5731c; }
.mq-status-icon.err { background: #fdecee; color: var(--mq-danger); }
.mq-status-card h2 { font-size: 24px; font-weight: 700; margin-bottom: 10px; }
.mq-status-card p { color: var(--mq-slate); font-size: 15px; margin: 0 0 22px; }

/* ============================================================
   Simple prose (privacy etc.)
   ============================================================ */
.mq-prose { max-width: 760px; margin: 0 auto; padding: 60px 0; }
.mq-prose h1 { font-size: 36px; font-weight: 700; margin-bottom: 18px; }
.mq-prose p { color: var(--mq-slate); font-size: 16px; }

/* ============================================================
   Admin theming — restyles the existing Bootstrap + legacy markup
   for every management / self-service view rendered inside .mq-app.
   (!important is used only to beat inline styles and legacy site.css)
   ============================================================ */

/* section spacing (legacy wrappers carried big 100px paddings) */
.mq-app section.enterprise,
.mq-app section.self-service,
.mq-app section.user-list-sec1,
.mq-app section.user-list-main,
.mq-app section.user-per-sec1,
.mq-app section.user-per-btns,
.mq-app section.communication-sec1,
.mq-app section.communication-sec2,
.mq-app section.user-permission,
.mq-app section.edit-con-sec1,
.mq-app section.auth-table,
.mq-app section.list-title,
.mq-app section.landing-sec1 { padding: 0 0 22px !important; }

/* form / table panels (legacy .container.border family) */
.mq-app .container.border,
.mq-app .container.per-table-main,
.mq-app .container.auth-container,
.mq-app .container.edite-user-container {
    background: #fff;
    border: 1px solid var(--mq-line) !important;
    border-radius: var(--mq-radius);
    box-shadow: var(--mq-shadow);
    padding: 24px 26px;
    margin-top: 16px;
}
.mq-app .row.border-bottom,
.mq-app .border-bottom { border-color: var(--mq-line) !important; }
.mq-app hr { border-color: var(--mq-line); }

/* headings */
.mq-app section.list-title h2,
.mq-app section.user-list-sec1 h2,
.mq-app section.list-title h2 { font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.mq-app h3 { font-weight: 600; }
.mq-app .card-header h3, .mq-app .card-header h4, .mq-app .card-header h5 { color: var(--mq-ink); }

/* tables */
.mq-app .list-group.list-group-flush {
    border: 1px solid var(--mq-line); border-radius: var(--mq-radius);
    overflow: hidden; box-shadow: var(--mq-shadow); background: #fff;
}
.mq-app table.table { border-collapse: collapse; width: 100%; font-size: 14px; background: #fff; margin: 0; }
.mq-app table.table thead th,
.mq-app .thead-light th,
.mq-app thead.thead-light th {
    background: #f4f7fb !important; color: var(--mq-slate) !important;
    font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 13px;
    border: 0 !important; border-bottom: 1px solid var(--mq-line) !important;
    padding: 12px 16px; text-align: left;
}
.mq-app table.table td, .mq-app table.table th { border: 0 !important; border-bottom: 1px solid #eef1f6 !important; padding: 11px 16px; vertical-align: middle; }
.mq-app .table-hover tbody tr:hover { background: #f7f9fc !important; }

/* buttons (Bootstrap variants) */
.mq-app .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-family: 'Poppins', sans-serif; font-weight: 600; font-size: 13.5px; line-height: 1.2;
    padding: 9px 16px; border-radius: var(--mq-radius-sm); border: 1px solid transparent;
    transition: all .18s ease; cursor: pointer;
}
.mq-app .btn-sm { padding: 6px 12px; font-size: 12.5px; }
.mq-app .btn-block { width: 100%; }
.mq-app .btn-primary {
    background: linear-gradient(135deg, var(--mq-btn-1), var(--mq-btn-2)) !important;
    color: var(--mq-on-btn) !important; border-color: transparent !important; box-shadow: 0 6px 16px rgba(245,165,36,.28);
}
.mq-app .btn-primary:hover { filter: brightness(1.06); color: var(--mq-on-btn) !important; }
.mq-app .btn-outline-primary, .mq-app .btn-outline-dark, .mq-app .btn-secondary, .mq-app .btn-info {
    background: #fff !important; color: var(--mq-ink) !important; border: 1px solid var(--mq-line) !important; box-shadow: none !important;
}
.mq-app .btn-outline-primary:hover, .mq-app .btn-outline-dark:hover, .mq-app .btn-secondary:hover, .mq-app .btn-info:hover {
    border-color: var(--mq-blue) !important; color: var(--mq-blue) !important;
}
.mq-app .btn-danger, .mq-app .btn-outline-danger {
    background: #fff !important; color: var(--mq-danger) !important; border: 1px solid #f1c2c8 !important;
}
.mq-app .btn-danger:hover, .mq-app .btn-outline-danger:hover { background: var(--mq-danger) !important; color: #fff !important; }
.mq-app .btn-link { color: var(--mq-blue) !important; background: transparent !important; border: 0 !important; padding: 6px 4px; }

/* legacy action links */
.mq-app .user-list-btn a, .mq-app .list-btn a, .mq-app .per-user-btn-top a {
    display: inline-flex; align-items: center; gap: 7px;
    background: linear-gradient(135deg, var(--mq-btn-1), var(--mq-btn-2));
    color: var(--mq-on-btn) !important; padding: 9px 16px; border-radius: var(--mq-radius-sm);
    font-weight: 600; font-size: 13.5px; border: 0 !important;
}
.mq-app .user-list-btn a:hover, .mq-app .list-btn a:hover, .mq-app .per-user-btn-top a:hover { filter: brightness(1.06); text-decoration: none; color: var(--mq-on-btn) !important; }
.mq-app .list-edit-btn a { color: var(--mq-blue) !important; font-weight: 600; border: 0 !important; }
.mq-app .list-edit-btn a:hover { text-decoration: underline; }

/* legacy save / back form actions */
.mq-app .per-btns-item { display: flex; justify-content: flex-end; align-items: center; gap: 12px; }
.mq-app .per-btns-item .back { margin: 0; }
.mq-app .per-btns-item .back a {
    display: inline-flex; align-items: center; background: #fff; color: var(--mq-ink) !important;
    border: 1px solid var(--mq-line) !important; border-radius: var(--mq-radius-sm); padding: 9px 18px; font-weight: 600; transition: all .18s;
}
.mq-app .per-btns-item .back a:hover { border-color: var(--mq-blue) !important; color: var(--mq-blue) !important; text-decoration: none; }
.mq-app .per-btns-item .save { border: 0 !important; border-radius: var(--mq-radius-sm); }
.mq-app .per-btns-item .save button, .mq-app .per-btns-item button {
    background: linear-gradient(135deg, var(--mq-btn-1), var(--mq-btn-2)); color: var(--mq-on-btn); border: 0;
    border-radius: var(--mq-radius-sm); padding: 9px 18px; font-weight: 600; transition: filter .18s;
}
.mq-app .per-btns-item .save:hover, .mq-app .per-btns-item .save button:hover, .mq-app .per-btns-item button:hover { filter: brightness(1.06); color: var(--mq-on-btn); background: linear-gradient(135deg, var(--mq-btn-1), var(--mq-btn-2)); }

/* tabs (inline bg colors neutralized via !important) */
.mq-app .nav-tabs { border-bottom: 1px solid var(--mq-line); gap: 4px; margin-bottom: 0; flex-wrap: wrap; }
.mq-app .nav-tabs .nav-link {
    background: transparent !important; color: var(--mq-slate) !important;
    border: 0 !important; border-radius: 0 !important; padding: 12px 18px !important; margin: 0 !important;
    font-weight: 600; font-size: 14px;
}
.mq-app .nav-tabs .nav-link:hover { color: var(--mq-ink) !important; }
.mq-app .nav-tabs .nav-link.active { color: var(--mq-blue) !important; background: transparent !important; border-bottom: 2px solid var(--mq-blue) !important; }
.mq-app .masteqa-custom-tab-link { background: transparent !important; margin-right: 0 !important; }

/* form fields */
.mq-app .masteqa-custom-half-size { width: 100% !important; text-align: left !important; font-size: 14px !important; }
.mq-app select.form-control { height: 46px; }
.mq-app textarea.form-control { min-height: 90px; }
.mq-app .form-check-input { width: 1.05em; height: 1.05em; accent-color: var(--mq-blue); }
.mq-app .font-weight-bold { font-weight: 600; }
.mq-app .small, .mq-app small { font-size: .86em; }
.mq-app .masteqa-custom-divider { margin: .35em 0; }

/* alerts (legacy used .alert-danger/.alert-success as bare classes) */
.mq-app .alert-danger { background: #fdecee; border: 1px solid #f6cdd3; color: #b3283a; border-radius: var(--mq-radius-sm); padding: 12px 16px; margin: 6px 0; }
.mq-app .alert-success { background: #e7f7ee; border: 1px solid #c4ebd4; color: #18794e; border-radius: var(--mq-radius-sm); padding: 12px 16px; margin: 6px 0; }

/* legacy table heading bar */
.mq-app .tble-heading { background: linear-gradient(120deg, var(--mq-navy), var(--mq-navy-2)); border-radius: var(--mq-radius-sm) var(--mq-radius-sm) 0 0; padding: 12px 18px; }
.mq-app .tble-heading h2 { color: #fff; font-size: 15px; }

/* legacy card-header (was loud green) → neutral inside app */
.mq-app .card { border: 1px solid var(--mq-line); border-radius: var(--mq-radius); }
.mq-app .card-header { background: #f4f7fb; color: var(--mq-ink); border-bottom: 1px solid var(--mq-line); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 920px) {
    .mq-hero-grid { grid-template-columns: 1fr; gap: 40px; padding: 60px 0 70px; }
    .mq-hero-visual { order: -1; }
    .mq-cards { grid-template-columns: 1fr; }
    .mq-pricing { grid-template-columns: repeat(2, 1fr); }
    .mq-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 680px) {
    .mq-links { display: none; }
    .mq-burger { display: block; }
    .mq-section { padding: 60px 0; }
    .mq-hero-meta { gap: 20px; flex-wrap: wrap; }
    .mq-deploy { flex-direction: column; align-items: flex-start; text-align: left; }
    .mq-pricing { grid-template-columns: 1fr; }
    .mq-footer-grid { grid-template-columns: 1fr; }
    .mq-page-head { align-items: flex-start; flex-direction: column; }
}

/* ---------- loading overlay (row navigation) ---------- */
.mq-loading-overlay {
    position: fixed; inset: 0; z-index: 1080;
    display: flex; align-items: center; justify-content: center;
    background: rgba(20, 22, 28, 0.5); backdrop-filter: blur(2px);
}
.mq-spinner {
    width: 48px; height: 48px; border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.35);
    border-top-color: var(--mq-teal);
    animation: mq-spin 0.7s linear infinite;
}
@keyframes mq-spin { to { transform: rotate(360deg); } }
