/* Reno AI intake: liquid-glass panels on a moving color field; a soft rotating ring marks anything working or active. */
:root {
  --ink: #fff8ee;
  --ink-2: rgba(255, 248, 238, 0.86);
  --ink-3: rgba(255, 248, 238, 0.66);
  --glass: rgba(255, 236, 200, 0.10);
  --glass-strong: rgba(255, 236, 200, 0.14);
  --edge: rgba(255, 255, 255, 0.22);
  --edge-soft: rgba(255, 214, 150, 0.16);
  --user: linear-gradient(135deg, #ffb020, #ff6b1a);
  --good: #ffd166;
  --warn: #ffb347;
  --bad: #ff6b3d;
  --radius: 26px;
  --siri: conic-gradient(from var(--angle), #ffe066, #ffc233, #ff9f1c, #ff6b1a, #ff9f1c, #ffd166, #ffe066);
  /* the ring: softer tones, and a dim stretch so it reads as a light travelling around the edge */
  --ring: conic-gradient(from var(--angle), rgba(255,214,140,.15), rgba(255,196,90,.9) 18%, rgba(255,150,50,.9) 30%,
          rgba(255,214,140,.15) 48%, rgba(255,214,140,.15) 100%);
  color-scheme: dark;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: #140a03;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* Moving color field behind the glass */
.field { position: fixed; inset: -20%; z-index: 0; filter: blur(110px) saturate(110%); opacity: 0.32; }
.field span { position: absolute; border-radius: 50%; mix-blend-mode: screen; animation: drift 26s ease-in-out infinite alternate; }
.field span:nth-child(1) { width: 52vw; height: 52vw; left: 2%; top: 4%; background: #ff8a00; }
.field span:nth-child(2) { width: 46vw; height: 46vw; right: 0; top: 18%; background: #ffb300; animation-duration: 31s; }
.field span:nth-child(3) { width: 40vw; height: 40vw; left: 30%; bottom: 0; background: #ff5a1f; animation-duration: 37s; opacity: .7; }
.field span:nth-child(4) { width: 30vw; height: 30vw; right: 22%; bottom: 8%; background: #ffd84d; animation-duration: 29s; opacity: .55; }
@keyframes drift { to { transform: translate(6vw, -5vh) scale(1.12); } }

/* Liquid glass */
.glass {
  position: relative;
  background: linear-gradient(160deg, rgba(255,236,200,0.12), rgba(26,12,3,0.64) 38%, rgba(26,12,3,0.56));
  backdrop-filter: blur(40px) saturate(140%);
  -webkit-backdrop-filter: blur(40px) saturate(140%);
  border: 1px solid var(--edge-soft);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.35), inset 0 -1px 0 rgba(255,255,255,0.06),
              0 20px 60px rgba(0,0,0,0.35);
}
.glass::after { /* specular highlight along the top edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 60% at 20% -10%, rgba(255,255,255,0.28), transparent 55%);
  mix-blend-mode: soft-light;
}

/* Glow: one thin rotating ring, no halo. Elements that can glow carry .ring; adding .glow fades the ring in,
   removing it fades the ring out (opacity transition), so it never snaps on or off. */
.ring { isolation: isolate; }
.ring::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; z-index: 2; pointer-events: none;
  background: var(--ring);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: 0; transition: opacity .9s cubic-bezier(.4, 0, .2, 1);
  animation: spin 4.5s linear infinite;
}
.ring.glow::before { opacity: .7; }
@keyframes spin { to { --angle: 360deg; } }

/* Layout */
.app { position: relative; z-index: 1; height: 100%; display: grid; grid-template-rows: auto 1fr; gap: 18px; padding: 22px 26px 26px; }
.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-radius: 999px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; }
.orb { width: 30px; height: 30px; border-radius: 50%; background: var(--siri); animation: spin 6s linear infinite; box-shadow: 0 0 18px rgba(255,170,40,.7); }
.topbar .sub { color: var(--ink-2); font-size: 14px; }
.topbar .spacer { flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-size: 13px;
  background: var(--glass); border: 1px solid var(--edge-soft); color: var(--ink-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--good); box-shadow: 0 0 10px var(--good); }
.main { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; min-height: 0; }
.side { display: grid; grid-template-rows: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; min-height: 0; }

/* Chat */
.chat { display: flex; flex-direction: column; min-height: 0; padding: 0; overflow: hidden; }
.chat header, .card header { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px 10px; }
.chat header h2, .card header h2 { font-size: 15px; font-weight: 600; margin: 0; color: var(--ink-2); letter-spacing: .02em; }
.messages { flex: 1; overflow-y: auto; padding: 8px 22px 18px; display: flex; flex-direction: column; gap: 12px; scroll-behavior: smooth; }
.msg { max-width: 82%; padding: 13px 17px; border-radius: 22px; font-size: 16.5px; line-height: 1.5; animation: rise .35s cubic-bezier(.2,.9,.3,1.2); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.msg.leaving { opacity: 0; transform: scale(.98); transition: opacity .35s ease, transform .35s ease; }
.msg.bot { align-self: flex-start; background: rgba(24, 11, 2, 0.78); border: 1px solid var(--edge-soft); border-bottom-left-radius: 8px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); position: relative; }
.msg.user { align-self: flex-end; background: var(--user); color: #1c0d02; font-weight: 500; border-bottom-right-radius: 8px; box-shadow: 0 8px 24px rgba(255,140,30,.35); }
.msg.safety { border: 1px solid rgba(255,107,61,.6); background: rgba(255,107,61,.18); }
.msg .meta { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.typing { display: inline-flex; gap: 5px; padding: 15px 18px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-2); animation: bounce 1.1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bounce { 40% { transform: translateY(-5px); opacity: 1; } 0%, 80%, 100% { opacity: .4; } }

.composer { padding: 12px 16px 16px; display: grid; gap: 10px; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; }
.quick button, .btn {
  font: inherit; font-size: 13px; color: var(--ink); cursor: pointer; padding: 8px 14px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--edge-soft); transition: background .2s, transform .1s;
}
.quick button:hover, .btn:hover { background: var(--glass-strong); }
.quick button:active, .btn:active { transform: scale(.97); }
.quick button:disabled, .btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--user); border: 0; font-weight: 600; color: #1c0d02; padding: 10px 18px; box-shadow: 0 8px 24px rgba(255,140,30,.35); }
.inputbar { position: relative; display: flex; align-items: flex-end; gap: 10px; padding: 8px 8px 8px 18px; border-radius: 24px; }
.inputbar textarea { flex: 1; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit;
  font-size: 15.5px; line-height: 1.4; max-height: 120px; padding: 9px 0; }
.inputbar textarea::placeholder { color: var(--ink-3); }
.send { width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer; background: var(--user); color: #1c0d02; font-size: 18px;
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(255,140,30,.45); }
.send:disabled { opacity: .45; cursor: default; }

/* Cards inside the chat: summary and confirmed record */
.card-in { align-self: stretch; max-width: 100%; padding: 16px 18px; border-radius: 20px; background: rgba(24,11,2,.78);
  border: 1px solid var(--edge-soft); animation: rise .35s; }
.card-in h3 { margin: 0 0 10px; font-size: 15px; }
.card-in .row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-top: 1px solid var(--edge-soft); font-size: 14px; }
.card-in .row:first-of-type { border-top: 0; }
.card-in .row .k { color: var(--ink-2); }
.card-in .actions { display: flex; gap: 10px; margin-top: 12px; }
.check { display: inline-flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13.5px; color: var(--good); }

/* Map */
.card { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.mapwrap { position: relative; flex: 1; min-height: 0; padding: 0 14px 14px; }
.mapwrap svg { width: 100%; height: 100%; display: block; }
.zip { fill: rgba(255,226,180,.08); stroke: rgba(255,214,150,.42); stroke-width: .6; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .25s; }
.zip:hover { fill: rgba(255,200,90,.30); }
.zip.on { fill: url(#siriFill); stroke: #fff; stroke-width: 2; filter: drop-shadow(0 0 8px rgba(255,170,40,.9)); }
.maplabel { position: absolute; left: 26px; bottom: 24px; padding: 9px 14px; border-radius: 16px; font-size: 13px; pointer-events: none; }
.maplabel b { font-size: 17px; display: block; }
.tooltip { position: absolute; pointer-events: none; padding: 6px 10px; border-radius: 10px; font-size: 12.5px; background: rgba(30,15,4,.75);
  border: 1px solid var(--edge-soft); transform: translate(-50%, -130%); white-space: nowrap; opacity: 0; transition: opacity .12s; }
.zipfield { display: flex; gap: 8px; align-items: center; }
.zipfield input { width: 92px; font: inherit; font-size: 14px; color: var(--ink); background: var(--glass); border: 1px solid var(--edge-soft);
  border-radius: 999px; padding: 6px 12px; outline: 0; letter-spacing: .08em; }

/* Job details */
.details { flex: 1; overflow-y: auto; padding: 0 18px 16px; display: grid; gap: 8px; align-content: start; }
.detail { position: relative; display: grid; grid-template-columns: 22px 1fr; gap: 10px; padding: 10px 12px; border-radius: 16px;
  background: rgba(24,11,2,.62); border: 1px solid var(--edge-soft); transition: background .3s; }
.detail .ic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; margin-top: 1px; }
.detail.known .ic { background: rgba(255,209,102,.2); color: var(--good); }
.detail.unsure .ic { background: rgba(251,191,36,.2); color: var(--warn); }
.detail.missing .ic { background: rgba(255,255,255,.08); color: var(--ink-3); }
.detail .name { font-size: 13px; color: var(--ink-2); }
.detail .val { font-size: 16px; font-weight: 600; margin-top: 1px; }
.detail.missing .val { color: var(--ink-3); font-weight: 500; }
.detail .quote { font-size: 13px; color: var(--ink-3); margin-top: 3px; font-style: italic; }
.detail.next { background: rgba(255,170,40,.14); }
.detail.fresh { animation: pop .9s ease; }
@keyframes pop { 0% { background: rgba(255,170,40,.45); } 100% { background: rgba(24,11,2,.62); } }
.empty { color: var(--ink-3); font-size: 14px; padding: 8px 4px; }

@media (max-width: 980px) {
  body { overflow: auto; }
  .app { height: auto; }
  .main { grid-template-columns: 1fr; }
  .chat { height: 70vh; }
  .side { grid-template-rows: 420px auto; }
}
/* Loading screen while the deployed server loads the model after waking (demo/deploy.py /model-status) */
.loading { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 16px;
  background: rgba(20, 10, 3, 0.55); backdrop-filter: blur(6px); }
.loading[hidden] { display: none; }
.loading-card { max-width: 440px; padding: 28px 30px; text-align: center; }
.loading-card .orb { width: 54px; height: 54px; margin: 0 auto 16px; }
.loading-card h2 { margin: 0 0 10px; font-size: 21px; }
.loading-card p { margin: 0 0 10px; color: var(--ink-2); line-height: 1.45; }
.loading-card .loading-time { margin: 6px 0 0; color: var(--ink-3); font-variant-numeric: tabular-nums; }
@media (prefers-reduced-motion: reduce) { *, *::before { animation: none !important; } }
