/* Quekly panel — extras on top of site.css */

.panel-wrap { max-width: 1080px; }
.panel-title-note { font-size: 0.9rem; margin-left: 2px; }
.narrow-card { max-width: 460px; margin: 40px auto; }
.btn-small { padding: 9px 16px; font-size: 0.9rem; }

.panel-nav {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 26px;
}
.panel-nav button {
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  border-radius: 999px; padding: 9px 18px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer;
}
.panel-nav button.active { background: var(--accent); border-color: var(--accent); color: #fff; }

.panel-section { padding-bottom: 40px; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
}
.section-head h2 { margin: 0; }
.section-head input[type="date"], .section-head select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); font-size: 0.95rem;
}

/* Stat cards */
.stat-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; box-shadow: var(--shadow);
}
.stat .num { font-size: 1.9rem; font-weight: 800; line-height: 1.1; }
.stat .cap { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }

/* Hour bars */
.hours { display: flex; align-items: flex-end; gap: 4px; height: 90px; margin-top: 18px; }
.hours .bar { flex: 1; background: var(--accent-soft); border-radius: 4px 4px 0 0; position: relative; min-height: 3px; }
.hours .bar i { position: absolute; inset: auto 0 0 0; background: var(--accent); border-radius: 4px 4px 0 0; display: block; }
.hours-caption { display: flex; justify-content: space-between; color: var(--muted); font-size: 0.75rem; margin-top: 4px; }

/* Tables */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.4px; }
tr:last-child td { border-bottom: 0; }

/* List rows (doctors, services, schedules) */
.row-item {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.row-item .grow { flex: 1 1 200px; min-width: 0; }
.row-item .title { font-weight: 700; }
.row-item .sub { color: var(--muted); font-size: 0.88rem; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn { padding: 8px 14px; font-size: 0.85rem; }
.pill {
  display: inline-block; border-radius: 999px; padding: 3px 11px;
  font-size: 0.78rem; font-weight: 700;
}
.pill-on { background: var(--accent-soft); color: var(--accent); }
.pill-off { background: color-mix(in srgb, var(--muted) 15%, transparent); color: var(--muted); }
.pill-warn { background: color-mix(in srgb, #c89632 18%, transparent); color: #a5761f; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--card); color: var(--text); font-size: 0.92rem;
}
.filters input[type="search"] { flex: 1; min-width: 160px; }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--text); color: var(--bg);
  border-radius: 999px; padding: 12px 22px; font-weight: 600; font-size: 0.95rem;
  box-shadow: var(--shadow); z-index: 60; max-width: 90vw; text-align: center;
}

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50; padding: 18px;
}
.modal-card { width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto; }
.modal-card h3 { margin-top: 0; }

.temp-password {
  font: 700 1.3rem ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--accent-soft); color: var(--accent);
  padding: 12px 16px; border-radius: 12px; text-align: center;
  letter-spacing: 1px; user-select: all; margin: 12px 0;
}

/* Knowledge-base article preview: shown exactly as a patient receives it. */
.article-body {
  white-space: pre-wrap; line-height: 1.6; font-size: 0.95rem;
  background: var(--bg); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; margin: 12px 0;
}

.empty-note { color: var(--muted); text-align: center; padding: 34px 10px; }
.center-loader { text-align: center; color: var(--muted); padding: 34px 10px; }

@media (max-width: 640px) {
  .row-item { flex-direction: column; align-items: flex-start; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

/* Login extras */
.check-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.92rem; margin: 4px 0 14px; cursor: pointer;
}
.check-row input { width: 16px; height: 16px; accent-color: var(--accent); }

/* "New data available" banner — shown instead of redrawing under the user's hands */
.refresh-banner {
  position: fixed; left: 50%; transform: translateX(-50%); top: 16px;
  background: var(--accent); color: #fff; border-radius: 999px;
  padding: 10px 20px; font-weight: 600; font-size: 0.92rem;
  box-shadow: var(--shadow); z-index: 55; cursor: pointer; border: 0;
}

/* Patient's own messages to the assistant, as the doctor sees them. Plain and
   uniform on purpose: highlighting a word here would be a clinical opinion the
   product does not have. */
.pm-item { border-top: 1px solid var(--line); padding: 10px 0; }
.pm-item:first-of-type { border-top: 0; }
.pm-when { font-size: 0.8rem; color: var(--muted); margin-bottom: 2px; }
.pm-text { white-space: pre-wrap; overflow-wrap: anywhere; }
