:root{font-family:"Segoe UI",Tahoma,Arial,sans-serif;color:#172b3a;background:#f3f6f8;line-height:1.65;--ink:#132b3a;--muted:#6b7f8c;--line:#dce6ea;--teal:#087f79;--teal-dark:#06635f;--surface:#fff;--shadow:0 16px 45px rgba(25,48,61,.08)}
*{box-sizing:border-box}
body{margin:0}
button,input,textarea,select{font:inherit}
button{cursor:pointer}
button:disabled{opacity:.55;cursor:wait}
a{color:var(--teal)}
[hidden]{display:none!important}
:focus-visible{outline:3px solid #f5ac5d;outline-offset:3px}
.brand-lockup{display:inline-flex;align-items:center;gap:12px;text-decoration:none;color:inherit;font-size:23px;font-weight:800;letter-spacing:-.03em}
.brand-icon{width:43px;height:43px;display:grid;place-items:center;border-radius:14px;color:#fff;background:linear-gradient(145deg,#0c9c94,#075a6b);box-shadow:0 9px 22px #0c9c9436;font-size:22px}
.brand-lockup small{display:block;font-size:11px;font-weight:500;letter-spacing:0;color:var(--muted);line-height:1.2}
.eyebrow{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:800;letter-spacing:.02em;color:var(--teal);margin:0 0 8px}
.eyebrow:before{content:"";width:7px;height:7px;border-radius:50%;background:#f5aa66}
.muted{color:var(--muted)}
.auth-page{background:#e9f0f2;min-height:100vh;padding:22px;display:grid;place-items:center;position:relative;overflow:hidden}
.auth-page:before,.auth-page:after{content:"";position:absolute;pointer-events:none;border-radius:50%;filter:blur(6px)}
.auth-page:before{width:650px;height:650px;background:#d6eae6;top:-350px;right:-130px}
.auth-page:after{width:470px;height:470px;background:#dce6f8;bottom:-290px;left:-180px}
.auth-shell{position:relative;z-index:1;width:min(1100px,100%);min-height:690px;display:grid;grid-template-columns:1fr 1fr;background:#fff;border-radius:30px;overflow:hidden;box-shadow:0 30px 100px #1b4e5d24}
.auth-feature{background:radial-gradient(circle at 7% 90%,#126b79 0%,transparent 36%),linear-gradient(145deg,#112d3e,#102438 68%,#0c1d2c);color:#fff;padding:48px 54px;display:flex;flex-direction:column;position:relative;overflow:hidden}
.auth-feature:after{content:"";position:absolute;width:410px;height:410px;border:1px solid #ffffff14;border-radius:50%;bottom:-205px;left:-195px;box-shadow:0 0 0 80px #ffffff06,0 0 0 160px #ffffff04}
.auth-feature .brand-lockup{color:#fff;position:relative;z-index:1}
.auth-feature .brand-lockup small{color:#bbd5da}
.auth-story{margin:auto 0;position:relative;z-index:1}
.auth-feature h2{font-size:clamp(33px,3vw,48px);line-height:1.25;letter-spacing:-.04em;max-width:440px;margin:0 0 22px}
.auth-feature h2 em{font-style:normal;color:#8fe2ce}
.auth-feature p{color:#c9dce0;max-width:440px;font-size:16px;line-height:1.9}
.feature-pills{display:flex;flex-wrap:wrap;gap:9px;margin:30px 0}
.feature-pills span{padding:7px 13px;border:1px solid #ffffff2e;background:#ffffff0b;border-radius:30px;font-size:12px;color:#e6f4f1}
.sample-chat{background:#fff;color:#183244;border-radius:18px;padding:18px;box-shadow:0 18px 44px #02172354;max-width:365px;transform:rotate(-2deg)}
.sample-chat header{display:flex;align-items:center;gap:8px;font-size:12px;color:#53727c;border-bottom:1px solid #e8eef0;padding-bottom:10px;margin-bottom:12px}
.online-dot{width:8px;height:8px;border-radius:50%;background:#25ba82;display:inline-block}
.sample-chat p{font-size:13px;line-height:1.6;margin:8px 0;padding:9px 12px;border-radius:11px;max-width:87%;color:#183244;background:#f2f6f6}
.sample-chat p.answer{margin-inline-start:auto;background:#dff5ee;color:#115a55}
.auth-form-wrap{padding:46px clamp(27px,4.5vw,66px);display:flex;flex-direction:column;justify-content:center}
.auth-mobile-brand{display:none}
.auth-kicker{color:var(--teal);font-size:12px;font-weight:800;margin:0 0 9px}
.auth-form-wrap h1{font-size:clamp(28px,3vw,38px);letter-spacing:-.04em;margin:0 0 7px;color:#132b3a}
.auth-form-wrap .subtitle{color:var(--muted);margin:0 0 22px;font-size:14px}
.auth-form-wrap label{display:block;color:#263e4b;font-size:13px;font-weight:700;margin:17px 0 7px}
.auth-form-wrap input{width:100%;border:1px solid #d9e5e9;border-radius:12px;background:#f9fbfb;color:#16303d;padding:14px 15px;min-height:49px;outline:0}
.auth-form-wrap input:focus{border-color:#23a69a;background:#fff;box-shadow:0 0 0 4px #20a5971c}
.auth-form-wrap input::placeholder{color:#9aadb6}
.auth-form-wrap button[type=submit],.auth-primary{border:0;border-radius:12px;background:#0a817b;color:#fff;font-weight:750;min-height:50px;padding:11px 20px;box-shadow:0 9px 18px #087f7926}
.auth-form-wrap button[type=submit]{width:100%;margin-top:24px}
.auth-form-wrap button[type=submit]:hover,.auth-primary:hover{background:#096b66}
.auth-secondary{background:none;border:0;color:var(--teal);font-weight:700;padding:7px}
.auth-footer{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:17px;font-size:13px;color:var(--muted)}
.auth-help{font-size:12px;text-align:center;margin:18px 0 0}
.auth-help a{text-decoration:none}
.auth-error{min-height:24px;color:#bd3c3c;font-size:13px;margin:10px 0 0}
.auth-trust{margin-top:30px;border-top:1px solid #edf1f3;padding-top:17px;font-size:11px;color:#8095a0}
.app-page{background:linear-gradient(#f2f7f8,#f7f9fa)}
.app-topbar{height:78px;padding:0 max(24px,calc((100vw - 1180px)/2));display:flex;align-items:center;justify-content:space-between;gap:16px;background:#fff;border-bottom:1px solid #e5ecef}
.app-topbar nav{display:flex;gap:8px;align-items:center}
.app-topbar nav a{text-decoration:none;color:#516b77;padding:9px 13px;border-radius:10px;font-size:13px;font-weight:650}
.app-topbar nav a:hover,.app-topbar nav a.active{background:#e8f5f3;color:#087f79}
.app-main{max-width:1180px;padding:39px 24px 70px;margin:auto}
.app-intro{display:flex;align-items:end;justify-content:space-between;gap:20px;margin:0 0 25px}
.app-intro h1{font-size:clamp(29px,3vw,39px);line-height:1.3;letter-spacing:-.04em;margin:0 0 5px}
.app-intro p{margin:0;color:var(--muted);font-size:14px}
.app-card{background:#fff;border:1px solid #e1eaed;border-radius:20px;box-shadow:var(--shadow)}
.app-card-heading{padding:22px 25px;border-bottom:1px solid #edf1f3}
.app-card-heading h2{font-size:19px;margin:0}
.app-card-heading p{font-size:12px;color:var(--muted);margin:4px 0 0}
.app-card-body{padding:24px 25px}
.app-btn{border:0;border-radius:11px;background:var(--teal);color:#fff;font-weight:750;min-height:45px;padding:10px 18px}
.app-btn:hover{background:var(--teal-dark)}
.app-btn.ghost{background:#edf4f5;color:#315561}
.app-btn.ghost:hover{background:#dfebed}
.app-btn:disabled{opacity:.5}
.settings-layout{display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:20px;align-items:start}
.settings-form label{display:block;font-weight:700;font-size:13px;color:#24404b;margin:0 0 19px}
.settings-form textarea,.settings-form select{display:block;width:100%;margin-top:7px;padding:12px 14px;border:1px solid #dbe5e9;border-radius:11px;background:#fbfcfd;color:#1e3a47;min-height:46px}
.settings-form textarea{resize:vertical;min-height:94px}
.settings-form textarea:focus,.settings-form select:focus{border-color:#3ba69d;outline:3px solid #3ba69d22}
.settings-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.settings-tip{padding:22px}
.settings-tip h2{font-size:17px;margin:0 0 9px}
.settings-tip p{color:var(--muted);font-size:13px;margin:0 0 14px}
.settings-tip strong{display:block;color:#0a716e;font-size:18px;line-height:1.75;overflow-wrap:anywhere}
.settings-tip small{font-size:11px;color:#81929b}
.settings-status{font-size:13px;color:#207b6c;min-height:23px}
.chat-layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:20px;align-items:start}
.chat-guide{padding:23px}
.chat-guide h2{font-size:18px;margin:0 0 9px}
.chat-guide p{font-size:13px;color:var(--muted);margin:0 0 14px}
.chat-guide ul{padding-inline-start:18px;font-size:13px;color:#4a6773;line-height:2}
.chat-card{overflow:hidden}
.chat-card-head{padding:17px 22px;border-bottom:1px solid #edf2f3;display:flex;align-items:center;gap:10px}
.chat-card-head strong{display:block;line-height:1.3}
.chat-card-head small{font-size:11px;color:#7d929b}
.chat-avatar{width:38px;height:38px;background:#e0f4ee;color:#087f79;display:grid;place-items:center;border-radius:13px;font-weight:800}
.chat-log{height:min(55vh,520px);min-height:340px;overflow:auto;display:flex;flex-direction:column;gap:14px;padding:24px;background:linear-gradient(160deg,#f8fbfb,#f2f7f8)}
.chat-log:empty:after{content:"ابدأ برسالة وشوف جاليلو هيرد إزاي بناءً على بيانات نشاطك.";display:grid;place-items:center;text-align:center;margin:auto;color:#90a3ab;font-size:13px;max-width:270px}
.chat-log article{max-width:min(80%,500px);white-space:pre-wrap;line-height:1.8;font-size:14px;padding:12px 16px;border-radius:15px;box-shadow:0 2px 8px #153b410a}
.chat-log article.mine{align-self:flex-start;background:#dff4ed;border-bottom-right-radius:4px}
.chat-log article.theirs{align-self:flex-end;background:#fff;border:1px solid #e7eff1;border-bottom-left-radius:4px}
.chat-composer{padding:15px 19px;display:flex;gap:9px;border-top:1px solid #edf2f3}
.chat-composer input,.chat-key input{flex:1;min-width:0;background:#f9fbfb;border:1px solid #dbe6e9;border-radius:11px;padding:10px 14px;min-height:46px}
.chat-key{display:flex;gap:9px;padding:15px 19px;background:#fff7e9;border-bottom:1px solid #f7e6c7}
.chat-status{padding:0 20px 13px;min-height:38px;color:#66818b;font-size:12px;margin:0}
@media(max-width:850px){.auth-shell{grid-template-columns:1fr;max-width:570px;min-height:0}.auth-feature{display:none}.auth-form-wrap{min-height:600px}.auth-mobile-brand{display:block;margin-bottom:50px}.settings-layout,.chat-layout{grid-template-columns:1fr}.chat-guide{display:none}}
@media(max-width:600px){.auth-page{padding:0;display:block;background:#fff}.auth-shell{border-radius:0;min-height:100vh;box-shadow:none}.auth-form-wrap{padding:27px 24px;min-height:100vh;justify-content:flex-start}.auth-mobile-brand{margin-bottom:70px}.app-topbar{height:auto;min-height:68px;padding:12px 16px;align-items:flex-start}.app-topbar .brand-lockup{font-size:20px}.app-topbar nav{flex-wrap:wrap;justify-content:flex-end;gap:2px}.app-topbar nav a{font-size:11px;padding:7px}.app-main{padding:26px 14px 50px}.app-intro{display:block}.app-intro h1{font-size:29px}.app-card-body{padding:20px}.settings-form-grid{grid-template-columns:1fr;gap:0}.chat-log{min-height:calc(100dvh - 350px);height:auto;max-height:55vh;padding:16px}.chat-composer{padding:10px;flex-wrap:wrap}.chat-composer input{flex-basis:100%}.chat-composer .app-btn{flex:1}.chat-key{flex-wrap:wrap}.chat-key input{flex-basis:100%}}
