/* user.css backup(5) */
/* test */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@800&display=swap');

/* FreeMarkIt — Cassiopeia child theme
   This file is automatically loaded by Cassiopeia after its own stylesheet.
   Define the palette here once; component CSS (com_markit/css/site.css) references these vars. */

:root {
    /* Blues */
    --fm-blue-dark:   #1E4E79;
    --fm-blue-mid:    #3F7CA6;
    --fm-blue-light:  #A7C4D9;

    /* Oranges — 5% rule: primary CTA and Marks currency indicator only */
    --fm-orange:      #F28C28;
    --fm-orange-soft: #F5B267;

    /* Neutrals */
    --fm-bg:          #F4EFEA;
    --fm-text-dark:   #2A2A2A;
    --fm-text-light:  #FFFFFF;
    --fm-border:      #E0D8CE;

    /* Wire Cassiopeia's own colour vars to our palette */
    --cassiopeia-color-primary: var(--fm-blue-mid);
    --cassiopeia-color-secondary: var(--fm-blue-dark);
    --cassiopeia-color-link:    var(--fm-blue-mid);
    --cassiopeia-color-hover:   var(--fm-orange);
}

/* FreeMarkIt colour usage guidance: 80% white/off-white/light blue, 15% dark/mid blue, 5% orange. */

/* ─── Page foundation (80% surface) ────────────────────────────────────── */

/*body {
    
}*/

a {
    color: var(--fm-blue-mid);
}

a:hover {
    color: var(--fm-orange);
}

/* ─── Joomla article card ───────────────────────────────────────────────── */

.com-content-featured .items-row article,
.com-content-article,
.item-page {
    background: #ffffff;
    border: 1px solid var(--fm-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.com-content-featured .items-row article h1,
.com-content-featured .items-row article h2,
.com-content-featured .items-row article h3,
.com-content-article h1,
.com-content-article h2,
.com-content-article h3,
.item-page h1,
.item-page h2,
.item-page h3 {
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-weight: 800;
}

/* ─── Header (15% dark/mid blue) ───────────────────────────────────────── */

/* Base header rules (desktop default) */
.header,
.header.container-header.full-width,
.header.header.container-header.full-width {
    background-color: var(--fm-blue-dark) !important;
    background-image: url("../images/FM_Banner_WO_1850x460.png") !important;
    background-repeat: no-repeat !important;
    background-position: 20% center !important;
    background-size: auto 100% !important;
    box-shadow: none !important;
    min-height: 192px !important;
    display: flex !important;
    align-items: center !important;
    padding: 1rem 0 !important;
}

/* ─── Mobile banner (< 992px): swap to 900×190 image ───────────────────── */
@media (max-width: 991.98px) {
    .header.container-header.full-width,
    .header.header.container-header.full-width {
        background-image: url("../images/FM_Banner_Mob_900x190.png") !important;
        background-size: cover !important;
        background-position: 100% center !important;
        min-height: 90px !important;
    }
}

header.header .navbar-brand,
header.header .navbar-brand *,
header.header .brand,
header.header .brand *,
header.header .logo,
header.header .logo *,
header.header .brand-logo,
header.header .fm-logo,
header.header .fm-logo * {
    display: none !important;
}

.header a,
.header .mod-menu a,
.navbar-brand {
    color: var(--fm-text-light) !important;
}

.header a:hover,
.header .mod-menu a:hover {
    color: var(--fm-orange-soft) !important;
}

/* ─── Bootstrap button overrides ───────────────────────────────────────── */

/* Primary CTA — orange (5% rule: use sparingly, one per screen) */
.btn-primary {
    --bs-btn-bg:                 var(--fm-orange);
    --bs-btn-border-color:       var(--fm-orange);
    --bs-btn-color:              var(--fm-text-light);
    --bs-btn-hover-bg:           #d9771f;
    --bs-btn-hover-border-color: #d9771f;
    --bs-btn-active-bg:          #c06a1a;
    --bs-btn-active-border-color:#c06a1a;
}

/* Secondary actions — mid-blue brand buttons */
.btn-secondary {
    --bs-btn-bg:                 var(--fm-blue-mid);
    --bs-btn-border-color:       var(--fm-blue-mid);
    --bs-btn-color:              var(--fm-text-light);
    --bs-btn-hover-bg:           var(--fm-blue-dark);
    --bs-btn-hover-border-color: var(--fm-blue-dark);
}

.btn-light {
    --bs-btn-bg:                 var(--fm-blue-light);
    --bs-btn-border-color:       var(--fm-blue-light);
    --bs-btn-color:              var(--fm-blue-dark);
    --bs-btn-hover-bg:           #c9d7e7;
    --bs-btn-hover-border-color: #c9d7e7;
}

.btn-outline-secondary {
    --bs-btn-color:              var(--fm-blue-mid);
    --bs-btn-border-color:       var(--fm-blue-mid);
    --bs-btn-hover-bg:           var(--fm-blue-mid);
    --bs-btn-hover-border-color: var(--fm-blue-mid);
    --bs-btn-hover-color:        var(--fm-text-light);
}

/* Outline primary — mid-blue (used for secondary CTAs and per-item actions) */
.btn-outline-primary {
    --bs-btn-color:              var(--fm-blue-mid);
    --bs-btn-border-color:       var(--fm-blue-mid);
    --bs-btn-hover-bg:           var(--fm-blue-mid);
    --bs-btn-hover-border-color: var(--fm-blue-mid);
    --bs-btn-hover-color:        var(--fm-text-light);
    --bs-btn-active-bg:          var(--fm-blue-dark);
    --bs-btn-active-border-color:var(--fm-blue-dark);
    --bs-btn-active-color:       var(--fm-text-light);
}

/* Filter/nav pills (browse page uses btn-outline-success) — light blue, not green */
.btn-outline-success {
    --bs-btn-color:              var(--fm-blue-dark);
    --bs-btn-border-color:       var(--fm-blue-light);
    --bs-btn-hover-bg:           var(--fm-blue-light);
    --bs-btn-hover-border-color: var(--fm-blue-light);
    --bs-btn-hover-color:        var(--fm-blue-dark);
    --bs-btn-active-bg:          var(--fm-blue-light);
    --bs-btn-active-border-color:var(--fm-blue-light);
    --bs-btn-active-color:       var(--fm-blue-dark);
}

/* ─── FreeMarkIt page components and form styling ───────────────────────── */

body {
background-color: var(--fm-bg);
    color: var(--fm-text-dark);
    background-image:
        radial-gradient(ellipse at left center, rgba(242, 140, 40, 0.18) 0%, transparent 38%),
        radial-gradient(ellipse at right center, rgba(242, 140, 40, 0.18) 0%, transparent 38%),
        radial-gradient(circle at 1px 1px, rgba(63, 124, 166, 0.06) 1px, transparent 0),
        linear-gradient(var(--fm-bg), var(--fm-bg));
    background-size: 100% 100%, 100% 100%, 24px 24px, 100% 100%;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

.card {
    background-color: #ffffff;
    border: 1px solid var(--fm-border);
    border-radius: 0.75rem;
    padding: 0.5rem;
    transition: box-shadow 0.25s ease, transform 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(63, 124, 166, 0.14);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
    border: 1px solid var(--fm-border);
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    width: 100%;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
input[type="datetime-local"]:focus,
textarea:focus,
select:focus {
    border-color: var(--fm-blue-mid);
    box-shadow: 0 0 0 0.25rem rgba(63, 124, 166, 0.18);
    outline: none;
}

.section-highlight {
    background-color: var(--fm-blue-light);
}

.section-warm {
    background-color: var(--fm-orange-soft);
}

.badge-swap {
    background-color: var(--fm-blue-mid);
    color: var(--fm-text-light);
}

.badge-free {
    background-color: var(--fm-orange);
    color: var(--fm-text-light);
}

/* ─── Sidebar modules — Cassiopeia 6.1 uses div.sidebar-right.card + h3.card-header ── */

/* Remove Bootstrap card padding so the heading band is flush to all edges */
.sidebar-right.card {
    padding-top: 0;
    padding-left: 0;
    padding-right: 0;
    border-radius: 12px;
}

/* Blue heading — flush at top of rounded card */
h3.card-header {
    background-color: var(--fm-blue-dark);
    color: var(--fm-text-light);
    padding: 12px 16px;
    margin: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 1px solid var(--fm-border);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-align: start;
}

/* Strip list defaults in card-body */
.sidebar-right .card-body ul {
    list-style: none;
    padding: 0 1rem;
    margin: 0;
}

/* Nav links */
.sidebar-right .card-body ul li a,
.sidebar-right .card-body .nav-link {
    display: block;
    padding: 9px 13px;
    color: var(--fm-text-dark);
    font-size: 0.9375rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    border-radius: 0 4px 4px 0;
    text-decoration: none;
    line-height: 1.4;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

/* Link hover */
.sidebar-right .card-body ul li a:hover,
.sidebar-right .card-body .nav-link:hover {
    background-color: var(--fm-bg);
    color: var(--fm-blue-mid);
    border-left-color: var(--fm-orange);
}

/* Active / current page */
.sidebar-right .card-body li.active > a,
.sidebar-right .card-body li.current > a,
.sidebar-right .card-body .nav-item.active .nav-link,
.sidebar-right .card-body .nav-item.current .nav-link {
    background-color: rgba(167, 196, 217, 0.22);
    color: var(--fm-blue-dark);
    border-left-color: var(--fm-blue-dark);
    font-weight: 700;
}

/* Sub-menu indent */
.sidebar-right .card-body ul ul {
    padding-left: 14px;
    border-left: 2px solid var(--fm-border);
    margin-left: 10px;
}

/* ─── Forms ────────────────────────────────────────────────────────────── */

.form-control:focus,
.form-select:focus {
    border-color: var(--fm-blue-mid);
    box-shadow: 0 0 0 0.25rem rgba(63, 124, 166, 0.25);
}

/* Checkboxes — refined to match site design */
.form-check-input[type="checkbox"] {
    width: 13px !important;
    height: 13px !important;
    min-width: 13px !important;
    max-width: 13px !important;
    min-height: 13px !important;
    max-height: 13px !important;
    margin-top: 0.2rem;
    flex-shrink: 0;
    border: 1px solid #bbc8d4 !important;
    border-radius: 3px;
    background-color: #fff !important;
    background-image: none !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, filter .15s ease;
}
/* Hover — unchecked: subtle tint */
.form-check-input[type="checkbox"]:not(:checked):hover:not(:disabled) {
    border-color: var(--fm-blue-mid) !important;
    background-color: #edf4f9 !important;
}
/* Hover — checked: darken the blue slightly */
.form-check-input[type="checkbox"]:checked:hover:not(:disabled) {
    filter: brightness(0.88);
}
.form-check-input[type="checkbox"]:checked {
    background-color: var(--fm-blue-mid) !important;
    border-color: var(--fm-blue-mid) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3.5' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
    background-size: 9px !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
}
.form-check-input[type="checkbox"]:focus {
    border-color: var(--fm-blue-mid) !important;
    box-shadow: 0 0 0 2px rgba(63, 124, 166, .22) !important;
    outline: 0;
}
.form-check-input[type="checkbox"]:checked:disabled {
    background-color: var(--fm-blue-light) !important;
    border-color: var(--fm-blue-light) !important;
    opacity: 0.7;
    cursor: not-allowed;
}
.form-check-input[type="checkbox"]:not(:checked):disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background-color: var(--fm-bg) !important;
}
.form-check-label { cursor: pointer; user-select: none; }
.form-check-input[type="checkbox"]:disabled ~ .form-check-label { cursor: default; }

/* Radio buttons */
.form-check-input[type="radio"] {
    width: 1rem !important;
    height: 1rem !important;
    min-width: 1rem !important;
    max-width: 1rem !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1.5px solid #bbc8d4 !important;
    background-color: #fff !important;
    flex-shrink: 0;
    margin-top: 0.2rem;
    cursor: pointer;
    appearance: auto;
    -webkit-appearance: auto;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.form-check-input[type="radio"]:checked {
    background-color: var(--fm-blue-mid) !important;
    border-color: var(--fm-blue-mid) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2.5' fill='%23fff'/%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: center !important;
    appearance: none;
    -webkit-appearance: none;
}
.form-check-input[type="radio"]:hover:not(:disabled) {
    border-color: var(--fm-blue-mid) !important;
}
.form-check-input[type="radio"]:focus {
    border-color: var(--fm-blue-mid) !important;
    box-shadow: 0 0 0 2px rgba(63, 124, 166, .22) !important;
    outline: 0;
}
.form-check-input[type="radio"]:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}
.form-check-input[type="radio"] ~ .form-check-label { cursor: pointer; }
.form-check-input[type="radio"]:disabled ~ .form-check-label { cursor: default; }

/* ─── Tables ───────────────────────────────────────────────────────────── */

.table > thead {
    background-color: var(--fm-blue-light);
    color: var(--fm-blue-dark);
}

/* ─── Policy / legal documents (.policy-doc) ────────────────────────────
   Wrap any policy or terms article body in <div class="policy-doc"> to
   get compact, professional typography without affecting other content. */

.policy-doc {
    font-size: 0.875rem;
    line-height: 1.55;
    color: var(--fm-text-dark);
    max-width: 860px;
}

.policy-doc h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fm-blue-dark);
    margin-top: 0;
    margin-bottom: 0.4rem;
    border-bottom: 2px solid var(--fm-blue-light);
    padding-bottom: 0.25rem;
}

.policy-doc h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--fm-blue-dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 1rem;
    margin-bottom: 0.25rem;
}

.policy-doc p {
    margin-top: 0;
    margin-bottom: 0.45rem;
}

.policy-doc ul,
.policy-doc ol {
    margin-top: 0.15rem;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
}

.policy-doc li {
    margin-bottom: 0.2rem;
}

.policy-doc hr {
    margin: 0.65rem 0;
    border-color: var(--fm-border);
    opacity: 0.5;
}

.policy-doc table {
    font-size: 0.8rem;
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0.75rem;
}

.policy-doc table th,
.policy-doc table td {
    padding: 4px 8px;
    border: 1px solid var(--fm-border);
    vertical-align: top;
}

.policy-doc table thead tr {
    background-color: var(--fm-blue-light);
    color: var(--fm-blue-dark);
    font-weight: 600;
}

/* ─── Marks Guide article (.marks-guide) ──────────────────────────────── */

.marks-guide {
    max-width: 820px;
}

.marks-guide .mg-hero {
    background: linear-gradient(135deg, var(--fm-blue-dark) 0%, var(--fm-blue-mid) 100%);
    border-radius: 0.75rem;
    padding: 2.5rem 2rem;
    color: var(--fm-text-light);
    text-align: center;
    margin-bottom: 1.75rem;
}

.marks-guide .mg-hero-icon {
    font-size: 3rem;
    line-height: 1;
    display: block;
    margin-bottom: 0.75rem;
    color: var(--fm-orange);
}

.marks-guide .mg-hero h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--fm-text-light);
}

.marks-guide .mg-hero p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 520px;
    margin: 0 auto;
    color: var(--fm-text-light);
}

.marks-guide .mg-section {
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: 0.75rem;
    padding: 1.75rem 2rem;
    margin-bottom: 1.25rem;
}

.marks-guide .mg-section h2 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--fm-blue-dark);
    margin-top: 0;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--fm-blue-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.marks-guide .mg-icon {
    color: var(--fm-orange);
}

.marks-guide .mg-tip {
    border-left: 4px solid var(--fm-blue-mid);
    background: rgba(167, 196, 217, 0.2);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.75rem 1rem;
    margin: 1rem 0 0;
    color: var(--fm-blue-dark);
    font-size: 0.925rem;
}

.marks-guide .mg-warn {
    border-left: 4px solid var(--fm-orange);
    background: rgba(242, 140, 40, 0.1);
    border-radius: 0 0.5rem 0.5rem 0;
    padding: 0.75rem 1rem;
    margin: 1rem 0 0;
    color: var(--fm-text-dark);
    font-size: 0.925rem;
}

.marks-guide .mg-steps {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0;
    counter-reset: mg-step;
}

.marks-guide .mg-steps li {
    counter-increment: mg-step;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.marks-guide .mg-steps li:last-child {
    margin-bottom: 0;
}

.marks-guide .mg-steps li::before {
    content: counter(mg-step);
    min-width: 32px;
    height: 32px;
    background: var(--fm-blue-mid);
    color: var(--fm-text-light);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.marks-guide .mg-step-title {
    font-weight: 700;
    color: var(--fm-text-dark);
    display: block;
    margin-bottom: 2px;
    font-size: 0.975rem;
}

.marks-guide .mg-step-desc {
    color: #555;
    font-size: 0.925rem;
}

.marks-guide .mg-balance-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.93rem;
}

.marks-guide .mg-balance-table th {
    background-color: var(--fm-blue-light);
    color: var(--fm-blue-dark);
    font-weight: 700;
    text-align: left;
    padding: 0.6rem 0.875rem;
    border-bottom: 2px solid #a7c4d9;
}

.marks-guide .mg-balance-table td {
    padding: 0.6rem 0.875rem;
    border-bottom: 1px solid var(--fm-border);
    color: var(--fm-text-dark);
}

.marks-guide .mg-balance-table tr:last-child td {
    border-bottom: none;
}

.marks-guide .mg-credit { color: var(--fm-blue-dark); font-weight: 600; }
.marks-guide .mg-debit  { color: var(--fm-orange);    font-weight: 600; }

.marks-guide .mg-faq-item {
    border-top: 1px solid var(--fm-border);
    padding: 1rem 0;
}

.marks-guide .mg-faq-item:first-of-type {
    border-top: none;
    padding-top: 0;
}

.marks-guide .mg-faq-q {
    font-weight: 700;
    color: var(--fm-blue-dark);
    margin-bottom: 0.3rem;
    font-size: 0.975rem;
}

.marks-guide .mg-faq-a {
    color: #555;
    font-size: 0.95rem;
    margin: 0;
}

.marks-guide .mg-footer {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--fm-border);
    color: #888;
    font-size: 0.875rem;
}

.marks-guide .mg-footer a {
    color: var(--fm-blue-mid);
}

.marks-guide .mg-footer a:hover {
    color: var(--fm-orange);
}

@media (max-width: 576px) {
    .marks-guide .mg-section { padding: 1.25rem; }
    .marks-guide .mg-hero    { padding: 1.5rem 1rem; }
    .marks-guide .mg-hero h1 { font-size: 1.35rem; }
}

/* ─── Shared profile / registration components (mki-*) ──────────────────── */

.mki-welcome-banner {
    background: linear-gradient(135deg, var(--fm-blue-dark) 0%, var(--fm-blue-mid) 100%);
    color: #fff;
    border-radius: 12px;
    padding: 1.75rem 2rem;
}

.mki-welcome-banner h2,
.mki-welcome-banner h1 {
    font-size: 1.4rem;
    font-weight: 800;
    margin-bottom: 0.3rem;
    color: #fff;
}

.mki-welcome-banner p {
    margin: 0;
    opacity: 0.88;
    font-size: 0.95rem;
    color: #fff;
}

.mki-identity-strip {
    display:     flex;
    align-items: baseline;
    gap:         0.85rem;
    flex-wrap:   wrap;
}
.mki-identity-name {
    font-size:   1.15rem;
    font-weight: 700;
    color:       var(--fm-text-dark);
}
.mki-identity-username {
    display:     flex;
    align-items: center;
    gap:         0.25rem;
    font-size:   0.85rem;
    color:       var(--fm-blue-mid);
}

.mki-profile-section {
    border: 1px solid #E8E2DA;
    border-radius: 12px;
    padding: 1.5rem 1.75rem;
    margin-bottom: 1.5rem;
    background: #fff;
}

.mki-section-heading {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--fm-blue-dark);
}

.mki-profile-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--fm-blue-dark);
}

.mki-privacy-note {
    font-size: 0.8rem;
    color: #6B7280;
    margin-bottom: 1rem;
    padding: 0.45rem 0.75rem;
    background: #F0F8FF;
    border-left: 3px solid var(--fm-blue-light);
    border-radius: 0 6px 6px 0;
}

.mki-privacy-note svg {
    vertical-align: -2px;
    margin-right: 4px;
}

details.mki-privacy-expand {
    cursor: default;
}
details.mki-privacy-expand summary {
    list-style:  none;
    display:     flex;
    align-items: center;
    gap:         0.3rem;
    cursor:      pointer;
    font-weight: 600;
    color:       var(--fm-blue-mid);
}
details.mki-privacy-expand summary::-webkit-details-marker { display: none; }
details.mki-privacy-expand summary::marker              { display: none; }
details.mki-privacy-expand summary svg {
    flex-shrink: 0;
    margin-right: 0;
    vertical-align: 0;
}
.mki-privacy-body {
    margin-top:  0.5rem;
    margin-bottom: 0;
    font-size:   0.8rem;
    color:       #6B7280;
}

.mki-legal-section {
    border: 2px solid var(--fm-blue-dark);
    border-radius: 12px;
    padding: 1.25rem 1.75rem;
    margin-bottom: 1.5rem;
    background: #F0F8FF;
}

.mki-legal-section h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--fm-blue-dark);
    margin-bottom: 0.75rem;
}

.mki-legal-check { font-size: 0.95rem; }

/* ── Registration step indicator ─────────────────────────────────────────── */

.mki-reg-steps {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.1rem;
}

.mki-reg-step-dot {
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
    flex-shrink: 0;
    line-height: 1;
}

.mki-reg-step-active {
    background: #fff;
    color: var(--fm-blue-dark);
}

.mki-reg-step-future {
    background: rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.65);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.mki-reg-step-done {
    background: rgba(255, 255, 255, 0.9);
    color: var(--fm-blue-dark);
    font-size: 0.8rem;
}

.mki-reg-step-line {
    flex: 1;
    height: 2px;
    background: rgba(255, 255, 255, 0.35);
    margin: 1rem 0.4rem 0;
    flex-shrink: 0;
}

.mki-reg-step-line-done {
    background: rgba(255, 255, 255, 0.7);
}

.mki-reg-step-label {
    display: block;
    font-size: 0.68rem;
    text-align: center;
    margin-top: 0.25rem;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Phase 6 — Mobile navigation: hamburger drawer · bottom nav · compact header
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 991.98px) {
    .navbar-toggler      { display: none !important; }
    .navbar-collapse     { display: none !important; }
}

.header.container-header.full-width,
.header.header.container-header.full-width {
    transition: min-height 0.25s ease;
    padding-top: max(1rem, env(safe-area-inset-top)) !important;
}

@media (max-width: 991.98px) {
    .header.fm-header-compact.container-header.full-width,
    .header.fm-header-compact.header.container-header.full-width {
        min-height: 50px !important;
    }
}

.fm-hamburger {
    display: none;
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 20px);
    right: 14px;
    z-index: 1035;
    background: rgba(63, 124, 166, 0.8);
    border: 1px solid rgba(242, 140, 40, 0.8);
    box-shadow: 0 0 8px 2px rgba(242, 140, 40, 0.6);
    border-radius: 8px;
    padding: 8px 10px;
    min-height: 40px;
    min-width: 40px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: fm-hamburger-glow 2.5s ease-in-out infinite;
}

@media (max-width: 991.98px) {
    .fm-hamburger { display: flex; }
}

.fm-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: #F28C28;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.fm-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.fm-nav-overlay.show { display: block; }

body.fm-drawer-open { overflow: hidden; }

.fm-nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    height: 100dvh;
    z-index: 1045;
    background: var(--fm-blue-dark);
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    overflow-y: auto;
    overscroll-behavior: contain;
    display: flex;
    flex-direction: column;
    padding-top: env(safe-area-inset-top, 0px);
}

.fm-nav-drawer.show { transform: translateX(0); }

.fm-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.fm-drawer-title {
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.fm-drawer-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    padding: 6px;
    min-height: 44px;
    min-width: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.fm-drawer-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }

.fm-drawer-body { flex: 1; overflow-y: auto; }

.fm-drawer-nav {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.fm-drawer-sep {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* .fm-drawer-item { } */

.fm-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.975rem;
    font-weight: 500;
    min-height: 44px;
    transition: background-color 0.15s ease, color 0.15s ease;
    border-left: 3px solid transparent;
}

.fm-drawer-link:hover,
.fm-drawer-link:focus {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    border-left-color: rgba(255, 255, 255, 0.3);
}

.fm-drawer-item.active .fm-drawer-link,
.fm-drawer-link.active {
    background: rgba(242, 140, 40, 0.15);
    color: var(--fm-orange);
    border-left-color: var(--fm-orange);
    font-weight: 600;
}

.fm-drawer-cta { color: var(--fm-orange) !important; }
.fm-drawer-cta:hover { color: var(--fm-orange-soft) !important; }

.fm-drawer-icon {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    opacity: 0.9;
}

/* ── Bottom navigation bar (phones only) ─────────────────────────────────── */
.fm-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: var(--fm-blue-dark);
    height: calc(56px + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    align-items: center;
    justify-content: space-around;
}

@media (max-width: 767.98px) {
    .fm-bottom-nav { display: flex; }
    body { padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px)); }
}

.fm-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    flex: 1;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    font-size: 0.6rem;
    font-weight: 500;
    min-height: 44px;
    min-width: 44px;
    padding: 4px 4px 0;
    transition: color 0.15s ease;
    letter-spacing: 0.02em;
}

button.fm-bottom-nav-item {
    background: none;
    border: none;
    cursor: pointer;
}

.fm-bottom-nav-item:hover,
.fm-bottom-nav-item:focus   { color: rgba(255, 255, 255, 0.9); }
.fm-bottom-nav-item.active  { color: #fff; }

.fm-bottom-nav-cta { color: var(--fm-orange) !important; }
.fm-bottom-nav-cta.active,
.fm-bottom-nav-cta:hover    { color: var(--fm-orange-soft) !important; }

/* ── Hide sidebar on phones ──────────────────────────────────────────────── */
@media (max-width: 767.98px) {
    .sidebar-right,
    #sidebar-right { display: none !important; }
}

/* ── Mobile baseline: font size + touch targets ──────────────────────────── */
@media (max-width: 991.98px) {
    input[type="text"],
    input[type="password"],
    input[type="email"],
    input[type="tel"],
    input[type="number"],
    input[type="url"],
    input[type="search"],
    input[type="date"],
    input[type="time"],
    input[type="datetime-local"],
    select,
    textarea {
        font-size: 16px !important;
    }

    .btn,
    button:not(.fm-hamburger):not(.fm-drawer-close),
    [role="button"],
    a.nav-link {
        min-height: 44px;
    }
}

/* ── Dashboard: Action Banner ───────────────────────────────────────────────*/
.fm-action-banner {
    background: var(--fm-orange, #F28C28);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    color: #ffffff;
    
    /* CRITICAL: Strict top-to-bottom vertical centering container */
    display: flex;
    align-items: center !important; 
}

.fm-action-banner-inner {
    /* CRITICAL: Force inner structural elements to line up on a perfect center horizontal line */
    display: flex;
    align-items: center !important; 
    gap: 0.6rem;
    flex: 1;
}

.fm-action-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    
    /* Strict top-to-bottom alignment lock for the lightning bolt */
    display: inline-flex;
    align-items: center !important;
    align-self: center !important;
    line-height: 1 !important;
}

.fm-action-banner-body {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    
    /* Strict vertical box locking for wrapping text structures */
    align-self: center !important;
    line-height: 1.3 !important; 
}

/* Highly visible white text pop using your Montserrat configurations */
.fm-action-banner-body strong {
    color: var(--fm-text-light, #ffffff) !important; 
    font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    display: inline-block;
    vertical-align: middle;
}

.fm-action-banner-btns {
    /* CRITICAL: Force the link/button layout wrapper to anchor directly to the vertical middle */
    display: flex;
    align-items: center !important;
    flex-shrink: 0;
}

.fm-action-banner-btn {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.15s ease;
    
    /* Explicit inline-flex layout keeps the inner button text centered inside itself */
    display: inline-flex;
    align-items: center;
}

.fm-action-banner-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    color: #ffffff !important;
}

/* Mobile responsive layout shift */
@media (max-width: 576px) {
    .fm-action-banner {
        flex-direction: column;
        align-items: stretch !important;
    }
    .fm-action-banner-btns {
        width: 100%;
    }
    .fm-action-banner-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Dashboard: Hero Mark Balance ───────────────────────────────────────────*/
.fm-mark-hero {
    background: linear-gradient(135deg, var(--fm-blue-dark, #1E4E79) 0%, var(--fm-blue-mid, #3F7CA6) 100%);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    color: #fff;
}
.fm-mark-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.fm-mark-hero-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
    font-weight: 600;
    margin-bottom: 0.2rem;
}
.fm-mark-hero-balance {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #fff;
}
.fm-mark-hero-hint {
    font-size: 0.75rem;
    opacity: 0.7;
    margin-top: 0.35rem;
}
.fm-mark-hero-arrow {
    font-size: 2rem;
    opacity: 0.6;
    flex-shrink: 0;
}
.fm-mark-hero:hover .fm-mark-hero-arrow {
    opacity: 1;
}

/* ── Dashboard: Mini stat tiles ─────────────────────────────────────────────*/
.fm-mini-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #fff;
    border: 1px solid #E8E2DA;
    border-radius: 10px;
    text-align: center;
    padding: 0.4rem 0.4rem;
    color: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.fm-mini-stat:hover {
    border-color: var(--fm-blue-mid, #3F7CA6);
    box-shadow: 0 2px 8px rgba(63,124,166,.15);
}
.fm-mini-stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--fm-blue-dark, #1E4E79);
    line-height: 1;
}
.fm-mini-stat-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6B7280;
    margin-top: 0.25rem;
    font-weight: 600;
}
.fm-mini-stat-alert {
    border-color: var(--fm-orange, #F28C28);
}
.fm-mini-stat-alert .fm-mini-stat-val {
    color: var(--fm-orange, #F28C28);
}

/* ── Dashboard: Preview row list ────────────────────────────────────────────*/
.fm-preview-row {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0rem;
    padding: 0.25rem 1rem;
    border-bottom: 1px solid #F4EFEA;
}
.fm-preview-row:last-child {
    border-bottom: none;
}
.fm-preview-row-main {
    flex: 1;
    min-width: 0;
}
.fm-preview-row-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #1a1a1a;
    text-decoration: none;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fm-preview-row-title:hover { color: var(--fm-orange, #F28C28); }
.fm-preview-row-meta {
    font-size: 0.6rem;
    color: #6B7280;
    margin-top: 0rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fm-preview-row-badge { flex-shrink: 0; }

/* ── Dashboard: Empty state ─────────────────────────────────────────────────*/
.fm-empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
}
.fm-empty-state p {
    color: #6B7280;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* ── Dashboard: Collapsible sections ────────────────────────────────────────*/
.fm-collapsible {
    border: 1px solid #E8E2DA;
    border-radius: 10px;
    overflow: visible;
}
.fm-collapsible summary,
.fm-collapsible-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
    background: #F9F6F2;
    user-select: none;
    position: relative;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: box-shadow 0.25s ease-in-out, border-color 0.25s ease-in-out, z-index 0.25s ease-in-out, background-color 0.25s ease-in-out;
}
details.fm-collapsible[open] > summary,
details.fm-collapsible[open] > .fm-collapsible-toggle {
    border-radius: 10px 10px 0 0;
    border-bottom-color: #E8E2DA;
}
.fm-collapsible summary:hover,
.fm-collapsible-toggle:hover {
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 0 4px 14px rgba(242, 140, 40, 0.55);
    border-color: var(--fm-orange);
}
.fm-collapsible summary::-webkit-details-marker { display: none; }
.fm-collapsible-arrow {
    font-size: 1.2rem;
    color: #9CA3AF;
    transition: transform 0.2s;
}
details.fm-collapsible[open] .fm-collapsible-arrow {
    transform: rotate(90deg);
}
.fm-collapsible-body {
    padding: 1rem;
    border-top: 1px solid #E8E2DA;
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

/* ── Compact transaction rows ────────────────────────────────────────────────*/
.fm-tx-row {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.0rem 1rem;
    border-bottom: 1px solid #F4EFEA;
}
.fm-tx-row:last-child { border-bottom: none; }
.fm-tx-row-main { flex: 1; min-width: 0; }
.fm-tx-row-title {
    font-size: 0.88rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.fm-tx-row-meta { font-size: 0.6rem; color: #9CA3AF; margin-top: 0.1rem;/*  text-align: center;  */}
.fm-tx-row-amount { flex-shrink: 0; text-align: right; text-align: center; }
.fm-tx-amount    { font-size: 0.6rem; min-width: 2.5rem; text-align: center; }
.fm-tx-row-balance { font-size: 0.6rem; color: #9CA3AF; margin-top: 0.1rem; text-align: center; }

/* ── Transactions page: balance strip ───────────────────────────────────── */
.fm-tx-balance-strip {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    background: linear-gradient(135deg, var(--fm-blue-dark, #1E4E79) 0%, var(--fm-blue-mid, #3F7CA6) 100%);
    color: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
}
.fm-tx-balance-label {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    opacity: 0.8;
    font-weight: 600;
}
.fm-tx-balance-val {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
}

/* ── Detail-page card list ───────────────────────────────────────────────────*/
.fm-detail-list { display: flex; flex-direction: column; gap: 0.75rem; }
.fm-detail-card {
    position: relative;
    background: #fff;
    border: 1px solid #E8E2DA;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
}
.fm-detail-card-highlight { border-color: var(--fm-orange, #F28C28); }
.fm-detail-card-dim { opacity: 0.65; }
.fm-detail-card-title {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a1a1a;
    text-decoration: none;
    margin-bottom: 0.25rem;
}
.fm-detail-card-title:hover { color: var(--fm-orange, #F28C28); }
.fm-detail-card-meta {
    font-size: 0.78rem;
    color: #6B7280;
    margin-bottom: 0.5rem;
}
.fm-detail-card-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ── Call / queue pills ──────────────────────────────────────────────────── */
.fm-call-pill {
    display: inline-block;
    background: var(--fm-orange, #F28C28);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    border-radius: 20px;
    padding: 0.18rem 0.55rem;
}
.fm-call-pill-muted {
    background: #E8E2DA;
    color: #6B7280;
}

/* ── Detail-page thumbnails ──────────────────────────────────────────────────*/
.fm-detail-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.fm-detail-card-content {
    flex: 1;
    min-width: 0;
}
.fm-thumb-link { flex-shrink: 0; display: block; }
.fm-thumb {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    object-fit: cover;
    display: block;
}
.fm-thumb-placeholder {
    width: 84px;
    height: 84px;
    border-radius: 8px;
    background: #F4EFEA;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 2rem;
    color: #9CA3AF;
}
.fm-thumb-placeholder-mark {
    background: linear-gradient(135deg, var(--fm-blue-dark, #1E4E79) 0%, var(--fm-blue-mid, #3F7CA6) 100%);
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
}

.fm-tx-row .fm-thumb,
.fm-tx-row .fm-thumb-placeholder {
    width: 66px;
    height: 66px;
    border-radius: 6px;
    flex-shrink: 0;
}

.fm-queue-badge {
    display: inline-block;
    background: #EFF6FF;
    color: #1E4E79;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 20px;
    padding: 0.18rem 0.55rem;
    border: 1px solid #A7C4D9;
}

/* ── Status badge palette ────────────────────────────────────────────────────*/
.fm-badge-available    { background-color: #198754 !important; color: #fff !important; }
.fm-badge-reserved     { background-color: #F5B267 !important; color: #212529 !important; }
.fm-badge-collected    { background-color: #A7C4D9 !important; color: #1E4E79 !important; }
.fm-badge-withdrawn    { background-color: #6c757d !important; color: #fff !important; }
.fm-badge-lapsed       { background-color: #6c757d !important; color: #fff !important; }
.fm-badge-declined     { background-color: #9B2335 !important; color: #fff !important; }
.fm-badge-cancelled    { background-color: #9B2335 !important; color: #fff !important; }
.fm-badge-open-to-all  { background-color: #1E4E79 !important; color: #fff !important; }
.fm-badge-pending-review { background-color: #F28C28 !important; color: #1E4E79 !important; }
.fm-badge-pending      { background-color: #F28C28 !important; color: #212529 !important; }
.fm-badge-awarded      { background-color: #1E4E79 !important; color: #fff !important; }
.fm-badge-unsuccessful { background-color: #9B2335 !important; color: #fff !important; }
.fm-badge-closed       { background-color: #6c757d !important; color: #fff !important; }
.fm-badge-credit       { background-color: #1a6e3c !important; color: #fff !important; font-size: 0.6rem !important;}
.fm-badge-debit        { background-color: #8b1a1a !important; color: #fff !important; font-size: 0.6rem !important;}
.fm-badge-wide         { min-width: 100px; display: inline-block; text-align: center; }

.markit-tbl-stars      { font-size: 0.65rem; line-height: 1; letter-spacing: -1px; text-align: center; }
.markit-truncate-cell  { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#markit-requests-table              { table-layout: fixed; width: 100%; }
#markit-requests-table th.col-date  { width: 65px; }
#markit-requests-table th.col-dist  { width: 80px; }
#markit-requests-table th.col-act   { width: 80px; }

.markit-cat-img-wrap { position: relative; }
.markit-cat-img-wrap img { display: block; width: 100%; height: auto; }

.markit-offer-thumb    { position: relative; }
.markit-requested-badge {
    position:       absolute;
    top:            -10px;
    right:          6px;
    width:          20%;
    height:         auto;
    pointer-events: none;
    filter:         drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
}

/* ─── Nav badge ─────────────────────────────────────────────────────────── */
.fm-nav-icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.fm-nav-badge {
    position: absolute;
    top: -5px;
    right: -7px;
    min-width: 17px;
    height: 17px;
    background: #dc3545;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    border: 2px solid var(--fm-blue-dark);
}

/* ─── Inbox view ────────────────────────────────────────────────────────── */
.fm-inbox-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--fm-blue-mid);
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fm-inbox-unread {
    background: #f0f6ff;
}

.fm-inbox-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fm-blue-mid);
    display: inline-block;
    flex-shrink: 0;
}

.fm-notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--fm-grey-light, #f3f4f6);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* ─── Chat view ─────────────────────────────────────────────────────────── */
#markit-chat .fm-chat-card {
    border-radius: 12px;
    overflow: hidden;
    height: calc(100vh - var(--fm-chat-top, 240px) - 3rem);
    min-height: 380px;
}

.fm-chat-header {
    background: var(--fm-blue-dark);
    color: #fff;
    flex-shrink: 0;
}

.fm-chat-back-btn {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.25rem;
    text-decoration: none;
    line-height: 1;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-chat-back-btn:hover { color: #fff; }

.fm-chat-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--fm-blue-mid);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.fm-chat-header-sub { color: rgba(255, 255, 255, 0.65); }

.fm-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 1.25rem;
    background: #eae6df;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fm-chat-date-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.75rem 0 0.25rem;
}

.fm-chat-date-divider span {
    background: rgba(255, 255, 255, 0.75);
    color: #555;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 10px;
    letter-spacing: 0.02em;
}

.fm-chat-row {
    display: flex;
    margin-bottom: 2px;
}

.fm-chat-row-sent     { justify-content: flex-end; }
.fm-chat-row-received { justify-content: flex-start; }

.fm-chat-bubble {
    max-width: 72%;
    padding: 3px 10px 2px;
    border-radius: 10px;
    word-break: break-word;
    position: relative;
    box-shadow: 0 1px 1px rgba(0,0,0,0.10);
}

.fm-chat-bubble-sent {
    background: var(--fm-blue-dark);
    color: #fff;
    border-bottom-right-radius: 3px;
}

.fm-chat-bubble-received {
    background: #fff;
    color: var(--fm-text-dark);
    border-bottom-left-radius: 3px;
}

.fm-chat-bubble-content {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    flex-wrap: wrap;
}

.fm-chat-bubble-body {
    font-size: 0.9rem;
    line-height: 1.35;
    white-space: pre-wrap;
    flex: 1 1 auto;
    min-width: 0;
}

.fm-chat-bubble-time {
    font-size: 0.65rem;
    opacity: 0.65;
    flex-shrink: 0;
    align-self: flex-end;
    line-height: 1;
    padding-bottom: 1px;
}

.fm-chat-bubble-sent .fm-chat-bubble-time   { color: var(--fm-blue-light); opacity: 0.85; }
.fm-chat-bubble-received .fm-chat-bubble-time { color: #888; }

.fm-chat-empty { color: #888; font-style: italic; }

.fm-chat-input-area {
    flex-shrink: 0;
    padding: 0.75rem 1rem;
    background: #f0ece6;
    border-top: 1px solid var(--fm-border);
}

.fm-chat-textarea {
    resize: none;
    overflow-y: hidden;
    min-height: 42px;
    max-height: 140px;
    border-radius: 21px;
    border: 1px solid #ccc;
    padding: 10px 16px;
    font-size: 0.9375rem;
    line-height: 1.4;
    background: #fff;
    transition: border-color 0.15s ease;
}

.fm-chat-textarea:focus {
    border-color: var(--fm-blue-mid);
    outline: none;
    box-shadow: 0 0 0 3px rgba(63, 124, 166, 0.18);
}

.fm-chat-send-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 50%;
    background: var(--fm-orange);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    padding: 0;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.fm-chat-send-btn:hover  { background: var(--fm-orange-soft); }
.fm-chat-send-btn:active { transform: scale(0.94); }

@media (max-width: 767.98px) {
    #markit-chat {
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    #markit-chat .fm-chat-card {
        height: calc(100vh - var(--fm-chat-top, 90px) - 56px);
        border-radius: 0;
    }
    .fm-chat-bubble { max-width: 85%; }
}

/* ── Help page ───────────────────────────────────────────────────────────── */
.help-portal-page .com-content-article,
.help-portal-page .item-page {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Home page — Getting Started (injected on front page only)
   ═══════════════════════════════════════════════════════════════════════════ */

.fm-home-getting-started {
    padding: 2rem 1rem 2.5rem;
    background: var(--fm-bg-warm, #F4EFEA);
}

.fm-home-getting-started .fmhp-wrap {
    max-width: 860px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   Help Portal Module — mod_fmhelpportal
   ═══════════════════════════════════════════════════════════════════════════ */

.fmhp-wrap {
    max-width: 860px;
    margin: 0 auto;
}

.fmhp-header {
    text-align: center;
    margin-bottom: 2rem;
}
.fmhp-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    color: var(--fm-blue-dark);
    font-size: 1.8rem;
    margin: 0 0 0.4rem;
}
.fmhp-header p {
    color: #666;
    font-size: 1.05rem;
    margin: 0;
}

.fmhp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.fmhp-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--fm-border);
    border-left: 4px solid var(--fm-border);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    text-decoration: none;
    color: var(--fm-text-dark);
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.12s;
}
.fmhp-card:hover {
    border-left-color: var(--fm-orange);
    box-shadow: 0 4px 16px rgba(242,140,40,0.14);
    color: var(--fm-text-dark);
    text-decoration: none;
    transform: translateY(-2px);
}

.fmhp-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
    width: 2.5rem;
    text-align: center;
    margin-top: 2px;
}
.fmhp-icon .bi {
    font-size: 1.75rem;
    color: var(--fm-blue-mid);
}
.fmhp-card-body {
    flex: 1;
    min-width: 0;
}
.fmhp-card-body h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    color: var(--fm-blue-dark);
    margin: 0 0 0.3rem;
}
.fmhp-card-body p {
    font-size: 0.875rem;
    color: #666;
    margin: 0;
    line-height: 1.45;
}
.fmhp-arrow {
    color: var(--fm-border);
    font-size: 1.6rem;
    font-weight: 300;
    align-self: center;
    flex-shrink: 0;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}
.fmhp-card:hover .fmhp-arrow {
    color: var(--fm-orange);
    transform: translateX(4px);
}

.fmhp-card--featured {
    grid-column: 1 / -1;
    background: var(--fm-blue-dark);
    border-color: var(--fm-blue-dark);
    border-left-color: var(--fm-orange);
    color: var(--fm-text-light);
    padding: 1.5rem 1.75rem;
}
.fmhp-card--featured .fmhp-icon {
    font-size: 2.4rem;
}
.fmhp-card--featured .fmhp-icon .bi {
    color: var(--fm-orange-soft);
}
.fmhp-card--featured .fmhp-card-body h3 {
    color: #fff;
    font-size: 1.1rem;
}
.fmhp-card--featured .fmhp-card-body p {
    color: rgba(255,255,255,0.82);
}
.fmhp-card--featured .fmhp-arrow {
    color: rgba(255,255,255,0.35);
    font-size: 2rem;
}
.fmhp-card--featured:hover {
    border-left-color: var(--fm-orange-soft);
    box-shadow: 0 6px 20px rgba(30,78,121,0.35);
    color: var(--fm-text-light);
}
.fmhp-card--featured:hover .fmhp-arrow {
    color: var(--fm-orange-soft);
}

.fmhp-helpdesk {
    grid-column: 1 / -1;
    background: var(--fm-blue-mid);
    border-radius: 0.75rem;
    padding: 1.5rem 1.75rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-top: 0.25rem;
}
.fmhp-helpdesk-info {
    flex: 1;
}
.fmhp-helpdesk-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
    margin: 0 0 0.3rem;
}
.fmhp-helpdesk-info p {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.85);
    margin: 0;
}
.fmhp-helpdesk-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    flex-shrink: 0;
    align-items: center;
}

.fmhp-btn-log {
    background: var(--fm-orange);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.fmhp-btn-log:hover {
    background: #d9771f;
    color: #fff;
    text-decoration: none;
}

.fmhp-btn-tickets {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    padding: 0.6rem 1.25rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.fmhp-btn-tickets:hover {
    background: rgba(255,255,255,0.22);
    color: #fff;
    text-decoration: none;
}
.fmhp-ticket-badge {
    background: var(--fm-orange);
    color: #fff;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 1px 7px;
    line-height: 1.6;
}

/* ─── Dashboard card headers (div.card-header + h2.h6) ─────────────────── */
div.card-header {
    padding: 4px 16px;
    margin: 0;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    border-bottom: 1px solid var(--fm-border);
}

div.card-header h2 {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

div.card-header .btn-outline-secondary {
    --bs-btn-color:              rgba(255,255,255,0.75);
    --bs-btn-border-color:       rgba(255,255,255,0.35);
    --bs-btn-hover-bg:           rgba(255,255,255,0.12);
    --bs-btn-hover-border-color: rgba(255,255,255,0.6);
    --bs-btn-hover-color:        #fff;
    font-size: 0.75rem;
    padding: 2px 10px;
    line-height: 2;
    min-height: unset;
}

/* ── Notification row inline expander ───────────────────────────────────── */
.mki-purpose-info > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    user-select: none;
}
.mki-purpose-info > summary::-webkit-details-marker { display: none; }
.mki-purpose-info > summary::marker { display: none; }
.mki-info-icon { color: #9CA3AF; flex-shrink: 0; transition: color 0.15s; }
.mki-purpose-info[open] .mki-info-icon { color: var(--fm-blue-mid); }

/* ── Mobile ──────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
    .fmhp-grid {
        grid-template-columns: 1fr;
    }
    .fmhp-card--featured {
        grid-column: 1;
    }
    .fmhp-helpdesk {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .fmhp-helpdesk-buttons {
        width: 100%;
    }
    .fmhp-btn-log,
    .fmhp-btn-tickets {
        flex: 1;
        text-align: center;
        justify-content: center;
    }
    .fmhp-header h2 { font-size: 1.45rem; }
}


/* ─── Footer ───────────────────────────────────────────────────────────── */
footer.container-footer {
    padding-top: 0rem;
    padding-bottom: 0rem;
    font-size: 1rem;
    margin: 0 !important;
}

footer.container-footer .grid-child {
    padding-top: 0rem;
    padding-bottom: 0rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GAMIFICATION — motion & feedback (palette unchanged; --fm-* vars only)
   Shell: index.php + mobile-nav.js · Views: dashboard, browse, profile, etc.
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes fm-pulse {
    0%, 100% { text-shadow: 0 0 0 rgba(242, 140, 40, 0); }
    50%      { text-shadow: 0 0 14px rgba(242, 140, 40, 0.65); }
}

@keyframes fm-shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes fm-bar-slide {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

@keyframes fm-bounce {
    0%, 100% { transform: translateY(0); }
    40%, 80% { transform: translateY(-5px); }
    60%      { transform: translateY(-3px); }
}

@keyframes fm-pop {
    0%   { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(242, 140, 40, 0.45); }
    50%  { transform: scale(1.08); box-shadow: 0 0 0 8px rgba(242, 140, 40, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(242, 140, 40, 0); }
}

@keyframes fm-fade-down {
    0%   { opacity: 0; transform: translateY(-4px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes fm-toast-in {
    0%   { transform: translateX(-50%) translateY(20px) scale(0.95); opacity: 0; }
    10%  { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
    90%  { transform: translateX(-50%) translateY(0) scale(1); opacity: 1; }
    100% { transform: translateX(-50%) translateY(-20px) scale(0.95); opacity: 0; }
}

@keyframes fm-hamburger-glow {
    0%, 100% { box-shadow: 0 0 8px 2px rgba(242, 140, 40, 0.45); }
    50%      { box-shadow: 0 0 14px 4px rgba(242, 140, 40, 0.7); }
}

@keyframes fm-skeleton-sweep {
    0%   { background-position: -150% 0; }
    100% { background-position: 150% 0; }
}

/* Quest-style page texture (same --fm-bg base colour) */
body {
    background-image:
        radial-gradient(circle at 1px 1px, rgba(63, 124, 166, 0.06) 1px, transparent 0),
        linear-gradient(var(--fm-bg), var(--fm-bg));
    background-size: 24px 24px, 100% 100%;
}

/* XP bar along the top of every page */
body::before {
    content: '';
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 9999;
    pointer-events: none;
    background: linear-gradient(
        90deg,
        var(--fm-blue-dark),
        var(--fm-orange),
        var(--fm-blue-mid),
        var(--fm-orange-soft),
        var(--fm-blue-dark)
    );
    background-size: 300% 100%;
    animation: fm-bar-slide 5s ease infinite;
}

/* ── Template shell (index.php → Cassiopeia header + mobile-nav.js) ─────── */

.fm-bottom-nav-item.active .fm-bottom-nav-icon,
.fm-bottom-nav-item.active svg {
    filter: drop-shadow(0 0 4px rgba(242, 140, 40, 0.55));
}

.fm-drawer-link {
    transition: background-color 0.15s ease, color 0.15s ease,
                border-left-color 0.15s ease, padding-left 0.15s ease;
}

.fm-drawer-link:hover {
    padding-left: 1.75rem;
}

.sidebar-right .card-body li.active > a,
.sidebar-right .card-body .nav-item.active .nav-link {
    box-shadow: inset 0 0 12px rgba(167, 196, 217, 0.35);
}

/* ── Dashboard (#markit-dashboard · site/tmpl/dashboard/default.php) ───── */
#markit-dashboard .markit-stat-marks .display-6,
.fm-mark-hero-balance {
    animation: fm-pulse 3s ease-in-out infinite;
}

#markit-dashboard .card.markit-stat-marks,
#markit-dashboard .card.markit-stat-offers,
#markit-dashboard .card.markit-stat-calls,
#markit-dashboard .card.markit-stat-trades {
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

#markit-dashboard .card.markit-stat-marks:hover,
#markit-dashboard .card.markit-stat-offers:hover,
#markit-dashboard .card.markit-stat-calls:hover,
#markit-dashboard .card.markit-stat-trades:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 28px rgba(30, 78, 121, 0.22);
}

#markit-dashboard .card.markit-stat-marks:hover .display-6,
#markit-dashboard .card.markit-stat-offers:hover .display-6,
#markit-dashboard .card.markit-stat-calls:hover .display-6,
#markit-dashboard .card.markit-stat-trades:hover .display-6 {
    animation: fm-bounce 0.5s ease;
}

#markit-dashboard .table-hover tbody tr {
    transition: background-color 0.15s ease;
}

#markit-dashboard .table-hover tbody tr:hover {
    background-color: rgba(167, 196, 217, 0.18);
}

#markit-dashboard .markit-sortable {
    transition: color 0.15s ease;
}

#markit-dashboard .markit-sortable:hover {
    color: var(--fm-orange);
}

/* ── Profile stats (site/tmpl/profile/edit.php · mki-stats-bar) ─────────── */
.mki-stats-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.mki-stat-card {
    flex: 1 1 0;
    min-width: 7rem;
    background: #fff;
    border: 1px solid var(--fm-border);
    border-radius: 10px;
    padding: 0.65rem 0.5rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.mki-stat-card:hover {
    transform: translateY(-3px);
    border-color: var(--fm-blue-mid);
    box-shadow: 0 6px 18px rgba(63, 124, 166, 0.18);
}

.mki-stat-card:hover .mki-stat-val {
    animation: fm-bounce 0.45s ease;
}

.mki-stat-card:nth-child(4):hover {
    border-color: var(--fm-orange);
    box-shadow: 0 6px 18px rgba(242, 140, 40, 0.2);
}

.mki-stat-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--fm-blue-dark);
    line-height: 1.1;
}

.mki-stat-lbl {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6B7280;
    margin-top: 0.25rem;
    font-weight: 600;
}

.mki-stat-rating .mki-stat-val { font-size: 1.1rem; }
.mki-star-on { color: var(--fm-orange); }
.mki-star-off { color: var(--fm-border); }

/* ── Registration / profile quest banner (mki-welcome-banner) ───────────── */
.mki-welcome-banner {
    position: relative;
    overflow: hidden;
}

.mki-welcome-banner::after {
    content: '★';
    position: absolute;
    top: -8px;
    right: 4px;
    font-size: 4.5rem;
    color: rgba(255, 255, 255, 0.07);
    pointer-events: none;
    line-height: 1;
}

.mki-reg-step-active {
    animation: fm-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    border: 2px solid var(--fm-orange);
}

.mki-reg-step-done {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

.mki-profile-section,
.mki-legal-section {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.mki-profile-section:focus-within,
.mki-legal-section:focus-within {
    box-shadow: 0 0 0 2px rgba(63, 124, 166, 0.25), 0 4px 14px rgba(63, 124, 166, 0.1);
}

details.mki-privacy-expand[open] .mki-privacy-body {
    animation: fm-fade-down 0.25s ease-out forwards;
}

details.mki-privacy-expand summary svg {
    transition: transform 0.2s ease;
}

details.mki-privacy-expand[open] summary svg {
    transform: rotate(90deg);
}

/* Image upload “drop zone” (offer/edit.php · mki-canvas) */
.mki-canvas.mki-drag-over {
    animation: fm-pop 0.4s ease;
    box-shadow: 0 0 0 3px rgba(63, 124, 166, 0.35);
}

.mki-primary-badge {
    animation: fm-pulse 2.5s ease-in-out infinite;
}

/* ── Browse cards (browse/default.php · markit-offer-thumb) ─────────────── */
.com-markit-browse .card:hover .markit-offer-thumb img {
    transform: scale(1.06);
}

.com-markit-browse .card {
    transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.com-markit-browse .card:hover {
    transform: translateY(-4px);
}

/* Star ratings (offer/default.php) */
.markit-star-widget {
    display: flex;
    gap: 6px;
}

.markit-star {
    font-size: 2rem;
    color: var(--fm-border);
    cursor: pointer;
    transition: transform 0.12s ease, color 0.12s ease, filter 0.12s ease;
    user-select: none;
    line-height: 1;
}

.markit-star:hover {
    transform: scale(1.15);
}

.markit-star.markit-star-on,
.markit-star:hover {
    color: var(--fm-orange);
    filter: drop-shadow(0 0 4px rgba(242, 140, 40, 0.45));
}

/* ── Badges & currency (fm-badge-* in dashboard / offer views) ─────────── */
.fm-badge-awarded {
    background: linear-gradient(
        90deg,
        var(--fm-blue-dark) 0%,
        var(--fm-blue-mid) 40%,
        var(--fm-blue-light) 50%,
        var(--fm-blue-mid) 60%,
        var(--fm-blue-dark) 100%
    ) !important;
    background-size: 200% auto !important;
    animation: fm-shimmer 2.5s linear infinite !important;
}

.fm-badge-credit,
.badge.fm-badge-credit {
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .fm-badge-credit,
#markit-dashboard tr:hover .fm-badge-credit {
    transform: scale(1.08);
}

.badge-free,
.badge-swap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card:hover .badge-free,
.card:hover .badge-swap {
    transform: scale(1.1) rotate(2deg);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.btn:active:not(:disabled),
[role="button"]:active {
    transform: scale(0.96);
    transition: transform 0.08s ease;
}

.btn-primary {
    box-shadow: 0 0 0 0 rgba(242, 140, 40, 0.35);
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 0 0 6px rgba(242, 140, 40, 0.14), 0 4px 12px rgba(242, 140, 40, 0.28);
}

.btn-secondary:hover:not(:disabled),
.btn-outline-primary:hover:not(:disabled) {
    transform: translateY(-1.5px);
    box-shadow: 0 4px 12px rgba(63, 124, 166, 0.22);
}

/* ── Legacy / article widgets (fm-* dashboard components) ─────────────── */
.fm-mark-hero {
    position: relative;
    overflow: hidden;
}

.fm-mark-hero::after {
    content: '★';
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 5rem;
    color: rgba(255, 255, 255, 0.06);
    pointer-events: none;
    line-height: 1;
}

.fm-mini-stat:hover .fm-mini-stat-val {
    animation: fm-bounce 0.5s ease;
}

.fm-preview-row,
.fm-tx-row {
    transition: background-color 0.15s ease;
}

.fm-preview-row:hover,
.fm-tx-row:hover {
    background-color: rgba(167, 196, 217, 0.15);
}

.fm-detail-card,
.fm-mini-stat,
.fm-collapsible {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fm-detail-card:hover,
.fm-mini-stat:hover {
    box-shadow: 0 0 0 2px var(--fm-orange), 0 6px 18px rgba(242, 140, 40, 0.14);
    transform: translateY(-2px);
}

.fm-action-banner {
    transition: box-shadow 0.2s ease;
}

.fm-action-banner:hover {
    box-shadow: 0 6px 20px rgba(242, 140, 40, 0.35);
}

/* Marks guide quest steps */
.marks-guide .mg-steps li {
    transition: transform 0.2s ease;
}

.marks-guide .mg-steps li:hover {
    transform: translateX(4px);
}

.marks-guide .mg-steps li:hover::before {
    background: var(--fm-orange);
    transform: scale(1.05);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

/* Help portal cards (mod_fmhelpportal) */
.fmhp-card {
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.fmhp-card:hover {
    transform: translateY(-3px) scale(1.01);
}

/* Achievement toast (optional markup) */
.fm-toast-achievement {
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 80px);
    left: 50%;
    background: var(--fm-blue-dark);
    color: var(--fm-text-light);
    padding: 0.85rem 1.5rem;
    border-radius: 50px;
    border: 1px solid var(--fm-orange);
    box-shadow: 0 8px 32px rgba(30, 78, 121, 0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10000;
    pointer-events: none;
    font-size: 0.9rem;
    font-weight: 600;
    animation: fm-toast-in 4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.fm-row-completed {
    position: relative;
    background-color: rgba(167, 196, 217, 0.08);
}

.fm-row-completed::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--fm-blue-mid);
}

.fm-loading-skeleton {
    background: linear-gradient(90deg, var(--fm-bg) 25%, var(--fm-border) 50%, var(--fm-bg) 75%);
    background-size: 200% 100%;
    animation: fm-skeleton-sweep 1.5s infinite linear;
    border-radius: 4px;
    display: inline-block;
    height: 12px;
    width: 100%;
}

input:focus:valid:not(:placeholder-shown) {
    border-color: var(--fm-blue-mid);
    background-color: rgba(167, 196, 217, 0.06);
}

/* ── Bottom Navigation: Smooth Upward Double Bounce ── */
/* @keyframes bounceUp {
    0%   { transform: translateY(0); }
    20%  { transform: translateY(-1px); }
    40%  { transform: translateY(-3px); }
    50%  { transform: translateY(-5px); }
    60%  { transform: translateY(-3px); } 
    80%  { transform: translateY(-1px); } 
    100% { transform: translateY(0); }
} */

@keyframes bounceUp {
    0%   { transform: translateY(-3px); }
    100% { transform: translateY(-3px); }
}

.fm-bottom-nav-item:active {
    animation: bounceUp 0.6s ease-in-out forwards;
}

.fm-bottom-nav-item {
    transition: color 0.15s ease;
}


@media (prefers-reduced-motion: reduce) {
    body::before,
    .fm-mark-hero-balance,
    #markit-dashboard .markit-stat-marks .display-6,
    .fm-badge-awarded,
    .fm-hamburger,
    .mki-reg-step-active,
    .mki-primary-badge {
        animation: none;
    }

    .fm-bottom-nav-item:active {
        animation: none;
    }

    .fm-bottom-nav-item {
        transition: color 0.15s ease !important;
    }

    .card:hover,
    #markit-dashboard .card.markit-stat-marks:hover,
    .mki-stat-card:hover,
    .fmhp-card:hover,
    .com-markit-browse .card:hover {
        transform: none;
    }
}
