:root {
  --blue: #6da9d2;
  --blue-dark: #5d99c6;
  --blue-header: #6ba8d1;
  --blue-text: #5a9bc4;
  --blue-link: #4a8eb8;
  --green-progress: #99c35f;
  --green-alert-bg: #e8f5e0;
  --green-alert-border: #a8d08d;
  --green-alert-text: #3d6b2e;
  --bg: #f0f2f5;
  --bg-page: #f5f6f8;
  --card: #ffffff;
  --text: #333333;
  --text-muted: #888888;
  --text-dark: #222222;
  --border: #e0e0e0;
  --border-light: #ececec;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

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

html,
body {
  height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

/* ========== Auth pages (login / register) ========== */

.auth-page {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: #f7f7f7;
}

.auth-header {
  background: var(--blue-header);
  color: #fff;
  padding: 14px 20px;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.2px;
}

.auth-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 60px;
}

.auth-card {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  padding: 40px 44px 36px;
  box-shadow: var(--shadow);
  border-radius: 2px;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.auth-logo img {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.auth-logo-text h1 {
  font-size: 18px;
  font-weight: 700;
  color: #4a90b8;
  line-height: 1.2;
}

.auth-logo-text p {
  font-size: 11px;
  color: #7ab0d0;
  margin-top: 2px;
  font-style: italic;
}

.auth-subtitle {
  text-align: center;
  font-size: 15px;
  color: #555;
  margin-bottom: 32px;
}

.field {
  position: relative;
  margin-bottom: 28px;
}

.field label {
  display: block;
  font-size: 13px;
  color: #666;
  margin-bottom: 6px;
  margin-left: 28px;
}

.field-row {
  display: flex;
  align-items: center;
  border-bottom: 1.5px solid #222;
  padding-bottom: 6px;
}

.field-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #555;
  margin-right: 6px;
}

.field input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--text-dark);
  padding: 4px 0;
  font-family: inherit;
}

.field input::placeholder {
  color: #bbb;
}

.toggle-pw {
  background: none;
  border: none;
  padding: 4px;
  color: #777;
  display: flex;
  align-items: center;
}

.toggle-pw:hover {
  color: #333;
}

.btn-outline {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 12px 24px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  background: #fff;
  color: var(--blue-text);
  font-size: 16px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s;
}

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

.auth-links {
  margin-top: 28px;
  text-align: center;
}

.auth-links a {
  display: block;
  color: #555;
  font-size: 14px;
  margin-bottom: 10px;
}

.auth-error {
  display: none;
  background: #fdecea;
  color: #c0392b;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 20px;
  text-align: center;
}

.auth-error.show {
  display: block;
}

.auth-footer {
  padding: 12px 20px;
  text-align: right;
  font-size: 12px;
  color: #999;
}

/* ========== Portal layout ========== */

.portal {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--bg-page);
}

.portal-header {
  background: var(--blue-header);
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.portal-header .menu-label {
  font-size: 17px;
  font-weight: 400;
}

.portal-header .header-title {
  font-size: 16px;
  font-weight: 400;
  flex: 1;
  padding-right: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hamburger {
  background: none;
  border: none;
  color: #fff;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
}

.portal-main {
  flex: 1;
  padding: 24px 28px 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}

.welcome {
  text-align: center;
  margin-bottom: 20px;
}

.welcome h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.welcome p {
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.alert-box {
  background: var(--green-alert-bg);
  border: 1px solid var(--green-alert-border);
  border-radius: 4px;
  padding: 14px 18px;
  margin-bottom: 24px;
}

.alert-box h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--green-alert-text);
  margin-bottom: 8px;
}

.alert-box p {
  font-size: 13px;
  color: #444;
  line-height: 1.55;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 800px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .portal-main {
    padding: 16px;
  }
}

.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px 18px 18px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
  min-height: 200px;
  display: flex;
  flex-direction: column;
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1.5px solid #b8d4e8;
  margin-bottom: 14px;
}

.dash-card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-dark);
}

.dash-card-title svg {
  width: 18px;
  height: 18px;
  color: #444;
}

.btn-view-all {
  border: 1px solid var(--blue);
  color: var(--blue-text);
  background: #fff;
  border-radius: 999px;
  padding: 4px 14px;
  font-size: 12px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-view-all:hover {
  background: var(--blue);
  color: #fff;
}

.dash-card-body {
  flex: 1;
}

.form-item {
  background: #f7f7f7;
  border: 1px solid #e8e8e8;
  border-radius: 6px;
  padding: 12px 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.form-item:hover {
  background: #eef5fa;
  border-color: var(--blue);
}

.form-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.form-item-meta {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.message-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-light);
}

.message-item:last-of-type {
  border-bottom: none;
}

.message-item-left h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.message-item-left p {
  font-size: 12px;
  color: #777;
}

.message-item-right {
  text-align: right;
  flex-shrink: 0;
  font-size: 11px;
  color: var(--text-muted);
}

.message-item-right .env-icon {
  display: block;
  margin-top: 4px;
  margin-left: auto;
  color: #888;
}

.empty-text {
  text-align: center;
  color: #999;
  font-size: 13px;
  font-style: italic;
  padding: 24px 8px;
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.section-empty {
  font-size: 12px;
  color: #999;
  font-style: italic;
  margin-bottom: 14px;
}

.appt-item {
  background: #f0f0f0;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
}

.appt-item:last-child {
  margin-bottom: 0;
}

.dash-card--appointments .dash-card-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.appt-past-list {
  max-height: 78px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  margin-bottom: 2px;
  scrollbar-gutter: stable;
}

.appt-past-list::-webkit-scrollbar {
  width: 6px;
}

.appt-past-list::-webkit-scrollbar-thumb {
  background: #c5c5c5;
  border-radius: 3px;
}

.appt-past-list::-webkit-scrollbar-track {
  background: #f0f0f0;
  border-radius: 3px;
}

.appt-item time {
  display: block;
  font-size: 13px;
  font-weight: 700;
  font-style: italic;
  color: var(--text-dark);
  margin-bottom: 2px;
}

.appt-item .loc {
  font-size: 12px;
  color: var(--blue-link);
  text-decoration: underline;
}

.appt-item .name {
  font-size: 12px;
  color: #555;
  margin-top: 2px;
}

.card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--blue);
  color: var(--blue-text);
  background: #fff;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

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

.btn-pill svg {
  width: 14px;
  height: 14px;
}

.portal-footer {
  padding: 10px 20px;
  text-align: right;
  font-size: 12px;
  color: #999;
  flex-shrink: 0;
}

/* ========== Side drawer ========== */

.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
  z-index: 100;
}

.drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  height: 100%;
  background: #fff;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 101;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 20px;
  border-bottom: 1px solid var(--border);
}

.drawer-logo img {
  width: 40px;
  height: 40px;
}

.drawer-logo span {
  font-size: 13px;
  font-weight: 700;
  color: #4a90b8;
  line-height: 1.25;
}

.drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

.drawer-nav a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 24px;
  color: #444;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.12s;
}

.drawer-nav a:hover {
  background: #f0f6fa;
}

.drawer-nav a svg {
  width: 20px;
  height: 20px;
  color: #555;
  flex-shrink: 0;
}

.drawer-nav .signout {
  border-top: 1px solid var(--border);
  margin-top: 8px;
  padding-top: 8px;
}

/* ========== Forms detail page ========== */

.forms-page .portal-main {
  max-width: 900px;
  padding-top: 28px;
}

.forms-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 8px;
}

.forms-intro svg {
  width: 28px;
  height: 28px;
  color: #333;
  flex-shrink: 0;
  margin-top: 2px;
}

.forms-intro h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 4px;
}

.forms-intro p {
  font-size: 13px;
  color: #888;
  font-style: italic;
}

.forms-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0 0;
}

.progress-list {
  list-style: none;
}

.progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border-light);
}

.progress-row .label {
  font-size: 14px;
  color: var(--text-dark);
  flex: 0 0 42%;
}

.progress-bar-wrap {
  flex: 1;
  height: 22px;
  background: #e8e8e8;
  border-radius: 2px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: var(--green-progress);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  font-size: 11px;
  color: #445533;
  font-weight: 500;
  min-width: fit-content;
}

.forms-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.btn-form {
  border: 1px solid #ccc;
  background: #fff;
  color: var(--blue-text);
  border-radius: 6px;
  padding: 10px 22px;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-form:hover {
  background: #f5f9fc;
  border-color: var(--blue);
}

/* ========== Messages page ========== */

.messages-page {
  background: #fff;
}

.messages-page .portal-footer {
  border-top: 1px solid var(--border-light);
}

.messages-layout {
  flex: 1;
  display: flex;
  min-height: 0;
  background: #fff;
}

.msg-rail {
  width: 72px;
  flex-shrink: 0;
  border-right: 1px solid #e5e5e5;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
  background: #fafafa;
  gap: 4px;
}

.msg-rail-item {
  width: 64px;
  border: none;
  background: transparent;
  color: #555;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  font-size: 11px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.msg-rail-item svg {
  width: 22px;
  height: 22px;
}

.msg-rail-item:hover {
  background: #eef5fa;
  color: var(--blue-text);
}

.msg-rail-item.active {
  background: #c5e0f0;
  color: #3a7a9e;
}

.msg-rail-expand {
  margin-top: auto;
  border: none;
  background: transparent;
  color: var(--blue);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.msg-rail-expand svg {
  width: 22px;
  height: 22px;
}

.messages-main {
  flex: 1;
  padding: 20px 28px 32px;
  min-width: 0;
  overflow-y: auto;
}

.msg-emergency {
  background: #fdeaea;
  border: 1px solid #e8a0a0;
  color: #c0392b;
  font-size: 13px;
  line-height: 1.45;
  padding: 12px 16px;
  border-radius: 2px;
  margin-bottom: 18px;
  max-width: 720px;
}

.msg-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.msg-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--blue);
  color: var(--blue-text);
  background: #fff;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  transition: background 0.15s, color 0.15s;
}

.msg-action-btn svg {
  width: 16px;
  height: 16px;
}

.msg-action-btn:hover {
  background: var(--blue);
  color: #fff;
}

.msg-folder-empty {
  color: #999;
  font-size: 14px;
  font-style: italic;
  padding: 32px 4px;
}

.header-left {
  display: flex;
  align-items: center;
  min-width: 0;
}

.msg-list {
  list-style: none;
  max-width: 900px;
}

.msg-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid #e8e8e8;
  cursor: pointer;
  transition: background 0.12s;
}

.msg-row:hover {
  background: #f7fafc;
}

.msg-row-left {
  min-width: 0;
}

.msg-subject {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 4px;
}

.msg-preview {
  font-size: 13px;
  color: #888;
}

.msg-row-right {
  flex-shrink: 0;
  text-align: right;
  color: #888;
}

.msg-row-right svg {
  width: 18px;
  height: 18px;
  display: block;
  margin-left: auto;
  margin-bottom: 4px;
}

.msg-row-right time {
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 600px) {
  .msg-rail {
    width: 58px;
  }

  .msg-rail-item {
    width: 52px;
    font-size: 10px;
  }

  .messages-main {
    padding: 14px 12px 24px;
  }

  .msg-row {
    flex-direction: column;
    gap: 8px;
  }

  .msg-row-right {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
  }

  .msg-row-right svg {
    margin: 0;
  }
}

/* ========== Message Detail ========== */

.msg-detail-page {
  background: #fff;
}

.header-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #fff;
  text-decoration: none;
  font-size: 16px;
}

.header-back:hover {
  opacity: 0.9;
}

.msg-detail-main {
  flex: 1;
  padding: 24px 32px 40px;
  max-width: 900px;
}

.msg-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

.msg-detail-subject {
  font-size: 22px;
  font-weight: 700;
  color: #222;
  margin-bottom: 8px;
  line-height: 1.3;
}

.msg-detail-category {
  font-size: 14px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.msg-detail-to {
  font-size: 14px;
  color: #333;
}

.msg-detail-right {
  flex-shrink: 0;
  text-align: right;
}

.msg-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 8px;
}

.msg-icon-btn {
  border: none;
  background: transparent;
  color: #333;
  padding: 4px;
  display: flex;
  align-items: center;
}

.msg-icon-btn svg {
  width: 20px;
  height: 20px;
}

.msg-icon-btn:hover {
  color: var(--blue-text);
}

.msg-detail-date {
  font-size: 13px;
  color: #555;
}

.msg-detail-divider {
  border: none;
  border-top: 1px solid #ddd;
  margin: 16px 0 20px;
}

.msg-detail-body {
  font-size: 14px;
  color: #222;
  line-height: 1.55;
}

.msg-detail-body p {
  margin-bottom: 14px;
}

.msg-detail-body ul {
  margin: 0 0 14px 1.2em;
  padding: 0;
}

.msg-detail-body li {
  margin-bottom: 10px;
}

.msg-signature {
  margin-top: 4px;
}

.msg-signature p {
  margin-bottom: 2px;
  line-height: 1.4;
}

.msg-detail-missing {
  padding: 40px 0;
  color: #666;
}

@media (max-width: 600px) {
  .msg-detail-main {
    padding: 16px;
  }

  .msg-detail-top {
    flex-direction: column;
  }

  .msg-detail-right {
    text-align: left;
  }

  .msg-detail-actions {
    justify-content: flex-start;
  }

  .msg-detail-subject {
    font-size: 18px;
  }
}

/* ========== Settings ========== */

.settings-page {
  background: #fff;
}

.settings-main {
  flex: 1;
  padding: 28px 32px 40px;
  max-width: 720px;
}

.settings-section {
  margin-bottom: 36px;
}

.settings-heading {
  font-size: 16px;
  font-weight: 600;
  color: var(--blue-text);
  padding-bottom: 8px;
  border-bottom: 1px solid #b8d4e8;
  margin-bottom: 16px;
}

.settings-subheading {
  font-size: 14px;
  font-weight: 500;
  color: var(--blue-text);
  margin-bottom: 14px;
}

.settings-row {
  display: flex;
  gap: 24px;
  padding: 10px 0;
  font-size: 14px;
  color: #333;
}

.settings-label {
  flex: 0 0 160px;
  color: #555;
}

.settings-value {
  color: #222;
}

.settings-row--toggle {
  align-items: center;
  justify-content: space-between;
}

.settings-row--toggle .settings-label {
  flex: 1;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #ccc;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
}

.toggle-switch input:checked + .toggle-slider {
  background: #333;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
}

.settings-save-wrap {
  display: flex;
  justify-content: center;
  margin-top: 24px;
}

.settings-save {
  width: auto;
  min-width: 120px;
  padding: 10px 36px;
}

/* ========== Compose ========== */

.compose-page {
  background: #fff;
}

.compose-main {
  flex: 1;
  width: 100%;
  padding: 24px 40px 48px;
  box-sizing: border-box;
}

.compose-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.compose-alert {
  background: #fdeaea;
  border: 1px solid #e8a0a0;
  color: #c0392b;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  padding: 12px 18px;
  margin: 0 auto 36px;
  max-width: 640px;
}

.compose-form {
  width: 100%;
}

.compose-line {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border-bottom: 1px solid #222;
  padding: 10px 0 12px;
  margin-bottom: 4px;
}

.compose-ico {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: #555;
  margin-top: 14px;
}

.compose-line-body {
  flex: 1;
  min-width: 0;
}

.compose-tiny {
  display: block;
  font-size: 12px;
  color: #888;
  margin-bottom: 2px;
}

.compose-select-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.compose-select-wrap select {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #222;
  font-family: inherit;
  padding: 2px 28px 2px 0;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
}

.compose-caret {
  position: absolute;
  right: 0;
  width: 22px;
  height: 22px;
  color: #666;
  pointer-events: none;
}

.compose-line-body input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: #222;
  font-family: inherit;
  padding: 14px 0 2px;
}

.compose-line-body input::placeholder {
  color: #999;
}

.compose-message-block {
  margin-top: 22px;
  border-bottom: 1px solid #222;
  padding-bottom: 8px;
}

.compose-msg-label {
  display: block;
  font-size: 14px;
  color: #888;
  margin-bottom: 8px;
}

.compose-message-block textarea {
  display: block;
  width: 100%;
  min-height: 220px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 15px;
  font-family: inherit;
  color: #222;
  line-height: 1.5;
  padding: 0;
}

.compose-no-files {
  text-align: center;
  font-style: italic;
  color: #999;
  font-size: 14px;
  margin: 22px 0 18px;
}

.compose-toolbar {
  display: flex;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.c-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  padding: 8px 14px;
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1.2;
}

.c-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.c-btn-outline {
  color: var(--blue-text);
  border: 1px solid #b0d0e4;
}

.c-btn-danger {
  color: #d64545;
  border: 1px solid #e8a0a0;
}

.c-btn-text {
  color: var(--blue-text);
  border: none;
  padding-left: 8px;
  padding-right: 8px;
}

.c-btn-outline:hover,
.c-btn-text:hover {
  background: #eef5fa;
}

.c-btn-danger:hover {
  background: #fdeaea;
}

/* ========== Lab Results ========== */

.lab-results-page {
  background: #fff;
}

.lab-results-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}

.lab-results-empty {
  font-size: 14px;
  color: #999;
  font-style: italic;
  text-align: center;
}

/* ========== Appointments page ========== */

.appointments-page {
  background: #fff;
}

.appointments-main {
  flex: 1;
  padding: 24px 32px 40px;
  max-width: 900px;
}

.appointments-notice {
  text-align: center;
  font-size: 13px;
  color: #555;
  margin-bottom: 28px;
  line-height: 1.5;
}

.appointments-section h2 {
  font-size: 16px;
  font-weight: 700;
  color: #222;
  margin-bottom: 12px;
}

.appointments-empty {
  font-size: 13px;
  color: #999;
  font-style: italic;
  margin-bottom: 8px;
}

.appointments-divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 20px 0;
}

.appointments-list .appt-item {
  margin-bottom: 10px;
}

/* ========== Web Resources ========== */

.web-resources-page {
  background: #fff;
}

.web-resources-main {
  flex: 1;
  padding: 40px 24px;
  text-align: center;
}

.web-resources-intro {
  font-size: 15px;
  color: #222;
  margin-bottom: 10px;
}

.web-resources-empty {
  font-size: 14px;
  color: #666;
  font-style: italic;
}

/* ========== Pay Bill ========== */

.pay-bill-page {
  background: #fff;
}

.pay-bill-main {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 24px;
}

.pay-bill-empty {
  font-size: 14px;
  color: #999;
  font-style: italic;
  text-align: center;
}

@media (max-width: 700px) {
  .settings-main {
    padding: 16px;
  }

  .settings-row {
    flex-direction: column;
    gap: 4px;
  }

  .settings-label {
    flex: none;
  }

  .compose-main {
    padding: 16px;
  }

  .compose-toolbar {
    flex-wrap: wrap;
    justify-content: stretch;
  }

  .c-btn {
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }
}
