/* ============================================================
   LMSDevs Forum — Professional UI
   ============================================================ */
.epf {
    --f-teal: #005957;
    --f-teal-dark: #053e3d;
    --f-teal-2: #00706d;
    --f-teal-soft: #e4f3f1;
    --f-teal-softer: #f0f8f7;
    --f-gold: #f59e0b;
    --f-gold-deep: #b45309;
    --f-gold-bg: #fff7e6;
    --f-green: #0a7a6d;
    --f-green-deep: #065f46;
    --f-green-bg: #e8f9f1;
    --f-red: #ef4444;
    --f-red-deep: #b91c1c;
    --f-red-bg: #fdeeee;
    --f-ink: #0f172a;
    --f-ink-2: #334155;
    --f-muted: #64748b;
    --f-faint: #94a3b8;
    --f-line: #e4e9ee;
    --f-line-2: #eef1f4;
    --f-bg: #f7f9fa;
    --f-white: #ffffff;
    --f-radius: 12px;
    --f-radius-lg: 16px;
    --f-shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
    --f-shadow-md: 0 6px 18px rgba(15, 23, 42, .07);
    --f-shadow-lg: 0 16px 40px rgba(3, 36, 35, .22);
    max-width: 960px;
    margin: 0 auto;
    color: var(--f-ink);
    font-family: var(--epm-font, 'Cairo', 'IBM Plex Sans Arabic', sans-serif);
    font-weight: 500;
}
.epf * { box-sizing: border-box; }
.epf .epf-svg {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}
.epf :is(a, button, input, textarea, select):focus-visible {
    outline: 3px solid rgba(0, 95, 93, .28);
    outline-offset: 2px;
}
body.epm-forum-page .epm-page-head { display: none; }
body.epm-forum-page .epm-section { padding-top: 24px; }

/* ─── Hero ─────────────────────────────────────────────────── */
.epf-hero {
    position: relative;
    overflow: hidden;
    border-radius: var(--f-radius-lg);
    background:
        radial-gradient(900px 320px at 85% -40%, rgba(255,255,255,.14), transparent 60%),
        linear-gradient(125deg, #03201f 0%, #005957 55%, #0a7a6d 100%);
    padding: 36px 30px;
    margin-bottom: 16px;
    text-align: center;
    box-shadow: var(--f-shadow-lg);
}
.epf-hero__orb { position: absolute; border-radius: 50%; pointer-events: none; }
.epf-hero__orb--1 { width: 280px; height: 280px; top: -150px; right: -90px; background: radial-gradient(circle, rgba(255,255,255,.14) 0, transparent 70%); }
.epf-hero__orb--2 { width: 160px; height: 160px; bottom: -80px; left: 6%; background: radial-gradient(circle, rgba(245,158,11,.2) 0, transparent 70%); }
.epf-hero__inner { position: relative; z-index: 1; }
.epf-hero__icon {
    width: 66px; height: 66px; margin: 0 auto 16px;
    display: grid; place-items: center;
    background: rgba(255,255,255,.13); color: #fff;
    border-radius: 20px; border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(6px);
}
.epf-hero__title { color: #fff; font-size: 1.7rem; font-weight: 900; margin: 0 0 8px; letter-spacing: -.2px; }
.epf-hero__sub { color: rgba(255,255,255,.84); font-size: 14px; margin: 0 0 20px; line-height: 1.8; }
.epf-hero .epf-btn--primary { background: #fff; color: var(--f-teal); border-color: #fff; }
.epf-hero .epf-btn--primary:hover { background: rgba(255,255,255,.92); color: var(--f-teal-dark); box-shadow: 0 12px 26px rgba(0,0,0,.28); transform: translateY(-1px); }

/* ─── Stats bar ────────────────────────────────────────────── */
.epf-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}
.epf-stat {
    display: flex; align-items: center; gap: 12px;
    background: var(--f-white);
    border: 1px solid var(--f-line);
    border-radius: var(--f-radius-lg);
    padding: 14px 16px;
    box-shadow: var(--f-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}
.epf-stat:hover { transform: translateY(-2px); box-shadow: var(--f-shadow-md); }
.epf-stat__icon {
    width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
    display: grid; place-items: center;
}
.epf-stat--q .epf-stat__icon { background: var(--f-teal-soft); color: var(--f-teal); }
.epf-stat--r .epf-stat__icon { background: #eaf3ff; color: #2563eb; }
.epf-stat--s .epf-stat__icon { background: var(--f-green-bg); color: var(--f-green-deep); }
.epf-stat--m .epf-stat__icon { background: var(--f-gold-bg); color: var(--f-gold-deep); }
.epf-stat__meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.epf-stat__val { font-size: 1.25rem; font-weight: 900; color: var(--f-ink); font-variant-numeric: tabular-nums; }
.epf-stat__label { font-size: 12px; color: var(--f-muted); font-weight: 600; white-space: nowrap; }

/* ─── Buttons ──────────────────────────────────────────────── */
.epf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px; border: 2px solid transparent; border-radius: var(--f-radius);
    font-family: var(--epm-font, 'Cairo', sans-serif); font-size: 14px; font-weight: 700;
    cursor: pointer; transition: all .22s ease; text-decoration: none; white-space: nowrap; line-height: 1.4;
}
.epf-btn--primary { background: var(--f-teal); color: #fff; border-color: var(--f-teal); box-shadow: 0 2px 0 rgba(0,0,0,.06); }
.epf-btn--primary:hover { background: var(--f-teal-dark); border-color: var(--f-teal-dark); color: #fff; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(0,89,87,.3); }
.epf-btn--primary:disabled { opacity: .7; cursor: not-allowed; transform: none; box-shadow: none; }
.epf-btn--ghost { background: #fff; color: var(--f-ink-2); border-color: var(--f-line); }
.epf-btn--ghost:hover { background: var(--f-teal-softer); color: var(--f-teal); border-color: var(--f-teal-2); }
.epf-btn--sm { padding: 9px 18px; font-size: 13px; border-radius: 10px; }
.epf-btn--xs { padding: 6px 13px; font-size: 12px; border-radius: 9px; border-width: 1px; }
.epf-btn--danger:hover { background: var(--f-red-bg); color: var(--f-red-deep); border-color: #f3c2c2; }

/* Spinner inside buttons */
.epf-spinner {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
    animation: epf-spin .6s linear infinite;
}
.epf-btn--ghost .epf-spinner { border-color: rgba(0,89,87,.25); border-top-color: var(--f-teal); }
@keyframes epf-spin { to { transform: rotate(360deg); } }

/* ─── Toolbar / search ─────────────────────────────────────── */
.epf-toolbar { margin-bottom: 12px; }
.epf-search {
    display: flex; align-items: center; gap: 4px;
    background: var(--f-white); border: 1px solid var(--f-line); border-radius: var(--f-radius);
    padding: 5px 6px 5px 12px; transition: border-color .2s, box-shadow .2s;
}
.epf-search:focus-within { border-color: var(--f-teal-2); box-shadow: 0 0 0 4px rgba(0,89,87,.1); }
.epf-search__icon { color: var(--f-faint); display: flex; margin-inline-start: 8px; }
.epf-search input {
    flex: 1; min-width: 0; border: 0; outline: none; background: transparent;
    font-family: var(--epm-font, 'Cairo', sans-serif); font-size: 13.5px; color: var(--f-ink);
    padding: 9px 4px;
}
.epf-search input::placeholder { color: var(--f-faint); }

/* ─── Category tabs ────────────────────────────────────────── */
.epf-tabs {
    display: flex; gap: 8px; flex-wrap: wrap;
    margin-bottom: 16px; padding: 6px;
    background: var(--f-white); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg);
    box-shadow: var(--f-shadow-sm);
}
.epf-tab {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 700; color: var(--f-muted);
    background: transparent; text-decoration: none;
    transition: all .18s ease;
}
.epf-tab:hover { background: var(--f-teal-softer); color: var(--f-teal); }
.epf-tab.is-active { background: var(--f-teal); color: #fff; box-shadow: 0 4px 12px rgba(0,89,87,.28); }
.epf-tab__count {
    font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px;
    background: var(--f-bg); color: var(--f-muted);
}
.epf-tab.is-active .epf-tab__count { background: rgba(255,255,255,.2); color: #fff; }

/* ─── Ask form ─────────────────────────────────────────────── */
.epf-ask, .epf-answer {
    background: var(--f-white); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg);
    padding: 22px; margin-bottom: 16px; box-shadow: var(--f-shadow-sm);
}
.epf-ask__head, .epf-answer__head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.epf-ask__icon {
    width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
    background: linear-gradient(135deg, #00706d, #005957); color: #fff; flex-shrink: 0;
    box-shadow: 0 6px 14px rgba(0,89,87,.25);
}
.epf-ask__head h2, .epf-answer__head h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 2px; }
.epf-ask__head p, .epf-answer__head p { font-size: 12.5px; color: var(--f-muted); margin: 0; }
.epf-ask__tip {
    display: flex; align-items: flex-start; gap: 8px;
    background: var(--f-gold-bg); border: 1px solid rgba(245,158,11,.3);
    color: var(--f-gold-deep); font-size: 12.5px; font-weight: 600; line-height: 1.7;
    padding: 10px 14px; border-radius: 11px; margin-bottom: 16px;
}
.epf-ask__tip .epf-svg { color: var(--f-gold); margin-top: 2px; }
.epf-ask__form { display: flex; flex-direction: column; gap: 14px; }
.epf-field { display: flex; flex-direction: column; gap: 6px; }
.epf-field__label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.epf-field__label label { font-size: 12.5px; font-weight: 700; color: var(--f-ink-2); }
.epf-req { color: var(--f-red); }
.epf-counter { font-size: 11px; font-weight: 600; color: var(--f-faint); font-variant-numeric: tabular-nums; }
.epf-counter.is-warn { color: var(--f-gold-deep); }
.epf-field input, .epf-field textarea, .epf-field select {
    width: 100%; padding: 12px 14px; border: 1.5px solid var(--f-line); border-radius: 11px;
    font-size: 14px; font-family: var(--epm-font, 'Cairo', sans-serif); color: var(--f-ink);
    background: var(--f-bg); outline: none; transition: all .22s ease; box-sizing: border-box;
}
.epf-field input:focus, .epf-field textarea:focus, .epf-field select:focus {
    border-color: var(--f-teal-2); background: #fff; box-shadow: 0 0 0 4px rgba(0,89,87,.1);
}
.epf-field textarea { resize: vertical; min-height: 110px; line-height: 1.8; }
.epf-field select {
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='1.8' stroke='%2364748b' width='16' height='16'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: left 14px center; padding-left: 40px;
    cursor: pointer;
}
.epf-ask__row { display: flex; gap: 12px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.epf-ask__row .epf-field { flex: 1; min-width: 180px; }
.epf-msg { font-size: 13px; font-weight: 600; margin: 0; display: none; }
.epf-msg.is-err { display: block; color: var(--f-red-deep); background: var(--f-red-bg); border: 1px solid #f3c2c2; padding: 10px 14px; border-radius: 10px; }
.epf-msg.is-ok { display: block; color: var(--f-green-deep); background: var(--f-green-bg); border: 1px solid rgba(10,122,109,.3); padding: 10px 14px; border-radius: 10px; }

/* ─── Login bar ────────────────────────────────────────────── */
.epf-loginbar {
    display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
    background: var(--f-teal-softer); border: 1px solid rgba(0,89,87,.25); border-radius: var(--f-radius-lg);
    padding: 16px 20px; margin-bottom: 16px;
}
.epf-loginbar__msg { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--f-teal-dark); line-height: 1.7; }
.epf-loginbar__msg .epf-svg { color: var(--f-teal); }

/* ─── Banned notice ────────────────────────────────────────── */
.epf-loginbar--banned {
    background: #fdf3f4;
    border-color: rgba(179,45,46,.28);
}
.epf-loginbar--banned .epf-loginbar__msg { color: #a33031; }
.epf-loginbar--banned .epf-loginbar__msg .epf-svg { color: #b32d2e; }

/* ─── Empty muted (banned) ─────────────────────────────────── */
.epf-empty__muted { color: var(--f-muted); font-size: 13px; font-weight: 600; margin: 0; }

/* ─── Locked (forum access lock) ───────────────────────────── */
.epf-locked { padding: 32px 0; }
.epf-locked__card {
    max-width: 460px; margin: 0 auto; text-align: center;
    background: var(--f-white); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg);
    padding: 40px 28px; box-shadow: var(--f-shadow-sm);
}
.epf-locked__icon {
    width: 84px; height: 84px; margin: 0 auto 18px; display: grid; place-items: center;
    background: var(--f-teal-soft); color: var(--f-teal); border-radius: 24px;
}
.epf-locked__title { font-size: 1.25rem; font-weight: 800; color: var(--f-ink); margin-bottom: 10px; }
.epf-locked__sub { font-size: 13.5px; color: var(--f-muted); line-height: 1.8; margin-bottom: 20px; }
.epf-locked__actions { display: flex; justify-content: center; }

/* ─── Topic list ───────────────────────────────────────────── */
.epf-list { background: var(--f-white); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg); overflow: hidden; box-shadow: var(--f-shadow-sm); }
.epf-list__head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 14px 18px; background: var(--f-bg); border-bottom: 1px solid var(--f-line);
    font-size: 12.5px; font-weight: 800; color: var(--f-ink-2);
}
.epf-list__count { font-variant-numeric: tabular-nums; background: var(--f-teal-soft); color: var(--f-teal); padding: 3px 12px; border-radius: 999px; font-size: 12px; }
.epf-topic { display: flex; gap: 14px; padding: 18px; transition: background .2s ease; }
.epf-topic + .epf-topic { border-top: 1px solid var(--f-line-2); }
.epf-topic:hover { background: var(--f-bg); }
.epf-topic__avatar {
    width: 46px; height: 46px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
    border: 2px solid var(--f-teal-soft); background: var(--f-teal-soft);
}
.epf-topic__avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.epf-topic__body { min-width: 0; flex: 1; }
.epf-topic__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--f-faint); }
.epf-topic__who { display: inline-flex; align-items: center; gap: 6px; color: var(--f-ink); }
.epf-topic__who strong { font-size: 13px; font-weight: 800; }
.epf-topic__date { display: inline-flex; align-items: center; gap: 4px; color: var(--f-faint); }
.epf-topic__cat {
    margin-inline-start: auto;
    background: var(--f-teal-soft); color: var(--f-teal);
    padding: 3px 12px; border-radius: 999px; font-weight: 700; font-size: 11.5px;
}
.epf-topic__title { font-size: 15.5px; font-weight: 800; margin: 7px 0; line-height: 1.55; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.epf-topic__title a { color: var(--f-ink); text-decoration: none; transition: color .2s; }
.epf-topic__title a:hover { color: var(--f-teal); }
.epf-topic__excerpt { font-size: 13px; color: var(--f-muted); margin: 0 0 10px; line-height: 1.8; }
.epf-topic__foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--f-muted); }
.epf-topic__stats { display: inline-flex; align-items: center; gap: 5px; font-weight: 700; color: var(--f-teal); background: var(--f-teal-soft); padding: 4px 12px; border-radius: 999px; }
.epf-topic__stats .epf-svg { color: var(--f-teal); }
.epf-topic__last { display: inline-flex; align-items: center; gap: 7px; color: var(--f-faint); min-width: 0; }
.epf-topic__last > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.epf-topic__lastavatar { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.epf-topic__open {
    margin-inline-start: auto;
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: grid; place-items: center;
    background: var(--f-white); color: var(--f-muted); border: 1px solid var(--f-line);
    text-decoration: none; transition: all .2s ease;
}
.epf-topic__open:hover { background: var(--f-teal); color: #fff; border-color: var(--f-teal); }

/* ─── Chips & badges ───────────────────────────────────────── */
.epf-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800;
    background: var(--f-bg); color: var(--f-muted); border: 1px solid var(--f-line);
}
.epf-chip--pin { background: var(--f-gold-bg); color: var(--f-gold-deep); border-color: rgba(245,158,11,.35); }
.epf-chip--done { background: var(--f-green-bg); color: var(--f-green-deep); border-color: rgba(10,122,109,.3); }
.epf-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap;
}
.epf-badge--teacher { background: var(--f-teal-soft); color: var(--f-teal); border: 1px solid rgba(0,89,87,.22); }
.epf-badge--admin { background: linear-gradient(120deg, #f59e0b, #fbbf24); color: #fff; box-shadow: 0 2px 6px rgba(245,158,11,.3); }
.epf-badge--owner { background: var(--f-teal-soft); color: var(--f-teal-dark); border: 1px dashed rgba(0,89,87,.4); }
.epf-badge--done { background: var(--f-green-bg); color: var(--f-green-deep); border: 1px solid rgba(10,122,109,.3); padding: 5px 13px; font-size: 12px; }

/* ─── Breadcrumb ───────────────────────────────────────────── */
.epf-crumb { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.epf-crumb a { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 700; color: var(--f-muted); text-decoration: none; transition: color .2s; }
.epf-crumb a:hover { color: var(--f-teal); }
.epf-crumb__sep { display: flex; color: var(--f-faint); }

/* ─── Single topic / question card ─────────────────────────── */
.epf-post {
    background: var(--f-white); border: 1px solid var(--f-line); border-radius: var(--f-radius-lg);
    padding: 26px; margin-bottom: 16px; box-shadow: var(--f-shadow-sm);
    position: relative;
}
.epf-post::before {
    content: ""; position: absolute; inset-block: 0; inset-inline-start: 0;
    width: 4px; border-radius: 16px 0 0 16px;
    background: linear-gradient(180deg, var(--f-teal-2), var(--f-teal));
}
.epf-post__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--f-line-2); }
.epf-post__avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; border: 2px solid var(--f-teal-soft); flex-shrink: 0; }
.epf-post__who { display: flex; flex-direction: column; gap: 1px; }
.epf-post__name { display: inline-flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 800; color: var(--f-ink); }
.epf-post__date { font-size: 12px; color: var(--f-faint); }
.epf-post__chips { margin-inline-start: auto; display: flex; gap: 6px; flex-wrap: wrap; }
.epf-post__tag {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--f-teal); color: #fff;
    font-size: 12px; font-weight: 800; padding: 5px 13px; border-radius: 999px;
    margin-bottom: 10px; box-shadow: 0 4px 10px rgba(0,89,87,.25);
}
.epf-post__title { font-size: 1.35rem; font-weight: 900; margin: 0 0 12px; color: var(--f-ink); line-height: 1.5; }
.epf-post__content { font-size: 14.5px; line-height: 2; color: var(--f-ink-2); }
.epf-post__content p { margin: 0 0 12px; color: var(--f-ink-2); }
.epf-post__content img { border-radius: 12px; margin: 10px 0; max-width: 100%; }
.epf-post__content a { color: var(--f-teal); }
.epf-post__foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--f-line-2); }

/* ─── Replies ──────────────────────────────────────────────── */
.epf-replies__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.epf-replies__head h2 { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 800; margin: 0; color: var(--f-ink); }
.epf-replies__head .epf-svg { color: var(--f-teal); }
.epf-replies__count { background: var(--f-teal-soft); color: var(--f-teal); font-size: 12px; padding: 2px 11px; border-radius: 999px; }
.epf-replies__note { font-size: 11.5px; color: var(--f-faint); font-weight: 600; }
.epf-reply {
    display: flex; gap: 14px; background: var(--f-white); border: 1px solid var(--f-line);
    border-radius: var(--f-radius-lg); padding: 20px; margin-bottom: 12px; position: relative;
    transition: border-color .2s, box-shadow .2s;
}
.epf-reply--best { border-color: rgba(245,158,11,.5); box-shadow: 0 0 0 3px rgba(245,158,11,.12), var(--f-shadow-sm); }
.epf-reply__besttag {
    position: absolute; top: -11px; inset-inline-start: 16px;
    display: inline-flex; align-items: center; gap: 6px;
    background: linear-gradient(120deg, #f59e0b, #fbbf24); color: #fff;
    font-size: 11.5px; font-weight: 800; padding: 4px 13px; border-radius: 999px;
    box-shadow: 0 4px 12px rgba(245,158,11,.35);
}
.epf-reply__avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--f-teal-soft); flex-shrink: 0; }
.epf-reply__body { min-width: 0; flex: 1; }
.epf-reply__meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.epf-reply__date { font-size: 12px; color: var(--f-faint); }
.epf-reply__content { font-size: 14px; line-height: 1.9; color: var(--f-ink-2); word-break: break-word; }
.epf-reply__content p { margin: 0 0 10px; color: var(--f-ink-2); }
.epf-reply__content p:last-child { margin-bottom: 0; }
.epf-reply__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--f-line-2); }

/* ─── Answer form ──────────────────────────────────────────── */
.epf-answer__icon {
    width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center;
    background: var(--f-teal-soft); color: var(--f-teal); flex-shrink: 0;
}

/* ─── Empty & pagination ───────────────────────────────────── */
.epf-empty { text-align: center; padding: 48px 20px; }
.epf-empty__icon {
    width: 68px; height: 68px; margin: 0 auto 14px; display: grid; place-items: center;
    border-radius: 22px; background: var(--f-teal-soft); color: var(--f-teal);
}
.epf-empty__title { font-size: 1.05rem; font-weight: 800; margin: 0 0 6px; color: var(--f-ink); }
.epf-empty p { color: var(--f-muted); font-size: 14px; margin: 0 0 16px; }
.epf-pagination { margin: 22px 0 6px; text-align: center; }
.epf-pagination .page-numbers { display: inline-flex; min-width: 38px; height: 38px; padding: 0 10px; align-items: center; justify-content: center; border: 1px solid var(--f-line); border-radius: 10px; margin: 0 3px; font-size: 13px; font-weight: 700; color: var(--f-muted); background: #fff; text-decoration: none; transition: all .2s; }
.epf-pagination .page-numbers:hover { border-color: var(--f-teal-2); color: var(--f-teal); }
.epf-pagination .page-numbers.current { background: var(--f-teal); border-color: var(--f-teal); color: #fff; }

/* ─── Toast notifications ──────────────────────────────────── */
.epf-toast-wrap {
    position: fixed; top: 20px; inset-inline-end: 20px; z-index: 999999;
    display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.epf-toast {
    display: flex; align-items: center; gap: 10px;
    min-width: 250px; max-width: 340px;
    background: var(--f-ink); color: #fff;
    padding: 13px 16px; border-radius: 13px;
    font-size: 13.5px; font-weight: 700; line-height: 1.6;
    box-shadow: 0 12px 32px rgba(15,23,42,.28);
    pointer-events: auto;
    animation: epf-toast-in .25s ease;
}
.epf-toast--ok { background: #065f46; }
.epf-toast--err { background: #991b1b; }
.epf-toast--info { background: var(--f-ink); }
.epf-toast.is-leave { animation: epf-toast-out .25s ease forwards; }
.epf-toast__icon { display: flex; flex-shrink: 0; }
@keyframes epf-toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes epf-toast-out { to { opacity: 0; transform: translateY(-8px); } }

/* ─── Animations ───────────────────────────────────────────── */
.epf-topic, .epf-post, .epf-reply, .epf-ask, .epf-answer, .epf-stat {
    animation: epf-rise .3s ease both;
}
.epf-replies .epf-reply:nth-child(2) { animation-delay: .03s; }
.epf-replies .epf-reply:nth-child(3) { animation-delay: .06s; }
@keyframes epf-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* بطاقة/إجابة أُضيفت للتو بدون تحديث الصفحة */
.epf-topic.is-new, .epf-reply.is-new {
    animation: epf-pop .5s ease both;
    box-shadow: 0 0 0 1px var(--epm, #005957), 0 10px 26px rgba(0, 95, 93, .14);
}
@keyframes epf-pop { from { opacity: .2; transform: translateY(10px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
    .epf * { animation: none !important; transition: none !important; }
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 720px) {
    .epf-stats { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (max-width: 640px) {
    .epf-hero { padding: 26px 18px; }
    .epf-hero__title { font-size: 1.4rem; }
    .epf-topic { padding: 15px; }
    .epf-topic__cat { margin-inline-start: 0; }
    .epf-topic__foot { gap: 8px; }
    .epf-post, .epf-ask, .epf-answer { padding: 20px 16px; }
    .epf-post__chips { margin-inline-start: 0; width: 100%; }
    .epf-reply { padding: 16px 14px; gap: 10px; }
    .epf-ask__row { flex-direction: column; align-items: stretch; }
    .epf-toast-wrap { top: 12px; inset-inline-end: 12px; inset-inline-start: 12px; }
    .epf-toast { max-width: none; min-width: 0; }
}
