/* ClinicOS — server-rendered desk UI */
:root {
  --bg: #f0f4f3;
  --surface: #ffffff;
  --text: #0c1f1d;
  --muted: #5c6f6c;
  --border: #d5e0dd;
  --accent: #0d7a72;
  --accent-hover: #0a635c;
  --danger: #b42318;
  --ok: #0d7a40;
  --shadow: 0 1px 3px rgba(12, 31, 29, 0.08);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
}

.app {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.brand-mark {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.25rem;
}

.brand strong { display: block; font-size: 1.05rem; }
.brand small { color: var(--muted); font-size: 0.75rem; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.nav-link {
  padding: 0.55rem 0.65rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link:hover {
  background: var(--bg);
  color: var(--accent);
}

.nav-link.is-active {
  background: rgba(13, 122, 114, 0.12);
  color: var(--accent);
}

.sidebar-foot {
  margin-top: auto;
  font-size: 0.7rem;
  color: var(--muted);
  line-height: 1.35;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 1.5rem;
  box-shadow: var(--shadow);
}

.page-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 600;
}

.main {
  padding: 1.25rem 1.5rem 2rem;
  max-width: 1100px;
}

.flash {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.flash-ok { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; }
.flash-err { background: #ffebee; color: #b71c1c; border: 1px solid #ef9a9a; }
.flash-info { background: #e3f2fd; color: #0d47a1; border: 1px solid #90caf9; }

.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
}

.stat-card .num {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.2;
}

.stat-card .lbl {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.stat-card-accent {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.stat-card-link {
  margin-top: 0.45rem;
  font-size: 0.8rem;
}

.stat-card-link a {
  color: var(--accent);
}

.tr-appt-online-today td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

.appt-card-online-today {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.appt-online-badge {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--accent);
  vertical-align: middle;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.15rem 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--muted);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 1rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
}

.btn:hover { background: var(--accent-hover); color: #fff; }

.btn-secondary {
  background: var(--surface);
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover {
  background: #8c1a13;
  color: #fff;
}

.desk-details--danger > summary {
  color: var(--danger);
}

.desk-details--danger[open] {
  border: 1px solid rgba(180, 35, 24, 0.35);
  border-radius: 10px;
  padding: 0.25rem 0.5rem;
  background: rgba(180, 35, 24, 0.04);
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="search"],
input[type="url"],
input[type="number"],
input[type="tel"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
textarea,
select {
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  background: var(--surface);
  color: var(--text);
}

textarea { min-height: 5rem; resize: vertical; }

.form-grid {
  display: grid;
  gap: 0.75rem;
  max-width: 520px;
}

.form-row {
  min-width: 0;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--muted);
}

.form-row .hint { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

.table-wrap { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

table.data th,
table.data td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

table.data th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
  font-weight: 600;
}

table.data tbody tr:hover { background: var(--bg); }

table.data a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

table.data a:hover { text-decoration: underline; }

.patient-header {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.patient-header h2 { margin: 0; font-size: 1.35rem; }
.patient-meta { color: var(--muted); font-size: 0.95rem; }

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  border-left: 3px solid var(--accent);
  padding: 0.5rem 0 0.65rem 1rem;
  margin-bottom: 0.5rem;
  background: #fafcfb;
  border-radius: 0 8px 8px 0;
}

.timeline .when { font-size: 0.8rem; color: var(--muted); }
.timeline .what { font-weight: 600; margin-top: 0.15rem; }
.timeline .detail { margin-top: 0.25rem; font-size: 0.95rem; white-space: pre-wrap; }

.empty {
  color: var(--muted);
  font-size: 0.95rem;
  padding: 0.5rem 0;
}

.sidebar-user {
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
}

.sidebar-user-name { font-weight: 600; margin: 0 0 0.15rem; }
.sidebar-user-role { color: var(--muted); margin: 0 0 0.5rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.sidebar-logout, .sidebar-booking-link {
  display: block;
  margin-top: 0.35rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.8rem;
}
.sidebar-logout:hover, .sidebar-booking-link:hover { text-decoration: underline; }

/* Public booking + login */
.public-body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  flex-direction: column;
}

.public-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.public-header-inner {
  max-width: 560px;
  margin: 0 auto;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.public-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-size: 1.1rem;
}

.public-brand .brand-mark {
  width: 2rem;
  height: 2rem;
  font-size: 1.1rem;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

.public-nav a { color: var(--accent); font-weight: 600; text-decoration: none; }
.public-nav a:hover { text-decoration: underline; }
.public-nav-hint { color: var(--muted); font-size: 0.85rem; }

.public-main {
  flex: 1;
  max-width: 560px;
  margin: 0 auto;
  padding: 1.5rem 1rem 2rem;
  width: 100%;
}

.public-footer {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.public-footer p { margin: 0; }

/* Dashboard quick links */
.panel-quick-links h2 { margin-bottom: 0.35rem; }

.quick-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.quick-link-card {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.quick-link-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--text);
}

.quick-link-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 8px;
  background: rgba(13, 122, 114, 0.12);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}

.quick-link-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.9rem;
}

.quick-link-text small {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.8rem;
}

/* Patient hero & contact */
.patient-hero {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  justify-content: space-between;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow);
}

.patient-hero-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.patient-hero-name {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.2;
}

.patient-hero-meta { margin: 0 0 0.25rem; }
.patient-hero-sub { margin: 0 0 0.75rem; font-size: 0.88rem; }

.patient-phone-display { font-weight: 600; color: var(--text); }
.patient-phone-missing { color: var(--danger); font-weight: 500; }

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.contact-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  max-width: 36rem;
  line-height: 1.4;
}

.patient-hero-aside {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
}

.btn-wa {
  background: #128c7e;
  color: #fff;
}

.btn-wa:hover {
  background: #0d6b60;
  color: #fff;
}

.btn-sms {
  background: #2e7d32;
  color: #fff;
}

.btn-sms:hover {
  background: #1b5e20;
  color: #fff;
}

.btn-sm {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.btn-table {
  padding: 0.35rem 0.65rem;
  font-size: 0.85rem;
}

.label-hint {
  font-weight: 400;
  color: var(--muted);
}

/* Patient work grid */
.grid-patient-work {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-bottom: 1.25rem;
}

@media (min-width: 920px) {
  .grid-patient-work {
    grid-template-columns: 1fr 1fr;
  }

  .panel-span-full {
    grid-column: 1 / -1;
  }
}

.form-grid--wide {
  max-width: none;
}

.form-row--inline {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 520px) {
  .form-row--inline {
    grid-template-columns: 1fr 1fr;
  }
}

.form-row--half {
  min-width: 0;
}

.panel-timeline h2 { margin-bottom: 0.35rem; }

/* Rich timeline */
.timeline-rich {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-rich .timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  border-left: none;
  padding: 0.85rem 0 0.85rem 0;
  margin: 0;
  background: transparent;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
}

.timeline-rich .timeline-item:last-child {
  border-bottom: none;
}

.timeline-badge {
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(13, 122, 114, 0.12);
  color: var(--accent);
}

.timeline-item--appointment .timeline-badge { background: #e3f2fd; color: #1565c0; }
.timeline-item--visit .timeline-badge { background: #e8f5e9; color: #2e7d32; }
.timeline-item--problem .timeline-badge { background: #fff3e0; color: #e65100; }
.timeline-item--prescription .timeline-badge { background: #f3e5f5; color: #6a1b9a; }
.timeline-item--bill .timeline-badge { background: #fce4ec; color: #c2185b; }
.timeline-item--followup .timeline-badge { background: #e0f7fa; color: #006064; }

.timeline-body { min-width: 0; }
.timeline-body .when { font-size: 0.8rem; color: var(--muted); }
.timeline-body .what { font-weight: 600; margin-top: 0.2rem; }
.timeline-body .detail { margin-top: 0.35rem; font-size: 0.95rem; white-space: pre-wrap; }

/* Appointments week */
.panel-appt-nav h2.appt-nav-title {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text);
}

.appt-nav-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.appt-view-toggle {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.appt-view-toggle a {
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent);
  border: 1px solid var(--border);
  background: var(--surface);
}

.appt-view-toggle a:hover {
  background: var(--bg);
}

.appt-view-toggle a.is-active {
  background: rgba(13, 122, 114, 0.15);
  border-color: var(--accent);
}

.appt-intro { margin-bottom: 0.75rem; }

.week-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.5rem;
}

.week-label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
}

.appt-day-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}

.appt-day-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.appt-day-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.appt-day-count {
  font-size: 0.85rem;
  color: var(--muted);
}

.appt-day-empty {
  margin: 0;
  padding: 0.25rem 0;
}

.appt-cards {
  list-style: none;
  margin: 0;
  padding: 0;
}

.appt-card {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

.appt-card:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.appt-card-main {
  display: flex;
  gap: 0.85rem;
  min-width: 0;
  flex: 1;
}

.appt-time {
  flex-shrink: 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent);
  min-width: 5.5rem;
}

.appt-card-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.appt-doc {
  font-size: 0.88rem;
  color: var(--muted);
}

.appt-note {
  font-size: 0.88rem;
  color: var(--text);
  font-style: italic;
}

.appt-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

.td-contact {
  white-space: nowrap;
}

.td-contact a {
  margin-right: 0.35rem;
}

.link-wa {
  font-weight: 700;
  color: #128c7e;
  text-decoration: none;
}

.link-wa:hover {
  text-decoration: underline;
}

.link-sms {
  font-weight: 600;
  color: #2e7d32;
  text-decoration: none;
  margin-left: 0.25rem;
}

.link-mail {
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  margin-left: 0.25rem;
}

.link-mail:hover,
.link-sms:hover {
  color: var(--accent);
  text-decoration: underline;
}

.muted { color: var(--muted); }

.toolbar-search .search-input {
  flex: 1;
  min-width: 12rem;
  max-width: 24rem;
}

.form-grid--register {
  max-width: 640px;
}

.register-lead {
  max-width: 40rem;
}

@media (max-width: 768px) {
  .app { flex-direction: column; }
  .sidebar {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
  }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-user { width: 100%; margin-top: 0; border-top: 0; padding-top: 0.5rem; }
  .sidebar-foot { display: none; }

  .appt-card-actions {
    width: 100%;
  }
}

/* —— Compact desk UI + fixed command bar */
@media (min-width: 769px) {
  .sidebar {
    width: 188px;
    padding: 1rem 0.75rem;
  }

  .nav-desk .nav-link {
    padding: 0.45rem 0.5rem;
    font-size: 0.9rem;
  }
}

.main.main-with-desk {
  padding-bottom: 10.5rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
}

.topbar-desk-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.topbar-desk-hint kbd,
.desk-tip-examples kbd,
.patient-desk-hint kbd {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  font-size: 0.75rem;
  font-family: inherit;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.panel-desk-tip {
  padding: 0.85rem 1.1rem;
}

.desk-tip-main {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.desk-tip-examples {
  margin: 0;
  font-size: 0.88rem;
}

.desk-page-line {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
}

.desk-details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow);
}

.desk-details > summary {
  cursor: pointer;
  padding: 0.65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.desk-details > summary::-webkit-details-marker {
  display: none;
}

.desk-details > summary::before {
  content: "▸";
  display: inline-block;
  color: var(--accent);
  font-size: 0.85rem;
  transition: transform 0.12s;
}

.desk-details[open] > summary::before {
  transform: rotate(90deg);
}

.desk-details-body {
  padding: 0 1rem 1rem;
  border-top: 1px solid var(--border);
}

.desk-details code,
.patient-desk-hint code {
  font-size: 0.85em;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
}

.patient-compact {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow);
}

.patient-compact-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem;
}

.patient-name-line {
  margin: 0 0 0.2rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.patient-line2 {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.patient-compact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.patient-desk-hint {
  margin: 0.65rem 0 0;
  font-size: 0.8rem;
}

/* Fixed desk bar */
.desk-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 200;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 24px rgba(12, 31, 29, 0.1);
  padding: 0.4rem 0.75rem 0.55rem;
}

.desk-feed-row {
  display: flex;
  align-items: stretch;
  gap: 0.35rem;
  margin-bottom: 0.35rem;
}

.desk-feed {
  flex: 1;
  min-width: 0;
  max-height: 4.25rem;
  overflow-y: auto;
  font-size: 0.82rem;
  padding: 0.15rem 0;
}

.desk-clear {
  flex-shrink: 0;
  width: 2rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
}

.desk-clear:hover {
  color: var(--danger);
  border-color: var(--danger);
}

.desk-bubble {
  padding: 0.25rem 0.5rem;
  margin-bottom: 0.2rem;
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.35;
  white-space: pre-wrap;
}

.desk-bubble--user {
  background: rgba(13, 122, 114, 0.12);
  color: var(--text);
  font-weight: 500;
}

.desk-input-row {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.desk-input {
  flex: 1;
  min-width: 0;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  background: var(--surface);
}

.desk-help-btn {
  flex-shrink: 0;
  padding: 0.45rem 0.65rem;
  min-width: 2.5rem;
}

.desk-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.35rem;
}

.desk-chip {
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--accent);
  cursor: pointer;
  font-family: inherit;
}

.desk-chip:hover {
  border-color: var(--accent);
  background: var(--surface);
}

.desk-chip--accent {
  background: rgba(13, 122, 114, 0.14);
  border-color: var(--accent);
  color: var(--accent);
}
