/* ============================================================
   PWA Enfermeras — Mobile, cards, paleta coral.
   En desktop: frame de smartphone.
   ============================================================ */

:root {
  --enf-bg: #fdf6f0;
  --enf-coral: var(--nana-coral);
  --enf-coral-soft: var(--nana-coral-soft);
}

body {
  background: linear-gradient(135deg, #2a1a1d 0%, #4a2730 100%);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

/* --- Phone frame (solo desktop) --- */
.phone-frame {
  width: 390px;
  height: 800px;
  background: #1c1c1e;
  border-radius: 48px;
  padding: 12px;
  box-shadow:
    0 0 0 2px #333,
    0 20px 60px rgba(0, 0, 0, 0.5),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
}
.phone-frame::before {
  content: '';
  position: absolute;
  top: 22px; left: 50%;
  transform: translateX(-50%);
  width: 110px; height: 28px;
  background: #000;
  border-radius: 18px;
  z-index: 10;
}
.phone-screen {
  width: 100%;
  height: 100%;
  background: var(--enf-bg);
  border-radius: 36px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}

@media (max-width: 460px) {
  body { padding: 0; background: var(--enf-bg); }
  .phone-frame { width: 100vw; height: 100vh; padding: 0; border-radius: 0; box-shadow: none; }
  .phone-frame::before { display: none; }
  .phone-screen { border-radius: 0; }
}

/* --- Header --- */
.enf-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 56px 24px 16px;
  background: var(--enf-bg);
}
.enf-greet { display: flex; flex-direction: column; }
.enf-hi { font-size: 13px; color: var(--neutral-500); }
.enf-name { font-size: 22px; font-weight: 700; color: var(--neutral-900); }
.enf-back {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--neutral-0);
  display: grid; place-items: center;
  color: var(--neutral-700);
  font-size: 20px;
  box-shadow: var(--shadow-xs);
}

/* --- Main scroll area --- */
.enf-main {
  flex: 1;
  overflow-y: auto;
  padding: 8px 20px 100px;
}
.tab-pane { display: none; }
.tab-pane.active { display: block; animation: fadeIn 200ms ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-h {
  font-size: 24px; font-weight: 700;
  margin: 8px 0 18px;
  letter-spacing: -0.3px;
}
.section-h {
  font-size: 13px; font-weight: 600;
  color: var(--neutral-600);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 16px 0 10px;
}
.muted-sm { font-size: 12px; color: var(--neutral-500); }

.inicio-hero { padding: 4px 0 14px; }
.inicio-hero h2 {
  font-size: 24px; font-weight: 700;
  letter-spacing: -0.3px;
  text-transform: capitalize;
}

/* --- Cards --- */
.enf-card {
  background: var(--neutral-0);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  margin-bottom: 10px;
}
.enf-card.coral {
  background: var(--enf-coral);
  color: white;
}
.enf-card-head {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 8px;
}
.enf-card-head strong { font-size: 16px; }
.enf-card-head .muted-sm { color: rgba(255,255,255,0.85); }
.enf-card.coral .muted-sm { color: rgba(255,255,255,0.9); }
.enf-card-row {
  display: flex; gap: 8px;
  font-size: 13px;
  color: var(--neutral-600);
  margin-top: 4px;
}
.enf-card-row svg { width: 14px; height: 14px; flex-shrink: 0; }
.enf-card.coral .enf-card-row { color: rgba(255,255,255,0.9); }

.enf-card-cta {
  display: flex; gap: 8px;
  margin-top: 12px;
}

/* --- Bottom nav --- */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--neutral-0);
  border-top: 1px solid var(--neutral-200);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 0 24px;
}
.bnav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 0;
  font-size: 11px;
  color: var(--neutral-500);
  position: relative;
}
.bnav-btn svg { width: 22px; height: 22px; }
.bnav-btn.active { color: var(--enf-coral); }
.bnav-btn.active svg { stroke-width: 2.2; }
.bnav-badge {
  position: absolute;
  top: 0; right: calc(50% - 18px);
  min-width: 18px; height: 18px;
  background: var(--enf-coral);
  color: white;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  display: none;
  align-items: center; justify-content: center;
  padding: 0 5px;
}
.bnav-badge.show { display: flex; }

/* --- Filter chips --- */
.filter-bar {
  display: flex; gap: 8px;
  overflow-x: auto;
  margin-bottom: 14px;
  padding-bottom: 4px;
}
.chip {
  padding: 6px 14px;
  border-radius: var(--r-full);
  background: var(--neutral-100);
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
  white-space: nowrap;
  border: 1px solid transparent;
}
.chip.active {
  background: var(--enf-coral);
  color: white;
}

/* --- Buttons --- */
.btn-coral {
  background: var(--enf-coral);
  color: white;
}
.btn-coral:hover { background: var(--nana-coral-dark); }
.btn-coral-soft {
  background: var(--enf-coral-soft);
  color: var(--nana-coral-dark);
}

/* --- Calendar mini (weekly chip strip) --- */
.cal-mini {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.cal-mini-day {
  background: var(--neutral-0);
  border-radius: var(--r-md);
  padding: 12px 4px;
  text-align: center;
  font-size: 12px;
  color: var(--neutral-600);
  position: relative;
}
.cal-mini-day strong {
  display: block; font-size: 16px; font-weight: 700;
  color: var(--neutral-900);
  margin: 2px 0;
}
.cal-mini-day.busy { background: var(--enf-coral); color: white; }
.cal-mini-day.busy strong { color: white; }
.cal-mini-day.busy::after {
  content: '';
  position: absolute;
  bottom: 4px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px;
  background: white;
  border-radius: 50%;
}
.cal-mini-day.today {
  outline: 2px solid var(--enf-coral);
}

/* --- Perfil --- */
.perfil-hero {
  text-align: center;
  padding: 20px 0 24px;
}
.perfil-hero img {
  width: 100px; height: 100px;
  border-radius: 50%;
  margin: 0 auto 12px;
  object-fit: cover;
  border: 4px solid var(--neutral-0);
  box-shadow: var(--shadow-md);
}
.perfil-hero h2 { font-size: 20px; font-weight: 700; }
.perfil-meta {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin-top: 8px;
}
.perfil-section {
  padding: 14px;
  background: var(--neutral-0);
  border-radius: var(--r-md);
  margin-bottom: 12px;
}
.perfil-info-row {
  display: flex; justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--neutral-100);
  font-size: 14px;
}
.perfil-info-row:last-child { border-bottom: 0; }
.perfil-info-row span { color: var(--neutral-500); }

.doc-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--neutral-100);
}
.doc-row:last-child { border-bottom: 0; }

/* --- Notifications appearing in PWA --- */
.push-notif {
  position: absolute;
  top: 24px; left: 16px; right: 16px;
  background: rgba(28, 25, 23, 0.95);
  color: white;
  padding: 14px 16px;
  border-radius: var(--r-md);
  display: flex; gap: 12px;
  z-index: 50;
  animation: pushDown 300ms ease-out;
  backdrop-filter: blur(10px);
}
.push-notif strong { font-size: 14px; }
.push-notif .push-msg { font-size: 13px; opacity: 0.85; margin-top: 2px; }
@keyframes pushDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
