/*
Theme Name: MHDESIGN Client Portal
Author: OpenAI
Version: 1.0.0
Description: Frontend portal theme for MHDESIGN licenses and customer dashboard.
*/
:root{
  --bg:#f5f7fb;
  --panel:#fff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e5e7eb;
  --blue:#2563eb;
  --blue-dark:#1d4ed8;
  --green:#0f9d58;
  --green-bg:#ecfdf3;
  --amber:#b7791f;
  --amber-bg:#fff8e1;
  --red:#c62828;
  --red-bg:#fff1f2;
  --dark:#0b1220;
  --radius:24px;
  --radius-sm:16px;
  --shadow:0 18px 60px rgba(15,23,42,.08);
  --max:1240px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text);line-height:1.55}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button,input,textarea,select{font:inherit}
input,textarea,select{width:100%;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:#fff}
label{display:block;font-size:14px;font-weight:700;color:var(--text);margin-bottom:8px}
body.admin-bar .mhp-header{top:32px}
.mhp-container{width:min(var(--max),calc(100% - 32px));margin:auto}
.mhp-site-main{min-height:72vh;padding:32px 0 72px}
.mhp-section{padding:24px 0}
.mhp-header{position:sticky;top:0;z-index:70;background:rgba(255,255,255,.88);backdrop-filter:blur(14px);border-bottom:1px solid rgba(229,231,235,.9)}
.mhp-header-row{display:flex;align-items:center;gap:22px;min-height:80px}
.mhp-brand{display:flex;align-items:center;color:var(--dark);flex-shrink:0}
.mhp-logo{height:56px;width:auto;display:block}
.mhp-nav{display:flex;gap:18px;align-items:center}
.mhp-nav a{font-weight:700;color:#334155;padding:10px 0;position:relative}
.mhp-nav a.current::after,.mhp-nav a:hover::after{content:"";position:absolute;right:0;left:0;bottom:-2px;height:2px;background:var(--blue);border-radius:2px}
.mhp-spacer{flex:1}
.mhp-user-nav{display:flex;align-items:center;gap:12px}
.mhp-avatar-wrap{position:relative;padding-bottom:8px}
.mhp-avatar-wrap:hover .mhp-dropdown,.mhp-dropdown:hover{display:block}
.mhp-avatar{width:42px;height:42px;border-radius:50%;overflow:hidden;background:#dbeafe;display:grid;place-items:center;font-weight:800;color:#1d4ed8}
.mhp-avatar img{width:100%;height:100%;object-fit:cover}
.mhp-dropdown{display:none;position:absolute;left:0;top:48px;width:230px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:var(--shadow);padding:10px}
.mhp-dropdown a{display:block;padding:11px 12px;border-radius:12px;color:var(--text);font-weight:700}
.mhp-dropdown a:hover{background:#f8fafc}
.mhp-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border-radius:14px;background:var(--blue);border:1px solid transparent;color:#fff;font-weight:800;cursor:pointer;transition:.18s ease}
.mhp-btn:hover{transform:translateY(-1px);background:var(--blue-dark)}
.mhp-btn.secondary{background:#fff;color:var(--text);border-color:var(--line)}
.mhp-btn.dark{background:var(--dark)}
.mhp-btn.success{background:var(--green)}
.mhp-btn.full{width:100%}
.mhp-hero{background:linear-gradient(135deg,#0b1220,#111827 55%,#1d4ed8);color:#fff;border-radius:32px;padding:56px;display:grid;grid-template-columns:1.1fr .9fr;gap:32px;align-items:center;box-shadow:var(--shadow)}
.mhp-hero h1{margin:0 0 16px;font-size:clamp(34px,5vw,58px);line-height:1.03}
.mhp-hero p{margin:0;color:#dbe2f1;font-size:18px;max-width:700px}
.mhp-hero-points{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
.mhp-point{background:rgba(255,255,255,.08);border:1px solid rgba(255,255,255,.14);padding:14px 16px;border-radius:18px;font-weight:700}
.mhp-hero-card{background:#fff;border-radius:28px;padding:18px;color:var(--text)}
.mhp-hero-card img{border-radius:18px;border:1px solid var(--line)}
.mhp-panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:24px}
.mhp-title{margin:0 0 8px;font-size:clamp(28px,4vw,42px);line-height:1.08}
.mhp-sub{margin:0;color:var(--muted);font-size:16px}
.mhp-grid-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.mhp-grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mhp-feature{padding:24px;border-radius:22px;background:#fff;border:1px solid var(--line);box-shadow:var(--shadow)}
.mhp-feature h3{margin:0 0 10px;font-size:22px}
.mhp-feature p{margin:0;color:var(--muted)}
.mhp-auth-wrap{display:grid;place-items:center;padding:26px 0}
.mhp-auth-card{width:min(560px,100%);background:#fff;border:1px solid var(--line);border-radius:30px;box-shadow:var(--shadow);padding:28px}
.mhp-auth-card.wide{width:min(820px,100%)}
.mhp-auth-head{text-align:center;margin-bottom:18px}
.mhp-auth-head h1{margin:0 0 8px;font-size:36px}
.mhp-auth-head p{margin:0;color:var(--muted)}
.mhp-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.mhp-form-row{margin-bottom:16px}
.mhp-note{font-size:14px;color:var(--muted)}
.mhp-alert{padding:14px 16px;border-radius:14px;margin-bottom:16px;font-weight:700}
.mhp-alert.success{background:var(--green-bg);color:var(--green)}
.mhp-alert.error{background:var(--red-bg);color:var(--red)}
.mhp-dashboard{display:grid;grid-template-columns:340px minmax(0,1fr);gap:22px}
.mhp-sidebar{position:sticky;top:96px;height:fit-content;background:#fff;border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);overflow:hidden}
.mhp-sidebar-cover{height:120px;background:linear-gradient(135deg,#111827,#2563eb)}
.mhp-sidebar-body{padding:22px;text-align:center}
.mhp-profile-head{margin:-54px auto 10px;display:block;width:max-content;border:6px solid #fff;border-radius:50%}
.mhp-profile-head img,.mhp-profile-head .avatar{display:block;margin:0 auto}
.mhp-sidebar h2{margin:0 0 8px;font-size:26px;text-align:center}
.mhp-sidebar p{margin:0 0 16px;color:var(--muted);text-align:center}
.mhp-chip-row{display:flex;flex-wrap:wrap;gap:10px;justify-content:center}
.mhp-chip{display:inline-flex;align-items:center;gap:8px;padding:8px 12px;border-radius:999px;background:#f8fafc;border:1px solid var(--line);font-size:13px;font-weight:800;color:#334155}
.mhp-sidebar-actions{display:grid;gap:10px;margin:16px 0;justify-items:stretch}
.mhp-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.mhp-stat{padding:14px;border-radius:18px;background:#f8fafc;border:1px solid var(--line);text-align:center}
.mhp-stat strong{display:block;font-size:26px;margin-bottom:4px}
.mhp-tabs{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:18px}
.mhp-tab{padding:10px 14px;border-radius:999px;background:#fff;border:1px solid var(--line);font-weight:800;color:#334155}
.mhp-tab.active{background:#dbeafe;border-color:#bfdbfe;color:#1d4ed8}
.mhp-device-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mhp-device-card{background:#fff;border:1px solid var(--line);border-radius:24px;box-shadow:var(--shadow);padding:22px}
.mhp-device-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:14px}
.mhp-device-card h3{margin:0;font-size:24px}
.mhp-status{display:inline-flex;align-items:center;padding:7px 12px;border-radius:999px;font-size:12px;font-weight:900}
.mhp-status.available{background:#eef2ff;color:#4338ca}
.mhp-status.active{background:var(--green-bg);color:var(--green)}
.mhp-status.expired{background:var(--red-bg);color:var(--red)}
.mhp-status.pending{background:var(--amber-bg);color:var(--amber)}
.mhp-meta{display:grid;gap:10px;margin-top:10px}
.mhp-meta div{padding:12px 14px;border-radius:16px;background:#f8fafc;border:1px solid var(--line);font-size:14px}
.mhp-meta strong{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.mhp-inline-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}
.mhp-table-wrap{overflow:auto}
table.mhp-table{width:100%;border-collapse:collapse;background:#fff;border-radius:18px;overflow:hidden}
.mhp-table th,.mhp-table td{padding:14px 16px;border-bottom:1px solid var(--line);text-align:left}
.mhp-table th{background:#f8fafc;font-size:13px;text-transform:uppercase;color:#475569}
.mhp-upload-box{padding:18px;border:1px dashed #cbd5e1;border-radius:18px;background:#f8fafc}
.mhp-footer{background:#fff;border-top:1px solid var(--line)}
.mhp-footer-row{padding:24px 0;display:flex;justify-content:space-between;gap:18px;align-items:center;color:var(--muted)}
.mhp-footer-nav{display:flex;flex-wrap:wrap;gap:16px}
@media (max-width:1100px){.mhp-dashboard,.mhp-hero,.mhp-grid-3,.mhp-grid-2,.mhp-device-grid{grid-template-columns:1fr}.mhp-sidebar{position:static}.mhp-hero-points{grid-template-columns:1fr 1fr}}
@media (max-width:760px){.mhp-nav{display:none}.mhp-header-row{gap:12px}.mhp-container{width:min(var(--max),calc(100% - 20px))}.mhp-hero{padding:24px}.mhp-hero-points,.mhp-form-grid,.mhp-stats{grid-template-columns:1fr}.mhp-auth-card,.mhp-auth-card.wide{padding:20px}.mhp-footer-row{flex-direction:column;align-items:flex-start}}


.mhp-device-grid{align-items:start}
.mhp-device-card{height:100%;display:flex;flex-direction:column}
.mhp-license-row{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:6px}
.mhp-license-row code{padding:8px 10px;border-radius:12px;background:#eef2ff;border:1px solid #c7d2fe;color:#312e81;word-break:break-all}

.mhp-tab-pane{display:none}.mhp-tab-pane.active{display:block}


.mhp-dashboard-main{min-width:0}
.mhp-link-device-wrap{display:flex;justify-content:flex-start}
.mhp-link-device-card{width:100%;max-width:560px}
.mhp-link-device-form .mhp-grid-3{grid-template-columns:1fr}
.mhp-link-device-live-message{margin-top:14px;display:none}
.mhp-link-device-live-message.mhp-alert{display:block}
@media (max-width:1100px){.mhp-link-device-card{max-width:100%}}


/* Dashboard layout hardening */
.mhp-dashboard{grid-template-columns:340px minmax(0,1fr)!important;align-items:start}
.mhp-dashboard > *{min-width:0}
.mhp-dashboard-main{min-width:0;width:100%}
.mhp-dashboard-main .mhp-device-grid{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:18px;align-items:start}
.mhp-dashboard-main .mhp-device-card{min-width:0;height:100%;display:flex;flex-direction:column}
@media (max-width:1100px){.mhp-dashboard{grid-template-columns:1fr!important}.mhp-dashboard-main .mhp-device-grid{grid-template-columns:1fr!important}}


/* ===== RTL mirror pass ===== */
html,body{direction:rtl}
body{text-align:right}
.mhp-header-row,
.mhp-hero,
.mhp-user-nav,
.mhp-device-top,
.mhp-license-row,
.mhp-footer-row,
.mhp-inline-actions,
.mhp-link-device-wrap,
.mhp-pricing-price,
.mhp-pricing-switch,
.mhp-custom-qty,
.mhp-renew-layout,
.mhp-renew-actions,
.mhp-chip-row,
.mhp-tabs,
.mhp-nav,
.mhp-meta,
.mhp-stats,
.mhp-form-grid{direction:rtl}

.mhp-header-row{justify-content:space-between}
.mhp-brand{order:3}
.mhp-nav{order:2;margin-inline:auto}
.mhp-spacer{display:none}
.mhp-user-nav{order:1}
.mhp-avatar-wrap{padding-bottom:8px}
.mhp-dropdown{left:auto;right:0;text-align:right}
.mhp-dropdown a{text-align:right}

.mhp-sidebar,
.mhp-panel,
.mhp-feature,
.mhp-auth-card,
.mhp-device-card,
.mhp-stat,
.mhp-meta div,
.mhp-upload-box,
.mhp-renew-card,
.mhp-transfer-box,
table.mhp-table,
.mhp-link-device-card{direction:rtl;text-align:right}

.mhp-table th,.mhp-table td{text-align:right}
.mhp-footer-row{flex-direction:row-reverse}
.mhp-footer-nav{justify-content:flex-start}
.mhp-link-device-wrap{justify-content:flex-end}
.mhp-nav a.current::after,.mhp-nav a:hover::after{right:0;left:0}

input,textarea,select{direction:rtl;text-align:right}
input[type="email"],
input[type="url"],
input[type="number"],
input[type="tel"],
code,
[dir="ltr"]{direction:ltr;text-align:left}

.mhp-license-row{justify-content:flex-start}
.mhp-inline-actions{justify-content:flex-start}
.mhp-device-top{flex-direction:row-reverse}
.mhp-sidebar-actions .mhp-btn,
.mhp-inline-actions .mhp-btn,
.mhp-pricing-switch .mhp-btn{justify-content:center}

@media (max-width:760px){
  .mhp-header-row{flex-wrap:wrap}
  .mhp-nav{order:4;width:100%;justify-content:center}
  .mhp-user-nav{order:2}
  .mhp-brand{order:3}
  .mhp-footer-row{flex-direction:column;align-items:flex-start}
}


/* ===== Home page redesign ===== */
.mhh-home{padding:10px 0 40px}
.mhh-hero{display:grid;grid-template-columns:1.05fr .95fr;gap:44px;align-items:center;margin:10px 0 50px}
.mhh-hero-media img{width:100%;max-width:640px;margin:0 auto;filter:drop-shadow(0 18px 36px rgba(15,23,42,.08))}
.mhh-kicker{font-size:24px;font-weight:900;color:#c79b22;margin-bottom:10px}
.mhh-hero-copy h1{margin:0 0 18px;font-size:clamp(36px,5vw,66px);line-height:1.18;color:#111827}
.mhh-checks{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:22px}
.mhh-check{position:relative;background:#fff;border:1px solid #ece8dd;border-radius:20px;padding:18px 62px 18px 20px;box-shadow:0 10px 28px rgba(15,23,42,.06);font-weight:700;color:#263041;min-height:88px;display:flex;align-items:center}
.mhh-check::before{content:"✓";position:absolute;right:16px;top:50%;transform:translateY(-50%);width:36px;height:36px;border-radius:12px;border:2px solid #d2ae50;color:#d2ae50;display:grid;place-items:center;font-weight:900;background:#fff8e6}
.mhh-actions{margin-top:16px;text-align:center}
.mhh-cta{min-width:210px;min-height:58px;border-radius:22px;font-size:28px;font-weight:900;box-shadow:0 12px 26px rgba(15,23,42,.08)}
.mhh-section-head{text-align:center;max-width:920px;margin:0 auto 28px}
.mhh-section-head h2{margin:0 0 10px;font-size:clamp(34px,5vw,60px);line-height:1.15;color:#111827}
.mhh-section-head p{margin:0;color:#8b8392;font-size:20px}
.mhh-steps{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0 0 42px}
.mhh-step{background:#fff;border:1px solid #ece8dd;border-radius:24px;padding:24px 22px;box-shadow:0 10px 28px rgba(15,23,42,.06);text-align:center}
.mhh-step-no{display:inline-grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#fff4d6;color:#c79b22;font-size:26px;font-weight:900;margin-bottom:12px}
.mhh-step h3{margin:0 0 8px;font-size:22px;color:#162030}
.mhh-step p{margin:0;color:#8b8392;font-size:16px}
.mhh-split-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:28px;margin-bottom:42px}
.mhh-split-card{background:#fff;border:1px solid #ece8dd;border-radius:26px;box-shadow:0 12px 30px rgba(15,23,42,.06);padding:26px;overflow:hidden}
.mhh-mini{font-size:18px;font-weight:900;color:#c79b22;margin-bottom:8px}
.mhh-copy-card h3{margin:0 0 14px;font-size:clamp(30px,3.2vw,52px);line-height:1.15;color:#111827}
.mhh-copy-card p{margin:0 0 18px;color:#8b8392;font-size:18px}
.mhh-image-card{display:grid;place-items:center;padding:16px}
.mhh-image-card img{width:100%;max-width:520px;border:1px solid #ece8dd;border-radius:22px;background:#fff}
.mhh-pill-list{display:grid;gap:14px}
.mhh-pill{background:#fff;border:1px solid #e9e4d9;border-radius:20px;padding:18px 20px;min-height:96px}
.mhh-pill strong{display:block;font-size:20px;margin-bottom:6px;color:#111827}
.mhh-pill span{display:block;color:#8b8392;font-size:16px}
.mhh-tools-head{margin-top:8px}
.mhh-tools-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;margin-bottom:36px}
.mhh-tool-card{position:relative;background:#fff;border:1px solid #ece8dd;border-radius:22px;padding:22px 22px 18px;box-shadow:0 10px 24px rgba(15,23,42,.06)}
.mhh-tool-icon{position:absolute;left:18px;top:18px;width:38px;height:38px;border-radius:12px;background:#fff4d6;display:grid;place-items:center;font-size:20px}
.mhh-tool-card h3{margin:0 0 8px;font-size:22px;color:#111827;padding-left:44px}
.mhh-tool-card p{margin:0;color:#8b8392;font-size:16px}
.mhh-before-after{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px;margin:18px 0 34px}
.mhh-compare{border-radius:28px;padding:28px;border:1px solid #ece8dd;box-shadow:0 10px 24px rgba(15,23,42,.05)}
.mhh-after{background:#f4fbf7}
.mhh-before{background:#fff6f6}
.mhh-compare h3{margin:0 0 18px;font-size:32px;color:#111827}
.mhh-compare-list{display:grid;gap:14px}
.mhh-compare-list div{background:#fff;border:1px solid #ece8dd;border-radius:18px;padding:14px 18px;font-weight:800;color:#1f2937}
.mhh-cta-band{display:grid;grid-template-columns:.65fr .35fr;gap:24px;align-items:center;background:#f7f0dc;border:1px solid #e5d5aa;border-radius:28px;padding:32px 34px;margin-top:10px;box-shadow:0 12px 30px rgba(15,23,42,.06)}
.mhh-cta-copy h3{margin:0 0 10px;font-size:clamp(30px,3.6vw,50px);line-height:1.2;color:#111827}
.mhh-cta-copy p{margin:0;color:#6b7280;font-size:20px}
.mhh-cta-actions{display:flex;gap:14px;justify-content:flex-start;flex-wrap:wrap}
.mhh-cta-actions .mhp-btn{min-height:58px;padding:0 26px;border-radius:18px;font-size:24px}
.mhh-cta-actions .mhp-btn.success{background:#20b46b}

@media (max-width:1200px){
  .mhh-checks,.mhh-steps,.mhh-tools-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:960px){
  .mhh-hero,.mhh-split-grid,.mhh-before-after,.mhh-cta-band{grid-template-columns:1fr}
  .mhh-hero-copy{text-align:center}
  .mhh-checks{grid-template-columns:1fr}
  .mhh-split-card,.mhh-cta-band{padding:22px}
}
@media (max-width:760px){
  .mhh-home{padding-top:0}
  .mhh-kicker{font-size:20px}
  .mhh-hero-copy h1,.mhh-section-head h2{font-size:38px}
  .mhh-steps,.mhh-tools-grid{grid-template-columns:1fr}
  .mhh-cta-actions{justify-content:center}
  .mhh-cta-actions .mhp-btn,.mhh-cta{width:100%}
}


html{scroll-behavior:smooth;}
.mhh-check{display:flex;text-decoration:none;color:inherit;cursor:pointer;}


/* ===== Footer final fix ===== */
.mhd-footer-elite{
  background:#1f2b33 !important;
  padding:56px 0 52px !important;
  margin-top:30px !important;
  direction:ltr !important;
  color:#fff !important;
}
.mhd-footer-elite *{box-sizing:border-box}
.mhd-footer-elite .mhd-footer-inner{
  width:min(1200px,calc(100% - 48px));
  margin:0 auto;
  display:grid !important;
  grid-template-columns:1.35fr 1fr 1fr;
  gap:48px;
  align-items:start;
  direction:ltr !important;
}
.mhd-footer-elite .mhd-footer-col{min-width:0;text-align:left !important}
.mhd-footer-elite h3,
.mhd-footer-elite h4{
  margin:0 0 22px !important;
  color:#fff !important;
  font-size:22px !important;
  font-weight:800 !important;
  line-height:1.2 !important;
  text-transform:uppercase;
}
.mhd-footer-elite p{
  margin:0 0 14px !important;
  color:#fff !important;
  font-size:15px !important;
  line-height:1.45 !important;
  max-width:420px;
}
.mhd-footer-elite .mhd-footer-contact p{font-size:16px !important}
.mhd-footer-elite .mhd-footer-payments{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:20px;
  align-items:center;
}
.mhd-footer-elite .mhd-footer-payments img{
  height:30px;
  width:auto;
  display:block;
}
.mhd-footer-elite .mhd-footer-socials{
  display:flex;
  align-items:center;
  gap:16px;
  margin:4px 0 18px;
}
.mhd-footer-elite .mhd-footer-socials a{
  color:#fff !important;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
}
.mhd-footer-elite .mhd-footer-socials img{width:28px;height:28px;display:block;object-fit:contain}
.mhd-footer-elite .mhd-paymob-logo{margin-top:10px}
.mhd-footer-elite .mhd-paymob-logo img{width:170px;height:auto;display:block}
@media (max-width:980px){
  .mhd-footer-elite .mhd-footer-inner{grid-template-columns:1fr;gap:28px}
  .mhd-footer-elite .mhd-footer-col{text-align:center !important}
  .mhd-footer-elite p{max-width:none}
  .mhd-footer-elite .mhd-footer-payments,
  .mhd-footer-elite .mhd-footer-socials{justify-content:center}
  .mhd-footer-elite .mhd-paymob-logo{text-align:center}
}


/* ===== Mobile header menu only ===== */
.mhp-mobile-only{display:none}
.mhp-mobile-menu-checkbox{display:none}
.mhp-mobile-menu-button{display:none}
.mhp-mobile-menu-overlay{display:none}
.mhp-mobile-menu-panel{display:none}

@media (max-width:760px){
  .mhp-header-row{flex-wrap:nowrap;justify-content:space-between;align-items:center}
  .mhp-brand{order:1;margin-inline-end:auto}
  .mhp-mobile-only{order:3;display:block}
  .mhp-nav,.mhp-user-nav,.mhp-spacer{display:none!important}

  .mhp-mobile-menu-button{
    width:46px;height:46px;border-radius:14px;border:1px solid var(--line);background:#fff;
    display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;
    cursor:pointer;box-shadow:0 8px 24px rgba(15,23,42,.08)
  }
  .mhp-mobile-menu-button span{
    display:block;width:20px;height:2px;background:#111827;border-radius:999px
  }

  .mhp-mobile-menu-overlay{
    position:fixed;inset:0;background:rgba(15,23,42,.38);opacity:0;visibility:hidden;
    transition:.2s ease;z-index:98
  }
  .mhp-mobile-menu-panel{
    display:block;position:fixed;top:0;right:0;width:min(86vw,340px);height:100vh;background:#fff;
    z-index:99;transform:translateX(100%);transition:.24s ease;padding:18px 16px 22px;
    box-shadow:-18px 0 44px rgba(15,23,42,.14);overflow:auto;text-align:right
  }
  .mhp-mobile-menu-checkbox:checked ~ .mhp-mobile-menu-overlay{display:block;opacity:1;visibility:visible}
  .mhp-mobile-menu-checkbox:checked ~ .mhp-mobile-menu-panel{transform:translateX(0)}

  .mhp-mobile-menu-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
  .mhp-mobile-menu-head strong{font-size:18px}
  .mhp-mobile-menu-close{font-size:32px;line-height:1;cursor:pointer;color:#0f172a}
  .mhp-mobile-links,.mhp-mobile-account-links{display:grid;gap:8px}
  .mhp-mobile-links{margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}
  .mhp-mobile-links a,.mhp-mobile-account-links a{
    display:block;padding:13px 14px;border:1px solid var(--line);border-radius:14px;background:#fff;
    color:#0f172a;font-weight:800
  }
  .mhp-mobile-links a.current,.mhp-mobile-account-links a.current{background:#eff6ff;border-color:#bfdbfe;color:#1d4ed8}
}

/* ===== Mobile header exact side fix ===== */
@media (max-width:760px){
  .mhp-header-row{
    display:flex !important;
    flex-wrap:nowrap !important;
    align-items:center !important;
    justify-content:space-between !important;
    direction:ltr !important;
  }

  .mhp-brand{
    order:1 !important;
    margin:0 !important;
    margin-right:auto !important;
    margin-left:0 !important;
    flex-shrink:0 !important;
  }

  .mhp-mobile-only{
    order:2 !important;
    display:block !important;
    margin:0 !important;
    margin-left:auto !important;
    margin-right:0 !important;
    flex-shrink:0 !important;
  }

  .mhp-nav,
  .mhp-user-nav,
  .mhp-spacer{
    display:none !important;
  }

  .mhp-mobile-menu-button{
    display:flex !important;
  }

  .mhp-mobile-menu-panel{
    right:0 !important;
    left:auto !important;
    direction:rtl !important;
    text-align:right !important;
  }
}

/* ===== Dashboard sidebar small stats: center content only ===== */
.mhp-sidebar .mhp-stats .mhp-stat{
  text-align:center !important;
}

.mhp-sidebar .mhp-stats .mhp-stat strong,
.mhp-sidebar .mhp-stats .mhp-stat span,
.mhp-sidebar .mhp-stats .mhp-stat small,
.mhp-sidebar .mhp-stats .mhp-stat div,
.mhp-sidebar .mhp-stats .mhp-stat p{
  display:block;
  width:100%;
  text-align:center !important;
  margin-left:auto;
  margin-right:auto;
}


.mhp-phone-ltr{display:inline-block;direction:ltr;unicode-bidi:embed;white-space:nowrap}
.mh-whatsapp-float{position:fixed;right:20px;bottom:20px;width:62px;height:62px;z-index:99999;display:flex;align-items:center;justify-content:center;border-radius:50%;box-shadow:0 8px 26px rgba(0,0,0,.18);background:#25D366;animation:mhdWhatsappPulse 1.8s infinite}
.mh-whatsapp-float img{width:100%;height:100%;display:block;border-radius:50%}
@keyframes mhdWhatsappPulse{0%{transform:scale(1);box-shadow:0 0 0 0 rgba(37,211,102,.40)}70%{transform:scale(1.04);box-shadow:0 0 0 14px rgba(37,211,102,0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(37,211,102,0)}}
@media (max-width:768px){.mh-whatsapp-float{right:16px;bottom:16px;width:56px;height:56px}}


.mhp-phone-combo{display:grid;grid-template-columns:minmax(180px,.9fr) minmax(0,1.3fr);gap:12px;align-items:end}
.mhp-phone-country-wrap,.mhp-phone-number-wrap{min-width:0}
.mhp-phone-country{direction:rtl;text-align:right}
.mhp-lock-timer{margin-top:8px;font-size:14px;font-weight:800}
@media (max-width:760px){.mhp-phone-combo{grid-template-columns:1fr}}


.mhp-accounting-shell{display:grid;gap:20px}
.mhp-accounting-head{display:flex;justify-content:space-between;align-items:flex-start;gap:18px}
.mhp-accounting-head h1{margin:6px 0 8px;font-size:36px}
.mhp-accounting-head p{margin:0;color:var(--muted);max-width:760px}
.mhp-accounting-kicker{display:inline-block;padding:7px 12px;border-radius:999px;background:#dbeafe;color:#1d4ed8;font-weight:800;font-size:13px}
.mhp-accounting-head-actions{display:flex;gap:10px;flex-wrap:wrap}
.mhp-accounting-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.mhp-accounting-filters{display:grid;grid-template-columns:180px 180px minmax(220px,1fr) auto;gap:14px;align-items:end}
.mhp-accounting-filter-actions{display:flex;gap:10px;flex-wrap:wrap}
.mhp-accounting-search input{min-width:220px}
.mhp-accounting-detail{padding:22px;border-radius:22px;background:#f8fafc;border:1px solid var(--line)}
.mhp-accounting-detail-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:18px}
.mhp-accounting-detail-head h2{margin:0 0 6px;font-size:28px}
.mhp-accounting-detail-head p{margin:0;color:var(--muted)}
.mhp-accounting-table td .mhp-btn{min-height:40px;padding:0 14px}
@media print{.mhp-header,.mhp-footer,.mhp-accounting-head-actions,.mhp-accounting-filters,.mhp-table-wrap,.mhp-mobile-only{display:none!important}.mhp-site-main{padding:0}.mhp-panel{box-shadow:none;border:0;padding:0}.mhp-accounting-detail{background:#fff;border:0;padding:0}}
@media (max-width:1100px){.mhp-accounting-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.mhp-accounting-filters{grid-template-columns:1fr 1fr}.mhp-accounting-search{grid-column:1/-1}.mhp-accounting-filter-actions{grid-column:1/-1}}
@media (max-width:760px){.mhp-accounting-head,.mhp-accounting-detail-head{flex-direction:column}.mhp-accounting-stats,.mhp-accounting-filters{grid-template-columns:1fr}}


.mhp-accounting-head h1{margin-bottom:0}
.mhp-accounting-stats-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.mhp-accounting-filters-compact{grid-template-columns:160px 160px minmax(180px,1fr) auto;gap:12px}
.mhp-accounting-filters-compact label{font-size:12px;margin-bottom:6px;display:block}
.mhp-accounting-filters-compact input{min-height:44px}
.mhp-accounting-bulk-form{display:grid;gap:14px}
.mhp-accounting-bulkbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.mhp-check-all{display:inline-flex;align-items:center;gap:8px;font-weight:800;color:#0f172a}
.mhp-col-check{width:56px;text-align:center!important}
.mhp-col-check input{width:18px;height:18px}
.mhp-accounting-row-actions{display:flex;gap:8px;flex-wrap:wrap}
.mhp-accounting-table th,.mhp-accounting-table td{vertical-align:middle}
.mhp-accounting-bulkbar .mhp-btn[disabled]{opacity:.55;cursor:not-allowed}
@media (max-width:1100px){.mhp-accounting-stats-3{grid-template-columns:repeat(3,minmax(0,1fr))}.mhp-accounting-filters-compact{grid-template-columns:1fr 1fr}.mhp-accounting-filters-compact .mhp-accounting-search,.mhp-accounting-filters-compact .mhp-accounting-filter-actions{grid-column:1/-1}}
@media (max-width:760px){.mhp-accounting-stats-3{grid-template-columns:1fr}.mhp-accounting-filters-compact{grid-template-columns:1fr}.mhp-accounting-bulkbar{align-items:stretch}.mhp-accounting-bulkbar .mhp-btn{width:100%}.mhp-accounting-row-actions{flex-direction:column}}


/* Accounting v3 fixes */
.mhp-accounting-stats-3{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px;align-items:stretch}
.mhp-accounting-stats-3 .mhp-stat{display:flex;flex-direction:column;justify-content:center;min-height:108px;padding:16px 14px}
.mhp-accounting-stats-3 .mhp-stat strong{font-size:24px;line-height:1.15;margin-bottom:6px}
.mhp-accounting-stats-3 .mhp-stat span{font-size:13px;line-height:1.4}
.mhp-accounting-filters-compact{grid-template-columns:150px 150px minmax(220px,1fr) auto;gap:10px}
.mhp-accounting-filters-compact input{min-height:42px}
@media (max-width:1100px){.mhp-accounting-stats-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media (max-width:900px){.mhp-accounting-stats-3{grid-template-columns:1fr 1fr}.mhp-accounting-filters-compact{grid-template-columns:1fr 1fr}.mhp-accounting-filters-compact .mhp-accounting-search,.mhp-accounting-filters-compact .mhp-accounting-filter-actions{grid-column:1/-1}}
@media (max-width:640px){.mhp-accounting-stats-3{grid-template-columns:1fr}}
