/* CHIKARA Wellness: login, console, layers, insights (brief palette) */
#login-screen { position: fixed; inset: 0; z-index: 9999; background: var(--teal-deep); color: var(--ivory); display: flex; align-items: center; justify-content: center; padding: 1rem; overflow-y: auto; }
#login-screen::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 70% at 85% 8%, rgba(201, 162, 39, .25), transparent 70%), radial-gradient(ellipse 60% 60% at 0% 100%, rgba(20, 145, 155, .45), transparent 70%); pointer-events: none; }
#login-screen[hidden] { display: none; }
.login-card { position: relative; max-width: 430px; width: 100%; background: var(--cream); color: var(--charcoal); border: 1px solid rgba(224, 188, 74, .5); border-radius: 14px; padding: 2rem; box-shadow: 0 30px 80px rgba(0, 0, 0, .4); margin: auto; }
.login-card::before { content: ''; display: block; height: 4px; margin: -2rem -2rem 1.4rem; border-radius: 14px 14px 0 0; background: var(--mesh); background-size: 400% 400%; animation: sweep 28s ease-in-out infinite; }
.login-card .brand-mark { width: 64px; height: 64px; margin-bottom: .6rem; }
.login-card .eyebrow { color: var(--mustard-ink); font-size: .62rem; letter-spacing: .2em; }
.login-card h1 { font-size: 1.8rem; margin: .3rem 0 .4rem; }
.login-card .muted { color: var(--stone); font-size: .86rem; }
.login-card label { display: block; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .12em; text-transform: uppercase; color: var(--stone); margin: .95rem 0 .3rem; }
.login-card select, .login-card input { width: 100%; background: #fff; border: 1px solid var(--line); color: var(--charcoal); border-radius: 6px; padding: .65rem .75rem; font: inherit; min-height: 44px; }
.login-card .btn { width: 100%; margin-top: 1.1rem; }
.login-err { color: var(--danger); font-size: .82rem; margin-top: .6rem; min-height: 1em; }
.demo-accounts { margin-top: 1rem; font-size: .76rem; color: var(--stone); border-top: 1px solid var(--line); padding-top: .8rem; line-height: 1.7; }
.demo-accounts code { background: rgba(212, 241, 242, .6); padding: .05rem .35rem; border-radius: 3px; color: var(--teal-deep); font-family: var(--font-mono); }
.login-back { display: inline-block; margin-top: .9rem; font-size: .76rem; font-weight: 600; }
#toast-box { position: fixed; bottom: 1rem; right: 1rem; z-index: 9998; display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.toast { background: var(--teal-deep); color: var(--ivory); border-left: 3px solid var(--mustard); border-radius: 6px; padding: .75rem .95rem; font-size: .82rem; opacity: 0; transform: translateX(20px); transition: all .3s; box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.toast.show { opacity: 1; transform: none; }
.toast.ok { border-left-color: #5FD0A0; } .toast.warn { border-left-color: var(--mustard-light); } .toast.err { border-left-color: #F0786B; }
.layer-row { display: flex; align-items: center; gap: .8rem; background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: .7rem .9rem; margin-bottom: .5rem; }
.layer-id { font-family: var(--font-mono); font-size: .68rem; font-weight: 700; color: var(--teal-deep); background: rgba(20, 145, 155, .16); padding: .25rem .5rem; border-radius: 4px; }
.console-row { display: grid; grid-template-columns: 88px 1fr 44px 52px 34px auto; gap: .6rem; align-items: center; font-size: .72rem; padding: .32rem 0; border-bottom: 1px dashed var(--line); font-family: var(--font-mono); }
.console-row.ok span:nth-child(3) { color: var(--ok); } .console-row.err span:nth-child(3) { color: var(--danger); } .console-row.wait { opacity: .55; }
#db-view { background: #0A1F1E; color: #9FE8D8; font-size: .68rem; padding: .8rem; border-radius: 8px; overflow: auto; max-height: 260px; white-space: pre-wrap; font-family: var(--font-mono); }
select#db-table { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .45rem; font: inherit; margin-bottom: .5rem; width: 100%; }
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.chip { font-size: .68rem; font-weight: 700; letter-spacing: .04em; background: rgba(13, 115, 119, .12); color: var(--teal-deep); padding: .28rem .65rem; border-radius: 999px; }
.insight-card { background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--mustard); border-radius: 8px; padding: .8rem .95rem; margin-bottom: .6rem; }
.insight-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .3rem; }
.insight-icon { font-family: var(--font-mono); font-size: .6rem; letter-spacing: .1em; font-weight: 700; color: var(--mustard-ink); background: rgba(201, 162, 39, .15); padding: .2rem .45rem; border-radius: 3px; }
.conf { margin-left: auto; width: 70px; height: 5px; background: rgba(13, 115, 119, .12); border-radius: 99px; overflow: hidden; }
.conf i { display: block; height: 100%; background: var(--mesh); background-size: 400% 400%; }
.timeline-item { display: flex; gap: .9rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.timeline-item .mono { color: var(--mustard-ink); font-weight: 700; }
#copilot-conv { max-height: 220px; overflow: auto; margin: .5rem 0; }
#copilot-conv .bubble { margin-bottom: .4rem; }
#probe-out { background: var(--ivory-light); border-radius: 6px; padding: .6rem; margin-top: .6rem; min-height: 2.2em; font-size: .75rem; font-family: var(--font-mono); }
.acl-table td, .acl-table th { text-align: center; } .acl-table td:first-child, .acl-table th:first-child { text-align: left; }
#appt-slot { color: var(--charcoal); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .55rem; font: inherit; min-height: 40px; }
@media (prefers-reduced-motion: reduce) { .login-card::before { animation: none; } }
.bubble.typing { display: inline-flex; gap: 5px; align-items: center; padding: .8rem 1rem; }
.bubble.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal-mid); animation: typing-dot 1.2s ease-in-out infinite; }
.bubble.typing i:nth-child(2) { animation-delay: .18s; } .bubble.typing i:nth-child(3) { animation-delay: .36s; }
@keyframes typing-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-4px); opacity: 1; } }
.bubble.live::after { content: ''; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: text-bottom; background: var(--mustard-ink); animation: caret .8s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bubble.typing i, .bubble.live::after { animation: none; } }
.heard-panel { background: var(--ivory-light); border: 1px solid var(--border); border-left: 3px solid var(--teal-mid); border-radius: 8px; padding: .75rem .95rem; margin-top: .6rem; font-size: .85rem; }
.heard-panel h4 { font-family: var(--font-mono); font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: .4rem; }
.heard { display: grid; grid-template-columns: 7rem 1fr; gap: .15rem .6rem; margin-bottom: .5rem; }
.heard dt { color: var(--stone); } .heard dd { color: var(--charcoal); font-weight: 600; }
.heard-panel p { margin-bottom: .5rem; }
.sla.overdue { color: var(--danger); font-weight: 700; }
.role-card { background: var(--cream); color: var(--charcoal); border: 1px solid rgba(224,188,74,.6); border-radius: 10px; padding: .9rem 1.1rem; margin: 0 auto 1.2rem; max-width: 620px; text-align: left; }
.role-card h3 { font-family: var(--font-display); font-size: 1.3rem; color: var(--teal-deep); margin-bottom: .2rem; }
.role-card p { font-size: .88rem; margin-bottom: .6rem; color: var(--stone); }
.role-card[hidden], .heard-panel[hidden] { display: none; }
