:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #213e38;
  background: #e8eeec;
  font-size: 14px;
  line-height: 1.45;
  font-synthesis: none;
  --green: #255648;
  --muted: #526962;
  --line: rgba(69, 100, 89, .16);
  --glass: rgba(255, 255, 255, .67);
  --rim: rgba(255, 255, 255, .88);
  --shadow: 0 5px 18px -10px #294b4028, inset 0 1px 0 #ffffffb3;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; isolation: isolate; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 8% 8%, #f9f3dc 0, transparent 45%), radial-gradient(ellipse at 90% 20%, #c7d9d4 0, transparent 52%), radial-gradient(ellipse at 15% 100%, #d5d5e9 0, transparent 48%), linear-gradient(140deg, #edf0e8, #e6ede9 60%, #e5e8f0);
}
button, input, textarea, select { font: inherit; }
a { color: var(--green); }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 34px; padding: 7px 12px; border: 2px solid currentColor; border-radius: 999px;
  background: transparent; color: var(--green);
  box-shadow: none;
  font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.filled { background: var(--green); border-color: var(--green); color: #fff; }
button:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.quiet { background: transparent; color: #365c50; box-shadow: none; padding: 6px 10px; }
.secondary { color: var(--green); background: transparent; box-shadow: none; }
header, .welcome, .meetings, .card {
  background: var(--glass); border: 1px solid var(--rim); box-shadow: var(--shadow);
  backdrop-filter: blur(26px) saturate(125%); -webkit-backdrop-filter: blur(26px) saturate(125%);
}
header {
  min-height: 56px; max-width: 1370px; margin: 16px auto 0; width: calc(100% - 40px);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 10px;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 21px; font-weight: 700; letter-spacing: -.8px; }
.mark { display: block; width: 30px; height: 30px; flex-shrink: 0; filter: drop-shadow(0 4px 5px #234a4320); }
.subbrand { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; border-left: 1px solid var(--line); padding-left: 14px; margin-left: 6px; }
#account { display: flex; gap: 12px; align-items: center; font-size: 13px; }
#username { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#logout { border-radius: 999px; }
main { max-width: 1370px; margin: auto; padding: 28px 20px 36px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 22px; }
.eyebrow { color: #527267; font-size: 10px; font-weight: 700; letter-spacing: 2.4px; margin: 0 0 8px; }
h1 { font-size: clamp(26px, 2.5vw, 32px); letter-spacing: -1px; line-height: 1.15; margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 16px; letter-spacing: -.4px; margin: 0; }
h3 { font-size: 14px; margin: 6px 0; }
.page-heading p:last-child { margin-bottom: 0; font-size: 14px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: stretch; }
.meetings { border-radius: 10px; padding: 16px; min-width: 0; min-height: 260px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.search { margin: 0; }
.search input { margin: 0; padding: 7px 10px; width: 230px; font-size: 12px; border-radius: 6px; }
.card { padding: 16px; border-radius: 10px; }
.meeting-row {
  width: 100%; display: flex; justify-content: space-between; align-items: center; text-align: left;
  color: inherit; margin: 0; padding: 12px 0; font-weight: 400; gap: 12px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
.meeting-row + .meeting-row { border-top: 1px solid var(--line); }
.meeting-row > div { min-width: 0; }
.meeting-row h3 { margin: 0 0 4px; font-size: 14px; overflow-wrap: anywhere; }
.meeting-row p { margin: 0; font-size: 12px; color: var(--muted); }
.badge { display: inline-block; background: #e4eee7; color: #315847; border: 1px solid #ffffff7a; border-radius: 4px; padding: 3px 7px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge.failed { background: #f9e9df; color: #884c29; }
.badge.recording { background: #d9ede3; color: #215e46; }
.card .section-heading { margin-bottom: 12px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #709b7e; box-shadow: 0 0 0 5px #709b7e15; }
.card p { margin-bottom: 14px; }
.calendar-card { min-width: 0; }
#calendar-description { margin: 0 0 14px; overflow-wrap: anywhere; }
.calendar-controls { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.calendar-controls button { min-height: 30px; padding: 4px 9px; gap: 5px; font-size: 11px; line-height: 1.3; border: 2px solid currentColor; border-radius: 999px; background: transparent; box-shadow: none; }
.calendar-controls button .icon { width: 13px; height: 13px; font-size: 13px; }
#disconnect { margin-left: 0; color: #c33d36; border-color: currentColor; }
#auto-row { margin: 14px 0 0; flex-wrap: nowrap; }
#auto-row input { flex-shrink: 0; }
#upcoming { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; font-size: 12px; }
.calendar-day + .calendar-day { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); }
.calendar-day-title { margin: 0 0 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
#calendar-range { width: 100%; margin-top: 16px; font-size: 12px; }
.event { font-size: 12px; }
.event + .event { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.event-heading { display: flex; align-items: flex-start; gap: 10px; }
.provider-logo { width: 28px; height: 28px; flex-shrink: 0; }
.event-info { flex: 1; min-width: 0; }
.event strong { display: block; font-size: 13px; color: #2d493d; overflow-wrap: anywhere; }
.event-meta { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); margin-top: 4px; font-size: 11px; }
.event-duration { white-space: nowrap; margin-left: auto; }
.event-actions { display: flex; align-items: center; gap: 4px; margin: 8px 0 0 28px; }
.event-actions .quiet { font-size: 12px; }
.event-actions [aria-disabled="true"] { opacity: .48; cursor: not-allowed; pointer-events: none; }
label { display: block; margin: 12px 0; color: #38594c; font-size: 13px; font-weight: 500; }
input, textarea, select {
  display: block; width: 100%; min-height: 34px; padding: 7px 10px; margin-top: 6px;
  border: 1px solid #82998b40; border-radius: 6px; background: #ffffffb8; color: #203d36;
  box-shadow: inset 0 2px 4px #234a4306; outline-offset: 3px;
}
input::placeholder, textarea::placeholder { color: #677a73; opacity: 1; }
select option { background: #fff; color: #203d36; }
textarea { resize: vertical; }
.toggle { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; font-size: 12px; }
.toggle input { width: 17px; height: 17px; min-height: 0; margin: 0; accent-color: var(--green); box-shadow: none; }
.empty { padding: 32px 20px; text-align: center; color: var(--muted); }
.empty > .icon { display: block; width: 24px; height: 24px; margin: 0 auto 12px; font-size: 24px; color: #4e7866; }
.empty h3 { color: #344f42; }
.empty p { font-size: 13px; }
dialog {
  width: min(760px, calc(100vw - 32px)); max-height: 88vh; max-height: 88dvh; overflow: hidden;
  border: 1px solid #fffffff2; border-radius: 10px; padding: 0; color: #203d36;
  background: #f3f7f4ed; backdrop-filter: blur(35px); -webkit-backdrop-filter: blur(35px);
  box-shadow: 0 20px 65px #193f3938, 0 4px 12px #193f391a, inset 0 1px 0 #fff;
}
dialog[open] { display: flex; flex-direction: column; animation: arrive .2s ease-out; }
dialog::backdrop { background: #273b394d; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
#create-dialog { max-width: 560px; }
#create-form, #whatsapp-form { display: flex; flex-direction: column; min-height: 0; }
.modal-header { flex-shrink: 0; margin: 0; padding: 14px 20px; border-bottom: 1px solid var(--line); background: #ffffff40; }
.modal-header h2 { margin: 0; font-size: 16px; }
.close-dialog { width: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 999px; background: transparent; box-shadow: none; }
.modal-content { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 20px 16px; overflow-wrap: anywhere; scrollbar-width: thin; scrollbar-color: #8ca99b #0000; }
.modal-footer.actions { flex-shrink: 0; margin: 0; padding: 12px 20px; background: #ffffff45; }
#create-dialog .modal-footer { justify-content: flex-end; }
#create-dialog .modal-footer button { min-width: 110px; }
dialog h1 { font-size: 24px; margin-top: 16px; }
dialog h2 { margin-top: 18px; font-size: 16px; }
dialog .modal-header h2 { margin: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; border-top: 1px solid var(--line); padding-top: 20px; }
.actions button, .actions a { font-size: 12px; }
.prose { white-space: pre-wrap; }
.detail-list { padding-left: 20px; margin: 10px 0 0; }
.detail-list li + li { margin-top: 8px; }
.detail-transcript { border-top: 1px solid var(--line); margin-top: 20px; }
.detail-transcript > summary { padding: 12px 0; margin-top: 0; }
.detail-transcript > summary:focus-visible { outline: 2px solid #367b63; outline-offset: 3px; }
.transcript { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; font-size: 13px; }
.transcript strong { display: block; color: #526962; font-size: 12px; }
audio.recording { display: block; width: 100%; margin-top: 15px; max-height: 350px; border-radius: 7px; }
.welcome { position: relative; overflow: hidden; border-radius: 12px; padding: 40px 5%; min-height: 0; }
.welcome h1 { position: relative; z-index: 1; font-size: clamp(30px, 3.5vw, 46px); line-height: 1.13; letter-spacing: -1.5px; max-width: 850px; }
.welcome p { position: relative; z-index: 1; max-width: 430px; margin: 16px 0; }
.welcome .button { position: relative; z-index: 1; margin: 12px 0; }
.welcome .eyebrow { margin: 0 0 16px; }
.welcome::after { content: ""; position: absolute; right: -80px; top: -100px; width: 400px; height: 400px; background: radial-gradient(ellipse, #c6ddd34d, transparent 70%); pointer-events: none; }
footer { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 0 20px 20px; font-size: 13px; font-weight: 600; color: #435e53; }
footer span { font-weight: 400; color: var(--muted); font-size: 12px; }
#notice { background: #f5f9ecdb; border: 1px solid #fff; box-shadow: var(--shadow); padding: 10px 14px; border-radius: 7px; margin-bottom: 16px; font-size: 13px; }
#create-error { font-size: 13px; color: #993d2f; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
[hidden] { display: none !important; }
details > summary { cursor: pointer; font-weight: 600; margin-top: 20px; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #367b63; outline-offset: 3px; }
@keyframes arrive { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  button:not(:disabled):hover, .button:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -5px #254d4333; }
  .quiet:hover { background: #ffffff8c; box-shadow: none; }
  button.meeting-open:not(:disabled):hover { background: #ffffff50; transform: none; box-shadow: none; }
}
@media (max-width: 980px) {
  .layout { grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; }
  .meetings { padding: 16px; }
  .meetings > .section-heading { flex-wrap: wrap; }
  .search, .search input { width: 100%; }
}
@media (max-width: 760px) {
  header { width: calc(100% - 28px); margin-top: 14px; padding: 8px 12px; min-height: 54px; border-radius: 10px; }
  .brand { font-size: 20px; }
  .mark { width: 28px; height: 28px; }
  .subbrand, #username { display: none; }
  main { padding: 22px 14px 28px; }
  .page-heading { flex-wrap: wrap; margin: 0 0 18px; gap: 14px; }
  .page-heading h1 { font-size: 27px; }
  .layout { grid-template-columns: minmax(0, 1fr); }
  .meetings { padding: 14px; min-height: 220px; border-radius: 10px; }
  .card { border-radius: 10px; }
  .meeting-row { padding: 12px 0; flex-wrap: wrap; }
  .welcome { padding: 28px 20px; min-height: auto; border-radius: 10px; }
  .welcome h1 { font-size: clamp(28px, 6vw, 38px); letter-spacing: -1.4px; }
  .welcome::after { right: -320px; opacity: .45; }
  .modal-header, .modal-footer.actions { padding: 12px 16px; }
  .modal-content { padding: 0 16px 16px; }
  dialog { border-radius: 10px; max-height: 92vh; max-height: 92dvh; }
  .modal-header h2 { font-size: 16px; }
  .empty { padding: 26px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce) {
  header, .welcome, .meetings, .card, dialog { background: #f4f7f4; backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.detail-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.detail-heading{min-width:0}.detail-title-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px}.detail-title-row h1{margin:0;overflow-wrap:anywhere}.detail-header .close-dialog{flex-shrink:0}.detail-heading p{margin:6px 0 0}.detail-primary-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.detail-delete{margin-left:auto;color:#a34433}#detail-actions{align-items:center;justify-content:space-between}

@media (pointer: coarse) {
  button, .button, input:not([type="checkbox"]), select { min-height: 44px; }
  .close-dialog { width: 44px; }
}

/* Hugeicons free stroke icons. Main actions keep their visible text labels. */
.icon { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; flex: 0 0 auto; font-size: 16px; line-height: 1; pointer-events: none; }
.icon-heading { display: flex; align-items: center; gap: 8px; }
.icon-heading .icon { color: var(--muted); }
.search { position: relative; }
.search > .icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 33px; }

/* Compact library: provider + status, title + badge, timestamp + duration. */
.meetings > .section-heading { flex-wrap: nowrap; }
.meetings > .section-heading .icon-heading { flex-shrink: 0; }
.meetings .search { width: min(230px, 55%); min-width: 0; }
.meetings .search input { width: 100%; }
.meeting-row { justify-content: flex-start; flex-wrap: nowrap; gap: 12px; }
.meeting-open { display: flex; flex: 1; min-width: 0; justify-content: flex-start; gap: 12px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; color: inherit; text-align: left; font-weight: 400; }
.meeting-row-actions { display: flex; flex-shrink: 0; align-items: center; gap: 6px; }
.meeting-row-actions .icon-button { width: 32px; min-height: 32px; padding: 0; }
.meeting-delete { color: #a34433; }
@media (pointer: coarse) { .meeting-row-actions .icon-button { width: 44px; min-height: 44px; } }
.meeting-provider { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 34px; }
.meeting-provider .provider-logo { width: 28px; height: 28px; }
.meeting-provider > .icon { width: 24px; height: 24px; font-size: 24px; color: var(--muted); }
.meeting-status-dot { position: absolute; bottom: 0; right: 0; width: 10px; height: 10px; border: 2px solid #f4f7f4; border-radius: 50%; background: #87958e; }
.status-queued, .status-join_uncertain, .status-joining, .status-waiting { background: #c78c2b; }
.status-recording { background: #2a9860; }
.status-processing { background: #4c84c8; }
.status-complete { background: #518668; }
.status-failed { background: #cb5749; }
.status-cancelled { background: #87958e; }
.meeting-info { flex: 1; min-width: 0; }
.meeting-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meeting-title-row h3 { min-width: 0; margin: 0; font-size: 13px; line-height: 1.4; }
.meeting-title-row .badge { flex-shrink: 0; }
.meeting-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.4; }
.meeting-meta-separator { color: #8b9a93; }
.meeting-duration { white-space: nowrap; font-variant-numeric: tabular-nums; }
.badge.processing { background: #e4edf7; color: #3a6288; }
.badge.queued, .badge.join_uncertain, .badge.joining, .badge.waiting { background: #f5eddb; color: #886321; }
.badge.cancelled, .badge.unknown { background: #e8ece9; color: #5d6b64; }

button.close-dialog:not(:disabled):hover { background: transparent; box-shadow: none; transform: none; color: #183e32; }
#disconnect .icon { color: inherit; }

.event-actions { flex-wrap: wrap; column-gap: 12px; row-gap: 8px; }
.event-actions .button-small { min-height: 28px; padding: 4px 8px; gap: 4px; font-size: 11px; line-height: 1.3; border: 2px solid currentColor; border-radius: 999px; background: transparent; box-shadow: none; }
.event-actions .button-small .icon { width: 13px; height: 13px; font-size: 13px; }
@media (pointer: coarse) { .event-actions .button-small, .calendar-controls button { min-height: 44px; } }

/* Actions reveal from the right, inside their calendar or library row. */
.event, .meeting-row { position: relative; outline-offset: 4px; }
.event:focus-visible { outline: 2px solid #367b63; border-radius: 4px; }
.event .row-hover-actions, .meeting-row .row-hover-actions {
  position: absolute; inset: 0 0 0 auto; z-index: 2;
  display: flex; align-items: center; justify-content: flex-end; flex-wrap: nowrap;
  width: max-content; max-width: 100%; margin: 0; padding: 0 2px 0 30px;
  border: 0; border-radius: 0; box-shadow: none;
  background: linear-gradient(to right, transparent, #f1f6f2 30px, #f1f6f2);
  visibility: hidden; opacity: 0; pointer-events: none; transform: translateX(8px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s;
}
.event + .event .row-hover-actions { top: 14px; }
.event:not(.actions-dismissed):is(:hover, :focus-within) .row-hover-actions,
.meeting-row:not(.actions-dismissed):is(:hover, :focus-within) .row-hover-actions {
  visibility: visible; opacity: 1; transform: translateX(0);
}
.event:not(.actions-dismissed):is(:hover, :focus-within) .row-hover-actions > :not([aria-disabled="true"]),
.meeting-row:not(.actions-dismissed):is(:hover, :focus-within) .row-hover-actions > :not([aria-disabled="true"]) {
  pointer-events: auto;
}
button.meeting-open:not(:disabled):hover { background: transparent; transform: none; box-shadow: none; }
@media (pointer: coarse) {
  .event { min-height: 44px; }
  .event + .event { min-height: 58px; }
  .event .row-hover-actions { column-gap: 8px; padding-left: 20px; }
}
@media (prefers-reduced-transparency: reduce) {
  .event .row-hover-actions, .meeting-row .row-hover-actions { background: #f4f7f4; }
}

/* Keep the dropdown chevron comfortably inside the control. */
select {
  appearance: none; -webkit-appearance: none; padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23203d36' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 16px;
}
@media (forced-colors: active) { select { appearance: auto; background-image: none; } }

#search-status { margin: -4px 0 12px; }
.meeting-row .search-excerpt { margin: 7px 0 0; font-size: 12px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }

.platform-controls { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
#platform-disconnect { color: #c33d36; }
#account { flex-wrap: wrap; justify-content: flex-end; }

#voice-field { margin: 16px 0; padding: 0; border: 0; min-width: 0; }
#voice-field legend { margin-bottom: 8px; padding: 0; font-size: 13px; font-weight: 500; color: #38594c; }
.voice-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 8px; }
.voice-option { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; margin: 0; padding: 16px 8px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; background: #ffffff50; text-align: center; }
.voice-option:has(input:checked) { border-color: var(--green); background: #e2eee7; }
.voice-option:has(input:focus-visible) { outline: 2px solid var(--green); outline-offset: 3px; }
.voice-option input { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: var(--green); box-shadow: none; }
.voice-avatar { display: block; width: 64px; height: 64px; object-fit: cover; border-radius: 50%; margin-bottom: 3px; }
.voice-option strong { display: block; }
.voice-language { display: flex; align-items: center; justify-content: center; gap: 4px; font-size: 12px; font-weight: 400; color: var(--muted); }
#voice-preview { margin: 12px 0; }
#voice-preview > summary { margin: 0; padding: 8px 0; font-size: 13px; }
#voice-preview > summary:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 4px; }
#voice-preview-frame { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 8px; background: #292421; }

/* A compact companion panel, with calendar and chat sharing the same space. */
.layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.assistant-panel { padding: 0; overflow: hidden; position: sticky; top: 16px; min-width: 0; }
.panel-tabs { display: flex; gap: 24px; padding: 0 18px; border-bottom: 1px solid var(--line); }
.panel-tabs button { border: 0; border-bottom: 2px solid transparent; border-radius: 0; min-height: 45px; padding: 0 1px; color: var(--muted); font-size: 12px; }
.panel-tabs button[aria-selected="true"] { border-bottom-color: var(--green); color: var(--green); }
#calendar-panel { padding: 18px; }
#chat-panel { display: flex; flex-direction: column; height: min(680px, calc(100dvh - 180px)); min-height: 470px; }
.chat-heading { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px 12px; }
.chat-identity { display: flex; align-items: center; gap: 9px; }
.chat-identity strong { font-size: 14px; font-weight: 600; }
.chat-identity span { display: block; font-size: 11px; color: var(--muted); margin-top: 1px; }
.chat-icon { width: 30px; min-height: 30px; padding: 0; border: 0; border-radius: 6px; color: var(--muted); flex-shrink: 0; }
.chat-icon:hover, .chat-icon[aria-pressed="true"] { background: #25564812; color: var(--green); }
.chat-feed { overflow: auto; flex: 1; min-height: 0; padding: 8px 18px 16px; overscroll-behavior: contain; scrollbar-width: thin; }
.chat-welcome { padding: 32px 2px 15px; }
.chat-spark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #fff; border-radius: 10px; background: linear-gradient(140deg,#f4e6cc88,#b8d3c780); box-shadow: var(--shadow); margin-bottom: 18px; }
.chat-spark .icon { width: 22px; font-size: 22px; }
.chat-welcome h2 { font-size: 22px; font-weight: 500; letter-spacing: -.7px; line-height: 1.3; }
.chat-welcome p { font-size: 12px; color: var(--muted); line-height: 1.7; margin: 10px 0 23px; }
.chat-prompts { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.chat-prompts button { border: 1px solid var(--line); background: #fff6; font-size: 11px; padding: 7px 10px; min-height: 32px; border-radius: 6px; font-weight: 500; text-align: left; }
.chat-prompts button:hover { background: #fff; }
.chat-message { margin: 14px 0 20px; font-size: 12px; line-height: 1.65; }
.chat-message-author { display: block; font-size: 10px; color: var(--muted); margin-bottom: 6px; }
.chat-message-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-user { margin-left: 28px; }
.chat-user .chat-message-author { text-align: right; }
.chat-user .chat-message-text { padding: 10px 12px; border-radius: 8px 8px 2px 8px; background: #2556480d; border: 1px solid #25564810; }
.chat-assistant .chat-message-author { font-weight: 600; color: var(--green); }
.chat-pending { opacity: .65; }
.chat-sources { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.chat-sources button { font-size: 10px; min-height: 25px; padding: 3px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; border: 1px solid var(--line); border-radius: 4px; }
.chat-message-actions { display: flex; margin-top: 7px; gap: 2px; }
.chat-message-actions .chat-icon { width: 25px; min-height: 25px; }
.chat-message-actions .icon { font-size: 13px; }
.chat-composer { margin: 0 14px; border: 1px solid #54796d3b; border-radius: 9px; background: #ffffffad; box-shadow: 0 3px 10px #234a4306; }
.chat-composer:focus-within { border-color: #597d70; outline: 2px solid #597d7015; }
.chat-composer textarea { display: block; width: 100%; margin: 0; padding: 12px 12px 4px; border: 0; border-radius: 9px; min-height: 64px; max-height: 160px; resize: vertical; background: transparent; box-shadow: none; font-size: 12px; outline: none; }
.chat-compose-actions { display: flex; align-items: center; justify-content: space-between; padding: 5px 8px 8px; }
.chat-compose-actions>div { display: flex; gap: 5px; align-items: center; }
.chat-talk { border: 0; border-radius: 5px; font-size: 11px; padding: 4px 7px; min-height: 30px; font-weight: 500; }
.chat-talk[aria-pressed="true"] { color: #a0373b; background: #a0373b0d; }
.chat-send { background: var(--green); color: white; border: 0; border-radius: 6px; padding: 0; width: 30px; min-height: 30px; }
.chat-status { font-size: 11px; color: var(--muted); padding: 0 18px; margin: 0 0 8px; min-height: 16px; }
.chat-error { color: #a0373b; }
.chat-footnote { text-align: center; font-size: 10px; color: var(--muted); margin: 9px 0 12px; }
.chat-voice-state { display: flex; gap: 10px; align-items: center; margin: 0 14px 10px; padding: 9px 12px; border-radius: 6px; background: #e6eee9; font-size: 11px; }
.chat-voice-state .chat-icon { margin-left: auto; }
.voice-bars { display: flex; align-items: center; gap: 3px; height: 22px; }
.voice-bars i { width: 3px; height: 7px; border-radius: 2px; background: var(--green); animation: voice-pulse .9s ease-in-out infinite alternate; }
.voice-bars i:nth-child(2n) { animation-delay: -.4s; }
.voice-bars i:nth-child(3) { animation-delay: -.7s; }
@keyframes voice-pulse { to {height: 21px;} }
@media(max-width:980px) { .layout { grid-template-columns: minmax(0,1fr) 340px; } }
@media(max-width:760px) { .layout { grid-template-columns: minmax(0,1fr); } .assistant-panel {position: static;} #chat-panel {height: 580px; min-height: 0; max-height: 80dvh;} }
@media(prefers-reduced-motion:reduce) { .voice-bars i {animation: none; height: 14px;} }
@media(pointer:coarse) { .chat-icon, .chat-send, .chat-talk { min-height: 40px; min-width: 40px; } }
.chat-heading-actions { display: flex; gap: 2px; }
.chat-history-title { margin: 14px 0; }
.chat-history-row { display: flex; align-items: center; border-bottom: 1px solid var(--line); padding: 8px 0; gap: 5px; }
.chat-history-open { border: 0; border-radius: 5px; padding: 5px 0; flex: 1; display: block; min-width: 0; text-align: left; }
.chat-history-open strong { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.chat-history-open span { font-size: 10px; font-weight: 400; color: var(--muted); }
.chat-older { width: 100%; font-size: 11px; margin: 10px 0; min-height: 30px; border: 1px solid var(--line); border-radius: 5px; }
