/* ── Backdrop ── */

#sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(var(--shadow-rgb),0.30);
  z-index: 900;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#sheet-backdrop.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Sheet ── */

#upload-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 85vh;
  background: var(--surface);
  border-radius: 16px 16px 0 0;
  box-shadow: 0 -8px 40px rgba(var(--shadow-rgb),0.14);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 950;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#upload-sheet.open { transform: translateY(0); }

/* ── Handle ── */

.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

/* ── Header ── */

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 0;
  flex-shrink: 0;
}

.sheet-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text);
}

.sheet-close {
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
  padding: 4px;
  transition: color var(--speed);
}

.sheet-close:hover { color: var(--red); }

/* ── Tabs ── */

.sheet-tabs {
  display: flex;
  padding: 10px 20px 0;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.sheet-tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--speed), border-color var(--speed);
}

.sheet-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Body ── */

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.sheet-panel { display: flex; flex-direction: column; gap: 14px; }

/* ── Footer ── */

.sheet-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
  flex-shrink: 0;
}

/* ── Beneficiary rows ── */

.beneficiary-row {
  display: grid;
  grid-template-columns: 1fr 1fr 80px 28px;
  gap: 8px;
  align-items: end;
}

.row-remove {
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 4px;
  line-height: 1;
  align-self: center;
  transition: color var(--speed);
  height: 36px;
  display: flex;
  align-items: center;
}

.row-remove:hover { color: var(--red); }

/* ── Carrier rows (Profile) ── */

.carrier-row {
  display: grid;
  grid-template-columns: 1fr 100px 28px;
  gap: 8px;
  align-items: end;
}

/* ── Medical condition tags ── */

.condition-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.condition-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--wood-soft);
  color: var(--wood);
  border-radius: 12px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
}

.condition-tag-remove {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 10px;
  color: var(--wood);
  line-height: 1;
}
