:root {
  --ink: #20272b;
  --muted: #66747a;
  --canvas: #f8f5f7;
  --primary: #0f7c86;
  --primary-deep: #4d3f75;
  --coral: #d94f7b;
  --mint: #e9f7f6;
  --soft-mint: #e4f4f3;
  --soft-coral: #ffe5ee;
  --line: #e3dde4;
  --gold: #c99223;
  --ribbon: #e85d8b;
  --card-fill: #fbfdfe;
  --danger: #9d2d25;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f4fafa; }

body {
  min-height: 100%;
  margin: 0;
  color: var(--ink);
  background: linear-gradient(180deg, #f4fafa 0%, var(--canvas) 58%, #ffffff 100%);
  font-family: "Tajawal", "Cairo", "Noto Kufi Arabic", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-feature-settings: "kern";
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }

.app-splash {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 14px;
  background: linear-gradient(180deg, #f4fafa 0%, #ffffff 100%);
  color: var(--primary-deep);
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.app-splash.hidden {
  opacity: 0;
  visibility: hidden;
}

.splash-logo-wrap {
  width: 116px;
  height: 116px;
  display: grid;
  place-items: center;
  border-radius: 30px;
  background: white;
  box-shadow: 0 18px 44px rgba(77, 63, 117, 0.18);
}

.splash-logo-wrap img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  border-radius: 24px;
}

.app-splash strong {
  color: var(--primary-deep);
  font-size: 26px;
  font-weight: 900;
}

.app-shell {
  width: min(430px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: env(safe-area-inset-top, 0) 14px calc(110px + env(safe-area-inset-bottom, 0px));
}

.top-app-bar {
  position: sticky;
  top: 0;
  z-index: 7;
  min-height: 64px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 0 6px;
  background: var(--canvas);
}

.top-title {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 0;
}

.top-title strong { color: var(--ink); font-size: 19px; font-weight: 900; line-height: 1.1; }
.top-title span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.top-actions { display: flex; gap: 8px; align-items: center; }

.round-action {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: var(--soft-mint);
  color: var(--primary);
  padding: 0;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.round-action.active { background: var(--primary); color: white; }
.round-action:active { transform: scale(0.97); }

.round-action > span {
  width: 32px;
  height: 32px;
  display: inline-block;
  border-radius: 999px;
  background-color: white;
}

.round-action.active > span {
  background-color: rgba(255, 255, 255, 0.18);
  color: white;
}

.hero-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep), var(--ribbon));
  color: white;
  box-shadow: 0 8px 22px rgba(77, 63, 117, 0.16);
}

.hero-head {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  align-items: center;
}

.logo-ring {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.logo-ring img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 999px;
}

.hero-card h1 {
  margin: 0 0 4px;
  color: white;
  font-size: 25px;
  line-height: 1.2;
  font-weight: 900;
}

.hero-card p {
  margin: 0;
  color: var(--mint);
  line-height: 1.55;
  font-size: 14px;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.hero-metrics article {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 10px 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
}

.hero-metrics b {
  color: white;
  font-size: 22px;
  line-height: 1;
}

.hero-metrics small {
  color: var(--mint);
  font-size: 12px;
  font-weight: 700;
}

.medical-disclaimer {
  display: grid;
  grid-template-columns: 28px 1fr 34px;
  gap: 10px;
  align-items: start;
  margin: 16px 0;
  padding: 12px;
  border: 1px solid rgba(217, 79, 123, 0.28);
  border-radius: 18px;
  background: var(--soft-coral);
}

.medical-disclaimer[hidden] {
  display: none !important;
}

.medical-disclaimer strong { display: block; margin-bottom: 3px; font-weight: 900; }
.medical-disclaimer p { margin: 0; color: var(--coral); font-size: 12px; line-height: 1.65; }
.hospital-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: white;
  color: var(--coral);
  font-weight: 900;
}

.medical-disclaimer button {
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 2;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--coral);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sync-page-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(15, 124, 134, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, var(--soft-mint) 100%);
}

.sync-page-card.connected {
  border-color: rgba(77, 63, 117, 0.22);
  background: linear-gradient(135deg, #ffffff 0%, #f0eaf7 100%);
}

.sync-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--primary);
  color: white;
}

.sync-page-card.connected .sync-card-icon {
  background: var(--primary-deep);
}

.sync-page-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.sync-page-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.account-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 12px;
}

.account-actions button {
  min-height: 46px;
  border: 0;
  border-radius: 18px;
  padding: 0 12px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.account-actions .danger-action {
  background: var(--soft-coral);
  color: var(--coral);
}

.screen { display: none; }
.screen.active { display: grid; gap: 14px; }

.screen[data-screen="today"].active {
  margin-top: 14px;
  padding: 16px;
  border: 1px solid rgba(227, 221, 228, 0.74);
  border-radius: 22px;
  background: white;
  box-shadow: 0 8px 18px rgba(32, 39, 43, 0.08);
}

.install-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(15, 124, 134, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, var(--soft-mint) 100%);
}

.install-card[hidden] {
  display: none !important;
}

.install-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  box-shadow: inset 0 0 0 1px rgba(15, 124, 134, 0.12);
}

.install-icon img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  border-radius: 12px;
}

.install-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.install-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.install-card button {
  grid-column: 1 / -1;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.permission-card {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(114, 75, 156, 0.18);
  border-radius: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #f4edf8 100%);
}

.permission-card[hidden] {
  display: none !important;
}

.permission-icon {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: white;
  color: var(--primary-deep);
  box-shadow: inset 0 0 0 1px rgba(114, 75, 156, 0.12);
}

.permission-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.permission-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.permission-card button {
  grid-column: 1 / -1;
  min-height: 44px;
  border: 0;
  border-radius: 14px;
  background: var(--primary-deep);
  color: white;
  font-weight: 900;
}

.section-heading {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.screen[data-screen="today"] > .section-heading {
  margin-top: 0;
}

.section-heading h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  font-weight: 900;
}

.section-heading button {
  min-height: 48px;
  margin-top: 0;
  border: 0;
  border-radius: 22px;
  padding: 0 16px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(15, 124, 134, 0.16);
}

.profile-save-bar {
  position: sticky;
  top: 64px;
  z-index: 6;
  margin-inline: -4px;
  margin-top: 12px;
  padding: 8px 4px 10px;
  background: linear-gradient(180deg, #f4fafa 78%, rgba(244, 250, 250, 0));
}

.profile-save-bar button {
  white-space: nowrap;
  box-shadow: 0 10px 24px rgba(15, 124, 134, 0.18);
}

.care-card, .stat-card {
  border: 1px solid var(--line);
  background: #fbfdfe;
  color: var(--ink);
  box-shadow: none;
}

.care-card {
  display: grid;
  grid-template-columns: 48px 1fr 20px;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
}

.care-card h3 { margin: 0 0 4px; font-size: 16px; font-weight: 900; }
.care-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.care-card small { color: var(--primary); font-weight: 800; }
.care-card .overline {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}
.action-card { text-align: right; }
.action-card.gold { border-color: rgba(201, 146, 35, 0.22); }
.water-card { background: var(--soft-mint); border-color: rgba(15, 124, 134, 0.12); }
.profile-card { grid-template-columns: 48px 1fr; }

.arrow {
  color: var(--primary);
  font-size: 28px;
  font-weight: 400;
}

.sync-settings-card {
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  border-color: rgba(15, 124, 134, 0.18);
}

.sync-settings-card button {
  min-height: 38px;
  border: 0;
  border-radius: 16px;
  padding: 0 14px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.sync-settings-card p {
  margin-bottom: 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-card {
  min-height: 104px;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 18px;
  text-align: right;
}

.stat-card b { font-size: 28px; line-height: 1; color: var(--ink); }
.stat-card small { color: var(--muted); font-weight: 800; }
.stat-card.coral .card-icon { background: var(--soft-coral); color: var(--coral); }
.stat-card.gold .card-icon { background: rgba(201, 146, 35, 0.14); color: var(--gold); }
.stat-card.deep .card-icon { background: var(--lavender, #f0eaf7); color: var(--primary-deep); }

.card-icon, .mini-icon, .nav-icon, .icon-person, .icon-doc, .icon-settings, .water-drop {
  position: relative;
  display: inline-block;
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: var(--soft-mint);
  color: var(--primary);
}

.mini-icon {
  width: 20px;
  height: 20px;
  color: white;
}

.water-drop {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: white;
  color: var(--primary);
}

.water-drop::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 22px;
  top: 12px;
  right: 15px;
  background: currentColor;
  border-radius: 16px 16px 16px 4px;
  transform: rotate(45deg);
}

.list { display: grid; gap: 10px; }

.item-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card-fill);
}

.item-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 15px;
  background: var(--soft-mint);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
}

.item-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 5px; }
.item-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft-mint);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.item-body h3 { margin: 0 0 4px; font-size: 16px; font-weight: 900; }
.item-body p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.small-line { color: var(--primary) !important; font-weight: 800; }
.row-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.row-actions button {
  flex: 1;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  color: var(--primary);
  font-weight: 800;
}
.row-actions button:last-child { color: var(--danger); }

.empty-state {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  background: var(--card-fill);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.empty-state b {
  display: block;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 15px;
}

.empty-state p {
  margin: 0;
}

.profile-summary, .form-card, .detail-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card-fill);
}

.detail-card.highlight-item {
  animation: highlightItem 2.2s ease;
}

.highlight-item.settings-focus {
  animation: highlightItem 2.4s ease;
  border-color: rgba(15, 124, 134, 0.5);
  background: #e9f7f6;
}

@keyframes highlightItem {
  0%, 100% {
    box-shadow: none;
  }
  15%, 70% {
    box-shadow: 0 0 0 4px rgba(15, 124, 134, 0.2);
  }
}

.summary-head, .detail-head {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
}

.summary-head {
  grid-template-columns: 56px 1fr;
}

.summary-head h3, .detail-head h3, .form-card h3, .detail-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 17px;
  font-weight: 900;
}

.summary-head p, .detail-head p, .detail-card p, .muted-line {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.detail-head small {
  display: block;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.doctor-list,
.doctor-notes {
  display: grid;
  gap: 10px;
}

.doctor-row,
.doctor-note {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}

.doctor-row {
  grid-template-columns: 1fr auto;
  align-items: start;
}

.doctor-row strong,
.doctor-note strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
}

.doctor-row p,
.doctor-note p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.doctor-row small,
.doctor-note-meta small {
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.doctor-note-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.doctor-note-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft-mint);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.profile-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick-tile {
  display: grid;
  gap: 6px;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(15, 124, 134, 0.14);
  border-radius: 18px;
  background: rgba(15, 124, 134, 0.08);
}

.quick-tile small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.quick-tile b {
  color: var(--ink);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-tile.gold {
  background: rgba(201, 146, 35, 0.1);
  border-color: rgba(201, 146, 35, 0.16);
}

.quick-tile.coral {
  background: rgba(217, 79, 123, 0.1);
  border-color: rgba(217, 79, 123, 0.16);
}

.quick-tile.deep {
  background: rgba(77, 63, 117, 0.1);
  border-color: rgba(77, 63, 117, 0.16);
}

.form-card label, .sheet label {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 800;
}

.form-card label[hidden], .sheet label[hidden] {
  display: none !important;
}

.notification-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-mint);
  color: var(--deep);
  font-size: 13px;
}

.notification-status span {
  color: var(--primary);
  font-weight: 900;
  text-align: left;
}

.settings-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.settings-actions button {
  border: 0;
  border-radius: 8px;
  padding: 12px 8px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  cursor: pointer;
}

.settings-actions button:last-child {
  background: var(--deep);
}

.drive-card {
  border-color: rgba(77, 63, 117, 0.2);
  background: linear-gradient(135deg, #ffffff 0%, #f0eaf7 100%);
}

.drive-actions {
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.drive-actions button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  padding: 0 14px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.drive-actions button:last-child {
  background: var(--primary-deep);
}

.settings-actions button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.brand-card {
  border-color: rgba(77, 63, 117, 0.18);
  background: linear-gradient(135deg, #ffffff 0%, #f0eaf7 100%);
}

.zaran-brand-link {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.zaran-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), var(--primary-deep));
  color: white;
  font-weight: 900;
  letter-spacing: 0;
  box-shadow: 0 10px 22px rgba(77, 63, 117, 0.18);
}

.zaran-brand-link h3 {
  margin: 0 0 4px;
}

.sadaqah-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  border-color: rgba(232, 93, 139, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 229, 238, 0.9)),
    linear-gradient(135deg, rgba(15, 124, 134, 0.12), rgba(77, 63, 117, 0.12));
}

.sadaqah-card h3 {
  margin: 10px 0 8px;
  color: var(--primary-deep);
  font-size: 19px;
  font-weight: 900;
}

.sadaqah-card p {
  margin: 0 0 8px;
  color: var(--ink);
  line-height: 1.85;
  font-weight: 800;
}

.sadaqah-mark {
  display: inline-flex;
  width: fit-content;
  min-height: 32px;
  margin-inline: auto;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  background: white;
  color: var(--coral);
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(232, 93, 139, 0.16);
}

.sadaqah-dua {
  color: var(--primary-deep) !important;
}

.privacy-card {
  border-color: rgba(15, 124, 134, 0.16);
}

.support-links {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.support-links a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: white;
  color: var(--primary-deep);
  font-weight: 900;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.form-card input, .form-card textarea, .form-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.form-card textarea {
  min-height: 104px;
  resize: vertical;
}

.status-pill {
  justify-self: end;
  padding: 8px 10px;
  border: 1px solid rgba(15, 124, 134, 0.14);
  border-radius: 14px;
  background: rgba(15, 124, 134, 0.12);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-pill.coral { background: var(--soft-coral); color: var(--coral); border-color: rgba(217, 79, 123, 0.14); }
.status-pill.primary { background: rgba(15, 124, 134, 0.12); color: var(--primary); border-color: rgba(15, 124, 134, 0.14); }
.status-pill.gold { background: rgba(201, 146, 35, 0.12); color: var(--gold); border-color: rgba(201, 146, 35, 0.14); }
.status-pill.deep { background: rgba(77, 63, 117, 0.12); color: var(--primary-deep); border-color: rgba(77, 63, 117, 0.14); }
.status-pill.danger { background: rgba(157, 45, 37, 0.12); color: var(--danger); border-color: rgba(157, 45, 37, 0.14); }

.dose-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.report-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.report-actions button {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--primary);
  border-radius: 18px;
  background: white;
  color: var(--primary);
  font-weight: 900;
}

.report-actions button:first-child {
  background: var(--primary);
  color: white;
}

.report-card {
  gap: 12px;
  padding: 12px;
  border-radius: 20px;
  background: #fbfdfe;
}

.report-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
}

.report-image-button {
  width: 82px;
  height: 82px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: white;
  overflow: hidden;
}

.report-image-button span {
  display: none;
  padding: 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.report-image-button.image-failed {
  border: 1px solid rgba(15, 124, 134, 0.18);
  background: var(--soft-mint);
}

.report-image-button.image-failed img {
  display: none;
}

.report-image-button.image-failed span {
  display: block;
}

.report-thumb {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.report-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.report-meta h3 {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 900;
}

.report-meta small {
  color: var(--primary);
  font-weight: 800;
}

.report-meta .status-pill {
  justify-self: start;
}

.report-open-link {
  justify-self: start;
  min-height: 34px;
  border: 0;
  border-radius: 14px;
  padding: 0 12px;
  background: rgba(15, 124, 134, 0.1);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.report-icon-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: var(--soft-mint);
  color: var(--primary);
}

.icon-button.delete {
  background: var(--soft-coral);
  color: var(--coral);
}

.icon-button span {
  width: 18px;
  height: 18px;
  display: block;
  background: currentColor;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}

.icon-button.edit span {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 17.3V21h3.7L18.6 10.1l-3.7-3.7L4 17.3Zm17.4-10c.4-.4.4-1 0-1.4l-2.3-2.3a1 1 0 0 0-1.4 0l-1.8 1.8l3.7 3.7l1.8-1.8Z'/%3E%3C/svg%3E");
}

.icon-button.delete span {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M8 21a2 2 0 0 1-2-2V7H4V5h5V3h6v2h5v2h-2v12a2 2 0 0 1-2 2H8Zm0-14v12h8V7H8Zm2 2h2v8h-2V9Zm4 0h2v8h-2V9Z'/%3E%3C/svg%3E");
}

.report-preview {
  display: grid;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card-fill);
}

.report-preview img {
  width: 100%;
  max-height: 300px;
  object-fit: contain;
  border-radius: 16px;
  background: white;
  border: 1px solid var(--line);
}

.report-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.report-file-actions {
  display: grid;
  gap: 12px;
}

.report-file-actions button {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 18px;
  border: 1px solid var(--primary);
  background: white;
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}

.report-file-actions .report-pick-btn {
  background: var(--primary);
  color: white;
}

.file-picker {
  position: relative;
}

.file-picker input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.file-picker span {
  min-height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--soft-mint);
  color: var(--primary);
  font-weight: 900;
}

.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(7, 16, 20, 0.88);
}

.image-viewer[hidden] {
  display: none !important;
}

.image-viewer img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  touch-action: pinch-zoom;
  transition: transform 0.18s ease;
}

.image-viewer.zoomed img {
  transform: scale(1.7);
}

.image-viewer button {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 41;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.dose-row button {
  min-height: 44px;
  border: 0;
  border-radius: 16px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.dose-row button:last-child {
  border: 1px solid var(--coral);
  background: white;
  color: var(--coral);
}

.dose-row button.selected {
  box-shadow: 0 0 0 3px rgba(15, 124, 134, 0.16);
  transform: translateY(-1px);
}

.dose-row button.selected::after {
  content: " ✓";
}

.dose-row button.selected.missed {
  background: var(--soft-coral);
  box-shadow: 0 0 0 3px rgba(217, 79, 123, 0.14);
}

.switch-line {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.switch-line input {
  width: 20px;
  height: 20px;
}

.icon-camera, .icon-upload {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
}

.icon-camera::before {
  content: "";
  position: absolute;
  inset: 6px 2px 3px;
  border: 2px solid currentColor;
  border-radius: 5px;
}

.icon-camera::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  right: 7px;
  top: 10px;
  border: 2px solid currentColor;
  border-radius: 50%;
}

.icon-upload::before {
  content: "";
  position: absolute;
  width: 13px;
  height: 11px;
  right: 4px;
  bottom: 3px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 0 0 5px 5px;
}

.icon-upload::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  right: 6px;
  top: 3px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(-45deg);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 104px;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(360px, calc(100% - 40px));
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 30px rgba(15, 124, 134, 0.26);
}

.saving-overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(32, 39, 43, 0.34);
}

.saving-card {
  width: min(360px, 100%);
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px;
  border: 1px solid rgba(15, 124, 134, 0.14);
  border-radius: 28px;
  background: white;
  box-shadow: 0 20px 55px rgba(32, 39, 43, 0.22);
  text-align: center;
}

.saving-card strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 900;
}

.saving-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.saving-card button {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid var(--soft-mint);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.saved-icon {
  width: 70px;
  height: 70px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--soft-mint);
  color: var(--primary);
  font-size: 36px;
  font-weight: 900;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.fab {
  position: fixed;
  left: calc(50% - min(430px, 100%) / 2 + 18px);
  bottom: 102px;
  z-index: 11;
  min-height: 52px;
  border: 0;
  border-radius: 22px;
  padding: 0 18px;
  background: var(--primary);
  color: white;
  font-weight: 900;
  box-shadow: 0 12px 28px rgba(15, 124, 134, 0.28);
}

.fab[hidden] {
  display: none !important;
}

.mobile-install-banner {
  position: fixed;
  left: 50%;
  bottom: calc(106px + env(safe-area-inset-bottom, 0px));
  z-index: 12;
  width: min(402px, calc(100% - 28px));
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 12px 12px 12px 42px;
  border: 1px solid rgba(15, 124, 134, 0.18);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(32, 39, 43, 0.18);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.mobile-install-banner[hidden] {
  display: none !important;
}

.mobile-install-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--soft-mint);
}

.mobile-install-icon img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  border-radius: 12px;
}

.mobile-install-banner strong {
  display: block;
  margin-bottom: 2px;
  font-size: 13px;
  font-weight: 900;
}

.mobile-install-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.mobile-install-button {
  min-height: 38px;
  border: 0;
  border-radius: 16px;
  padding: 0 14px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 900;
}

.mobile-install-close {
  position: absolute;
  top: 8px;
  left: 10px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: var(--soft-coral);
  color: var(--coral);
  font-size: 18px;
  line-height: 1;
}

@media (min-width: 641px) {
  .mobile-install-banner {
    display: none !important;
  }
}

.bottom-bar {
  position: fixed;
  left: 50%;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 10;
  width: min(402px, calc(100% - 28px));
  height: 84px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(227, 221, 228, 0.7);
  border-radius: 28px;
  background: white;
  box-shadow: 0 10px 30px rgba(32, 39, 43, 0.14);
}

.bottom-item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  border: 0;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  padding: 5px 2px;
  transition: transform 0.12s ease, background 0.12s ease, color 0.12s ease;
}
.bottom-item:active { transform: scale(0.97); }

.bottom-item b {
  max-width: 100%;
  color: inherit;
  font-size: 10.5px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bottom-item.selected b {
  font-weight: 900;
}

.bottom-item.selected {
  background: rgba(232, 93, 139, 0.12);
  color: var(--ribbon);
}

.bottom-item[data-tab="meds"].selected {
  background: rgba(15, 124, 134, 0.12);
  color: var(--primary);
}

.bottom-item[data-tab="appointments"].selected {
  background: rgba(201, 146, 35, 0.12);
  color: var(--gold);
}

.bottom-item[data-tab="symptoms"].selected {
  background: rgba(217, 79, 123, 0.12);
  color: var(--coral);
}

.bottom-item[data-tab="reports"].selected {
  background: rgba(77, 63, 117, 0.12);
  color: var(--primary-deep);
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
  background: #f3f6f7;
  color: currentColor;
}

.bottom-item.selected .nav-icon {
  width: 36px;
  height: 36px;
}

.bottom-item.selected .nav-icon { background: var(--ribbon); color: white; }
.bottom-item[data-tab="meds"].selected .nav-icon { background: var(--primary); }
.bottom-item[data-tab="appointments"].selected .nav-icon { background: var(--gold); }
.bottom-item[data-tab="symptoms"].selected .nav-icon { background: var(--coral); }
.bottom-item[data-tab="reports"].selected .nav-icon { background: var(--primary-deep); }

.modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: end center;
  padding: 14px;
  background: rgba(32, 39, 43, 0.42);
  z-index: 20;
}

.modal[hidden] { display: none !important; }

.sheet {
  width: min(430px, 100%);
  max-height: min(760px, 92svh);
  overflow: auto;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 22px;
  background: white;
  box-shadow: 0 20px 55px rgba(32, 39, 43, 0.22);
}

.sheet-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.sheet-title h2 { margin: 0; font-size: 20px; }
.sheet-title button {
  min-height: 40px;
  border: 0;
  border-radius: 14px;
  padding: 0 12px;
  background: var(--soft-mint);
  color: var(--primary);
  font-weight: 900;
}

.sheet label { display: grid; gap: 6px; color: var(--ink); font-weight: 800; }
.sheet input, .sheet textarea, .sheet select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card-fill);
  color: var(--ink);
  padding: 12px;
  outline: none;
}

.sheet textarea { min-height: 104px; resize: vertical; }
.two-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.primary-btn {
  min-height: 48px;
  border: 0;
  border-radius: 18px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.nav-icon::before, .card-icon::before, .mini-icon::before, .icon-person::before, .icon-doc::before, .icon-settings::before, .icon-cloud::before, .icon-bell::before {
  content: "";
  position: absolute;
  box-sizing: border-box;
  background-color: currentColor;
  inset: 24%;
  -webkit-mask: var(--icon-mask) center / contain no-repeat;
  mask: var(--icon-mask) center / contain no-repeat;
}

.icon-person, .icon-doc, .icon-settings, .icon-cloud, .icon-bell {
  width: 24px;
  height: 24px;
  position: relative;
}

.round-action .icon-person,
.round-action .icon-doc,
.round-action .icon-settings,
.round-action .icon-cloud {
  color: inherit;
}

.mini-icon::before {
  inset: 0;
}

.nav-icon::before {
  inset: 7px;
}

.card-icon::before {
  inset: 12px;
}

.icon-person::before, .icon-doc::before, .icon-settings::before, .icon-cloud::before, .icon-bell::before {
  inset: 2px;
}

.heart {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 21s-7.5-4.6-9.6-9.2C.9 8.5 2.7 5 6.2 5c2 0 3.3 1.1 3.8 2.1C10.7 6.1 12 5 14 5c3.5 0 5.3 3.5 3.8 6.8C15.5 16.4 12 21 12 21Z'/%3E%3C/svg%3E");
}

.medicine {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7.4 3.9a5 5 0 0 1 7.1 0l5.6 5.6a5 5 0 0 1-7.1 7.1L7.4 11a5 5 0 0 1 0-7.1Zm1.4 1.4a3 3 0 0 0 0 4.3l2.1 2.1l4.3-4.3l-2.1-2.1a3 3 0 0 0-4.3 0ZM12.3 13.1l2.1 2.1a3 3 0 0 0 4.3-4.3l-2.1-2.1l-4.3 4.3Z'/%3E%3C/svg%3E");
}

.calendar {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M7 2h2v3h6V2h2v3h2a3 3 0 0 1 3 3v11a3 3 0 0 1-3 3H5a3 3 0 0 1-3-3V8a3 3 0 0 1 3-3h2V2Zm13 9H4v8a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-8ZM5 7a1 1 0 0 0-1 1v1h16V8a1 1 0 0 0-1-1H5Zm2 7h3v3H7v-3Zm5 0h3v3h-3v-3Z'/%3E%3C/svg%3E");
}

.healing {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M11 2h2v20h-2V2Zm-5 7h12v2H6V9Zm0 4h12v2H6v-2Z'/%3E%3C/svg%3E");
}

.report {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h8l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm7 2H6v16h11V8h-4V4Zm-4 8h6v2H9v-2Zm0 4h6v2H9v-2Z'/%3E%3C/svg%3E");
}

.person, .icon-person {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 12a5 5 0 1 0 0-10a5 5 0 0 0 0 10Zm0 2c-4.4 0-8 2.4-8 5.3V22h16v-2.7c0-2.9-3.6-5.3-8-5.3Z'/%3E%3C/svg%3E");
}

.icon-doc {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M6 2h9l5 5v15H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2Zm8 2H6v16h12V8h-4V4Zm-3 6h2v3h3v2h-3v3h-2v-3H8v-2h3v-3Z'/%3E%3C/svg%3E");
}

.icon-settings, .settings {
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M4 6h9a3 3 0 0 0 5.8 0H20V4h-1.2A3 3 0 0 0 13 4H4v2Zm12-2a1 1 0 1 1 0 2a1 1 0 0 1 0-2ZM4 13h1.2a3 3 0 0 0 5.6 0H20v-2h-9.2a3 3 0 0 0-5.6 0H4v2Zm4-2a1 1 0 1 1 0 2a1 1 0 0 1 0-2Zm-4 8h9.2a3 3 0 0 0 5.6 0H20v-2h-1.2a3 3 0 0 0-5.6 0H4v2Zm12-2a1 1 0 1 1 0 2a1 1 0 0 1 0-2Z'/%3E%3C/svg%3E");
}

.icon-cloud {
  display: inline-block;
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 3l4 4h-3v6h-2V7H8l4-4Zm-5 9a5 5 0 0 1 4.7-4v2A3 3 0 0 0 7 13H6a3 3 0 0 0 0 6h12a3 3 0 0 0 .4-6a5 5 0 0 0-6.4-4.8v-2a7 7 0 0 1 8.3 5A5 5 0 0 1 18 21H6a5 5 0 0 1 1-9Z'/%3E%3C/svg%3E");
}

.icon-bell {
  display: inline-block;
  --icon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='black' d='M12 22a2.8 2.8 0 0 0 2.7-2h-5.4A2.8 2.8 0 0 0 12 22Zm7-6h-1V9a6 6 0 0 0-4.7-5.9V2h-2.6v1.1A6 6 0 0 0 6 9v7H5a2 2 0 0 0-2 2v1h18v-1a2 2 0 0 0-2-2ZM8 16V9a4 4 0 1 1 8 0v7H8Z'/%3E%3C/svg%3E");
}

@media (min-width: 700px) {
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.34);
    pointer-events: none;
  }

  .app-shell {
    position: relative;
    border-left: 1px solid rgba(227, 221, 228, 0.8);
    border-right: 1px solid rgba(227, 221, 228, 0.8);
    background: linear-gradient(180deg, #f4fafa 0%, var(--canvas) 58%, #ffffff 100%);
  }
}

@media (max-width: 360px) {
  .app-shell { padding-inline: 12px; }
  .top-actions { gap: 4px; }
  .round-action { width: 36px; height: 36px; }
  .bottom-bar { width: calc(100% - 20px); }
  .bottom-item b { font-size: 10px; }
  .hero-card { padding: 15px; }
  .two-fields { grid-template-columns: 1fr; }
}

/* Android visual parity layer */
.app-shell {
  width: min(432px, 100%);
  padding: 0 17px 136px;
}

.top-app-bar {
  min-height: 104px;
  padding: 14px 0 12px;
  grid-template-columns: 62px minmax(0, 1fr) auto;
}

.top-title strong {
  font-size: 26px;
}

.top-title span {
  font-size: 14px;
  font-weight: 500;
}

.top-actions {
  gap: 6px;
}

.round-action {
  width: 54px;
  height: 54px;
  background: #e3f7f6;
}

.round-action > span {
  width: 40px;
  height: 40px;
}

.hero-card {
  min-height: 256px;
  margin-top: 18px;
  padding: 34px 22px 22px;
  border-radius: 30px;
  border-bottom-left-radius: 26px;
  background: linear-gradient(135deg, #0f8790 0%, #3d4d78 50%, #e34b83 100%);
  box-shadow: 0 16px 28px rgba(32, 39, 43, 0.18);
}

.hero-head {
  grid-template-columns: 62px 1fr;
  align-items: start;
}

.logo-ring {
  width: 62px;
  height: 62px;
  order: -1;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.38);
}

.logo-ring img {
  width: 50px;
  height: 50px;
}

.hero-card h1 {
  font-size: 31px;
  text-align: right;
}

.hero-card p {
  font-size: 18px;
  line-height: 1.7;
}

.hero-metrics {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 16px;
}

.hero-metrics article {
  min-height: 108px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.23);
  background: rgba(255, 255, 255, 0.11);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.hero-metrics b {
  font-size: 32px;
}

.hero-metrics small {
  font-size: 15px;
}

.list-screen.active {
  display: grid;
  gap: 16px;
}

.add-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.add-action-row button {
  min-width: 148px;
  min-height: 64px;
  display: inline-flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: center;
  gap: 16px;
  border: 0;
  border-radius: 22px;
  padding: 0 20px;
  background: var(--primary);
  color: white;
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 25px rgba(15, 124, 134, 0.24);
}

.add-action-row button span {
  font-size: 32px;
  line-height: 1;
  font-weight: 500;
}

.content-panel {
  display: grid;
  gap: 22px;
  padding: 26px 22px 22px;
  border: 1px solid rgba(227, 221, 228, 0.88);
  border-radius: 28px;
  background: white;
  box-shadow: 0 12px 22px rgba(32, 39, 43, 0.14);
}

.content-panel .section-heading {
  margin-top: 0;
}

.content-panel .section-heading h2 {
  margin-right: auto;
  font-size: 28px;
  line-height: 1.25;
}

.content-panel .list {
  gap: 12px;
}

.empty-state {
  min-height: 132px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 24px 14px;
  border: 1px solid rgba(227, 221, 228, 0.9);
  border-radius: 22px;
  background: #fbfdfe;
  text-align: center;
}

.empty-state b {
  font-size: 20px;
}

.empty-state p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
}

.detail-card {
  border-radius: 20px;
  background: #fbfdfe;
}

.modal {
  place-items: end center;
  padding: 0 14px 28px;
  background: rgba(0, 0, 0, 0.58);
}

.sheet {
  width: min(410px, 100%);
  max-height: min(820px, 88svh);
  gap: 22px;
  padding: 32px 20px 22px;
  border-radius: 28px;
  border-top-left-radius: 32px;
  border-top-right-radius: 32px;
}

.sheet-title h2 {
  font-size: 28px;
  line-height: 1.2;
}

.sheet label {
  font-size: 17px;
  gap: 9px;
}

.sheet input,
.sheet textarea,
.sheet select {
  min-height: 64px;
  border-radius: 18px;
  border-color: rgba(227, 221, 228, 0.98);
  background: #fbfdfe;
  font-size: 18px;
  text-align: right;
}

.sheet textarea {
  min-height: 122px;
}

.primary-btn {
  min-height: 64px;
  border-radius: 18px;
  font-size: 18px;
}

.bottom-bar {
  bottom: 16px;
  width: min(404px, calc(100% - 32px));
  height: 96px;
  padding: 9px;
  border-radius: 30px;
  background: #e8f7f6;
}

.nav-icon {
  width: 38px;
  height: 38px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
}

.bottom-item.selected .nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
}

.bottom-item b {
  font-size: 13px;
}

@media (max-width: 360px) {
  .hero-card h1 { font-size: 27px; }
  .hero-card p { font-size: 16px; }
  .content-panel .section-heading h2 { font-size: 24px; }
  .add-action-row button { min-height: 58px; font-size: 16px; }
}

/* Compact mobile scale */
.app-shell {
  width: min(420px, 100%);
  padding: 0 14px 118px;
}

.top-app-bar {
  min-height: 82px;
  padding: 10px 0 8px;
  grid-template-columns: 50px minmax(0, 1fr) auto;
}

.top-title strong {
  font-size: 22px;
}

.top-title span {
  font-size: 12px;
}

.top-actions {
  gap: 4px;
}

.round-action {
  width: 46px;
  height: 46px;
}

.round-action > span {
  width: 32px;
  height: 32px;
}

.hero-card {
  min-height: 218px;
  margin-top: 14px;
  padding: 26px 18px 18px;
  border-radius: 26px;
}

.hero-head {
  grid-template-columns: 52px 1fr;
  gap: 12px;
}

.logo-ring {
  width: 52px;
  height: 52px;
}

.logo-ring img {
  width: 42px;
  height: 42px;
}

.hero-card h1 {
  font-size: 25px;
}

.hero-card p {
  font-size: 15px;
  line-height: 1.65;
}

.hero-metrics {
  gap: 8px;
  margin-top: 10px;
}

.hero-metrics article {
  min-height: 86px;
  border-radius: 18px;
}

.hero-metrics b {
  font-size: 26px;
}

.hero-metrics small {
  font-size: 13px;
}

.list-screen.active {
  gap: 13px;
}

.add-action-row {
  margin-top: 18px;
}

.add-action-row button {
  min-width: 128px;
  min-height: 54px;
  gap: 12px;
  border-radius: 20px;
  padding: 0 17px;
  font-size: 16px;
}

.add-action-row button span {
  font-size: 27px;
}

.content-panel {
  gap: 17px;
  padding: 22px 18px 18px;
  border-radius: 24px;
}

.content-panel .section-heading h2 {
  font-size: 23px;
}

.empty-state {
  min-height: 112px;
  padding: 18px 12px;
  border-radius: 18px;
}

.empty-state b {
  font-size: 17px;
}

.empty-state p {
  font-size: 13px;
}

.detail-card {
  border-radius: 18px;
}

.modal {
  padding: 0 12px 22px;
}

.sheet {
  width: min(398px, 100%);
  max-height: min(760px, 86svh);
  gap: 16px;
  padding: 26px 18px 18px;
  border-radius: 26px;
}

.sheet-title h2 {
  font-size: 24px;
}

.sheet label {
  font-size: 15px;
}

.sheet input,
.sheet textarea,
.sheet select {
  min-height: 54px;
  border-radius: 16px;
  font-size: 16px;
}

.sheet textarea {
  min-height: 104px;
}

.primary-btn {
  min-height: 54px;
  font-size: 16px;
}

.bottom-bar {
  bottom: 12px;
  width: min(392px, calc(100% - 28px));
  height: 82px;
  padding: 8px;
  border-radius: 28px;
}

.nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 14px;
}

.bottom-item.selected .nav-icon {
  width: 42px;
  height: 42px;
  border-radius: 16px;
}

.bottom-item b {
  font-size: 11px;
}
