
:root{--bg:#f6fbf8;--panel:#fff;--border:#e7ecef;--shadow:0 6px 24px rgba(16,24,40,.08);--forest:#0e5746;--chip:#e8f5ef;--cta:#198754;--cta-hover:#116f43;--blue:#00A1E0;--muted:#667085}
*{box-sizing:border-box}html,body{height:100%}body{margin:0;font-family:'Inter',system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:linear-gradient(180deg,#e7f4ee 0,#f6fbf8 40%,#f6fbf8 100%);color:#0b1720}
.header{position:sticky;top:0;z-index:40;display:flex;align-items:center;justify-content:space-between;padding:10px 16px;background:rgba(255,255,255,.6);backdrop-filter:saturate(180%) blur(8px);border-bottom:1px solid var(--border)}
.logo{height:28px}.app-tag{font-size:12px;padding:4px 8px;border:1px solid var(--border);border-radius:10px;background:#fff;margin-left:8px}
.muted{color:var(--muted)}.small{font-size:12px}.tiny{font-size:11px}.link{background:none;border:none;color:var(--forest);text-decoration:underline;cursor:pointer}.left{display:flex;align-items:center}.right{display:flex;gap:10px;align-items:center}
.container{width:min(1100px,92vw);margin:20px auto}.title{margin:8px 0 16px}.title .subtitle{display:inline-block;font-size:42px;margin-top:6px;letter-spacing:-.02em;color:transparent;background:linear-gradient(90deg,#0e5746,#1a936f,#8bc34a);-webkit-background-clip:text;background-clip:text;text-shadow:0 6px 24px rgba(27,94,32,.18)}
.chip-row{display:flex;gap:10px;flex-wrap:wrap;overflow:visible;padding-bottom:8px}.chip{display:inline-flex;align-items:center;border:1px solid #a8d5c5;background:#f2fff9;color:#174d42;border-radius:999px;padding:12px 16px;white-space:nowrap;cursor:pointer;font-weight:700;font-size:15px}.chip:disabled{opacity:.55;cursor:not-allowed}
.chat-card{background:var(--panel);border:1px solid var(--border);border-radius:16px;box-shadow:var(--shadow)}.chat{height:min(70vh,780px);min-height:480px;overflow:auto;padding:14px 16px 16px;background:#f6f8fb}
.bubble{max-width:76ch;margin:12px 0;padding:12px 14px;border-radius:14px;background:#fff;border:1px solid var(--border);line-height:1.55;font-size:15px;color:#1b2832;position:relative}
.bubble.user{margin-left:auto;background:#43a047;color:#fff;border-color:#3a8b3b}.bubble.backend{background:rgba(0,161,224,.08);border-color:rgba(0,161,224,.35)}
.label{position:absolute;top:-9px;right:8px;font-size:10px;color:#fff;background:#98a2b3;padding:2px 6px;border-radius:8px;letter-spacing:.08em;text-transform:uppercase}.label.backend{background:var(--blue);color:#fff}
p{margin:0 0 8px}ul{margin:0 0 8px 18px}.sp{height:6px}
.typing{display:inline-flex;align-items:center;gap:6px;color:#0c5132}.dots span{display:inline-block;width:6px;height:6px;background:#0e5746;border-radius:999px;margin-right:4px;opacity:.25;animation:blink 1.4s infinite}.dots span:nth-child(2){animation-delay:.2s}.dots span:nth-child(3){animation-delay:.4s}@keyframes blink{0%,80%,100%{opacity:.15}40%{opacity:.85}}
.composer{display:flex;gap:10px;align-items:center;padding:10px;border-top:1px solid var(--border);background:#f6f8fb}.composer input{flex:1;height:54px;border:1px solid #cbd5e1;border-radius:999px;padding:0 16px;font-size:15px}.send{width:46px;height:46px;border-radius:999px;border:none;background:var(--forest);color:#fff;cursor:pointer}.send[disabled]{opacity:.6}
.cta-row{display:block;margin-top:6px}.cta{display:inline-block;padding:8px 12px;border:none;border-radius:8px;background:var(--cta);color:#fff;text-align:center;font-weight:600;font-size:14px;line-height:1.2;margin-top:6px}.cta:hover{background:var(--cta-hover)}
.gate{position:fixed;inset:0;display:grid;place-items:center;background:rgba(255,255,255,.65);backdrop-filter:blur(5px);z-index:100}.gate.hidden{display:none}
.gate-card{max-width:520px;width:92%;margin:0 auto;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.25);}
.gate-card label{display:block;font-weight:600;margin:12px 0 6px}.gate-card input{width:100%;height:44px;border:1px solid #cbd5e1;border-radius:10px;padding:8px 12px}
.btn{height:44px;border:none;background:var(--forest);color:#fff;border-radius:10px;padding:0 14px;cursor:pointer}.btn[disabled]{opacity:.55;cursor:not-allowed}
@media (max-width:640px){.title .subtitle{font-size:34px}.chat{height:65vh}.bubble{font-size:14px}}

.cta small,.cta .domain{display:none !important}

@media (max-width: 640px){ .title{font-size:32px} .chat{height:60vh} .chip{display:inline-flex;align-items:center;border:1px solid #a8d5c5;background:#f2fff9;color:#174d42;border-radius:999px;padding:12px 16px;white-space:nowrap;cursor:pointer;font-weight:700;font-size:15px} }

.cta small,.cta .domain{display:none !important}

.chat a{color:var(--blue);text-decoration:underline}

.link-row{margin:4px 0}


/* === UNA Front-end Refresh v2 === */

/* Theme */
:root{
  --una-green-100:#79836F;
  --una-green-cta:#659941;
  --una-text-dark:#143200;
  --una-bar:#F7A700;
}

/* Background: blurred website */
body::before{
  content:''; position:fixed; inset:0;
  background:url('https://i.imgur.com/5gzdjcR.png') center/cover no-repeat;
  filter:blur(5px); transform:scale(1.05);
  z-index:-2;
}
body::after{
  content:''; position:fixed; inset:0;
  background:rgba(255,255,255,.25);
  z-index:-1;
}

/* Shell places the chat UI above the blur, bordered on all sides */
.chat-shell{
  width:min(1180px,94vw);
  margin:14px auto 18px auto;
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.18);
  border:1px solid rgba(0,0,0,.08);
  background: rgba(255,255,255,.88);
}

/* Top orange chat bar is now the shell header */
.chat-shell > .header{
  background:var(--una-bar);
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 14px;
  border-bottom:1px solid rgba(0,0,0,.08);
  backdrop-filter:none; filter:none;
}
.header .left{display:flex;align-items:center;gap:10px}
.header .dog-logo{height:28px;width:28px;border-radius:50%}
.header .app-title{font-weight:700}
.header .right{display:flex;gap:12px;align-items:center}
.header .signed-as{font-size:13px}
.header .sign-out{font-weight:600;text-decoration:underline;cursor:pointer}

/* Shell body is a 2-col grid that expands when the sidebar hides */
.shell-body{display:grid; grid-template-columns: 300px 1fr; gap:18px; position:relative; padding:14px}
body.sidebar-collapsed .shell-body{grid-template-columns: 0 1fr}

/* Sidebar visuals; it's part of the shell (no external card) */
.sidebar{
  background: rgba(255,255,255,.7);
  border:1px solid rgba(0,0,0,.08);
  border-radius:10px;
  padding:12px 12px 16px 12px;
  box-shadow: 0 10px 20px rgba(0,0,0,.06) inset;
  overflow:hidden;
  transition: transform .18s ease, opacity .18s ease;
}
body.sidebar-collapsed .sidebar{transform:translateX(-8px); opacity:0; pointer-events:none}

/* Sidebar toggle floats at the boundary so it remains clickable even when collapsed */
.sidebar-toggle{
  position:absolute; top:6px; left: 298px; /* top-right of sidebar */
  transform: translateX(50%);
  background:transparent; border:none; padding:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
  width:28px; height:28px;
}
.sidebar-toggle img{width:28px;height:28px}
body.sidebar-collapsed .sidebar-toggle{ left: 0; transform: translateX(-50%);} /* stick to left edge when collapsed */

/* Sidebar inner content */
.profile{display:flex;gap:10px;align-items:center;margin:2px 0 8px 0}
.avatar{width:44px;height:44px;border-radius:50%;object-fit:cover}
.intro h3{font-size:12px;line-height:1.3;margin:0;text-transform:uppercase;letter-spacing:.3px;color:var(--una-text-dark)}
.side-text{font-size:13px;color:#122b0a;line-height:1.5;margin:6px 0}
.side-text.strong{font-weight:700}
.checklist{list-style:none;padding:0;margin:6px 0 8px 0}
.checklist li{display:flex;gap:8px;align-items:flex-start;margin:6px 0}
.checklist img{width:16px;height:16px;flex:0 0 16px;margin-top:3px}
.checklist span{font-size:13px;line-height:1.45;color:#0f2a07}
.divider{border:none;border-top:1px solid rgba(0,0,0,.08);margin:8px 0 6px}
.quickhead{font-weight:700;font-size:12px;text-transform:uppercase;letter-spacing:.3px;margin:4px 0;color:#143200}
.quicklinks{list-style:none;margin:0;padding:0}
.quicklinks li{margin:5px 0}
.quicklinks a{font-size:13px;text-decoration:underline;color:#0b1720}

/* Title centered above both columns */
.container{width:auto; margin:0} /* let shell control width */
.title{margin:4px 0 10px 0; text-align:center}
.title .subtitle{font-size:20px; font-weight:600; color:#0b1720}

/* Suggested chips above chat */
#chipRow{margin:6px auto 10px auto; display:flex; gap:10px; flex-wrap:wrap; justify-content:center}
body.chips-hidden #chipRow{display:none}

/* Chat region within the shell (no extra card) */
.chat{min-height:380px; max-height:60vh; overflow:auto; padding:14px 16px; background:#f6f8fb; border:1px solid rgba(0,0,0,.08); border-radius:8px}
.composer{display:flex;gap:10px;align-items:center;padding-top:10px}

/* Send button size fix */
#sendBtn{
  background: url('https://i.imgur.com/GIo912y.png') center/contain no-repeat;
  width:36px; height:36px; border:none; font-size:0; line-height:0; flex:0 0 36px;
}
#message{height:44px}

/* Login gate restyle */
.gate{background: rgba(255,255,255,.2); backdrop-filter: blur(5px)}
.gate-card{max-width:520px;width:92%;margin:0 auto;border-radius:12px;box-shadow:0 10px 30px rgba(0,0,0,.25);}
.gate-card h2{color:var(--una-text-dark)}
.gate-card .muted{color:var(--una-text-dark); opacity:.85}
.gate-card input{background:#fff !important; color:#0b1720; border:1px solid #cbd5e1; border-radius:10px; padding:8px 12px}
.gate-card .btn{background: var(--una-green-cta); color:#fff}
.gate-card .btn:hover{filter:brightness(.92)}

/* Hide original name-based header; we display email instead */
#signedAs{display:none}

/* Neutralize inner chat-card so the shell's top bar appears as the chat's border */
.chat-card{background:transparent;border:none;box-shadow:none;padding:0}

/* Toggle positioning refinement */
.sidebar-toggle{ left: 300px; transform: translateX(-50%); }
body.sidebar-collapsed .sidebar-toggle{ left: 10px; transform: none; }

/* When suggested chips are hidden, let the chat breathe a bit more */
body.chips-hidden .chat{ max-height: 70vh; }

/* --- UNA v3 layout refinements --- */

/* Appbox: bordered chat app above the blurred background */
.chat-shell.appbox{
  width:min(1180px,94vw);
  margin:22px auto;
  background:rgba(255,255,255,.92);
  border:1px solid rgba(0,0,0,.08);
  border-radius:16px;
  overflow:hidden;
  box-shadow: 0 18px 45px rgba(0,0,0,.12);
  position:relative;
}

/* Topbar sits inside the appbox as the top border */
.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px;
  background:var(--una-bar);
  border-bottom:1px solid rgba(0,0,0,.07);
}

/* Nullify any sticky behavior from .header (legacy) */
.header{ position:static !important; top:auto !important; background:transparent !important; box-shadow:none !important; filter:none !important; backdrop-filter:none !important; }

/* Grid body under topbar */
.shell-body.content-grid{
  display:grid;
  grid-template-columns: 300px 1fr;
  gap: 18px;
  padding: 14px;
}

/* Collapse: hide the sidebar column, grow chat */
body.sidebar-collapsed .shell-body.content-grid{ grid-template-columns: 0 1fr; }
body.sidebar-collapsed .sidebar{ transform:translateX(-100%); opacity:0; pointer-events:none; }

/* Sidebar card inside the appbox */
.sidebar{
  background: rgba(255,255,255,.75);
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  padding:14px 12px;
  position:relative;
}
.sidebar-hide{
  position:absolute; top:8px; right:8px;
  background:transparent; border:none; padding:0; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center;
}
.sidebar-hide img{ width:22px; height:22px; }

/* Re-open button that persists when collapsed */
.sidebar-show{
  position:absolute; left:8px; top:10px;
  background:rgba(255,255,255,.9);
  border:1px solid rgba(0,0,0,.1);
  border-radius:8px;
  padding:4px;
  cursor:pointer;
  display:none;
  box-shadow:0 4px 12px rgba(0,0,0,.12);
}
.sidebar-show img{ width:22px; height:22px; }
body.sidebar-collapsed .sidebar-show{ display:inline-flex; }

/* Main content */
.container{ width:auto; margin:0; }
.title{ margin: 4px 0 8px; text-align:center; }
#chipRow{ margin:6px auto 10px; display:flex; gap:8px; flex-wrap:wrap; justify-content:center; }

/* Chat visuals adjusted because the appbox now supplies the border */
.chat-card{ background:transparent; border:none; box-shadow:none; padding:0; }
.chat{
  min-height: 420px;
  background: rgba(246,248,251,.8);
  border:1px solid rgba(0,0,0,.06);
  border-radius:12px;
  padding:14px 16px 16px;
  overflow:auto;
}

/* Composer & send button size fixes */
#composer{ display:flex; gap:10px; align-items:center; padding:10px 0 0 0; margin-top:6px; border-top:1px dashed rgba(0,0,0,.1); }
#message{ height:38px; }
#sendBtn{
  width:32px; height:32px; flex:0 0 32px;
  background: url('https://i.imgur.com/GIo912y.png') center/contain no-repeat !important;
  border:none; padding:0; font-size:0; line-height:0;
}
/* Hide original name-based 'Logged in as' (we show email beside Sign out) */
#signedAs{ display:none; }

/* === v4 refinements === */
:root{
  --topbar-h: 56px;
  --pad: 14px;
  --gap: 18px;
  --sidebarW: 300px;
}

/* Topbar thinner with dog overlapping outside its bottom */
.topbar{ height: var(--topbar-h); padding: 8px 12px; overflow: visible; }
.topbar .bar-left{ display:flex; align-items:center; gap:12px; position:relative; padding-left:70px; }
.topbar .dog-logo{
  position:absolute; left:0; bottom:-8px;
  height:72px; width:auto; border-radius:0; /* overlapping */
}
.topbar .app-title{ font-weight:700; font-size:28px; color:var(--una-text-dark); letter-spacing:.2px; }
.topbar .right{ display:flex; gap:12px; align-items:center; }

/* Position the show button at the same spot as the sidebar's top-right corner */
.sidebar-show{
  position:absolute;
  left: calc(var(--pad) + var(--sidebarW) - 22px);
  top: calc(var(--topbar-h) + var(--pad) + 8px);
}

/* Sidebar header split lines and spacing */
.profile{ display:flex; gap:10px; align-items:flex-start; margin:6px 0 10px 0; }
.intro{ display:flex; flex-direction:column; line-height:1.1; margin-top:2px; }
.intro-line1{ font-size:13px; font-weight:800; color:#0e2f09; }
.intro-line2{ font-size:12px; font-weight:700; color:#1c3e12; }
.side-text{ font-size:13px; color:#122b0a; line-height:1.45; margin:6px 0; }

/* Better spacing around divider and quicklinks */
.divider{ margin:10px 0; }
.quickhead{ font-weight:800; font-size:13px; margin:8px 0 6px; text-transform:uppercase; letter-spacing:.3px; }
.quicklinks a{ text-decoration:underline; font-size:14px; }

/* Quality Score box (full width at bottom) */
.quality-box{
  margin-top:auto;
  border-radius:12px;
  overflow:hidden;
  border:1px solid rgba(0,0,0,.08);
  background:#fff;
  box-shadow:0 10px 24px rgba(0,0,0,.08);
}
.quality-top{
  background:var(--una-bar);
  color:var(--una-text-dark);
  font-weight:800;
  padding:10px 12px;
  text-align:left;
}
.quality-val{
  height:76px;
  display:flex; align-items:center; justify-content:center;
  font-size:34px; font-weight:800; color:#0a1f0a;
  background:linear-gradient(#fff, #f6f6f6);
}

/* Composer size: thicker input; smaller send button */
#message{
  height:52px;
  padding:12px 14px;
  border-radius:26px;
}
#sendBtn{
  width:26px; height:26px; flex:0 0 26px;
  background: url('https://i.imgur.com/GIo912y.png') center/contain no-repeat !important;
}

/* Ensure content grid padding respects the new topbar height for positioning */
.shell-body.content-grid{ padding: var(--pad); }

/* === v5 fixes === */
/* Dog fully inside the bar */
.topbar{ height: 56px; }
.topbar .bar-left{ padding-left:64px; position:relative; }
.topbar .dog-logo{
  position:absolute; left:12px; bottom:4px;
  height:48px; width:auto;
}

/* Remove sidebar hide/show UI */
.sidebar-hide, .sidebar-show{ display:none !important; }

/* Divider after quicklinks already inserted in HTML — keep consistent spacing */
.sidebar .divider{ margin:12px 0; }

/* Quality score value placeholder: keep space even when empty */
.quality-val{ min-height:76px; }

/* Ensure chat links are clean and readable */
.chat a{ text-decoration:underline; word-break:break-word; }

/* Slightly more line-height for bot text bubbles for tidiness */
.bubble{ line-height:1.55; }

/* v6: ensure dog fully inside topbar */
.topbar{ height:56px; overflow:visible; }
.topbar .bar-left{ padding-left:64px; position:relative; }
.topbar .dog-logo{ position:absolute; left:12px; top:4px; bottom:auto; height:48px; width:auto; }

.quality-val{ color:#0a2e0a; font-weight:800; font-size:34px; }
#gate{position:fixed;inset:0;display:grid;place-items:center;background:rgba(0,0,0,.28);backdrop-filter:blur(4px);z-index:9999;}