@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Arabic:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700;800&display=swap');

/* MASAR auth: isolated from the workspace shell so the route can be mounted independently. */
.public-shell:has(.masar-auth) { min-height: 100vh; background: #080f1d; }
.public-shell:has(.masar-auth) .public-header,
.public-shell:has(.masar-auth) .app-footer { display: none; }
.public-shell:has(.masar-auth) .public-page { max-width: none; padding: 0 !important; }

.masar-auth {
  --auth-bg: #080f1d;
  --auth-panel: rgba(16, 28, 48, .72);
  --auth-panel-deep: rgba(7, 15, 30, .82);
  --auth-line: rgba(143, 174, 209, .18);
  --auth-text: #edf5ff;
  --auth-muted: #9aaac0;
  --auth-cyan: #4cd7f6;
  --auth-blue: #4d8eff;
  --auth-purple: #b89bff;
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
  padding: 30px 22px 16px;
  background:
    radial-gradient(circle at 10% 12%, rgba(87, 27, 193, .28), transparent 30rem),
    radial-gradient(circle at 88% 78%, rgba(0, 158, 185, .16), transparent 32rem),
    var(--auth-bg);
  color: var(--auth-text);
  font-family: 'IBM Plex Sans Arabic', sans-serif;
}
.masar-auth *, .masar-auth *::before, .masar-auth *::after { box-sizing: border-box; }
.masar-auth a { color: inherit; text-decoration: none; }
.masar-auth button, .masar-auth a { -webkit-tap-highlight-color: transparent; }
.masar-auth button:focus-visible, .masar-auth a:focus-visible { outline: 2px solid var(--auth-cyan); outline-offset: 4px; }
.auth-backdrop-orb { position: absolute; border: 1px solid rgba(132, 177, 224, .11); border-radius: 999px; pointer-events: none; }
.auth-backdrop-orb-a { width: 560px; height: 560px; top: -290px; left: -170px; box-shadow: 0 0 120px rgba(76, 215, 246, .08); }
.auth-backdrop-orb-b { width: 680px; height: 680px; right: -360px; bottom: -420px; border-color: rgba(184, 155, 255, .12); }
.auth-frame {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
  grid-template-areas: 'hero form';
  width: min(1170px, 100%);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid rgba(178, 211, 244, .2);
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(18, 34, 58, .83), rgba(7, 15, 30, .78));
  box-shadow: 0 30px 100px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .05);
  backdrop-filter: blur(24px);
}
.auth-hero-panel { grid-area: hero; position: relative; overflow: hidden; padding: clamp(32px, 5vw, 65px); background: linear-gradient(142deg, rgba(16, 47, 71, .62), rgba(18, 22, 56, .46) 58%, rgba(11, 16, 33, .24)); }
.auth-hero-panel::after { content: ''; position: absolute; inset: 0; opacity: .28; pointer-events: none; background-image: linear-gradient(rgba(124, 185, 211, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(124, 185, 211, .07) 1px, transparent 1px); background-size: 38px 38px; mask-image: linear-gradient(to bottom, black, transparent 75%); }
.auth-hero-content { position: relative; z-index: 1; display: flex; flex-direction: column; height: 100%; max-width: 640px; }
.auth-hero-orbit { position: absolute; border: 1px solid rgba(76, 215, 246, .14); border-radius: 50%; pointer-events: none; }
.auth-hero-orbit-one { width: 430px; height: 430px; top: 110px; left: -210px; }
.auth-hero-orbit-two { width: 250px; height: 250px; right: -100px; bottom: 70px; border-color: rgba(184, 155, 255, .2); }
.auth-brand-lockup { display: flex; align-items: center; gap: 13px; margin-bottom: clamp(40px, 8vh, 84px); }
.auth-brand-mark { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .3); }
.auth-brand-lockup strong { display: block; font: 800 20px/1.15 'Plus Jakarta Sans', sans-serif; letter-spacing: 1.8px; }
.auth-brand-lockup strong b { color: var(--auth-cyan); }
.auth-brand-lockup span { display: block; margin-top: 4px; color: #7f98b5; font: 500 8px/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .65px; }
.auth-kicker { display: inline-flex; width: fit-content; color: var(--auth-cyan); font: 600 10px/1.4 'Plus Jakarta Sans', 'IBM Plex Sans Arabic', sans-serif; letter-spacing: .09em; text-transform: uppercase; }
.auth-hero-panel h1 { max-width: 610px; margin: 12px 0 14px; color: #f3f7ff; font-size: clamp(30px, 4vw, 50px); font-weight: 700; line-height: 1.3; letter-spacing: -.045em; }
.auth-hero-panel h1 em { color: var(--auth-cyan); font-style: normal; }
.auth-hero-copy { max-width: 540px; color: #aebed1; font-size: 14px; line-height: 2; }
.auth-chart-card { margin-top: auto; padding: 16px 17px 14px; border: 1px solid rgba(156, 196, 222, .15); border-radius: 16px; background: rgba(5, 15, 29, .5); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04); }
.auth-chart-heading, .auth-chart-labels, .auth-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-chart-heading > div { display: flex; align-items: baseline; gap: 10px; }
.auth-chart-heading span:first-child { color: #90a7be; font-size: 10px; }
.auth-chart-heading strong { color: #eaf7ff; font: 700 20px/1 'Plus Jakarta Sans', sans-serif; }
.auth-demo-badge { padding: 4px 7px; border: 1px solid rgba(76, 215, 246, .32); border-radius: 5px; color: var(--auth-cyan); background: rgba(0, 158, 185, .12); font-size: 9px; white-space: nowrap; }
.auth-chart-area { display: flex; height: 144px; margin-top: 14px; }
.auth-chart-y { display: flex; flex: 0 0 27px; flex-direction: column; justify-content: space-between; padding: 1px 0 7px; color: #60758f; font: 8px/1 'Plus Jakarta Sans', sans-serif; }
.auth-chart { width: calc(100% - 27px); height: 144px; overflow: visible; }
.auth-chart-grid { fill: none; stroke: rgba(140, 171, 198, .12); stroke-dasharray: 3 6; }
.auth-chart-fill { fill: url(#masarAuthFill); }
.auth-chart-line { fill: none; stroke: var(--auth-cyan); stroke-linecap: round; stroke-width: 2.5; filter: drop-shadow(0 0 5px rgba(76, 215, 246, .3)); }
.auth-chart-point { fill: var(--auth-cyan); stroke: #c5f5ff; stroke-width: 2; }
.auth-chart-labels { padding-right: 27px; color: #627790; font-size: 8px; }
.auth-hero-notes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 16px; color: #8fa5bd; font-size: 10px; }
.auth-hero-notes span { display: inline-flex; align-items: center; gap: 5px; }
.auth-hero-notes .icon { color: var(--auth-cyan); }
.auth-form-panel { grid-area: form; display: flex; flex-direction: column; min-width: 0; padding: clamp(25px, 4vw, 48px); background: rgba(5, 13, 27, .64); border-right: 1px solid rgba(162, 201, 231, .14); }
.auth-panel-top { min-height: 22px; margin-bottom: 30px; color: #7187a2; font-size: 10px; }
.auth-secure-label { display: inline-flex; align-items: center; gap: 6px; color: #91dce8; }
.auth-secure-label .icon { color: var(--auth-cyan); }
.auth-provider-label { color: #8799b0; font: 500 9px/1 'Plus Jakarta Sans', sans-serif; letter-spacing: .05em; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 30px; border: 1px solid rgba(145, 178, 209, .13); border-radius: 10px; background: rgba(21, 36, 60, .62); }
.auth-tab { padding: 9px 8px; border-radius: 7px; color: #8093ab; text-align: center; font-size: 12px; transition: color .2s, background .2s, box-shadow .2s; }
.auth-tab:hover { color: #e8f6ff; }
.auth-tab.is-active { color: #04263a; background: linear-gradient(115deg, #7fe4f5, #4d8eff); box-shadow: 0 5px 18px rgba(76, 215, 246, .16); font-weight: 700; }
.auth-heading h2 { margin: 9px 0 8px; color: #eef6ff; font-size: clamp(23px, 2.5vw, 30px); font-weight: 700; line-height: 1.4; letter-spacing: -.03em; }
.auth-heading p, .auth-muted { color: var(--auth-muted); font-size: 12px; line-height: 1.9; }
.auth-manus-explainer { display: flex; align-items: center; gap: 11px; margin: 27px 0 14px; padding: 11px 12px; border: 1px solid rgba(158, 196, 224, .13); border-radius: 10px; background: rgba(23, 39, 65, .44); }
.auth-manus-mark { display: grid; flex: 0 0 29px; place-items: center; width: 29px; height: 29px; border-radius: 8px; color: #082036; background: linear-gradient(135deg, #d0bcff, #4cd7f6); font: 800 14px/1 'Plus Jakarta Sans', sans-serif; }
.auth-manus-explainer strong, .auth-manus-explainer span { display: block; }
.auth-manus-explainer strong { color: #d9e9f7; font-size: 11px; }
.auth-manus-explainer span { margin-top: 3px; color: #8298b3; font-size: 10px; }
.auth-primary-button, .auth-secondary-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 47px; width: 100%; border-radius: 9px; cursor: pointer; font-size: 12px; font-weight: 700; transition: transform .2s, box-shadow .2s, opacity .2s; }
.auth-primary-button { border: 1px solid rgba(149, 232, 248, .34); color: #05263e; background: linear-gradient(105deg, #8be8f6 0%, #4d8eff 100%); box-shadow: 0 12px 26px rgba(28, 135, 205, .2); }
.auth-primary-button:hover { transform: translateY(-1px); box-shadow: 0 15px 32px rgba(28, 135, 205, .3); }
.auth-primary-button:disabled { cursor: wait; opacity: .65; transform: none; }
.auth-primary-button .icon { transition: transform .2s; }
.auth-primary-button:hover .icon { transform: translateX(-3px); }
.auth-primary-button.is-loading .icon { animation: auth-spin .8s linear infinite; }
.auth-secondary-button { margin-top: 10px; border: 1px solid rgba(155, 185, 213, .18); color: #b8cbe0; background: rgba(27, 43, 69, .48); }
.auth-secondary-button:hover { color: #fff; background: rgba(43, 64, 96, .68); }
.auth-privacy-note { margin: 13px 0 0; color: #6e829b; font-size: 10px; line-height: 1.8; text-align: center; }
.auth-panel-links, .auth-state-links { display: flex; justify-content: center; gap: 17px; margin-top: 23px; color: #89a3bf; font-size: 10px; }
.auth-panel-links a:hover, .auth-state-links a:hover, .auth-legal-links a:hover { color: var(--auth-cyan); }
.auth-legal-links { display: flex; justify-content: center; gap: 8px; margin-top: auto; padding-top: 24px; color: #627791; font-size: 9px; }
.auth-error { margin-top: 11px; padding: 10px 11px; border: 1px solid rgba(255, 137, 145, .3); border-radius: 8px; color: #ffc0c0; background: rgba(126, 25, 40, .23); font-size: 10px; line-height: 1.7; }
.auth-open-fallback { margin-top: 10px; padding: 9px 11px; border: 1px solid rgba(76, 215, 246, .25); border-radius: 8px; color: #a4c4d7; background: rgba(0, 158, 185, .1); font-size: 10px; line-height: 1.7; }
.auth-open-fallback a { color: var(--auth-cyan); text-decoration: underline; text-underline-offset: 3px; }
.auth-state-panel { justify-content: flex-start; }
.auth-state-panel .auth-panel-top { margin-bottom: 60px; }
.auth-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #64dfbb; box-shadow: 0 0 0 4px rgba(100, 223, 187, .12); }
.auth-state-icon { display: grid; place-items: center; width: 58px; height: 58px; margin-bottom: 21px; border: 1px solid rgba(100, 223, 187, .35); border-radius: 16px; color: #7ce4c4; background: rgba(29, 103, 93, .22); }
.auth-state-icon.is-error { border-color: rgba(255, 137, 145, .35); color: #ffc0c0; background: rgba(126, 25, 40, .22); }
.auth-state-panel h2 { margin: 9px 0 8px; color: #eef6ff; font-size: 27px; line-height: 1.4; }
.auth-state-panel .auth-muted strong { color: #dcefff; font-weight: 600; }
.auth-dashboard-button { margin-top: 28px; }
.auth-state-panel .auth-secondary-button { margin-top: 10px; }
.auth-loading-note { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 47px; margin-top: 20px; border: 1px solid rgba(145, 178, 209, .15); border-radius: 9px; color: #9eb5cb; background: rgba(23, 39, 65, .42); font-size: 11px; }
.auth-spinner { width: 14px; height: 14px; border: 2px solid rgba(76, 215, 246, .25); border-top-color: var(--auth-cyan); border-radius: 50%; animation: auth-spin .8s linear infinite; }
.auth-footnote { position: relative; z-index: 1; margin: 13px 0 0; color: #526984; font: 500 9px/1.4 'Plus Jakarta Sans', sans-serif; letter-spacing: .04em; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) {
  .masar-auth { padding: 18px 14px; }
  .auth-frame { grid-template-columns: 1fr; grid-template-areas: 'form' 'hero'; min-height: auto; max-width: 620px; }
  .auth-form-panel { border-right: 0; border-bottom: 1px solid rgba(162, 201, 231, .14); }
  .auth-hero-panel { min-height: 530px; }
  .auth-state-panel .auth-panel-top { margin-bottom: 36px; }
}
@media (max-width: 520px) {
  .masar-auth { padding: 0; align-items: stretch; }
  .auth-frame { width: 100%; border: 0; border-radius: 0; }
  .auth-form-panel { padding: 25px 19px 27px; }
  .auth-panel-top { margin-bottom: 22px; }
  .auth-tabs { margin-bottom: 24px; }
  .auth-heading h2 { font-size: 23px; }
  .auth-hero-panel { min-height: 480px; padding: 30px 19px 25px; }
  .auth-brand-lockup { margin-bottom: 40px; }
  .auth-hero-panel h1 { font-size: 31px; }
  .auth-hero-copy { font-size: 12px; }
  .auth-chart-card { margin-top: 35px; }
  .auth-hero-notes { gap: 9px; font-size: 9px; }
  .auth-footnote { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .masar-auth *, .masar-auth *::before, .masar-auth *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Brand remains visible above the sign-in action on narrow screens. */
.auth-mobile-brand{display:none}
@media(max-width:900px){.auth-mobile-brand{display:flex;align-items:center;gap:9px;margin-bottom:22px}.auth-mobile-brand img{width:32px;height:32px;border-radius:8px}.auth-mobile-brand strong{font-family:"Plus Jakarta Sans",sans-serif;font-size:14px;letter-spacing:1px}.auth-mobile-brand b{color:#4cd7f6}}

/* Google OAuth action and compact provider choice. */
.auth-google-button{position:relative;display:flex;align-items:center;justify-content:center;gap:11px;width:100%;min-height:47px;border:1px solid rgba(190,207,226,.3);border-radius:9px;color:#edf5ff;background:rgba(255,255,255,.06);font:700 12px 'IBM Plex Sans Arabic',sans-serif;cursor:pointer;transition:background .2s,border-color .2s,opacity .2s}
.auth-google-button:hover:not(:disabled){background:rgba(255,255,255,.11);border-color:rgba(190,207,226,.55)}
.auth-google-button:disabled{cursor:not-allowed;opacity:.58}
.auth-google-mark{width:20px;height:20px;flex:none}
.auth-button-spinner{display:none;width:14px;height:14px;border:2px solid rgba(255,255,255,.3);border-top-color:#fff;border-radius:50%}
.auth-google-button.is-loading .auth-button-spinner{display:block;animation:auth-spin .8s linear infinite}
.auth-google-status{margin:6px 0 0;color:#8298b3;text-align:center;font-size:10px;line-height:1.6}
.auth-divider{display:flex;align-items:center;gap:10px;margin:11px 0 0;color:#657991;font-size:10px}
.auth-divider::before,.auth-divider::after{content:'';height:1px;flex:1;background:rgba(145,178,209,.14)}
.auth-manus-explainer{margin:10px 0 14px}
@media(max-width:520px){.auth-google-button{min-height:45px}.auth-manus-explainer{margin-top:8px}.auth-divider{margin-top:8px}}
