/* 3XE Orbit — Created by 3XE Studios · Texas */
@font-face { font-family: 'Sora'; src: url('/fonts/Sora.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }
:root {
  --bg: #070A14; --bg2: #0B1020; --surface: #0F1528; --surface2: #151C33; --line: rgba(255,255,255,.08);
  --text: #EEF1F8; --muted: #8E97B3; --dim: #5D6683;
  --cyan: #22D3EE; --indigo: #818CF8; --violet: #A78BFA; --pink: #F472B6; --green: #34D399; --red: #F87171; --amber: #FBBF24;
  --grad: linear-gradient(135deg, #22D3EE 0%, #818CF8 55%, #C084FC 100%);
  --radius: 18px; --radius-sm: 12px;
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --head: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh; min-height: 100dvh; -webkit-font-smoothing: antialiased;
  background-image: radial-gradient(1200px 600px at 80% -10%, rgba(129,140,248,.14), transparent 60%), radial-gradient(900px 500px at -10% 10%, rgba(34,211,238,.10), transparent 60%);
  background-attachment: fixed;
}
a { color: var(--cyan); text-decoration: none; }
h1, h2, h3 { font-family: var(--head); letter-spacing: -.02em; margin: 0 0 .4em; line-height: 1.15; }
h1 { font-size: clamp(2rem, 7vw, 3.4rem); font-weight: 700; }
h2 { font-size: 1.35rem; font-weight: 600; }
h3 { font-size: 1.05rem; font-weight: 600; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: .85rem; }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Buttons & inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; border-radius: 999px; padding: .85em 1.4em; font: 600 1rem/1 var(--head); cursor: pointer; color: #061018; background: var(--grad); box-shadow: 0 8px 30px -8px rgba(129,140,248,.6); transition: transform .12s, opacity .2s; text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); box-shadow: none; }
.btn.subtle { background: var(--surface2); color: var(--text); box-shadow: none; }
.btn.danger { background: rgba(248,113,113,.12); color: var(--red); box-shadow: none; }
.btn.block { width: 100%; }
.btn.sm { padding: .55em 1em; font-size: .88rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); display: inline-grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.on { color: var(--amber); border-color: rgba(251,191,36,.35); }
input, textarea, select { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: .8em .95em; outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
input:focus, textarea:focus, select:focus { border-color: rgba(129,140,248,.6); box-shadow: 0 0 0 4px rgba(129,140,248,.15); }
input[type=date], input[type=time] { min-height: 48px; }
textarea { resize: vertical; min-height: 90px; }
label { display: block; font-size: .85rem; color: var(--muted); margin: 0 0 .35em; font-weight: 500; }
.field { margin-bottom: 1rem; }
.row { display: flex; gap: .75rem; } .row > * { flex: 1; min-width: 0; }
.err { color: var(--red); font-size: .9rem; min-height: 1.3em; margin: .2rem 0 .6rem; }

/* Brand */
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font: 700 1.1rem var(--head); letter-spacing: .02em; }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand span { font-weight: 300; letter-spacing: .14em; }

/* Footer */
.footer { text-align: center; color: var(--dim); font-size: .82rem; padding: 2rem 1rem calc(1.5rem + var(--safe-b)); letter-spacing: .02em; }
.footer strong { color: var(--muted); font-weight: 600; }

/* ---------- Landing ---------- */
.topnav { display: flex; align-items: center; justify-content: space-between; padding: calc(1rem + var(--safe-t)) 1.25rem 1rem; max-width: 1100px; margin: 0 auto; }
.topnav nav { display: flex; gap: .5rem; }
.hero { max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.25rem 1rem; text-align: center; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 560px; margin: 0 auto 1.8rem; }
.hero .ctas { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }
.orb-demo { margin: 2.5rem auto 1rem; width: 210px; height: 210px; position: relative; display: grid; place-items: center; }
.orb-demo img { width: 150px; height: 150px; border-radius: 34px; box-shadow: 0 30px 80px -20px rgba(129,140,248,.6); position: relative; z-index: 1; }
.orb-demo::before, .orb-demo::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(129,140,248,.25); animation: pulse 3s ease-out infinite; }
.orb-demo::after { animation-delay: 1.5s; }
@keyframes pulse { from { transform: scale(.7); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.bubble-demo { display: inline-block; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: .8rem 1.1rem; margin: .4rem; font-size: .95rem; color: var(--muted); }
.bubble-demo b { color: var(--text); font-weight: 500; }
.features { max-width: 1100px; margin: 2rem auto; padding: 0 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.feature { background: linear-gradient(180deg, var(--surface), rgba(15,21,40,.6)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; }
.feature .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(129,140,248,.12); color: var(--indigo); margin-bottom: .8rem; }
.feature .ic svg { width: 22px; height: 22px; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }
.install-tip { max-width: 680px; margin: 2rem auto 0; padding: 1.2rem 1.25rem; border-radius: var(--radius); background: rgba(34,211,238,.06); border: 1px solid rgba(34,211,238,.2); color: var(--muted); font-size: .95rem; text-align: left; }
.install-tip strong { color: var(--text); }

/* ---------- Auth ---------- */
.auth-wrap { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.auth-card { width: 100%; max-width: 420px; margin: 0 auto; padding: 1.5rem 1.25rem; flex: 1; }
.auth-card .logo { display: block; width: 72px; height: 72px; border-radius: 18px; margin: 1.5rem auto 1.2rem; box-shadow: 0 20px 50px -15px rgba(129,140,248,.6); }
.auth-card h1 { font-size: 1.8rem; text-align: center; }
.auth-card .sub { text-align: center; color: var(--muted); margin-bottom: 1.6rem; }
.auth-card .switch { text-align: center; margin-top: 1.2rem; color: var(--muted); }
.pw-wrap { position: relative; }
.pw-wrap button { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--muted); font-size: .85rem; padding: .5em; cursor: pointer; }

/* ---------- App shell ---------- */
.app { max-width: 720px; margin: 0 auto; padding: 0 1rem calc(96px + var(--safe-b)); }
.app-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -1rem 1rem; position: sticky; top: 0; z-index: 5; padding: calc(.6rem + var(--safe-t)) 1rem .6rem; background: rgba(7,10,20,.72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-bottom: 1px solid transparent; }
.view { animation: fadein .25s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: space-around; padding: .45rem .5rem calc(.45rem + var(--safe-b)); background: rgba(9,12,24,.82); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); border-top: 1px solid var(--line); }
.tabbar button { flex: 1; max-width: 110px; background: none; border: 0; color: var(--dim); display: flex; flex-direction: column; align-items: center; gap: 3px; font: 500 .7rem var(--head); padding: .35rem 0; cursor: pointer; }
.tabbar button svg { width: 24px; height: 24px; }
.tabbar button.active { color: var(--text); }
.tabbar button.active svg { color: var(--cyan); filter: drop-shadow(0 0 8px rgba(34,211,238,.5)); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem; margin-bottom: 1rem; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .6rem; }
.card-head h3 { margin: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 1.4rem 0 .7rem; }
.section-title h2 { margin: 0; }
.empty { text-align: center; color: var(--dim); padding: 1.6rem .5rem; font-size: .95rem; }

/* Assistant (home) */
.greet h1 { font-size: 1.75rem; margin-bottom: .15rem; }
.greet p { color: var(--muted); margin: 0; }
.assistant { text-align: center; padding: 1.4rem 0 .4rem; }
.mic { position: relative; width: 148px; height: 148px; margin: 0 auto; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, #2A3360, #0E1328 70%); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 25px 60px -18px rgba(129,140,248,.7); display: grid; place-items: center; color: #fff; transition: transform .15s; }
.mic::before { content: ''; position: absolute; inset: -3px; border-radius: 50%; padding: 3px; background: var(--grad); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; opacity: .9; }
.mic svg { width: 56px; height: 56px; position: relative; z-index: 1; }
.mic:active { transform: scale(.96); }
.mic .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(34,211,238,.5); opacity: 0; }
.mic.listening { background: radial-gradient(circle at 35% 30%, #1B6E86, #102040 70%); }
.mic.listening .ring { animation: pulse 1.6s ease-out infinite; }
.mic.listening .ring:nth-child(2) { animation-delay: .5s; }
.mic.listening .ring:nth-child(3) { animation-delay: 1s; }
.mic-hint { color: var(--muted); font-size: .95rem; margin: 1rem 0 0; min-height: 1.5em; }
.transcript { font-family: var(--head); font-size: 1.1rem; min-height: 1.6em; margin: .4rem 1rem 0; color: var(--text); }
.composer { display: flex; gap: .5rem; align-items: center; margin: 1rem 0 .6rem; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: .3rem .3rem .3rem 1rem; }
.composer input { border: 0; background: transparent; padding: .6rem 0; box-shadow: none !important; }
.composer .send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--grad); color: #061018; display: grid; place-items: center; cursor: pointer; flex: none; }
.composer .send svg { width: 20px; height: 20px; }
.chips { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem 0 .6rem; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 999px; padding: .5em .95em; font-size: .85rem; cursor: pointer; white-space: nowrap; }
.chip.active { color: #061018; background: var(--grad); border-color: transparent; }
.convo { display: flex; flex-direction: column; gap: .6rem; margin: .6rem 0 1rem; }
.msg { max-width: 88%; padding: .75rem 1rem; border-radius: 18px; font-size: .97rem; animation: fadein .25s ease; }
.msg.me { align-self: flex-end; background: var(--surface2); border-bottom-right-radius: 6px; }
.msg.bot { align-self: flex-start; background: linear-gradient(135deg, rgba(34,211,238,.12), rgba(167,139,250,.12)); border: 1px solid rgba(129,140,248,.2); border-bottom-left-radius: 6px; }
.msg .actions { display: flex; gap: .4rem; margin-top: .6rem; flex-wrap: wrap; }

/* Appointment items */
.appt { display: flex; gap: .9rem; padding: .9rem 0; border-top: 1px solid var(--line); }
.appt:first-child { border-top: 0; padding-top: .2rem; }
.appt .when { flex: none; width: 64px; text-align: center; }
.appt .when .t { font: 600 .98rem var(--head); }
.appt .when .ap { font-size: .72rem; color: var(--muted); letter-spacing: .06em; }
.appt .body { flex: 1; min-width: 0; }
.appt .title { font-weight: 600; word-wrap: break-word; }
.appt .meta { color: var(--muted); font-size: .88rem; margin-top: .15rem; display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.appt .meta a { color: var(--cyan); }
.appt .tools { display: flex; gap: .4rem; margin-top: .55rem; flex-wrap: wrap; }
.appt .tools button, .appt .tools a { font-size: .8rem; padding: .38em .8em; border-radius: 999px; background: var(--surface2); border: 1px solid var(--line); color: var(--text); cursor: pointer; }
.day-group h4 { font: 600 .8rem var(--head); color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin: 1.2rem 0 .4rem; }
.day-group h4.today { color: var(--cyan); }
.daynav { display: flex; align-items: center; gap: .5rem; margin-bottom: .8rem; }
.daynav input { flex: 1; text-align: center; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); padding: .5em 1.1em; border-radius: 999px; font: 600 .85rem var(--head); cursor: pointer; }
.seg button.active { background: var(--surface2); color: var(--text); }
.week-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: .35rem; margin-bottom: 1rem; }
.week-strip button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); border-radius: 14px; padding: .5rem 0; cursor: pointer; font: 500 .72rem var(--head); display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative; }
.week-strip button b { font-size: 1.05rem; color: var(--text); }
.week-strip button.sel { background: var(--grad); color: #061018; border-color: transparent; }
.week-strip button.sel b { color: #061018; }
.week-strip button .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); }
.week-strip button.sel .dot { background: #061018; }

/* Ideas */
.ideas-grid { columns: 2 160px; column-gap: .8rem; }
.idea { break-inside: avoid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: .8rem; position: relative; }
.idea.pinned { border-color: rgba(251,191,36,.35); background: linear-gradient(180deg, rgba(251,191,36,.06), var(--surface)); }
.idea h3 { font-size: 1rem; margin: 0 1.8rem .35rem 0; word-wrap: break-word; }
.idea p { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; white-space: pre-wrap; word-wrap: break-word; }
.idea .tags { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .5rem; }
.tag { font-size: .74rem; color: var(--violet); background: rgba(167,139,250,.12); border-radius: 999px; padding: .15em .6em; cursor: pointer; }
.idea .pin { position: absolute; top: .7rem; right: .7rem; background: none; border: 0; color: var(--dim); cursor: pointer; padding: .2rem; }
.idea .pin.on { color: var(--amber); }
.idea .pin svg { width: 18px; height: 18px; }
.idea .foot { display: flex; justify-content: space-between; align-items: center; font-size: .75rem; color: var(--dim); }
.idea .foot button { background: none; border: 0; color: var(--muted); font-size: .8rem; cursor: pointer; padding: .2rem .3rem; }
.search { position: relative; margin-bottom: .6rem; }
.search svg { position: absolute; left: .9rem; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--dim); }
.search input { padding-left: 2.6rem; border-radius: 999px; }

/* Tasks */
.task { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task .check { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--dim); background: none; flex: none; cursor: pointer; display: grid; place-items: center; color: transparent; padding: 0; }
.task.done .check { background: var(--green); border-color: var(--green); color: #052; }
.task .check svg { width: 14px; height: 14px; }
.task .txt { flex: 1; min-width: 0; word-wrap: break-word; }
.task.done .txt { color: var(--dim); text-decoration: line-through; }
.task .due { font-size: .78rem; color: var(--muted); }
.task .due.overdue { color: var(--red); }
.task .del { background: none; border: 0; color: var(--dim); cursor: pointer; font-size: 1.2rem; padding: .2rem .4rem; }
.progress { height: 6px; background: var(--surface2); border-radius: 99px; overflow: hidden; margin: .4rem 0 .2rem; }
.progress i { display: block; height: 100%; background: var(--grad); border-radius: 99px; transition: width .3s; }

/* Settings */
.setting { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .85rem 0; border-top: 1px solid var(--line); }
.setting:first-of-type { border-top: 0; }
.setting .lbl { font-weight: 500; }
.setting .desc { color: var(--muted); font-size: .85rem; }
.switch-t { position: relative; width: 52px; height: 32px; flex: none; }
.switch-t input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch-t span { position: absolute; inset: 0; border-radius: 99px; background: var(--surface2); border: 1px solid var(--line); transition: .2s; }
.switch-t span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: .2s; }
.switch-t input:checked + span { background: var(--green); border-color: transparent; }
.switch-t input:checked + span::after { transform: translateX(20px); }
.badge { display: inline-block; font: 600 .7rem var(--head); letter-spacing: .06em; text-transform: uppercase; padding: .25em .7em; border-radius: 99px; background: rgba(251,191,36,.12); color: var(--amber); }
.badge.ok { background: rgba(52,211,153,.12); color: var(--green); }
.faceid { display: flex; gap: 1rem; align-items: flex-start; }
.faceid .ic { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(34,211,238,.1); color: var(--cyan); }
.faceid .ic svg { width: 26px; height: 26px; }
ol.steps { padding-left: 1.2rem; color: var(--muted); margin: .4rem 0 0; } ol.steps li { margin-bottom: .35rem; }

/* Modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(3,5,12,.7); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fadein .2s; }
.modal { width: 100%; max-width: 560px; max-height: 92vh; overflow-y: auto; background: var(--bg2); border: 1px solid var(--line); border-radius: 24px 24px 0 0; padding: 1.3rem 1.2rem calc(1.3rem + var(--safe-b)); animation: slideup .25s ease; }
@keyframes slideup { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal .grab { width: 40px; height: 5px; background: var(--surface2); border-radius: 9px; margin: -.3rem auto 1rem; }
@media (min-width: 640px) { .modal-bg { align-items: center; } .modal { border-radius: 24px; } }
.toast { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); background: var(--surface2); border: 1px solid var(--line); color: var(--text); padding: .75rem 1.1rem; border-radius: 14px; z-index: 60; box-shadow: 0 20px 40px -10px rgba(0,0,0,.6); font-size: .93rem; max-width: 92vw; animation: fadein .2s; display: flex; gap: .8rem; align-items: center; }
.toast button { background: none; border: 0; color: var(--cyan); font-weight: 600; cursor: pointer; }


.connection-status {padding:.8rem 1rem;background:#493119;color:#ffe5b6;border-bottom:1px solid #795226;font-size:.85rem;}
button:disabled {opacity:.55;cursor:wait;}
