/* Mftaah CRM — customer My Account */
body.mcrm-acc{--p:#4933D1;--p2:#3A28A8;--pl:#EFECFC;--ink:#1B1836;--mut:#6B6B76;--line:#E6E6EC;--soft:#F7F7FA;--ok:#0B7A4B;--okbg:#E3F6EC;--warn:#8A5A00;--warnbg:#FFF4D6;--bad:#B3261E;--badbg:#FFE5E3}
body.mcrm-acc .woocommerce-MyAccount-navigation,body.mcrm-acc .mac{font-family:"IBM Plex Sans Arabic","Segoe UI",Tahoma,sans-serif}
.mac{display:flex;flex-direction:column;gap:16px;color:var(--ink)}
.mac *{box-sizing:border-box}
.mac a{text-decoration:none}
.mac .muted{color:var(--mut);font-size:13px}
/* hero */
.mac-hero{background:linear-gradient(135deg,#1B1836,#3A28A8);color:#fff;border-radius:20px;padding:22px;display:flex;flex-direction:column;gap:18px}
.mac-hero .who{display:flex;align-items:center;gap:14px}
.mac-hero .av{width:54px;height:54px;border-radius:16px;background:rgba(255,255,255,.16);display:grid;place-items:center;font-size:24px;font-weight:700;flex:0 0 54px}
.mac-hero h2{margin:0;font-size:22px;color:#fff;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.mac-hero p{margin:2px 0 0;color:#CFC9F5;font-size:13px}
.mac-hero .mcrm-vbadge{display:inline-flex;align-items:center;gap:4px;background:#fff;color:#1D9BF0;border-radius:99px;padding:2px 9px 2px 6px;font-size:12px}
.mac-hero .mcrm-vbadge b{color:#1D9BF0;font-size:12px}
.mac-hero .stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.mac-hero .stats a{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:12px;color:#fff!important;display:flex;flex-direction:column;gap:2px;transition:background .15s}
.mac-hero .stats a:hover{background:rgba(255,255,255,.18)}
.mac-hero .stats b{font-size:24px;line-height:1.1}
.mac-hero .stats span{font-size:12.5px;color:#DCD7FA}
.mac-hero .stats a.warn{background:#FFB020;border-color:#FFB020}
.mac-hero .stats a.warn span{color:#3a2a00}.mac-hero .stats a.warn b{color:#1B1836}
/* alerts */
.mac-alert{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--warnbg);border:1px solid #F5D98A;border-radius:14px;padding:12px 16px;color:var(--warn)}
.mac-alert>div{display:flex;align-items:center;gap:10px}
/* buttons */
.mac-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:42px;padding:0 18px;border-radius:12px;background:var(--p);color:#fff!important;font-weight:700;font-size:14px;border:0;white-space:nowrap;transition:background .15s}
.mac-btn:hover{background:var(--p2)}
.mac-btn.ghost{background:#fff;color:var(--p)!important;border:1.5px solid var(--line)}
.mac-btn.ghost:hover{border-color:var(--p);background:var(--pl)}
.mac-btn.wa{background:#25D366}.mac-btn.wa:hover{background:#1DA851}
.mac-btn.sm{min-height:36px;padding:0 14px;font-size:13px}
/* quick actions */
.mac-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.mac-actions a{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:flex;flex-direction:column;gap:4px;color:var(--ink)!important;transition:border-color .15s,transform .15s,box-shadow .15s}
.mac-actions a:hover{border-color:var(--p);transform:translateY(-2px);box-shadow:0 8px 20px rgba(73,51,209,.1)}
.mac-actions i{width:42px;height:42px;border-radius:12px;background:var(--pl);color:var(--p);display:grid;place-items:center;margin-bottom:6px}
.mac-actions a.wa i{background:#E6F9EE;color:#1DA851}
.mac-actions b{font-size:15px}
.mac-actions small{color:var(--mut);font-size:12.5px}
/* cards */
.mac-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:16px}
.mac-card{background:#fff;border:1px solid var(--line);border-radius:18px;padding:18px}
.mac-card .hd{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.mac-card h3{margin:0;font-size:17px}
.mac-card .hd a{color:var(--p);font-size:13px;font-weight:600}
.mac-pill{display:inline-flex;align-items:center;font-size:12px;font-weight:700;padding:3px 10px;border-radius:99px;background:var(--soft);color:var(--mut);white-space:nowrap}
.mac-pill.s-completed,.mac-pill.s-ok{background:var(--okbg);color:var(--ok)}
.mac-pill.s-processing{background:var(--pl);color:var(--p)}
.mac-pill.s-pending,.mac-pill.s-on-hold,.mac-pill.s-soon{background:var(--warnbg);color:var(--warn)}
.mac-pill.s-failed,.mac-pill.s-cancelled,.mac-pill.s-exp{background:var(--badbg);color:var(--bad)}
.mac-order .row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.mac-order .row .muted{margin-inline-start:auto}
.mac-order .items{margin:8px 0 4px;color:var(--mut);font-size:14px;line-height:1.7}
.mac-order .total{justify-content:space-between;border-top:1px dashed var(--line);padding-top:10px;margin-top:4px}
.mac-order .btns,.mac-help .btns{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.mac-steps{list-style:none;margin:14px 0;padding:0;display:grid;grid-template-columns:repeat(4,1fr);position:relative}
.mac-steps:before{content:"";position:absolute;top:14px;inset-inline:12%;height:2px;background:var(--line)}
.mac-steps li{display:flex;flex-direction:column;align-items:center;gap:6px;font-size:12px;color:var(--mut);position:relative;text-align:center}
.mac-steps i{width:30px;height:30px;border-radius:50%;background:#fff;border:2px solid var(--line);display:grid;place-items:center;font-style:normal;font-weight:700;font-size:12px}
.mac-steps i svg{width:16px;height:16px}
.mac-steps li.done i{background:var(--p);border-color:var(--p);color:#fff}
.mac-steps li.done{color:var(--ink)}
.mac-steps li.now i{border-color:var(--p);color:var(--p);box-shadow:0 0 0 4px var(--pl)}
.mac-steps li.now{color:var(--p);font-weight:700}
.mac-sub{border:1px solid var(--line);border-radius:14px;padding:12px 14px;margin-bottom:10px;display:flex;flex-direction:column;gap:8px}
.mac-sub .top{display:flex;align-items:center;justify-content:space-between;gap:10px}
.mac-sub .top b{font-size:14px}
.mac-sub .bar{height:7px;background:var(--soft);border-radius:99px;overflow:hidden}
.mac-sub .bar i{display:block;height:100%;background:var(--ok);border-radius:99px}
.mac-sub.soon .bar i{background:#F0A500}.mac-sub.exp .bar i{background:var(--bad)}
.mac-sub .meta{display:flex;justify-content:space-between;font-size:12.5px;color:var(--mut)}
.mac-sub .mac-btn{align-self:flex-start}
.mac-subs .mac-sub{margin-bottom:12px}
.mac-empty{text-align:center;padding:18px 8px;color:var(--mut)}
.mac-empty svg{width:34px;height:34px;color:var(--p);opacity:.7}
.mac-empty p{margin:8px 0 12px}
.mac-help{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;background:var(--pl);border-radius:16px;padding:16px 18px}
.mac-help b{display:block;font-size:15px}.mac-help span{color:var(--mut);font-size:13px}
.mac-help .btns{margin:0}
.mac-tickets{list-style:none;margin:0;padding:0}
.mac-tickets li{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.mac-tickets li:first-child{border-top:0}
.mac-tickets li>div{flex:1;min-width:0}
.mac-tickets small{display:block;color:var(--mut);font-size:12.5px}
/* navigation */
body.mcrm-acc .woocommerce-MyAccount-navigation ul{list-style:none;margin:0;padding:8px;background:#fff;border:1px solid var(--line);border-radius:18px}
body.mcrm-acc .woocommerce-MyAccount-navigation li{margin:0;padding:0;border:0!important}
body.mcrm-acc .woocommerce-MyAccount-navigation li a{display:flex;align-items:center;gap:10px;padding:11px 14px;border-radius:12px;color:var(--ink)!important;font-weight:600;font-size:14.5px;text-decoration:none;background:none;transition:background .15s}
body.mcrm-acc .woocommerce-MyAccount-navigation li a:hover{background:var(--soft)}
body.mcrm-acc .woocommerce-MyAccount-navigation li.is-active a{background:var(--pl);color:var(--p)!important}
body.mcrm-acc .woocommerce-MyAccount-navigation li a:before{content:"";width:20px;height:20px;flex:0 0 20px;background:currentColor;opacity:.85;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;position:static!important;font-size:0!important;margin:0!important;border:0!important;transform:none!important}
body.mcrm-acc .woocommerce-MyAccount-navigation li a:after{display:none!important}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--dashboard a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--orders a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 7h14l-1.2 11.2a2 2 0 0 1-2 1.8H8.2a2 2 0 0 1-2-1.8z'/%3E%3Cpath d='M9 7a3 3 0 0 1 6 0'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--subscriptions a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 11a8 8 0 1 0-2.3 5.7'/%3E%3Cpath d='M20 5v6h-6'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--my-support a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 13v-1.5a7.5 7.5 0 0 1 15 0V13'/%3E%3Crect x='3.5' y='12.5' width='4' height='6' rx='1.5'/%3E%3Crect x='16.5' y='12.5' width='4' height='6' rx='1.5'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--downloads a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11M7 10l5 5 5-5M5 20h14'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--edit-account a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 20c1.5-4 5-5.5 8-5.5s6.5 1.5 8 5.5'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--edit-address a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='M7 10h6M7 14h10'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation-link--customer-logout a{color:var(--bad)!important;--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 4h3a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2h-3M10 16l-4-4 4-4M6 12h10'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation li:not([class*="--dashboard"]):not([class*="--orders"]):not([class*="--subscriptions"]):not([class*="--my-support"]):not([class*="--downloads"]):not([class*="--edit-account"]):not([class*="--edit-address"]):not([class*="--customer-logout"]) a{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3C/svg%3E")}
body.mcrm-acc .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout{border-top:1px solid var(--line)!important;margin-top:6px;padding-top:6px}
/* orders table */
body.mcrm-acc .woocommerce-orders-table{border:1px solid var(--line)!important;border-radius:16px;overflow:hidden;border-collapse:separate!important;border-spacing:0}
body.mcrm-acc .woocommerce-orders-table th{background:var(--soft);font-weight:700;font-size:13px}
body.mcrm-acc .woocommerce-orders-table td,body.mcrm-acc .woocommerce-orders-table th{padding:12px 14px!important;vertical-align:middle}
body.mcrm-acc .woocommerce-orders-table .button,body.mcrm-acc .woocommerce-MyAccount-content .woocommerce-button{background:var(--p)!important;color:#fff!important;border-radius:10px!important;padding:0 14px!important;min-height:36px;line-height:36px!important;font-weight:700;text-transform:none!important;letter-spacing:0!important;margin:2px!important}
body.mcrm-acc .woocommerce-orders-table .button.view{background:#fff!important;color:var(--p)!important;border:1.5px solid var(--line)!important}
/* hide default greeting if a theme prints it */
body.mcrm-acc .woocommerce-MyAccount-content>p:first-child:has(+p){display:none}
@media (max-width:900px){.mac-grid{grid-template-columns:1fr}.mac-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:768px){
body.mcrm-acc .woocommerce-MyAccount-navigation{margin-bottom:14px}
body.mcrm-acc .woocommerce-MyAccount-navigation ul{display:flex;overflow-x:auto;gap:4px;padding:6px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
body.mcrm-acc .woocommerce-MyAccount-navigation ul::-webkit-scrollbar{display:none}
body.mcrm-acc .woocommerce-MyAccount-navigation li a{white-space:nowrap;padding:9px 12px;font-size:13.5px}
body.mcrm-acc .woocommerce-MyAccount-navigation li.woocommerce-MyAccount-navigation-link--customer-logout{border-top:0!important;margin:0;padding:0}
.mac-hero{padding:18px}.mac-hero .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
.mac-hero h2{font-size:19px}
.mac-actions,.mac-actions.three{grid-template-columns:repeat(2,minmax(0,1fr))}
.mac-actions a{padding:13px}
.mac-tickets li{flex-wrap:wrap}
}
