/* FMO responsive shell - keeps the app usable inside narrow WordPress themes */
.fmo-app, .fmo-app * { box-sizing: border-box; }
.fmo-app {
    font-family: Tahoma, Arial, sans-serif;
    color: #172033;
    background: #f6f7fb;
    border: 1px solid #e8eaf1;
    border-radius: 18px;
    overflow: hidden;
    margin: 20px auto;
    width: min(1180px, calc(100vw - 28px));
    max-width: min(1180px, calc(100vw - 28px));
    position: relative;
}
/* Break out of default post/page content width without affecting the rest of the site */
.entry-content > .fmo-app,
.wp-block-post-content > .fmo-app,
.page-content > .fmo-app {
    left: 50%;
    transform: translateX(-50%);
}
body:has(#fmo-app) .entry-title {
    margin-bottom: 18px;
}
.fmo-topbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 22px;
    background: linear-gradient(135deg, #1f2937, #334155);
    color: #fff;
}
.fmo-topbar h2 { margin: 0 0 6px; color: #fff; font-size: clamp(22px, 3vw, 32px); line-height: 1.35; }
.fmo-topbar p { margin: 0; opacity: .85; line-height: 1.8; word-break: break-word; }
.fmo-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 700px; }
.fmo-sidebar {
    background: #ffffff;
    border-left: 1px solid #e8eaf1;
    padding: 14px;
}
.fmo-sidebar button {
    display: block;
    width: 100%;
    text-align: right;
    background: transparent;
    border: 0;
    border-radius: 12px;
    padding: 13px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    font-weight: 700;
    color: #344054;
}
.fmo-sidebar button.active,
.fmo-sidebar button:hover { background: #eef4ff; color: #175cd3; }
.fmo-content { padding: 18px; min-width: 0; overflow: hidden; }
.fmo-tab { display: none; }
.fmo-tab.active { display: block; }
.fmo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 14px; }
.fmo-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.fmo-kpis { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.fmo-card {
    background: #fff;
    border: 1px solid #e8eaf1;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 8px 22px rgba(15, 23, 42, .04);
}
.fmo-card h3, .fmo-card h4 { margin-top: 0; color: #111827; }
.fmo-card span { display: block; color: #667085; font-size: 13px; margin-bottom: 6px; }
.fmo-card strong { font-size: 22px; color: #111827; }
.fmo-form { display: grid; grid-template-columns: 1fr; gap: 12px; }
.fmo-form-wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fmo-form.fmo-inline { grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: end; }
.fmo-form label { display: grid; gap: 6px; font-weight: 700; color: #344054; font-size: 13px; }
.fmo-form input,
.fmo-form select,
.fmo-form textarea {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 10px 11px;
    background: #fff;
    min-height: 42px;
    box-sizing: border-box;
}
.fmo-form textarea { min-height: 84px; resize: vertical; }
.fmo-btn {
    background: #175cd3;
    color: #fff;
    border: 0;
    border-radius: 12px;
    padding: 11px 16px;
    cursor: pointer;
    font-weight: 800;
    min-height: 42px;
}
.fmo-btn:hover { background: #0b4db7; }
.fmo-btn:disabled { opacity: .65; cursor: not-allowed; }
.fmo-muted { color: #667085; font-size: 13px; }
.fmo-table-wrap { overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.fmo-table-wrap table { width: 100%; border-collapse: collapse; min-width: 720px; }
.fmo-table-wrap th,
.fmo-table-wrap td { border-bottom: 1px solid #eef0f5; padding: 11px; text-align: right; vertical-align: top; }
.fmo-table-wrap th { background: #f8fafc; color: #475467; font-size: 13px; }
.fmo-alert {
    margin: 14px 18px 0;
    border-radius: 12px;
    padding: 12px 14px;
    font-weight: 700;
}
.fmo-alert.success { background: #ecfdf3; color: #027a48; border: 1px solid #abefc6; }
.fmo-alert.error { background: #fef3f2; color: #b42318; border: 1px solid #fecdca; }
.fmo-result { margin-top: 14px; }
.fmo-login-box {
    padding: 18px;
    background: #fff4e5;
    border: 1px solid #ffd9a8;
    border-radius: 12px;
    color: #8a4b00;
    font-weight: 700;
}
@media (max-width: 1250px) {
    .fmo-layout { grid-template-columns: 1fr; }
    .fmo-sidebar { display: flex; overflow-x: auto; gap: 8px; border-left: 0; border-bottom: 1px solid #e8eaf1; }
    .fmo-sidebar button { min-width: 160px; text-align: center; }
    .fmo-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fmo-grid,
    .fmo-grid.two,
    .fmo-form-wide,
    .fmo-form.fmo-inline { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .fmo-topbar { flex-direction: column; align-items: stretch; }
    .fmo-content { padding: 12px; }
    .fmo-kpis { grid-template-columns: 1fr; }
}


.fmo-counter-box {
    border: 1px dashed #b8c4d8;
    background: #f8fbff;
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 10px;
}
.fmo-counter-number {
    font-size: 42px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
    color: #1d4ed8;
    background: #eef4ff;
    border-radius: 12px;
    padding: 18px;
}
.fmo-counter-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
}
.fmo-pan-groups {
    display: grid;
    gap: 10px;
}
.fmo-pan-group {
    display: grid;
    grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
}
.fmo-live-total {
    padding: 12px 14px;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #14532d;
    font-weight: 800;
}
.fmo-btn.secondary {
    background: #e5e7eb;
    color: #111827;
}
.fmo-btn.danger {
    background: #dc2626;
    color: #fff;
}
@media (max-width: 900px) {
    .fmo-pan-group { grid-template-columns: 1fr; }
}

.fmo-vehicles {
    display: grid;
    gap: 14px;
    margin: 14px 0;
}
.fmo-vehicle-card {
    border: 1px solid #dbe4f0;
    background: #ffffff;
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, .04);
}
.fmo-vehicle-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.fmo-vehicle-head h4 { margin: 0; }
.fmo-circle-counter {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 120px;
    border: 1px dashed #93c5fd;
    border-radius: 16px;
    background: #eff6ff;
}
.fmo-circle-counter button {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 0;
    background: #175cd3;
    color: #fff;
    font-size: 38px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(23, 92, 211, .25);
}
.fmo-circle-counter span {
    display: inline-block;
    margin: 0;
    font-size: 22px;
    font-weight: 900;
    color: #1e3a8a;
}
.fmo-circle-counter small {
    color: #475467;
    font-weight: 700;
}
.fmo-mini-total {
    margin-top: 12px;
    padding: 10px 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    font-weight: 800;
}
.fmo-mini-total strong { color: #175cd3; }
.fmo-reception-total {
    margin: 14px 0;
    font-size: 16px;
}
@media (max-width: 760px) {
    .fmo-vehicle-head { align-items: stretch; flex-direction: column; }
    .fmo-circle-counter { min-height: 105px; }
    .fmo-circle-counter button { width: 64px; height: 64px; font-size: 34px; }
}

.fmo-login-shell, .fmo-login-shell * { box-sizing: border-box; }
.fmo-login-shell {
    direction: rtl;
    display: grid;
    place-items: center;
    min-height: 70vh;
    background: linear-gradient(135deg, #eef4ff, #f8fafc);
    padding: 24px;
    font-family: Tahoma, Arial, sans-serif;
    width: min(760px, calc(100vw - 28px));
    max-width: min(760px, calc(100vw - 28px));
    margin: 20px auto;
    position: relative;
}
.entry-content > .fmo-login-shell,
.wp-block-post-content > .fmo-login-shell,
.page-content > .fmo-login-shell {
    left: 50%;
    transform: translateX(-50%);
}
.fmo-login-card {
    width: min(100%, 440px);
    background: #fff;
    border: 1px solid #e8eaf1;
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .10);
    padding: 26px;
    text-align: right;
}
.fmo-login-card h2 {
    margin: 0 0 8px;
    color: #111827;
    font-size: 26px;
}
.fmo-login-card p {
    margin: 0 0 18px;
    color: #667085;
    line-height: 1.8;
}
.fmo-login-card label {
    display: block;
    color: #344054;
    font-weight: 800;
    margin-bottom: 8px;
}
.fmo-login-card input[type="text"],
.fmo-login-card input[type="password"] {
    width: 100%;
    min-height: 44px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 10px 12px;
    box-sizing: border-box;
    margin-bottom: 14px;
}
.fmo-login-card input[type="submit"] {
    width: 100%;
    background: #175cd3;
    color: #fff;
    border: 0;
    border-radius: 12px;
    min-height: 46px;
    font-weight: 900;
    cursor: pointer;
}
.fmo-login-card input[type="submit"]:hover { background: #0b4db7; }
.fmo-login-note {
    margin-top: 14px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    color: #475467;
    font-size: 13px;
    line-height: 1.7;
}
.fmo-my-activity-card strong {
    font-size: 14px;
    color: #027a48;
}
.fmo-good{color:#16803b}.fmo-bad{color:#b42318}.fmo-calcs .fmo-card{align-self:start}.fmo-result table strong.fmo-bad{background:#fff1f0;padding:3px 7px;border-radius:999px}.fmo-result table strong.fmo-good{background:#ecfdf3;padding:3px 7px;border-radius:999px}

.fmo-btn.small{padding:7px 12px;font-size:12px;border-radius:10px;}
.fmo-edit-note{font-size:11px;color:#64748b;margin-top:4px;white-space:nowrap;}
.fmo-modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);z-index:99999;display:flex;align-items:flex-start;justify-content:center;padding:35px 14px;overflow:auto;direction:rtl;}
.fmo-modal{width:min(980px,96vw);background:#fff;border-radius:22px;box-shadow:0 25px 80px rgba(15,23,42,.35);padding:18px;max-height:92vh;overflow:auto;}
.fmo-modal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;border-bottom:1px solid #e5e7eb;padding-bottom:10px;}
.fmo-modal-head h3{margin:0;font-size:24px;}
.fmo-edit-form{margin-top:10px;}
@media(max-width:700px){.fmo-modal-backdrop{padding:10px}.fmo-modal{width:100%;border-radius:16px;padding:12px}.fmo-modal-head h3{font-size:19px}}

/* v1.8 responsive/full-width improvements */
body.fmo-has-app .site,
body.fmo-has-app .site-main,
body.fmo-has-app .content-area,
body.fmo-has-app .entry-content,
body.fmo-has-app .wp-block-post-content,
body.fmo-has-app .page-content,
body.fmo-has-app .post-content,
body.fmo-has-app .ast-container,
body.fmo-has-app .container,
body.fmo-has-app .content-wrapper {
    max-width: 100% !important;
}
body.fmo-has-app .sidebar,
body.fmo-has-app #secondary,
body.fmo-has-app .widget-area,
body.fmo-has-app .site-sidebar {
    display: none !important;
}
body.fmo-has-app .content-area,
body.fmo-has-app .site-main,
body.fmo-has-app .primary,
body.fmo-has-app .site-content {
    width: 100% !important;
    flex: 0 0 100% !important;
}
.fmo-app {
    width: min(1380px, calc(100vw - 24px));
    max-width: min(1380px, calc(100vw - 24px));
}
.entry-content > .fmo-app,
.wp-block-post-content > .fmo-app,
.page-content > .fmo-app,
.post-content > .fmo-app {
    position: relative;
    right: 50%;
    transform: translateX(50%);
    width: min(1380px, calc(100vw - 24px));
    max-width: min(1380px, calc(100vw - 24px));
}
.fmo-layout {
    grid-template-columns: 260px minmax(0, 1fr);
}
.fmo-sidebar {
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    overflow: auto;
}
.fmo-content {
    overflow: visible;
}
.fmo-card,
.fmo-topbar,
.fmo-sidebar,
.fmo-table-wrap,
.fmo-form {
    max-width: 100%;
}
@media (max-width: 1280px) {
    .fmo-app,
    .entry-content > .fmo-app,
    .wp-block-post-content > .fmo-app,
    .page-content > .fmo-app,
    .post-content > .fmo-app {
        width: calc(100vw - 16px);
        max-width: calc(100vw - 16px);
        right: 50%;
        transform: translateX(50%);
    }
}
@media (max-width: 1250px) {
    .fmo-sidebar {
        position: static;
        max-height: none;
    }
}
@media (max-width: 768px) {
    .fmo-app,
    .entry-content > .fmo-app,
    .wp-block-post-content > .fmo-app,
    .page-content > .fmo-app,
    .post-content > .fmo-app {
        width: calc(100vw - 10px);
        max-width: calc(100vw - 10px);
        border-radius: 12px;
    }
    .fmo-topbar {
        padding: 16px;
    }
    .fmo-topbar h2 {
        font-size: 28px;
    }
    .fmo-sidebar {
        padding: 10px;
    }
    .fmo-sidebar button {
        min-width: 145px;
        white-space: nowrap;
    }
    .fmo-grid,
    .fmo-grid.two,
    .fmo-kpis,
    .fmo-form-wide,
    .fmo-form.fmo-inline {
        grid-template-columns: 1fr !important;
    }
    .fmo-table-wrap table {
        min-width: 620px;
    }
}


/* v1.9 chair/pan counter */
.fmo-circle-counter small::after {
    content: " — الحساب الافتراضي: 80 كتكوت/برنيكة، و4 إلى 20 برنيكة/كرسي";
    display: block;
    font-size: 11px;
    color: #667085;
    margin-top: 4px;
    max-width: 220px;
}


/* v2.0 Login portal and role gateway */
.fmo-login-shell.fmo-login-portal {
    width: min(1220px, calc(100vw - 24px));
    max-width: min(1220px, calc(100vw - 24px));
    margin: 28px auto;
    direction: rtl;
    font-family: Tahoma, Arial, sans-serif;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 18px;
    align-items: stretch;
}
.fmo-login-hero,
.fmo-login-card,
.fmo-login-roles,
.fmo-entry-card {
    background: #fff;
    border: 1px solid #e8eaf1;
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, .08);
}
.fmo-login-hero {
    background: linear-gradient(135deg, #111827, #334155);
    color: #fff;
    padding: 34px;
    display: grid;
    align-content: center;
}
.fmo-login-brand {
    display: inline-flex;
    width: fit-content;
    padding: 9px 14px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 999px;
    font-weight: 900;
    margin-bottom: 18px;
}
.fmo-login-hero h1 {
    margin: 0 0 12px;
    font-size: clamp(30px, 4vw, 54px);
    line-height: 1.25;
    color: #fff;
}
.fmo-login-hero p {
    margin: 0;
    font-size: 18px;
    line-height: 1.9;
    color: rgba(255,255,255,.88);
}
.fmo-login-card {
    padding: 28px;
}
.fmo-login-card h2,
.fmo-login-roles h3 {
    margin-top: 0;
    color: #111827;
}
.fmo-login-card form p {
    margin: 0 0 12px;
}
.fmo-login-card input[type="text"],
.fmo-login-card input[type="password"] {
    width: 100%;
    min-height: 46px;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 10px 12px;
}
.fmo-login-card input[type="submit"] {
    width: 100%;
    min-height: 46px;
    border: 0;
    border-radius: 12px;
    background: #175cd3;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}
.fmo-login-note {
    margin-top: 12px;
    color: #667085;
    font-size: 13px;
    line-height: 1.7;
}
.fmo-login-roles {
    grid-column: 1 / -1;
    padding: 22px;
}
.fmo-role-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.fmo-role-card {
    border: 1px solid #e8eaf1;
    border-radius: 18px;
    padding: 14px;
    background: #f8fafc;
    display: grid;
    gap: 7px;
    min-height: 142px;
}
.fmo-role-card.active {
    background: #eef4ff;
    border-color: #175cd3;
    box-shadow: inset 0 0 0 2px rgba(23,92,211,.12);
}
.fmo-role-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #fff;
    font-size: 25px;
    box-shadow: 0 8px 18px rgba(15, 23, 42, .06);
}
.fmo-role-card strong {
    font-size: 15px;
    color: #111827;
}
.fmo-role-card span {
    display: block;
    color: #667085;
    font-size: 12px;
    line-height: 1.7;
}
.fmo-dashboard-locked .fmo-dashboard-shell {
    display: none;
}
.fmo-entry-gate {
    padding: 24px;
    background: #f6f7fb;
}
.fmo-entry-card {
    padding: 26px;
}
.fmo-entry-badge {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #ecfdf3;
    color: #027a48;
    font-weight: 900;
    margin-bottom: 10px;
}
.fmo-entry-card h2 {
    margin: 0 0 8px;
    color: #111827;
}
.fmo-entry-card p {
    color: #475467;
}
.fmo-entry-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 18px;
}
.fmo-entry-actions .fmo-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 1000px) {
    .fmo-login-shell.fmo-login-portal {
        grid-template-columns: 1fr;
    }
    .fmo-role-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 560px) {
    .fmo-login-shell.fmo-login-portal {
        width: calc(100vw - 12px);
        max-width: calc(100vw - 12px);
        margin: 10px auto;
    }
    .fmo-login-hero,
    .fmo-login-card,
    .fmo-login-roles,
    .fmo-entry-card {
        border-radius: 16px;
        padding: 18px;
    }
    .fmo-role-grid {
        grid-template-columns: 1fr;
    }
    .fmo-entry-actions {
        display: grid;
    }
}


/* v2.1 default user role selectors */
.fmo-role-card-login[data-login-user] {
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.fmo-role-card-login[data-login-user]:hover,
.fmo-role-card-login.selected {
    transform: translateY(-2px);
    border-color: #175cd3;
    box-shadow: 0 14px 28px rgba(23, 92, 211, .14);
    background: #eef4ff;
}
.fmo-role-card-login em {
    color: #175cd3;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}


/* v2.2 administrative delete/edit zone */
.fmo-btn.small {
    min-height: 32px;
    padding: 7px 10px;
    border-radius: 9px;
    font-size: 12px;
    margin: 2px;
}
.fmo-danger-zone {
    border-color: #fecaca;
    background: #fffafa;
}
.fmo-danger-zone h3 {
    color: #991b1b;
}


/* v2.4 separated chick / pan / chair count lines */
.fmo-vehicle-meta { margin-bottom: 12px; }
.fmo-count-lines { display: grid; gap: 12px; margin: 12px 0; }
.fmo-count-line {
    display: grid;
    grid-template-columns: minmax(220px, 1.2fr) repeat(3, minmax(150px, 1fr));
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 16px;
    background: #fff;
}
.fmo-line-title { display: grid; gap: 4px; align-content: center; }
.fmo-line-title span { font-size: 26px; margin: 0; }
.fmo-line-title strong { font-size: 16px; color: #111827; }
.fmo-line-title small { color: #667085; line-height: 1.6; }
.fmo-line-total { min-height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: #f8fafc; border: 1px dashed #d0d5dd; font-weight: 900; }
.fmo-line-chick { background: #fff7ed; }
.fmo-line-pan { background: #f0fdf4; }
.fmo-line-chair { background: #eff6ff; }
.fmo-line-adjust { background: #fafafa; grid-template-columns: minmax(220px, 1.2fr) repeat(2, minmax(150px, 1fr)); }
@media (max-width: 980px) {
    .fmo-count-line, .fmo-line-adjust { grid-template-columns: 1fr; }
}


/* v2.5 reception counters refinements */
.fmo-mini-counter {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 54px;
    border: 1px dashed #93c5fd;
    border-radius: 14px;
    background: #eff6ff;
    padding: 8px 10px;
}
.fmo-mini-plus {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 0;
    background: #175cd3;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 6px 14px rgba(23, 92, 211, .18);
}
.fmo-mini-counter span {
    min-width: 34px;
    text-align: center;
    font-size: 22px;
    font-weight: 900;
    color: #1e3a8a;
}
.fmo-mini-counter small {
    color: #475467;
    font-weight: 700;
}
.fmo-preset-buttons {
    display: flex;
    gap: 6px;
    margin-top: 6px;
    flex-wrap: wrap;
}
.fmo-preset-buttons button {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #175cd3;
    border-radius: 999px;
    padding: 4px 10px;
    font-weight: 800;
    cursor: pointer;
}
.fmo-preset-buttons button:hover {
    background: #dbeafe;
}
.fmo-line-chair .fmo-circle-counter { display: none; }


/* v2.6 Smart management modules */
.fmo-alert-list { display: grid; gap: 12px; }
.fmo-smart-alert {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    background: #f8fafc;
}
.fmo-smart-alert strong { display:block; font-size: 16px; margin-bottom: 5px; }
.fmo-smart-alert span { display:block; color:#667085; font-size: 13px; margin-bottom: 6px; }
.fmo-smart-alert p { margin:0; }
.fmo-smart-alert.danger { background:#fef2f2; border-color:#fecaca; color:#7f1d1d; }
.fmo-smart-alert.warning { background:#fffbeb; border-color:#fde68a; color:#78350f; }
.fmo-quick-tasks { display:flex; gap:8px; flex-wrap:wrap; }
.fmo-done-row { opacity:.72; background:#f0fdf4; }
.fmo-danger-text { color:#b42318; }
.fmo-report-paper {
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:18px;
    padding:20px;
    margin-top:14px;
}
.fmo-report-paper h2, .fmo-report-paper h3 { color:#111827; }
.fmo-report-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:12px; }
.fmo-report-actions a { text-decoration:none; }
@media print {
    body * { visibility: hidden !important; }
    #fmo-printable-report, #fmo-printable-report * { visibility: visible !important; }
    #fmo-printable-report {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}


/* v2.7 inventory supplier/transfer controls */
.fmo-highlight-card {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.fmo-admin-stock-card {
    border-color: #fde68a;
    background: #fffbeb;
}
.fmo-transfer-row {
    background: #f8fafc;
}
.fmo-admin-stock-card textarea,
.fmo-highlight-card textarea {
    min-height: 74px;
}


/* v2.8 advanced reporting */
.fmo-advanced-report-card {
    border-color: #c7d2fe;
    background: #f8faff;
}
.fmo-checklist {
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 9px;
}
.fmo-checklist h4 {
    margin: 0 0 4px;
    color: #111827;
}
.fmo-checklist label {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: center;
    gap: 8px;
    font-weight: 700;
}
.fmo-checklist input[type="checkbox"] {
    width: auto;
    min-height: auto;
}
.fmo-default-checks {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.fmo-secondary-checks {
    border-color: #fed7aa;
    background: #fff7ed;
}
.fmo-report-toolbar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 14px 0;
}
.fmo-advanced-report-paper {
    overflow: visible;
}
.fmo-adv-table th,
.fmo-adv-table td {
    white-space: nowrap;
}
@media print {
    .fmo-report-toolbar,
    .fmo-sidebar,
    .fmo-topbar,
    #wpadminbar {
        display: none !important;
    }
    .fmo-advanced-report-paper {
        width: 100% !important;
        border: 0 !important;
        box-shadow: none !important;
    }
}


/* v2.9 reception reports */
.fmo-reception-report-card {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.fmo-reception-report-paper h2 {
    margin-top: 0;
}
.fmo-report-notes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.fmo-report-notes-grid p {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    margin: 0;
    line-height: 1.8;
}
@media (max-width: 800px) {
    .fmo-report-notes-grid {
        grid-template-columns: 1fr;
    }
}


/* v3.0 comparable software inspired modules */
.fmo-biosecurity-card {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.fmo-harvest-card {
    border-color: #fed7aa;
    background: #fff7ed;
}
.fmo-sensor-card {
    border-color: #bae6fd;
    background: #f0f9ff;
}
.fmo-bio-checks {
    grid-column: 1 / -1;
}
.fmo-bio-checks label {
    font-size: 14px;
}


/* v3.1 simpler interactive UI */
.fmo-layout {
    grid-template-columns: 285px minmax(0, 1fr);
}
.fmo-sidebar {
    position: sticky;
    top: 10px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    background: #f8fafc;
}
.fmo-menu-tools {
    background: #ffffff;
    border: 1px solid #e8eaf1;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 12px;
}
.fmo-menu-tools strong {
    display: block;
    margin-bottom: 8px;
    color: #101828;
}
.fmo-menu-search {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 12px;
    padding: 10px 11px;
    box-sizing: border-box;
    background: #fff;
}
.fmo-menu-group {
    background: #fff;
    border: 1px solid #e8eaf1;
    border-radius: 16px;
    padding: 10px;
    margin-bottom: 12px;
}
.fmo-menu-title {
    display: block;
    font-size: 12px;
    font-weight: 900;
    color: #667085;
    margin: 0 4px 8px;
}
.fmo-sidebar button {
    margin-bottom: 4px;
    padding: 11px 10px;
    font-size: 13px;
    line-height: 1.35;
}
.fmo-sidebar button.active {
    background: #175cd3;
    color: #fff;
    box-shadow: 0 8px 16px rgba(23, 92, 211, .18);
}
.fmo-screen-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 15px 16px;
    margin-bottom: 16px;
}
.fmo-current-screen-title {
    display: block;
    font-size: 20px;
    font-weight: 900;
    color: #111827;
}
.fmo-current-screen-desc {
    margin: 5px 0 0;
    color: #475467;
    line-height: 1.7;
}
.fmo-welcome-card {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    background: #101828;
    color: #fff;
    border-radius: 20px;
    padding: 18px;
    margin-bottom: 16px;
}
.fmo-welcome-card h2 {
    margin: 0 0 6px;
    color: #fff;
}
.fmo-welcome-card p {
    margin: 0;
    color: #d0d5dd;
}
.fmo-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fmo-quick-actions button {
    border: 0;
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 900;
    background: #fff;
    color: #175cd3;
}
.fmo-help-box {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr);
    gap: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 18px;
    padding: 16px;
    margin-top: 18px;
}
.fmo-help-box strong {
    display: block;
    color: #92400e;
    font-size: 17px;
    margin-bottom: 6px;
}
.fmo-help-box p {
    margin: 0;
    color: #78350f;
    line-height: 1.8;
}
.fmo-help-box ol {
    margin: 0;
    padding-right: 20px;
    color: #78350f;
    line-height: 1.9;
    font-weight: 700;
}
.fmo-card {
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.fmo-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15, 23, 42, .07);
}
@media (max-width: 1100px) {
    .fmo-layout {
        grid-template-columns: 1fr;
    }
    .fmo-sidebar {
        position: relative;
        top: auto;
        max-height: none;
        display: grid;
        gap: 10px;
    }
    .fmo-help-box {
        grid-template-columns: 1fr;
    }
    .fmo-screen-head,
    .fmo-welcome-card {
        flex-direction: column;
        align-items: stretch;
    }
}


/* v3.2 review workflow and cycle closing */
.fmo-review-card {
    border-color: #bfdbfe;
    background: #eff6ff;
}
.fmo-close-cycle-card {
    border-color: #fecaca;
    background: #fff1f2;
}
.fmo-review-summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    padding: 12px 14px;
    margin-top: 10px;
}
.fmo-review-summary strong {
    font-size: 28px;
    color: #175cd3;
}
.fmo-pending-pending {
    background: #fffbeb;
}
.fmo-pending-approved {
    background: #f0fdf4;
}
.fmo-pending-rejected {
    background: #fef2f2;
}


/* v3.3 dashboard current counts */
.fmo-structure-counts-card {
    border-color: #bae6fd;
    background: #f0f9ff;
}
.fmo-structure-counts-card h4 {
    margin-top: 18px;
}
.fmo-structure-counts-card table td strong {
    font-size: 18px;
    color: #0f172a;
}

/* v3.4 notifications, validation and cycle close checklist */
.fmo-top-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.fmo-notify-wrap {
    position: relative;
    z-index: 30;
}
.fmo-notify-btn {
    border: 1px solid #fcd34d;
    background: #fffbeb;
    color: #92400e;
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
    font-weight: 900;
    min-height: 42px;
}
.fmo-notify-btn strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    background: #dc2626;
    color: #fff;
    margin-inline-start: 5px;
    font-size: 12px;
}
.fmo-notify-panel {
    position: absolute;
    left: 0;
    top: calc(100% + 8px);
    width: min(360px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    box-shadow: 0 18px 38px rgba(15,23,42,.16);
    padding: 10px;
    max-height: 430px;
    overflow-y: auto;
}
.fmo-notify-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid #eef2f7;
    padding: 8px 8px 10px;
    margin-bottom: 6px;
}
.fmo-notify-head span {
    color: #b42318;
    font-weight: 900;
    font-size: 12px;
}
.fmo-notify-item {
    display: block;
    width: 100%;
    text-align: right;
    border: 0;
    border-radius: 14px;
    padding: 10px;
    margin-bottom: 6px;
    cursor: pointer;
    background: #f8fafc;
}
.fmo-notify-item strong { display:block; color:#111827; margin-bottom:4px; }
.fmo-notify-item small { display:block; color:#475467; line-height:1.5; }
.fmo-notify-item.danger { background:#fef2f2; }
.fmo-notify-item.warning { background:#fffbeb; }
.fmo-notify-item.info { background:#eff6ff; }
.fmo-close-checklist {
    border-color: #fecaca;
    background: #fff7f7;
}
.fmo-close-checklist h4 { margin-top: 0; }
@media (max-width: 800px) {
    .fmo-notify-panel { right: 0; left: auto; }
    .fmo-top-actions { width: 100%; justify-content: space-between; }
}


/* v3.5 main dashboard timeline */
.fmo-timeline-card {
    border-color: #ddd6fe;
    background: #fbfaff;
}
.fmo-card-head-inline {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.fmo-card-head-inline h3 { margin-bottom: 4px; }
.fmo-card-head-inline strong {
    background: #ede9fe;
    color: #5b21b6;
    border-radius: 999px;
    padding: 8px 12px;
    font-size: 14px;
    white-space: nowrap;
}
.fmo-timeline-filter {
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid #ede9fe;
    border-radius: 16px;
    padding: 12px;
}
.fmo-timeline-wrap {
    display: grid;
    gap: 14px;
}
.fmo-timeline-day h4 {
    margin: 0 0 8px;
    color: #4c1d95;
}
.fmo-timeline-list {
    position: relative;
    display: grid;
    gap: 10px;
}
.fmo-timeline-item {
    position: relative;
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}
.fmo-timeline-dot {
    width: 12px;
    height: 12px;
    background: #7c3aed;
    border: 3px solid #ede9fe;
    border-radius: 50%;
    margin-top: 12px;
}
.fmo-timeline-body {
    background: #fff;
    border: 1px solid #e9d5ff;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 6px 16px rgba(76, 29, 149, .05);
}
.fmo-timeline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}
.fmo-timeline-meta strong { font-size: 15px; color: #111827; }
.fmo-timeline-meta span {
    background: #f3f4f6;
    border-radius: 999px;
    padding: 3px 8px;
    color: #374151;
    font-size: 12px;
    font-weight: 800;
}
.fmo-timeline-meta small { color: #667085; font-weight: 800; }
.fmo-timeline-body p { margin: 0 0 8px; color: #111827; }
.fmo-timeline-sub {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}
.fmo-timeline-sub span {
    background: #f8fafc;
    border: 1px solid #eef2ff;
    border-radius: 999px;
    padding: 4px 8px;
    color: #475467;
    font-size: 12px;
    font-weight: 700;
}
.fmo-empty-timeline {
    background: #fff;
    border: 1px dashed #c4b5fd;
    border-radius: 16px;
    padding: 18px;
    color: #6d28d9;
    font-weight: 800;
}
@media (max-width: 900px) {
    .fmo-card-head-inline { flex-direction: column; }
}

/* v3.6 offline mode */
.fmo-offline-center {
    min-width: 230px;
}
.fmo-offline-widget {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 8px 10px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .04);
}
.fmo-offline-widget.offline {
    border-color: #fecaca;
    background: #fef2f2;
}
.fmo-offline-widget.online {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.fmo-offline-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #16a34a;
    display: inline-block;
}
.fmo-offline-widget.offline .fmo-offline-dot {
    background: #dc2626;
}
.fmo-offline-widget strong {
    font-size: 13px;
    color: #111827;
}
.fmo-offline-widget span {
    font-size: 12px;
    color: #475467;
}
.fmo-offline-list {
    flex-basis: 100%;
    display: grid;
    gap: 5px;
    margin-top: 6px;
    max-height: 110px;
    overflow: auto;
}
.fmo-offline-list div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    background: rgba(255,255,255,.72);
    border-radius: 10px;
    padding: 6px 8px;
}
.fmo-offline-list b,
.fmo-offline-list small {
    font-size: 11px;
}
@media (max-width: 900px) {
    .fmo-offline-center {
        min-width: 100%;
    }
}


/* v3.7 Dawagen.Masr / Egypoultry.com style + export/settings */
.fmo-app {
    --fmo-primary: #0f766e;
    --fmo-primary-dark: #115e59;
    --fmo-accent: #f59e0b;
    --fmo-soft: #ecfdf5;
    --fmo-cream: #fffbeb;
    border-color: #99f6e4;
    background:
        radial-gradient(circle at top right, rgba(15,118,110,.10), transparent 34%),
        linear-gradient(180deg, #f0fdfa, #f8fafc 42%, #ffffff);
}
.fmo-topbar {
    background:
        linear-gradient(135deg, rgba(17,94,89,.97), rgba(15,118,110,.94)),
        radial-gradient(circle at left, rgba(245,158,11,.28), transparent 38%);
    border-bottom: 4px solid var(--fmo-accent);
}
.fmo-topbar h2::before {
    content: '🐔 ';
}
.fmo-sidebar button.active {
    background: linear-gradient(135deg, var(--fmo-primary), var(--fmo-primary-dark));
    color: #fff;
}
.fmo-sidebar button:hover {
    background: #ccfbf1;
    color: var(--fmo-primary-dark);
}
.fmo-btn {
    background: var(--fmo-primary);
}
.fmo-btn:hover {
    background: var(--fmo-primary-dark);
}
.fmo-btn.secondary {
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
}
.fmo-screen-head,
.fmo-welcome-card {
    background:
        linear-gradient(135deg, #ecfdf5, #ffffff),
        radial-gradient(circle at left, rgba(245,158,11,.18), transparent 40%);
    border-color: #99f6e4;
}
.fmo-welcome-card h2,
.fmo-current-screen-title {
    color: #064e3b;
}
.fmo-brand-hero {
    background:
        linear-gradient(135deg, #064e3b, #0f766e),
        radial-gradient(circle at left, rgba(245,158,11,.45), transparent 42%);
    color: #fff;
    border-radius: 22px;
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: 0 16px 40px rgba(15, 118, 110, .18);
}
.fmo-brand-hero span {
    display: inline-block;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 999px;
    padding: 6px 12px;
    font-weight: 900;
    margin-bottom: 10px;
}
.fmo-brand-hero h2 {
    margin: 0 0 8px;
    color: #fff;
}
.fmo-brand-hero p {
    margin: 0;
    color: #d1fae5;
}
.fmo-export-card {
    background: linear-gradient(180deg, #ecfdf5, #fff);
    border-color: #99f6e4;
}
.fmo-backup-card {
    background: linear-gradient(180deg, #fffbeb, #fff);
    border-color: #fde68a;
}
.fmo-settings-card {
    background: linear-gradient(180deg, #f0f9ff, #fff);
    border-color: #bae6fd;
}
.fmo-success-note {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 800;
}

/* v3.8 security hardening UI */
.fmo-security-card {
    background: linear-gradient(180deg, #fef2f2, #fff);
    border-color: #fecaca;
}
.fmo-sec-pass td { background: #f0fdf4; }
.fmo-sec-warning td { background: #fffbeb; }
.fmo-sec-danger td { background: #fef2f2; }
.fmo-security-card code {
    direction: ltr;
    display: inline-block;
    background: #111827;
    color: #fff;
    border-radius: 8px;
    padding: 6px 8px;
    font-family: Consolas, Monaco, monospace;
}


/* v3.9 server backup + recovery */
.fmo-server-backup-card {
    background: linear-gradient(180deg, #f8fafc, #ffffff);
    border-color: #cbd5e1;
}
.fmo-server-backup-card code {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 3px 6px;
    direction: ltr;
    display: inline-block;
}
.fmo-warning-note {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 10px 0;
    font-weight: 800;
}
.fmo-danger-note {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 10px 0;
    font-weight: 800;
}


/* v4.0 danger zone */
.fmo-danger-zone-card {
    background: linear-gradient(180deg, #fff1f2, #ffffff);
    border-color: #fecdd3;
}
.fmo-danger-zone-card h3 {
    color: #991b1b;
}
.fmo-check-line {
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: #fff;
    border: 1px solid #fecdd3;
    border-radius: 14px;
    padding: 12px 14px;
    margin: 12px 0;
    font-weight: 800;
}
.fmo-check-line input {
    width: auto !important;
}


/* v4.3 manager report fix */
.fmo-manager-paper {
    background: #fff;
    border: 1px solid #dbeafe;
    border-radius: 18px;
    padding: 18px;
}
.fmo-report-brand {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    background: linear-gradient(135deg, #064e3b, #0f766e);
    color: #fff;
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.fmo-report-brand span {
    color: #d1fae5;
}
.fmo-whatsapp-preview {
    white-space: pre-wrap;
    direction: rtl;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 12px;
    line-height: 1.8;
}
@media print {
    body * { visibility: hidden; }
    #fmo-manager-printable-report, #fmo-manager-printable-report * { visibility: visible; }
    #fmo-manager-printable-report {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
        border: 0;
    }
}


/* v4.4 full review */
.fmo-expense-card {
    background: linear-gradient(180deg, #fff7ed, #ffffff);
    border-color: #fed7aa;
}


/* v4.5 detailed user access */
.fmo-chip {
    display: inline-block;
    background: #ecfeff;
    color: #0e7490;
    border: 1px solid #a5f3fc;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 900;
    margin-inline-start: 6px;
}
.fmo-access-modal {
    width: min(1120px, 96vw);
}
.fmo-access-box {
    border-color: #99f6e4;
    background: linear-gradient(180deg, #f0fdfa, #ffffff);
}
.fmo-access-box .fmo-checklist {
    max-height: 360px;
    overflow: auto;
}
.fmo-modal-close {
    float: left;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 0;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 900;
    cursor: pointer;
}


/* v4.6 sign out + cash calculator */
.fmo-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.fmo-signout-btn {
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.fmo-cash-card {
    border-color: #bbf7d0;
    background: linear-gradient(180deg, #f0fdf4, #ffffff);
}
.fmo-cash-quick {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}
.fmo-cash-rows {
    display: grid;
    gap: 10px;
}
.fmo-cash-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr) minmax(120px, auto) auto;
    gap: 8px;
    align-items: end;
    background: #fff;
    border: 1px solid #dcfce7;
    border-radius: 14px;
    padding: 10px;
}
.fmo-cash-row > span {
    font-weight: 900;
    padding-bottom: 12px;
}
.fmo-cash-row [data-cash-line-total] {
    background: #ecfdf5;
    color: #065f46;
    border-radius: 12px;
    padding: 11px 12px;
    text-align: center;
}
.fmo-cash-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #065f46, #0f766e);
    color: #fff;
    border-radius: 18px;
    padding: 15px 18px;
    margin-top: 14px;
}
.fmo-cash-total strong {
    font-size: 28px;
    color: #fff;
}
@media(max-width:720px) {
    .fmo-cash-quick,
    .fmo-cash-row {
        grid-template-columns: 1fr;
    }
    .fmo-cash-row > span {
        padding-bottom: 0;
    }
}


/* v4.7 cash calculator redesign + advanced users */
.fmo-calc-first {
    grid-column: 1 / -1;
}
.fmo-cash-card {
    border: 1px solid #86efac !important;
    background:
        radial-gradient(circle at top left, rgba(16,185,129,.12), transparent 38%),
        linear-gradient(180deg, #f0fdf4, #ffffff) !important;
}
.fmo-cash-head {
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(220px, 320px);
    gap: 16px;
    align-items: start;
    margin-bottom: 16px;
}
.fmo-cash-total {
    margin: 0 !important;
    box-shadow: 0 14px 30px rgba(6,95,70,.18);
}
.fmo-cash-quick {
    grid-template-columns: minmax(0,1fr) auto !important;
    background: #fff;
    border: 1px solid #dcfce7;
    border-radius: 16px;
    padding: 12px;
}
.fmo-cash-table-head,
.fmo-cash-row {
    display: grid !important;
    grid-template-columns: minmax(100px,1fr) 34px minmax(100px,1fr) minmax(130px,160px) 80px !important;
    gap: 8px;
    align-items: center !important;
}
.fmo-cash-table-head {
    color: #065f46;
    font-weight: 900;
    padding: 0 10px 6px;
}
.fmo-cash-row {
    background: #ffffff !important;
    border: 1px solid #bbf7d0 !important;
    border-radius: 16px !important;
    padding: 10px !important;
}
.fmo-cash-row input {
    min-height: 42px !important;
    text-align: center;
    font-size: 16px;
    font-weight: 800;
}
.fmo-cash-x {
    text-align: center;
    color: #64748b;
    font-size: 20px;
    font-weight: 900;
}
.fmo-cash-row [data-cash-line-total] {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5 !important;
    color: #047857 !important;
    border: 1px solid #bbf7d0;
    font-size: 18px;
}
.fmo-email-settings-card {
    border-color: #bfdbfe;
    background: linear-gradient(180deg, #eff6ff, #ffffff);
}
.fmo-access-modal .fmo-form > .fmo-grid.two {
    margin-bottom: 12px;
}
.fmo-farm-checks {
    border-color: #c7d2fe;
    background: #f8faff;
}
@media(max-width:720px) {
    .fmo-cash-head,
    .fmo-cash-quick,
    .fmo-cash-table-head,
    .fmo-cash-row {
        grid-template-columns: 1fr !important;
    }
    .fmo-cash-table-head {
        display: none !important;
    }
}


/* v4.8 calculator categories */
.fmo-calc-hero {
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
    border-color: #99f6e4;
}
.fmo-calc-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.fmo-calc-category {
    background: #ffffff;
    border-color: #d1fae5;
}
.fmo-calc-category h3 {
    margin-top: 0;
    color: #064e3b;
}
.fmo-calc-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.fmo-calc-nav-btn {
    border: 1px solid #a7f3d0;
    background: #f0fdf4;
    color: #065f46;
    border-radius: 999px;
    padding: 9px 12px;
    font-weight: 900;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fmo-calc-nav-btn.active,
.fmo-calc-nav-btn:hover {
    background: #0f766e;
    color: #fff;
    border-color: #0f766e;
}
.fmo-calc-card {
    display: none;
}
.fmo-calc-card.active {
    display: block;
}
.fmo-calc-cards .fmo-card.active {
    grid-column: 1 / -1;
}
.fmo-calc-card .fmo-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.fmo-calc-card .fmo-result {
    margin-top: 12px;
    background: #f8fafc;
    border-radius: 14px;
    padding: 12px;
}
@media(max-width:1000px){
    .fmo-calc-category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .fmo-calc-card .fmo-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media(max-width:720px){
    .fmo-calc-category-grid,
    .fmo-calc-card .fmo-form { grid-template-columns: 1fr; }
}


/* v4.9 calculator polish: icons, cash direct rows, eggs/trays */
.fmo-calc-nav-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    min-height: 44px;
    text-align: right;
}
.fmo-calc-icon {
    width: 34px;
    height: 34px;
    min-width: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    font-size: 18px;
    line-height: 1;
}
.fmo-calc-nav-btn.active .fmo-calc-icon {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.45);
}
.fmo-calc-label {
    flex: 1;
    line-height: 1.35;
    font-weight: 900;
}
.fmo-cash-card .fmo-cash-head {
    align-items: stretch;
}
.fmo-cash-table-head {
    grid-template-columns: minmax(100px,1fr) 34px minmax(100px,1fr) minmax(130px,160px) 80px !important;
}
.fmo-cash-row {
    grid-template-columns: minmax(100px,1fr) 34px minmax(100px,1fr) minmax(130px,160px) 80px !important;
}
.fmo-cash-direct-box {
    margin-top: 16px;
    background: #fff;
    border: 1px dashed #86efac;
    border-radius: 16px;
    padding: 12px;
}
.fmo-cash-direct-box h4 {
    margin: 0 0 4px;
    color: #065f46;
}
.fmo-cash-direct-head,
.fmo-cash-direct-row {
    display: grid;
    grid-template-columns: minmax(140px,1fr) minmax(120px,180px) minmax(130px,160px) 80px;
    gap: 8px;
    align-items: center;
}
.fmo-cash-direct-head {
    color: #065f46;
    font-weight: 900;
    padding: 8px 0 6px;
}
.fmo-cash-direct-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 10px;
    margin-top: 8px;
}
.fmo-cash-direct-row input {
    min-height: 42px !important;
    text-align: center;
    font-weight: 800;
}
.fmo-cash-direct-row [data-cash-direct-total] {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    font-size: 18px;
}
@media(max-width:720px) {
    .fmo-cash-table-head,
    .fmo-cash-row,
    .fmo-cash-direct-head,
    .fmo-cash-direct-row {
        grid-template-columns: 1fr !important;
    }
    .fmo-cash-table-head,
    .fmo-cash-direct-head {
        display: none !important;
    }
}


/* v5.0 daily date/time auto controls */
.fmo-daily-time-tools {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 10px 12px;
}
.fmo-daily-time-tools .fmo-btn {
    white-space: nowrap;
}


/* v5.1 navigation + task notifications */
.fmo-nav-controls {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
}
.fmo-nav-controls .fmo-btn[disabled],
.fmo-floating-nav button[disabled] {
    opacity: .45;
    cursor: not-allowed;
}
.fmo-floating-nav {
    position: sticky;
    bottom: 8px;
    z-index: 30;
    display: none;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255,255,255,.88);
    backdrop-filter: blur(8px);
    border-top: 1px solid #e2e8f0;
}
.fmo-floating-nav button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 900;
    color: #fff;
    background: #0f766e;
    cursor: pointer;
}
.fmo-floating-nav button:first-child,
.fmo-floating-nav button:last-child {
    background: #f8fafc;
    color: #0f766e;
    border: 1px solid #99f6e4;
}
.fmo-task-focus {
    animation: fmoTaskPulse 1.1s ease-in-out 0s 5;
    outline: 3px solid #f59e0b;
    outline-offset: -3px;
}
@keyframes fmoTaskPulse {
    0%,100% { background: #fff7ed; }
    50% { background: #ffedd5; }
}
.fmo-notify-item small::after {
    content: ' ← اضغط للفتح';
    color: #0f766e;
    font-weight: 900;
}
@media(max-width: 820px) {
    .fmo-floating-nav { display: flex; }
    .fmo-nav-controls { width: 100%; }
    .fmo-nav-controls .fmo-btn { flex: 1; }
}


/* v5.2 reception batch/date-time improvements */
.fmo-batch-empty-note {
    grid-column: 1 / -1;
    margin: 0 0 4px;
}
.fmo-form select[name="batch_id"] {
    background-color: #fff !important;
    cursor: pointer;
}
.fmo-form select[name="batch_id"]:disabled {
    opacity: .65;
    cursor: not-allowed;
}


/* v5.3 subscription and farm licensing */
.fmo-subscription-card {
    border-color: #bbf7d0;
    background:
        radial-gradient(circle at top left, rgba(16,185,129,.12), transparent 36%),
        linear-gradient(180deg, #f0fdf4, #ffffff);
}
.fmo-payment-box {
    display: grid;
    gap: 4px;
    background: #052e16;
    color: #fff;
    border-radius: 16px;
    padding: 14px 16px;
    margin: 12px 0;
    border: 2px solid #22c55e;
}
.fmo-payment-box span {
    font-size: 26px;
    font-weight: 900;
    direction: ltr;
}
.fmo-payment-box small {
    color: #bbf7d0;
}
.fmo-sub-amount {
    grid-column: 1 / -1;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    padding: 12px 14px;
    font-weight: 900;
}
.fmo-sub-amount strong {
    font-size: 24px;
}
.fmo-license-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    border-radius: 999px;
    padding: 5px 10px;
    font-weight: 900;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #334155;
}
.fmo-license-badge.pending {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}
.fmo-license-badge.approved,
.fmo-license-badge.active {
    background: #ecfdf5;
    border-color: #a7f3d0;
    color: #065f46;
}
.fmo-license-badge.rejected,
.fmo-license-badge.expired,
.fmo-license-badge.paused {
    background: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}
.fmo-small-input {
    max-width: 150px;
    min-height: 34px !important;
    margin: 3px;
}


/* v5.4 gateway, renewal and quick batch */
.fmo-license-gate {
    border-radius: 22px;
    padding: 18px;
    margin-bottom: 16px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .06);
}
.fmo-license-gate h3 {
    margin: 0 0 8px;
}
.fmo-license-gate p {
    margin: 0 0 12px;
    font-weight: 700;
}
.fmo-license-gate.new-user,
.fmo-license-gate.pending {
    background: linear-gradient(135deg, #ecfdf5, #ffffff);
    border-color: #86efac;
    color: #064e3b;
}
.fmo-license-gate.rejected {
    background: linear-gradient(135deg, #fef2f2, #ffffff);
    border-color: #fecaca;
    color: #991b1b;
}
.fmo-license-gate.active-soon {
    background: linear-gradient(135deg, #fffbeb, #ffffff);
    border-color: #fde68a;
    color: #92400e;
}
.fmo-quick-batch-card {
    border-color: #bfdbfe;
    background:
        radial-gradient(circle at top left, rgba(59,130,246,.10), transparent 34%),
        linear-gradient(180deg, #eff6ff, #ffffff);
}
.fmo-quick-batch-card h3::before {
    content: '⚡ ';
}

/* v5.5 owner notifications and broadcast */
.fmo-broadcast-card {
    border-color: #c4b5fd;
    background:
        radial-gradient(circle at top left, rgba(139,92,246,.12), transparent 36%),
        linear-gradient(180deg, #f5f3ff, #ffffff);
}
.fmo-notify-item em {
    display: inline-flex;
    width: fit-content;
    margin-top: 5px;
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
    border-radius: 999px;
    padding: 3px 8px;
    font-size: 11px;
    font-style: normal;
    font-weight: 900;
}
.fmo-whatsapp-outbox {
    margin-top: 14px;
    background: #ffffff;
    border: 1px dashed #c4b5fd;
    border-radius: 16px;
    padding: 12px;
}
.fmo-whatsapp-outbox h4 {
    margin: 0 0 4px;
    color: #5b21b6;
}


/* v5.7 WhatsApp API settings */
.fmo-whatsapp-api-note {
    grid-column: 1 / -1;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    border-radius: 14px;
    padding: 10px 12px;
    font-weight: 700;
}
.fmo-chip.success {
    background: #dcfce7;
    color: #166534;
    border-color: #86efac;
}
.fmo-chip.danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}


/* =========================
   v6.0 SaaS UI / Design System
   ========================= */
#fmo-app {
    --fmo-primary: #0f766e;
    --fmo-primary-2: #14b8a6;
    --fmo-dark: #0f172a;
    --fmo-muted: #64748b;
    --fmo-line: #e2e8f0;
    --fmo-soft: #f8fafc;
    --fmo-success: #16a34a;
    --fmo-warning: #d97706;
    --fmo-danger: #dc2626;
    --fmo-radius: 20px;
    --fmo-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}
#fmo-app .fmo-card {
    border: 1px solid var(--fmo-line);
    border-radius: var(--fmo-radius);
    box-shadow: var(--fmo-shadow);
    background: #fff;
}
#fmo-app .fmo-card h3 {
    letter-spacing: -.2px;
}
#fmo-app .fmo-btn,
#fmo-app button.fmo-btn,
#fmo-app .fmo-quick-actions button,
#fmo-app .fmo-role-action,
#fmo-app .fmo-wizard-steps button {
    transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}
#fmo-app .fmo-btn:hover,
#fmo-app .fmo-quick-actions button:hover,
#fmo-app .fmo-role-action:hover,
#fmo-app .fmo-wizard-steps button:hover {
    transform: translateY(-1px);
}
#fmo-app.fmo-loading {
    opacity: .72;
    pointer-events: none;
}
#fmo-app.fmo-loading::after {
    content: 'جاري تحميل البيانات...';
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    background: #0f172a;
    color: #fff;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 14px 35px rgba(15,23,42,.2);
    font-weight: 800;
}
.fmo-v6-pill {
    display: inline-flex;
    padding: 6px 12px;
    border-radius: 999px;
    background: #ccfbf1;
    color: #115e59;
    font-weight: 900;
    margin-bottom: 8px;
}
.fmo-welcome-card.v6 {
    background:
        radial-gradient(circle at 20% 0%, rgba(20,184,166,.22), transparent 36%),
        linear-gradient(135deg, #0f172a, #134e4a);
    color: #fff;
    border-radius: 28px;
    padding: 24px;
    box-shadow: 0 22px 60px rgba(15,23,42,.18);
}
.fmo-welcome-card.v6 p,
.fmo-welcome-card.v6 h2 {
    color: #fff;
}
.fmo-welcome-card.v6 .fmo-quick-actions button {
    background: rgba(255,255,255,.14);
    color: #fff;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 16px;
}

/* Role dashboard */
.fmo-role-dashboard {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 16px;
    margin: 16px 0;
}
.fmo-role-head {
    border-radius: 24px;
    padding: 18px;
    background: linear-gradient(180deg, #ecfeff, #ffffff);
    border: 1px solid #bae6fd;
    box-shadow: var(--fmo-shadow);
}
.fmo-role-head span,
.fmo-role-head small {
    display: block;
    color: var(--fmo-muted);
    font-weight: 700;
}
.fmo-role-head strong {
    display: block;
    font-size: 24px;
    color: var(--fmo-dark);
    margin: 6px 0;
}
.fmo-role-actions {
    display: grid;
    grid-template-columns: repeat(4, minmax(150px, 1fr));
    gap: 12px;
}
.fmo-role-action {
    text-align: right;
    border: 1px solid var(--fmo-line);
    background: #fff;
    border-radius: 22px;
    padding: 16px;
    min-height: 128px;
    cursor: pointer;
    box-shadow: var(--fmo-shadow);
}
.fmo-role-action span {
    display: inline-flex;
    font-size: 28px;
    margin-bottom: 10px;
}
.fmo-role-action strong,
.fmo-role-action small {
    display: block;
}
.fmo-role-action small {
    color: var(--fmo-muted);
    margin-top: 6px;
    line-height: 1.5;
}

/* License summary */
.fmo-license-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 22px;
    margin-bottom: 14px;
    border: 1px solid var(--fmo-line);
    background: #fff;
    box-shadow: var(--fmo-shadow);
}
.fmo-license-summary div {
    padding: 12px;
    border-radius: 16px;
    background: #f8fafc;
}
.fmo-license-summary span {
    display: block;
    color: var(--fmo-muted);
    font-size: 12px;
    font-weight: 800;
}
.fmo-license-summary strong {
    display: block;
    font-size: 20px;
    color: var(--fmo-dark);
}
.fmo-license-summary.active {
    border-color: #86efac;
}
.fmo-license-summary.warning {
    border-color: #fcd34d;
    background: #fffbeb;
}
.fmo-license-summary.danger {
    border-color: #fecaca;
    background: #fef2f2;
}

/* Wizard */
.fmo-wizard-card {
    background: #fff;
    border: 1px solid var(--fmo-line);
    border-radius: 24px;
    padding: 18px;
    margin: 16px 0;
    box-shadow: var(--fmo-shadow);
}
.fmo-wizard-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}
.fmo-wizard-title strong {
    font-size: 20px;
}
.fmo-wizard-title span {
    color: var(--fmo-muted);
    font-weight: 900;
}
.fmo-progress {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 14px;
}
.fmo-progress i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--fmo-primary), var(--fmo-primary-2));
    border-radius: 999px;
}
.fmo-wizard-steps {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
}
.fmo-wizard-steps button {
    border: 1px solid var(--fmo-line);
    border-radius: 18px;
    background: #f8fafc;
    padding: 12px;
    text-align: right;
    cursor: pointer;
}
.fmo-wizard-steps button.done {
    border-color: #86efac;
    background: #ecfdf5;
}
.fmo-wizard-steps button.todo {
    border-style: dashed;
}
.fmo-wizard-steps b {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--fmo-dark);
    color: #fff;
    margin-bottom: 8px;
}
.fmo-wizard-steps strong,
.fmo-wizard-steps small {
    display: block;
}
.fmo-wizard-steps small {
    color: var(--fmo-muted);
}

/* Notifications hub */
.fmo-card-headline {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}
.fmo-card-headline h3,
.fmo-card-headline p {
    margin: 0;
}
.fmo-notification-list {
    display: grid;
    gap: 8px;
}
.fmo-notification-row {
    border: 1px solid var(--fmo-line);
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 5px 8px;
    text-align: right;
    cursor: pointer;
}
.fmo-notification-row span {
    grid-row: span 3;
    color: var(--fmo-primary);
    font-size: 24px;
    line-height: 1;
}
.fmo-notification-row strong,
.fmo-notification-row small,
.fmo-notification-row em {
    display: block;
}
.fmo-notification-row small {
    color: var(--fmo-muted);
}
.fmo-notification-row.read {
    opacity: .62;
}
.fmo-notification-row.danger {
    border-color: #fecaca;
    background: #fff7f7;
}
.fmo-notification-row.warning {
    border-color: #fde68a;
    background: #fffbeb;
}
.fmo-notify-toolbar {
    display: flex;
    gap: 8px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--fmo-line);
}

/* Batch cards and empty states */
.fmo-batch-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    gap: 10px;
}
.fmo-batch-card {
    border: 1px solid var(--fmo-line);
    border-radius: 18px;
    padding: 12px;
    background: #f8fafc;
}
.fmo-batch-card div {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}
.fmo-batch-card strong {
    color: var(--fmo-dark);
}
.fmo-batch-card span,
.fmo-batch-card p {
    color: var(--fmo-muted);
}
.fmo-batch-card b {
    font-size: 22px;
    color: var(--fmo-primary);
}
.fmo-empty-state {
    display: grid;
    justify-items: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
    border: 1px dashed #cbd5e1;
    border-radius: 20px;
    background: #f8fafc;
}
.fmo-empty-state span {
    font-size: 42px;
}
.fmo-empty-state strong {
    color: var(--fmo-dark);
}
.fmo-empty-state small {
    color: var(--fmo-muted);
}

/* Broadcast / WhatsApp command center */
.fmo-broadcast-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 12px 0;
}
.fmo-broadcast-stats div {
    background: #f8fafc;
    border: 1px solid var(--fmo-line);
    border-radius: 16px;
    padding: 12px;
}
.fmo-broadcast-stats span {
    display: block;
    color: var(--fmo-muted);
    font-weight: 800;
}
.fmo-broadcast-stats strong {
    display: block;
    font-size: 24px;
    color: var(--fmo-dark);
}
.fmo-error-text {
    color: var(--fmo-danger);
    font-weight: 800;
}

/* Mobile polish */
@media (max-width: 980px) {
    .fmo-role-dashboard {
        grid-template-columns: 1fr;
    }
    .fmo-role-actions,
    .fmo-wizard-steps,
    .fmo-grid.fmo-kpis.v6,
    .fmo-license-summary,
    .fmo-broadcast-stats {
        grid-template-columns: 1fr 1fr;
    }
}
@media (max-width: 640px) {
    #fmo-app {
        font-size: 15px;
    }
    .fmo-welcome-card.v6 {
        padding: 18px;
        border-radius: 22px;
    }
    .fmo-role-actions,
    .fmo-wizard-steps,
    .fmo-grid.fmo-kpis.v6,
    .fmo-license-summary,
    .fmo-broadcast-stats,
    .fmo-batch-card-grid {
        grid-template-columns: 1fr;
    }
    .fmo-card,
    .fmo-role-action,
    .fmo-wizard-card {
        border-radius: 18px !important;
    }
    .fmo-form button[type="submit"] {
        position: sticky;
        bottom: 72px;
        z-index: 50;
        width: 100%;
        box-shadow: 0 12px 32px rgba(15,23,42,.18);
    }
    .fmo-table-wrap table,
    .fmo-table-wrap thead,
    .fmo-table-wrap tbody,
    .fmo-table-wrap th,
    .fmo-table-wrap td,
    .fmo-table-wrap tr {
        font-size: 13px;
    }
    .fmo-notify-panel {
        position: fixed !important;
        right: 10px !important;
        left: 10px !important;
        width: auto !important;
        max-height: 75vh;
        overflow: auto;
    }
}


/* v6.2 stability polish: hide system admin from public UI + stop mobile horizontal drift */
html:has(#fmo-app),
body:has(#fmo-app),
html:has(.fmo-login-shell),
body:has(.fmo-login-shell) {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}
body:has(#fmo-app) .entry-content,
body:has(#fmo-app) .wp-block-post-content,
body:has(#fmo-app) .page-content,
body:has(#fmo-app) .post-content,
body:has(.fmo-login-shell) .entry-content,
body:has(.fmo-login-shell) .wp-block-post-content,
body:has(.fmo-login-shell) .page-content,
body:has(.fmo-login-shell) .post-content {
    overflow-x: clip !important;
}
.fmo-app,
.fmo-login-shell.fmo-login-portal,
.entry-content > .fmo-app,
.wp-block-post-content > .fmo-app,
.page-content > .fmo-app,
.post-content > .fmo-app {
    right: auto !important;
    left: auto !important;
    transform: none !important;
    max-width: min(1380px, calc(100vw - 16px)) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
#fmo-app,
.fmo-dashboard-shell,
.fmo-layout,
.fmo-content,
.fmo-tab,
.fmo-card,
.fmo-screen-head,
.fmo-topbar,
.fmo-role-dashboard,
.fmo-wizard-card,
.fmo-license-summary,
.fmo-table-wrap {
    min-width: 0 !important;
    max-width: 100% !important;
}
.fmo-topbar,
.fmo-screen-head,
.fmo-card-headline,
.fmo-entry-actions,
.fmo-top-actions,
.fmo-nav-controls {
    flex-wrap: wrap !important;
}
.fmo-sidebar button,
.fmo-role-card,
.fmo-role-action,
.fmo-wizard-steps button,
.fmo-btn {
    font-family: Tahoma, Arial, 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif !important;
}
.fmo-sidebar button {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    white-space: normal !important;
    word-break: break-word;
}
.fmo-role-icon,
.fmo-calc-icon,
.fmo-role-action span,
.fmo-empty-state span {
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', Tahoma, sans-serif !important;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 768px) {
    .fmo-app,
    .fmo-login-shell.fmo-login-portal,
    .entry-content > .fmo-app,
    .wp-block-post-content > .fmo-app,
    .page-content > .fmo-app,
    .post-content > .fmo-app {
        width: calc(100vw - 10px) !important;
        max-width: calc(100vw - 10px) !important;
        margin: 6px auto !important;
        border-radius: 12px !important;
    }
    .fmo-layout { display: block !important; }
    .fmo-sidebar {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto !important;
        overflow-y: visible !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    .fmo-menu-group {
        min-width: 0 !important;
    }
    .fmo-sidebar button {
        min-width: 128px !important;
        max-width: 210px !important;
        flex: 0 0 auto;
        text-align: center !important;
        justify-content: center;
    }
    .fmo-content,
    .fmo-entry-gate,
    .fmo-topbar,
    .fmo-screen-head {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
    .fmo-form input,
    .fmo-form select,
    .fmo-form textarea {
        font-size: 16px !important;
    }
    .fmo-table-wrap {
        width: 100% !important;
        overflow-x: auto !important;
    }
    .fmo-table-wrap table {
        min-width: 560px !important;
    }
}
@media (max-width: 420px) {
    .fmo-table-wrap table { min-width: 500px !important; }
    .fmo-sidebar button { min-width: 116px !important; max-width: 180px !important; }
    .fmo-role-action, .fmo-card { padding: 12px !important; }
}
