/* =====================================================================
   Mission Possible - Islamic Help Türkiye
   Brand palette + fonts are the same as the Islamic Help Türkiye website
   (WebApp.Public/wwwroot/assets/css/brand.css). The "happy" accents
   (sun, coral, leaf, sky) are only used for playful details.
   ===================================================================== */
:root {
    /* official brand colours */
    --color-sanctuary: #004c51;
    --color-dawn: #faf8db;
    --color-hope: #ffeda9;
    --color-teal-accent-1: #f7fcfa;
    --color-teal-accent-2: #d4f4ee;
    --color-midnight: #012527;
    --color-core-white: #fffef2;
    --color-sanctuary-dark: #003639;

    /* happy accents */
    --sun: #ffc93c;
    --coral: #ff8a5b;
    --leaf: #2fb36b;
    --leaf-dark: #1f8a50;
    --sky: #6cc5e8;
    --muted: #6b7f80;

    --font-head: "Antonio", Arial, Helvetica, sans-serif;
    --font-body: "Karla", Arial, Helvetica, sans-serif;

    --radius: 22px;
    --shadow: 0 10px 30px rgba(1, 37, 39, .10);
    --shadow-lg: 0 20px 50px rgba(1, 37, 39, .18);

    --bs-body-font-family: var(--font-body);
    --bs-body-color: var(--color-midnight);
    --bs-link-color-rgb: 0, 76, 81;
    --bs-link-hover-color-rgb: 0, 54, 57;
}

html { scroll-behavior: smooth; }
body {
    background: var(--color-dawn);
    color: var(--color-midnight);
    font-family: var(--font-body);
    font-size: 1.05rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.mp-main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, .font-head {
    font-family: var(--font-head);
    color: var(--color-sanctuary);
    letter-spacing: .01em;
    font-weight: 700;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.lead { font-weight: 500; }

/* ---------------- buttons (same pattern as the website: sanctuary -> hope) ---------------- */
.btn-mp, .btn-mp-light, .btn-mp-sun, .btn-mp-leaf, .btn-mp-ghost {
    display: inline-flex; align-items: center; gap: .55rem; justify-content: center;
    border-radius: 999px; border: 2px solid transparent;
    padding: .7rem 1.5rem; font-weight: 700; text-decoration: none;
    font-family: var(--font-head); letter-spacing: .06em; text-transform: uppercase; font-size: 1rem;
    transition: transform .15s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
    cursor: pointer;
}
.btn-mp { background: var(--color-sanctuary); color: #fff; }
.btn-mp:hover, .btn-mp:focus { background: var(--color-hope); color: var(--color-sanctuary); transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-mp-sun { background: var(--sun); color: var(--color-midnight); }
.btn-mp-sun:hover { background: var(--color-sanctuary); color: #fff; transform: translateY(-2px); }
.btn-mp-leaf { background: var(--leaf); color: #fff; }
.btn-mp-leaf:hover { background: var(--leaf-dark); color: #fff; transform: translateY(-2px); }
.btn-mp-light { background: #fff; color: var(--color-sanctuary); border-color: var(--color-teal-accent-2); }
.btn-mp-light:hover { background: var(--color-hope); color: var(--color-sanctuary); }
.btn-mp-ghost { background: transparent; color: var(--color-sanctuary); border-color: var(--color-sanctuary); }
.btn-mp-ghost:hover { background: var(--color-sanctuary); color: #fff; }
.btn-sm.btn-mp, .btn-sm.btn-mp-light, .btn-sm.btn-mp-leaf, .btn-sm.btn-mp-sun, .btn-sm.btn-mp-ghost { padding: .4rem .95rem; font-size: .85rem; }
.btn-danger-soft { background: #ffe3dc; color: #a33b1f; border-radius: 999px; border: 0; padding: .4rem .95rem; font-weight: 700; font-size: .85rem; }
.btn-danger-soft:hover { background: #ffcbbd; }

/* ---------------- header ---------------- */
.mp-header {
    background: var(--color-sanctuary);
    color: #fff;
    padding: .6rem 0;
    position: sticky; top: 0; z-index: 1030;
    box-shadow: 0 4px 18px rgba(0,0,0,.12);
}
.mp-header nav { flex-wrap: wrap; }
.mp-brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: #fff; }
.mp-brand img { width: 48px; height: 48px; border-radius: 12px; }
.mp-brand-title { display: block; font-family: var(--font-head); font-size: 1.45rem; font-weight: 700; line-height: 1; letter-spacing: .04em; text-transform: uppercase; color: var(--color-hope); }
.mp-brand-sub { display: block; font-size: .8rem; opacity: .85; }
.mp-burger { background: transparent; border: 0; color: #fff; font-size: 1.5rem; }
.mp-nav { gap: .25rem; align-items: center; }
.mp-nav > a, .mp-nav .dropdown > a {
    color: #fff; text-decoration: none; padding: .5rem .85rem; border-radius: 999px; font-weight: 600;
    display: inline-flex; align-items: center; gap: .45rem; position: relative;
}
.mp-nav > a:hover, .mp-nav .dropdown > a:hover, .mp-nav > a.active { background: rgba(255, 237, 169, .18); color: var(--color-hope); }
.mp-nav-admin { background: var(--color-hope); color: var(--color-sanctuary) !important; }
.mp-nav-admin:hover, .mp-nav-admin.active { background: #fff !important; }
.mp-badge:empty { display: none; }
.mp-badge {
    background: var(--coral); color: #fff; border-radius: 999px; font-size: .72rem; font-weight: 800;
    min-width: 1.3rem; height: 1.3rem; padding: 0 .35rem; display: inline-flex; align-items: center; justify-content: center;
    animation: pop 1.8s ease-in-out infinite;
}
@media (max-width: 991.98px) {
    .mp-nav { width: 100%; flex-direction: column; align-items: stretch; padding-top: .5rem; }
    .mp-nav.show { display: flex; }
}

.mp-footer { background: var(--color-midnight); color: rgba(255,255,255,.8); padding: 1.1rem 0; font-size: .9rem; margin-top: 3rem; }
.mp-footer img { width: 28px; height: 28px; vertical-align: middle; margin-right: .4rem; }
.mp-footer .fa-heart { color: var(--coral); }

/* ---------------- cards & generic ---------------- */
.mp-card {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
    padding: 1.6rem; border: 1px solid rgba(0, 76, 81, .06);
}
.mp-card-teal { background: var(--color-teal-accent-2); }
.mp-card-hope { background: var(--color-hope); }
.mp-eyebrow {
    font-family: var(--font-head); text-transform: uppercase; letter-spacing: .18em; font-size: .9rem; color: var(--coral); font-weight: 700;
}
.mp-pill {
    display: inline-flex; align-items: center; gap: .4rem; background: var(--color-teal-accent-2); color: var(--color-sanctuary);
    border-radius: 999px; padding: .25rem .8rem; font-weight: 700; font-size: .85rem;
}
.mp-pill.sun { background: var(--color-hope); }
.mp-pill.leaf { background: #d9f5e4; color: var(--leaf-dark); }
.mp-pill.grey { background: #eceee9; color: var(--muted); }
.mp-pill.coral { background: #ffe3d6; color: #b4532c; }

.form-control, .form-select {
    border-radius: 14px; border: 2px solid var(--color-teal-accent-2); padding: .7rem 1rem; background: var(--color-teal-accent-1);
}
.form-control:focus, .form-select:focus { border-color: var(--color-sanctuary); box-shadow: 0 0 0 .25rem rgba(0,76,81,.12); background: #fff; }
.form-label { font-weight: 700; color: var(--color-sanctuary); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--color-sanctuary); border-color: var(--color-sanctuary); }
.text-danger, .validation-summary-errors { color: #c0392b !important; font-weight: 600; font-size: .92rem; }
.validation-summary-errors ul { padding-left: 1rem; margin: 0 0 .5rem; }

.mp-toast {
    position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 2000;
    background: var(--color-midnight); color: #fff; border-radius: 999px; padding: .85rem 1.4rem; box-shadow: var(--shadow-lg);
    font-weight: 600; display: flex; align-items: center; gap: .6rem; max-width: calc(100% - 32px);
    animation: toastIn .4s ease, toastOut .5s ease 5s forwards;
}
.mp-toast i { color: var(--sun); font-size: 1.3rem; }

/* decorative floating icons */
.floaty { position: absolute; color: var(--color-sanctuary); opacity: .08; animation: float 7s ease-in-out infinite; pointer-events: none; }

@keyframes float { 0%,100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-14px) rotate(6deg); } }
@keyframes pop { 0%,100% { transform: scale(1); } 50% { transform: scale(1.15); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(255,201,60,.7); } 70% { box-shadow: 0 0 0 18px rgba(255,201,60,0); } 100% { box-shadow: 0 0 0 0 rgba(255,201,60,0); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 20px); } }
@keyframes toastOut { to { opacity: 0; transform: translate(-50%, 20px); visibility: hidden; } }
@keyframes wave { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }

/* =====================================================================
   Welcome page
   ===================================================================== */
.welcome {
    min-height: 100vh; position: relative; overflow: hidden;
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 201, 60, .35) 0, transparent 32%),
        radial-gradient(circle at 88% 82%, rgba(108, 197, 232, .28) 0, transparent 30%),
        linear-gradient(160deg, var(--color-sanctuary) 0%, #00666c 55%, #0b7f78 100%);
    color: #fff; display: flex; align-items: center; padding: 2.5rem 0;
}
.welcome::after {
    content: ""; position: absolute; inset: 0; background: url("../images/IH-Pattern.png") repeat; background-size: 260px;
    opacity: .05; pointer-events: none;
}
.welcome .container { position: relative; z-index: 1; }
.welcome-logo { width: 92px; filter: drop-shadow(0 6px 14px rgba(0,0,0,.2)); }
.welcome h1 { color: #fff; font-size: clamp(2.6rem, 6vw, 4.6rem); line-height: 1.02; text-transform: uppercase; }
.welcome h1 .hl { color: var(--sun); display: block; }
.welcome .mp-eyebrow { color: var(--color-hope); }
.welcome-intro { font-size: 1.15rem; opacity: .95; max-width: 34rem; }
.welcome-facts { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.4rem; }
.welcome-facts span { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.18); padding: .45rem .9rem; border-radius: 999px; font-weight: 600; }
.welcome-facts i { color: var(--sun); margin-right: .35rem; }
.welcome-emojis { display: flex; gap: .9rem; margin-top: 1.6rem; font-size: 1.7rem; }
.welcome-emojis i { color: var(--color-hope); animation: float 5s ease-in-out infinite; }
.welcome-emojis i:nth-child(2) { animation-delay: .6s; color: var(--sun); }
.welcome-emojis i:nth-child(3) { animation-delay: 1.2s; color: #9fe7d9; }
.welcome-emojis i:nth-child(4) { animation-delay: 1.8s; color: var(--coral); }
.welcome-emojis i:nth-child(5) { animation-delay: 2.4s; color: #fff; }

.login-card { background: #fff; color: var(--color-midnight); border-radius: 28px; padding: 2rem; box-shadow: var(--shadow-lg); position: relative; }
.login-card h2 { font-size: 2rem; }
.login-card .wave { display: inline-block; animation: wave 2.2s ease-in-out infinite; transform-origin: 70% 70%; }
.login-card .divider { display: flex; align-items: center; gap: .8rem; color: var(--muted); font-size: .9rem; margin: 1.2rem 0; }
.login-card .divider::before, .login-card .divider::after { content: ""; flex: 1; height: 1px; background: #e4e8e3; }

/* plain centred page (register / pending) */
.center-page { min-height: 100vh; display: flex; align-items: center; padding: 2rem 0;
    background: radial-gradient(circle at 85% 10%, rgba(255,201,60,.25), transparent 35%), radial-gradient(circle at 5% 95%, rgba(108,197,232,.25), transparent 35%), var(--color-dawn); }

.pending-illustration { width: 120px; height: 120px; border-radius: 50%; background: var(--color-hope); color: var(--color-sanctuary);
    display: flex; align-items: center; justify-content: center; font-size: 3.2rem; margin: 0 auto 1rem; animation: pulse 2.4s infinite; }

/* =====================================================================
   Mission home
   ===================================================================== */
.mission-hero {
    background: linear-gradient(135deg, var(--color-sanctuary), #0b7f78);
    color: #fff; border-radius: 0 0 40px 40px; padding: 2.4rem 0 4.5rem; position: relative; overflow: hidden;
}
.mission-hero h1 { color: #fff; text-transform: uppercase; }
.mission-hero .mp-eyebrow { color: var(--color-hope); }
.mission-hero .progress-wrap { background: rgba(255,255,255,.15); border-radius: 999px; height: 16px; overflow: hidden; }
.mission-hero .progress-fill { background: linear-gradient(90deg, var(--sun), var(--leaf)); height: 100%; border-radius: 999px; transition: width 1s ease; }
.hero-sun { position: absolute; right: -40px; top: -40px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,201,60,.55), rgba(255,201,60,0) 70%); }

.field-card { margin-top: -3rem; position: relative; z-index: 2; }
.field-card .field-flag { width: 64px; height: 64px; border-radius: 18px; background: var(--color-hope); display: flex; align-items: center; justify-content: center; font-size: 1.8rem; color: var(--color-sanctuary); flex-shrink: 0; }
.field-card p:last-child { margin-bottom: 0; }

/* ---------------- the road map ---------------- */
.road-section { position: relative; padding: 2rem 0 1rem; }
.road-title { text-align: center; margin-bottom: 1.6rem; }
.road {
    position: relative; max-width: 980px; margin: 0 auto;
    background:
        radial-gradient(circle at 10% 20%, rgba(47,179,107,.10) 0 70px, transparent 71px),
        radial-gradient(circle at 92% 55%, rgba(47,179,107,.10) 0 90px, transparent 91px),
        radial-gradient(circle at 15% 85%, rgba(108,197,232,.15) 0 80px, transparent 81px),
        #fdfbe6;
    border-radius: 36px; padding: 2rem 1rem; border: 3px dashed rgba(0,76,81,.12);
}
.road-svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }
.road-svg .road-base { fill: none; stroke: #d9cfa3; stroke-width: 34; stroke-linecap: round; }
.road-svg .road-top { fill: none; stroke: #efe6bd; stroke-width: 26; stroke-linecap: round; }
.road-svg .road-dash { fill: none; stroke: #fff; stroke-width: 3; stroke-dasharray: 12 14; stroke-linecap: round; }
.road-svg .road-done { fill: none; stroke: var(--leaf); stroke-width: 8; stroke-linecap: round; opacity: .85; }

.stop { position: relative; z-index: 1; display: flex; align-items: center; gap: 1.2rem; margin: 0 0 2.2rem; }
.stop:last-child { margin-bottom: 0; }
.stop.right { flex-direction: row-reverse; text-align: right; }
.stop .pin-col { width: 50%; display: flex; }
.stop.left .pin-col { justify-content: flex-end; padding-right: 1.6rem; }
.stop.right .pin-col { justify-content: flex-start; padding-left: 1.6rem; }
.stop .card-col { width: 50%; }

.pin {
    width: 92px; height: 92px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 2.2rem; position: relative; flex-shrink: 0; text-decoration: none;
    border: 6px solid #fff; box-shadow: var(--shadow); transition: transform .2s ease;
}
.pin:hover { transform: scale(1.07) rotate(-3deg); }
.pin .pin-num {
    position: absolute; top: -8px; left: -8px; width: 32px; height: 32px; border-radius: 50%; background: var(--color-midnight); color: #fff;
    font-family: var(--font-head); font-size: 1rem; display: flex; align-items: center; justify-content: center; border: 3px solid #fff;
}
.pin .pin-badge {
    position: absolute; bottom: -6px; right: -6px; width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1rem; border: 3px solid #fff;
}
.stop.locked .pin { background: #e6e8e1; color: #9aa69f; }
.stop.locked .pin .pin-badge { background: #9aa69f; color: #fff; }
.stop.unlocked .pin { background: var(--sun); color: var(--color-midnight); animation: pulse 2s infinite; }
.stop.unlocked .pin .pin-badge { background: var(--color-sanctuary); color: var(--color-hope); }
.stop.completed .pin { background: var(--leaf); color: #fff; }
.stop.completed .pin .pin-badge { background: #fff; color: var(--leaf); }
.green-flag { position: absolute; top: -34px; right: 6px; font-size: 1.8rem; color: var(--leaf); transform-origin: bottom left; animation: wave 2.5s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0,0,0,.15)); }

.stop-card {
    display: block; background: #fff; border-radius: 20px; padding: 1rem 1.2rem; box-shadow: var(--shadow); text-decoration: none; color: inherit;
    border-left: 6px solid #d8ddd5; transition: transform .2s ease, box-shadow .2s ease; max-width: 400px;
}
.stop.right .stop-card { border-left: 0; border-right: 6px solid #d8ddd5; margin-left: auto; }
.stop-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); color: inherit; }
.stop.unlocked .stop-card { border-color: var(--sun); }
.stop.completed .stop-card { border-color: var(--leaf); }
.stop-card .stop-date { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .1em; color: var(--coral); font-weight: 700; font-size: .9rem; }
.stop-card h3 { font-size: 1.35rem; margin: .15rem 0 .25rem; }
.stop-card .stop-loc { color: var(--muted); font-weight: 600; font-size: .92rem; }
.stop-card p { margin: .5rem 0 .4rem; font-size: .95rem; }

.road-end { display: flex; justify-content: center; position: relative; z-index: 1; margin-top: 2rem; }
.road-end-badge { background: var(--color-sanctuary); color: var(--color-hope); border-radius: 999px; padding: .8rem 1.6rem; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; font-size: 1.1rem; display: inline-flex; gap: .6rem; align-items: center; box-shadow: var(--shadow); text-decoration: none; }
.road-end-badge.done { background: var(--leaf); color: #fff; animation: pop 2s ease-in-out infinite; }
.road-start { display: flex; justify-content: center; position: relative; z-index: 1; margin-bottom: 2rem; }

@media (max-width: 767.98px) {
    .stop, .stop.right { flex-direction: row; text-align: left; gap: .9rem; }
    .stop .pin-col, .stop.left .pin-col, .stop.right .pin-col { width: auto; padding: 0; }
    .stop .card-col { width: auto; flex: 1; }
    .stop.right .stop-card { border-right: 0; border-left: 6px solid #d8ddd5; margin-left: 0; }
    .stop.right.unlocked .stop-card { border-left-color: var(--sun); }
    .stop.right.completed .stop-card { border-left-color: var(--leaf); }
    .pin { width: 70px; height: 70px; font-size: 1.6rem; border-width: 4px; }
    .road { padding: 1.5rem .8rem; }
}

/* ---------------- message pop-up ---------------- */
.mp-modal .modal-content { border: 0; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-lg); }
.mp-modal .modal-head {
    background: linear-gradient(135deg, var(--color-sanctuary), #0b7f78); color: #fff; text-align: center; padding: 2rem 1.5rem 1.4rem; position: relative;
}
.mp-modal .modal-head.kind-2, .mp-modal .modal-head.kind-3 { background: linear-gradient(135deg, var(--leaf-dark), var(--leaf)); }
.mp-modal .modal-head.kind-4 { background: linear-gradient(135deg, #e0a800, var(--sun)); color: var(--color-midnight); }
.mp-modal .modal-head .big-icon {
    width: 86px; height: 86px; border-radius: 50%; background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
    font-size: 2.6rem; margin: 0 auto .8rem; color: var(--color-hope); animation: pop 2s ease-in-out infinite;
}
.mp-modal .modal-head h2 { color: inherit; font-size: 2rem; margin: 0; text-transform: uppercase; }
.mp-modal .btn-close-x { position: absolute; top: 14px; right: 16px; background: rgba(255,255,255,.2); color: inherit; border: 0; width: 36px; height: 36px; border-radius: 50%; }
.mp-modal .modal-body-x { padding: 1.6rem 1.8rem 1.8rem; }
.mp-modal .modal-body-x p { margin-bottom: .8rem; }
.next-up { background: var(--color-hope); border-radius: 18px; padding: 1rem 1.2rem; margin-top: 1rem; }
.next-up-label { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .15em; color: var(--coral); font-weight: 700; font-size: .85rem; }
.next-up-title { font-family: var(--font-head); font-size: 1.5rem; color: var(--color-sanctuary); font-weight: 700; }
.next-up-meta { font-weight: 700; color: var(--color-sanctuary); font-size: .92rem; margin: .2rem 0 .4rem; }
.next-up p { margin: 0 !important; }

/* =====================================================================
   Step details
   ===================================================================== */
.step-hero { padding: 2.2rem 0 4rem; color: #fff; border-radius: 0 0 40px 40px; background: linear-gradient(135deg, #7d8a86, #a3ada8); position: relative; overflow: hidden; }
.step-hero.unlocked { background: linear-gradient(135deg, var(--color-sanctuary), #0b7f78); }
.step-hero.completed { background: linear-gradient(135deg, var(--leaf-dark), var(--leaf)); }
.step-hero h1 { color: #fff; text-transform: uppercase; }
.step-hero .hero-icon { width: 96px; height: 96px; border-radius: 28px; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; font-size: 2.8rem; color: var(--color-hope); flex-shrink: 0; }
.step-hero .meta span { background: rgba(255,255,255,.16); border-radius: 999px; padding: .35rem .85rem; font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; margin: .2rem .3rem .2rem 0; }
.step-body { margin-top: -2.6rem; position: relative; z-index: 2; }
.done-banner { display: flex; align-items: center; gap: 1rem; background: #d9f5e4; color: var(--leaf-dark); border-radius: 20px; padding: 1rem 1.3rem; font-weight: 700; }
.done-banner i { font-size: 2rem; animation: wave 2.5s ease-in-out infinite; }
.locked-box { text-align: center; padding: 2.4rem 1.5rem; }
.locked-box .lock-icon { width: 90px; height: 90px; border-radius: 50%; background: #eceee9; color: #8c9893; display: flex; align-items: center; justify-content: center; font-size: 2.4rem; margin: 0 auto 1rem; }

.activity { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 0; border-bottom: 1px dashed #e4e8e3; }
.activity:last-child { border-bottom: 0; }
.activity .a-icon { width: 54px; height: 54px; border-radius: 16px; background: var(--color-teal-accent-2); color: var(--color-sanctuary); display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.activity:nth-child(3n+2) .a-icon { background: var(--color-hope); }
.activity:nth-child(3n+3) .a-icon { background: #ffe3d6; color: #b4532c; }
.activity h4 { font-size: 1.15rem; margin: 0 0 .15rem; }
.rich p:last-child { margin-bottom: 0; }
.rich ul { padding-left: 1.2rem; }
.rich li { margin-bottom: .3rem; }
.rich li::marker { color: var(--leaf); }

.memo { border-radius: 18px; background: var(--color-teal-accent-1); border: 1px solid var(--color-teal-accent-2); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.memo-time { font-size: .85rem; color: var(--muted); font-weight: 600; }
.memo-text { white-space: pre-wrap; margin: .4rem 0; }
.memo-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: .6rem; margin-top: .6rem; }
.memo-media img, .memo-media video { width: 100%; height: 140px; object-fit: cover; border-radius: 14px; background: #000; }
.drop-zone { border: 3px dashed var(--color-teal-accent-2); border-radius: 18px; padding: 1.3rem; text-align: center; background: #fff; cursor: pointer; transition: background .2s; }
.drop-zone:hover, .drop-zone.drag { background: var(--color-hope); border-color: var(--sun); }
.drop-zone i { font-size: 2rem; color: var(--color-sanctuary); }
.file-list { font-size: .9rem; color: var(--muted); margin-top: .4rem; }

/* =====================================================================
   Field / Syria page
   ===================================================================== */
.field-hero { background: linear-gradient(135deg, var(--color-midnight), var(--color-sanctuary)); color: #fff; padding: 3rem 0 5rem; border-radius: 0 0 40px 40px; position: relative; overflow: hidden; }
.field-hero h1 { color: #fff; text-transform: uppercase; }
.field-hero .mp-eyebrow { color: var(--color-hope); }
.field-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-top: -3.2rem; position: relative; z-index: 2; }
.field-stat { background: #fff; border-radius: 20px; padding: 1.2rem; box-shadow: var(--shadow); text-align: center; }
.field-stat .num { font-family: var(--font-head); font-size: 2.3rem; color: var(--color-sanctuary); font-weight: 700; line-height: 1; }
.field-stat .lbl { font-size: .9rem; color: var(--muted); font-weight: 600; margin-top: .3rem; }
.field-stat i { font-size: 1.5rem; color: var(--coral); margin-bottom: .4rem; }
.field-article h2 { font-size: 1.9rem; margin-top: 2rem; display: flex; align-items: center; gap: .6rem; }
.field-article h2::before { content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--sun); display: inline-block; }
.field-article h2:first-child { margin-top: 0; }
.field-article ul { padding-left: 1.2rem; }
.field-article li { margin-bottom: .45rem; }
.field-article li::marker { color: var(--coral); }
.source-note { font-size: .85rem; color: var(--muted); border-top: 1px dashed #dfe3dc; padding-top: 1rem; margin-top: 2rem; }

/* =====================================================================
   Certificate (HTML preview)
   ===================================================================== */
.cert {
    background: var(--color-dawn); border: 4px solid var(--color-sanctuary); outline: 2px solid var(--color-hope); outline-offset: -12px;
    border-radius: 6px; padding: 2.4rem 2.6rem; aspect-ratio: 297 / 210; display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
    max-width: 960px; margin: 0 auto; position: relative;
}
.cert-top { display: flex; align-items: center; gap: 1rem; }
.cert-top img { height: 70px; }
.cert-org { font-family: var(--font-head); font-weight: 700; color: var(--color-sanctuary); letter-spacing: .12em; }
.cert-mission { margin-left: auto; background: var(--color-hope); color: var(--color-sanctuary); font-family: var(--font-head); font-weight: 700; padding: .4rem .8rem; font-size: .85rem; text-transform: uppercase; }
.cert-of { text-align: center; font-family: var(--font-head); color: var(--coral); letter-spacing: .3em; margin-top: 1rem; }
.cert-title { text-align: center; font-family: var(--font-head); color: var(--color-sanctuary); font-size: clamp(2rem, 5vw, 3.6rem); font-weight: 700; line-height: 1; }
.cert-to { text-align: center; font-style: italic; margin-top: .6rem; }
.cert-name { text-align: center; font-family: var(--font-head); font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 700; color: var(--color-midnight); border-bottom: 3px solid var(--color-hope); width: fit-content; margin: .2rem auto 0; padding: 0 2rem; }
.cert-text { text-align: center; max-width: 640px; margin: .8rem auto 0; font-size: .98rem; }
.cert-stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: .4rem; margin-top: auto; }
.cert-stops div { background: var(--color-teal-accent-2); text-align: center; padding: .35rem; font-size: .78rem; }
.cert-stops b { display: block; font-family: var(--font-head); color: var(--color-sanctuary); }
@media (max-width: 767.98px) { .cert { aspect-ratio: auto; padding: 1.4rem; } .cert-top img { height: 48px; } }

.cert-locked { text-align: center; }
.cert-progress { display: flex; justify-content: center; gap: .6rem; flex-wrap: wrap; margin: 1.2rem 0; }
.cert-progress span { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: #e6e8e1; color: #9aa69f; }
.cert-progress span.done { background: var(--leaf); color: #fff; }

/* =====================================================================
   Messages inbox
   ===================================================================== */
.msg-row { display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: 18px; padding: 1rem 1.2rem; box-shadow: var(--shadow); text-decoration: none; color: inherit; margin-bottom: .8rem; transition: transform .15s; }
.msg-row:hover { transform: translateX(4px); color: inherit; }
.msg-row.unread { border-left: 6px solid var(--coral); }
.msg-row .m-icon { width: 50px; height: 50px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; background: var(--color-teal-accent-2); color: var(--color-sanctuary); flex-shrink: 0; }
.msg-row .m-icon.k2, .msg-row .m-icon.k3 { background: #d9f5e4; color: var(--leaf-dark); }
.msg-row .m-icon.k4 { background: var(--color-hope); }
.msg-row h3 { font-size: 1.15rem; margin: 0; }
.msg-row small { color: var(--muted); }

/* =====================================================================
   Admin
   ===================================================================== */
.admin-hero { background: var(--color-midnight); color: #fff; padding: 1.8rem 0 3.5rem; border-radius: 0 0 32px 32px; }
.admin-hero h1 { color: var(--color-hope); font-size: 2.4rem; text-transform: uppercase; margin: 0; }
.admin-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: 1rem; }
.admin-tabs a { color: #fff; text-decoration: none; padding: .45rem .95rem; border-radius: 999px; background: rgba(255,255,255,.08); font-weight: 600; font-size: .95rem; }
.admin-tabs a.active, .admin-tabs a:hover { background: var(--color-hope); color: var(--color-sanctuary); }
.admin-body { margin-top: -2.2rem; position: relative; z-index: 2; }
.stat-tile { background: #fff; border-radius: 20px; padding: 1.1rem 1.3rem; box-shadow: var(--shadow); display: flex; align-items: center; gap: 1rem; height: 100%; }
.stat-tile .ic { width: 52px; height: 52px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; background: var(--color-teal-accent-2); color: var(--color-sanctuary); }
.stat-tile .ic.sun { background: var(--color-hope); }
.stat-tile .ic.leaf { background: #d9f5e4; color: var(--leaf-dark); }
.stat-tile .ic.coral { background: #ffe3d6; color: #b4532c; }
.stat-tile .v { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--color-sanctuary); line-height: 1; }
.stat-tile .l { color: var(--muted); font-weight: 600; font-size: .9rem; }

.step-row { display: flex; gap: 1rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid #eef0ea; flex-wrap: wrap; }
.step-row:last-child { border-bottom: 0; }
.step-row .s-icon { width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; flex-shrink: 0; }
.step-row.locked .s-icon { background: #eceee9; color: #8c9893; }
.step-row.unlocked .s-icon { background: var(--sun); color: var(--color-midnight); }
.step-row.completed .s-icon { background: var(--leaf); color: #fff; }
.step-row .s-main { flex: 1; min-width: 220px; }
.step-row .s-main h3 { font-size: 1.2rem; margin: 0; }
.step-row .s-actions { display: flex; gap: .4rem; flex-wrap: wrap; }
.step-row .s-actions form { margin: 0; }

.table-mp { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-mp th { font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; color: var(--color-sanctuary); font-size: .9rem; padding: .6rem .7rem; border-bottom: 2px solid var(--color-teal-accent-2); }
.table-mp td { padding: .75rem .7rem; border-bottom: 1px solid #eef0ea; vertical-align: middle; }
.table-mp tr:last-child td { border-bottom: 0; }

.icon-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: .35rem; max-height: 170px; overflow: auto; padding: .4rem; background: var(--color-teal-accent-1); border-radius: 14px; border: 2px solid var(--color-teal-accent-2); }
.icon-picker button { border: 0; background: #fff; border-radius: 10px; height: 44px; color: var(--color-sanctuary); font-size: 1.15rem; }
.icon-picker button:hover, .icon-picker button.sel { background: var(--sun); }
.activity-edit { background: var(--color-teal-accent-1); border-radius: 18px; padding: 1rem; margin-bottom: .8rem; border: 1px solid var(--color-teal-accent-2); }
textarea.code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .88rem; }

@media print {
    .mp-header, .mp-footer, .no-print, .mp-toast { display: none !important; }
    body { background: #fff; }
    .cert { box-shadow: none; max-width: none; }
    @page { size: A4 landscape; margin: 8mm; }
}
