/* Almajad CRM 3.8.0 — look & feel layer (loaded last). Visual only: no layout logic, permissions or data change. */
:root{--th-brand:#2f6db0;--th-brand-d:#1f4f86;--th-accent:#e3864a;--th-gold:#d9a35a;--th-ink:#1a2a3a;--th-ink2:#3f5063;--th-line:#e6ebf1;--th-good:#2f9a73;--th-warn:#c48a1c}

/* 1) One clear Arabic font everywhere (Almarai — very legible, common in Saudi apps) */
body.app-body,body.login-body,body.app-body *,body.login-body *{font-family:"Almarai",Tahoma,Arial,sans-serif!important}
body.app-body .mono,body.app-body code{font-family:Consolas,"Courier New",monospace!important}
body.app-body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}

/* 2) Secondary text: darker and easier to read */
body.app-body .muted,body.app-body small,body.app-body .v33-kpi-name,body.app-body .v33-heading p,body.app-body .panel p.muted{color:var(--th-ink2)!important}
body.app-body .v33-kpi-name,body.app-body .v33-queue-body strong{font-weight:700!important}

/* 3) Primary buttons in the clinic blue */
body.app-body .btn-primary{background:linear-gradient(135deg,var(--th-brand),var(--th-brand-d))!important;border-color:transparent!important;color:#fff!important}
body.app-body .btn-primary:hover{filter:brightness(1.06)}

/* 4) Top bar: orange "new client" button + motivation icon on the avatar */
.crmth-new{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border-radius:11px;background:var(--th-accent);color:#fff!important;font-weight:700;font-size:14px;text-decoration:none;box-shadow:0 8px 18px -10px rgba(227,134,74,.9);white-space:nowrap}
.crmth-new:hover{filter:brightness(1.05)}
.user-circle,.sidebar-profile .avatar{position:relative}
.crmth-badge{position:absolute;bottom:-4px;inset-inline-start:-6px;width:20px;height:20px;border-radius:50%;background:#fff;display:grid;place-items:center;font-style:normal;font-size:12px;line-height:1;box-shadow:0 2px 6px rgba(0,0,0,.18);font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif!important}
.v33-welcome .crm365-spark.crmth-icon{font-family:"Segoe UI Emoji","Apple Color Emoji","Noto Color Emoji",sans-serif!important;display:inline-block;animation:crmthPop .6s cubic-bezier(.2,.9,.3,1.4)}
@keyframes crmthPop{from{transform:scale(.4);opacity:0}to{transform:none;opacity:1}}

/* 5) Monthly goal card */
.crmth-goal{display:grid;grid-template-columns:auto 1fr;gap:22px;align-items:center;margin:16px 0;padding:18px 22px;border-radius:20px;background:linear-gradient(135deg,#fff,#fdf7ee);border:1px solid #f0e2c6;box-shadow:0 10px 30px -18px rgba(20,40,60,.25)}
.crmth-goal-ring{position:relative;width:118px;height:118px}
.crmth-goal-ring svg{width:118px;height:118px;display:block}
.crmth-goal-ring .bg{fill:none;stroke:#f1e7d6;stroke-width:10}
.crmth-goal-ring .fg{fill:none;stroke:var(--th-gold);stroke-width:10;stroke-linecap:round;stroke-dashoffset:314.16;animation:crmthRing 1.2s cubic-bezier(.2,.8,.2,1) .2s forwards}
@keyframes crmthRing{to{stroke-dashoffset:var(--off)}}
.crmth-goal-ring b{position:absolute;inset:0;display:grid;place-items:center;font-size:26px;font-weight:800;color:var(--th-ink)}
.crmth-goal-lbl{font-size:14px;font-weight:700;color:#9a6b2c}
.crmth-goal h3{margin:4px 0 2px!important;font-size:21px!important;color:var(--th-ink)!important}
.crmth-goal h3 small{font-size:14px;font-weight:400;color:var(--th-ink2)}
.crmth-goal p{margin:0 0 10px!important;color:var(--th-ink2)!important;font-size:14px}
.crmth-goal-bar{height:10px;border-radius:10px;background:#f1e7d6;overflow:hidden;max-width:560px}
.crmth-goal-bar i{display:block;height:100%;border-radius:10px;background:linear-gradient(90deg,#e8c48f,var(--th-gold))}
.crmth-goal-form{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px;margin-top:12px}
.crmth-goal-form label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:700;color:var(--th-ink2)}
.crmth-goal-form input{height:38px;width:170px;border:1px solid #e3d5bb;border-radius:10px;padding:0 10px;background:#fff}
.crmth-goal-form .btn{height:38px}
.crmth-goal-form small{color:var(--th-ink2);font-size:12.5px;align-self:center}

/* 6) Welcome note after login */
.crmth-welcome{position:fixed;z-index:80;bottom:22px;inset-inline-end:22px;width:min(390px,calc(100% - 28px));background:#fff;border:1px solid var(--th-line);border-radius:20px;box-shadow:0 30px 70px -28px rgba(20,40,60,.55);overflow:hidden;opacity:0;transform:translateY(18px);transition:opacity .35s,transform .5s cubic-bezier(.2,.9,.3,1.15)}
.crmth-welcome.show{opacity:1;transform:none}
.crmth-w-head{display:flex;align-items:center;gap:12px;padding:16px 16px 8px}
.crmth-w-av{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;font-weight:800;color:#fff;background:linear-gradient(135deg,var(--th-brand),var(--th-brand-d));flex:none}
.crmth-w-head b{display:block;font-size:16px;color:var(--th-ink)}
.crmth-w-head small{display:block;color:#9a5530!important;font-weight:700;font-size:13px;line-height:1.6}
.crmth-w-x{margin-inline-start:auto;width:30px;height:30px;border:0;border-radius:9px;background:#f2f5f9;color:var(--th-ink2);font-size:18px;cursor:pointer}
.crmth-w-list{display:grid;gap:2px;padding:4px 14px}
.crmth-w-list a{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:11px;text-decoration:none;color:var(--th-ink2);font-size:14px}
.crmth-w-list a:hover{background:#f5f7fa}
.crmth-w-list a span:nth-child(2){flex:1}
.crmth-w-list a b{font-size:16px;color:var(--th-ink)}
.crmth-w-ico{width:28px;height:28px;border-radius:9px;display:grid;place-items:center}
.crmth-w-list .tone-red .crmth-w-ico{background:#fbeeed;color:#c4554f}.crmth-w-list .tone-orange .crmth-w-ico{background:#fbf4e4;color:#b07c16}.crmth-w-list .tone-green .crmth-w-ico{background:#e9f6f0;color:#2f9a73}.crmth-w-list .tone-blue .crmth-w-ico{background:#eef4fa;color:var(--th-brand)}
.crmth-w-empty{margin:4px 16px 8px!important;color:var(--th-ink2)!important;font-size:14px}
.crmth-w-goal{display:flex;align-items:center;gap:8px;margin:8px 16px 0;padding:10px 12px;border-radius:12px;background:#fbf8f2;font-size:13.5px;color:var(--th-ink2)}
.crmth-w-goal .crmth-goal-bar{flex:1;height:7px}
.crmth-w-goal b{color:var(--th-ink)}
.crmth-w-actions{display:flex;gap:8px;padding:14px 16px 16px}
.crmth-w-actions .btn{flex:1;justify-content:center}
.crmth-w-timer{display:block;height:3px;background:var(--th-brand);width:100%}
.crmth-welcome.show .crmth-w-timer{animation:crmthTimer 12s linear forwards}
@keyframes crmthTimer{to{width:0}}

@media (max-width:900px){
 .crmth-new span{display:none}.crmth-new{width:38px;padding:0;justify-content:center}
 .crmth-goal{grid-template-columns:1fr;justify-items:center;text-align:center}.crmth-goal-bar{margin-inline:auto}.crmth-goal-form{justify-content:center}
 .crmth-welcome{inset-inline:12px;width:auto;bottom:14px}
}
@media (prefers-reduced-motion:reduce){.crmth-welcome,.crmth-goal-ring .fg,.v33-welcome .crm365-spark.crmth-icon{animation:none!important;transition:none!important}.crmth-goal-ring .fg{stroke-dashoffset:var(--off)}}
