/* ===== NutriMatch V6 additions (original NutriCare styles.css is untouched) ===== */
@font-face{font-family:'Cairo';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/Cairo-Regular.ttf) format('truetype')}
@font-face{font-family:'Cairo';font-style:normal;font-weight:500;font-display:swap;src:url(fonts/Cairo-Medium.ttf) format('truetype')}
@font-face{font-family:'Cairo';font-style:normal;font-weight:600;font-display:swap;src:url(fonts/Cairo-SemiBold.ttf) format('truetype')}

:root{--nm-green:#02BE6A;--nm-ink:#142F20;--nm-soft:#E1F5EC;--nm-mut:#5B6B62}
*{box-sizing:border-box}
html,body{margin:0;background:#EAF3EE;font-family:'Cairo',system-ui,-apple-system,'Segoe UI',sans-serif;color:var(--nm-ink)}
button,input{font:inherit}
.nm-app{width:100%;max-width:440px;min-height:100vh;min-height:100dvh;margin:0 auto;background:#fff;display:flex;flex-direction:column;position:relative;overflow:hidden}
@media (min-width:700px){
  body{padding:28px 0;display:flex;justify-content:center}
  .nm-app{height:min(880px,calc(100vh - 56px));min-height:0;border-radius:34px;box-shadow:0 24px 60px rgba(20,60,35,.18)}
}
.nm-screen{flex:1;display:flex;flex-direction:column;min-height:0;animation:nm-in .4s cubic-bezier(.2,.7,.2,1) both}
@keyframes nm-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ---------- Welcome (original layout; image kept at full proportions) ---------- */
.nm-welcome{position:relative;flex:1;display:flex;flex-direction:column;background:var(--nm-green);color:#fff;overflow:hidden}
.nm-welcome .nm-art{position:absolute;left:0;right:0;top:40px;width:100%;height:auto;display:block}
.nm-welcome .nm-fade-top{position:absolute;left:0;right:0;top:0;height:170px;background:linear-gradient(to bottom,var(--nm-green) 45%,rgba(2,190,106,0))}
.nm-welcome .nm-fade-bottom{position:absolute;left:0;right:0;bottom:0;height:330px;background:linear-gradient(to top,var(--nm-green) 62%,rgba(2,190,106,0))}
.nm-welcome .nm-logo{height:56px;padding:0 22px;display:flex;align-items:center;position:relative;flex-shrink:0}
.nm-welcome .nm-logo img{display:block;width:91px;height:auto}
.nm-welcome h1{margin:44px 22px 0;font-size:32px;font-weight:800;line-height:1.35;position:relative;text-align:center}
.nm-welcome .nm-gap{flex:1}
.nm-welcome .nm-lead{margin:0 22px 36px;font-size:18px;line-height:1.7;position:relative;text-align:center}
.nm-welcome .nm-actions{padding:16px 22px 30px;position:relative}
.nm-btn-white{display:flex;align-items:center;justify-content:center;width:100%;height:58px;border:0;border-radius:18px;background:#fff;color:#142F20;font-size:18px;font-weight:800;cursor:pointer;box-shadow:0 10px 24px rgba(0,60,30,.18);transition:transform .15s}
.nm-btn-white:active{transform:scale(.98)}
.nm-note{margin:12px 0 0;text-align:center;font-size:14px;opacity:.92}

/* ---------- Result / booking / shared ---------- */
.nm-head-logo{display:flex;align-items:center;justify-content:space-between;padding:12px 18px 6px;gap:10px}
.nm-head-logo img{width:105px;height:auto}
.nm-iconbtn{width:40px;height:40px;border:0;border-radius:50%;background:transparent;color:var(--nm-ink);font-size:26px;cursor:pointer;display:grid;place-items:center}
.nm-spacer{width:40px}
.nm-scroll{flex:1;overflow-y:auto;overflow-x:hidden;padding:4px 20px 12px;-webkit-overflow-scrolling:touch}
.nm-footer{padding:10px 20px 22px;background:#fff}
.nm-primary{display:flex;align-items:center;justify-content:center;width:100%;height:58px;border:0;border-radius:18px;background:var(--nm-green);color:#fff;font-size:18px;font-weight:800;cursor:pointer;box-shadow:0 10px 22px rgba(2,190,106,.28);transition:transform .15s}
.nm-primary:active{transform:scale(.98)}
.nm-primary[disabled]{opacity:.5;cursor:not-allowed}
.nm-ghost{display:block;width:100%;margin-top:8px;height:46px;border:0;background:transparent;color:#1E7F4C;font-size:16px;font-weight:700;cursor:pointer}
.nm-err{color:#B3261E;font-size:14px;font-weight:700;margin:10px 0 0}
.nm-en{direction:ltr;unicode-bidi:isolate}

/* ---------- Matching (10 seconds) ---------- */
.nm-match{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px 28px;text-align:center}
.nm-orbit{position:relative;width:260px;height:260px}
.nm-ring{position:absolute;inset:0;border-radius:50%;border:2px solid rgba(2,190,106,.38);animation:nm-pulse 2.4s ease-out infinite}
.nm-ring.r2{animation-delay:1.2s}
@keyframes nm-pulse{0%{transform:scale(.42);opacity:.9}100%{transform:scale(1);opacity:0}}
.nm-lines{position:absolute;inset:0;width:100%;height:100%}
.nm-lines line{stroke:#02BE6A;stroke-width:2;stroke-dasharray:4 6;opacity:.45;animation:nm-dash 1.6s linear infinite}
@keyframes nm-dash{to{stroke-dashoffset:-20}}
.nm-core{position:absolute;left:80px;top:80px;width:100px;height:100px;border-radius:50%;background:var(--nm-green);display:grid;place-items:center;box-shadow:0 12px 30px rgba(2,190,106,.35)}
.nm-core svg{width:44px;height:44px}
.nm-node{position:absolute;width:52px;height:52px;border-radius:50%;background:#fff;border:2px solid var(--nm-soft);display:grid;place-items:center;box-shadow:0 6px 16px rgba(20,60,35,.1);transition:border-color .5s,transform .5s}
.nm-node svg{width:24px;height:24px;stroke:#1E7F4C}
.nm-node.n1{left:104px;top:0}
.nm-node.n2{left:0;top:172px}
.nm-node.n3{left:208px;top:172px}
.nm-node.on{border-color:var(--nm-green);transform:scale(1.08)}
.nm-msg{font-size:21px;font-weight:800;color:var(--nm-ink);margin:30px 0 0;min-height:34px;line-height:1.5;transition:opacity .35s}
.nm-msg.fade{opacity:0}
.nm-bar{width:min(300px,80vw);height:8px;border-radius:99px;background:var(--nm-soft);overflow:hidden;margin-top:26px}
.nm-bar i{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#02BE6A,#44D98E);animation:nm-fill 10s linear forwards}
@keyframes nm-fill{to{width:100%}}
.nm-sub{margin:10px 0 0;font-size:14px;color:var(--nm-mut);line-height:1.7;max-width:300px}
@media (prefers-reduced-motion:reduce){
  .nm-ring{display:none}
  .nm-lines line{animation:none}
  .nm-node{transition:none}
  .nm-screen{animation:none}
}

/* ---------- Result card ---------- */
.nm-result-title{font-size:26px;font-weight:800;text-align:center;margin:6px 0 14px;line-height:1.3}
.nm-card{position:relative;overflow:hidden;background:#fff;border:1.5px solid var(--nm-soft);border-radius:26px;padding:26px 18px 20px;text-align:center;box-shadow:0 14px 30px rgba(20,60,35,.12)}
.nm-card::before{content:'';position:absolute;left:0;right:0;top:0;height:6px;background:linear-gradient(90deg,#02BE6A,#8FE3B5)}
.nm-photo{width:132px;height:132px;border-radius:50%;margin:4px auto 14px;display:grid;place-items:center;background:#F3FAF6;border:2px dashed #9ED9BA;box-shadow:0 0 0 6px var(--nm-soft);overflow:hidden}
.nm-photo img{width:100%;height:100%;object-fit:cover}
.nm-photo span{font-size:12px;font-weight:800;color:var(--nm-mut);line-height:1.5;letter-spacing:.04em}
.nm-name{font-size:26px;font-weight:800;margin:0;direction:ltr;letter-spacing:.2px}
.nm-title{font-size:15px;font-weight:600;color:var(--nm-mut);margin-top:4px;direction:ltr}
.nm-name-ar{font-size:18px;font-weight:700;margin-top:4px}
.nm-lic{display:inline-flex;align-items:center;gap:8px;margin-top:12px;padding:7px 14px;border-radius:999px;background:#EAF8F0;border:1px solid #BDE8D0;color:#14673D;font-size:13.5px;font-weight:700}
.nm-lic img{height:20px;width:auto}
.nm-sec{font-size:13px;font-weight:800;color:#1E7F4C;margin:20px 0 8px;text-align:start}
.nm-sec.en{direction:ltr;text-align:center;letter-spacing:.06em;text-transform:uppercase}
.nm-services{list-style:none;padding:0;margin:0;display:flex;flex-wrap:wrap;gap:8px;justify-content:center;direction:ltr}
.nm-services li{background:var(--nm-soft);color:#1E7F4C;font-size:13.5px;font-weight:700;padding:7px 12px;border-radius:999px}
.nm-pending{margin-top:12px;font-size:12.5px;color:#7A5A10;background:#FFF6DD;border-radius:12px;padding:8px 12px;line-height:1.6;direction:ltr}
.nm-bio{font-size:15px;line-height:1.9;color:#243329;margin:0;text-align:start}
.nm-placeholder{border:1.5px dashed #9ED9BA;border-radius:14px;padding:11px 12px;color:var(--nm-mut);font-size:14px;text-align:start}
.nm-why{margin-top:18px;text-align:start;background:#F6FBF8;border:1px solid var(--nm-soft);border-inline-start:4px solid var(--nm-green);border-radius:18px;padding:16px 18px}
.nm-why h3{margin:0 0 6px;font-size:15px;color:#1E7F4C}
.nm-why p{margin:0;font-size:15px;line-height:1.9}

/* ---------- Booking placeholder ---------- */
.nm-notice{margin-top:14px;background:#FFF8E6;border:1px solid #F0D78C;color:#5E4A10;border-radius:16px;padding:14px;font-size:14.5px;line-height:1.8}
.nm-notice em{display:block;font-style:normal;font-size:13px;opacity:.85;margin-top:6px;direction:ltr;text-align:left}

/* ---------- V7 refinements ---------- */
.nm-lic svg{flex:none;color:#02BE6A}
.nm-lic{margin-top:10px}
.nm-msg.nm-en{direction:ltr;unicode-bidi:isolate}
.nm-goal-list button.nc-card{min-height:58px}
.nm-lic{font-size:12.5px;padding:6px 12px;max-width:92%;line-height:1.5;text-align:start;justify-content:center}
