/* CuidarApp — Estilos de Compartilhamento Familiar */

.app-header {
  background: var(--blue, #1267a8);
  color: #fff;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.app-header h1 { font-size: 1.25rem; font-weight: 700; }
.header-actions { display: flex; align-items: center; gap: 0.75rem; }
.header-actions span { font-size: 0.875rem; opacity: 0.9; }

.container { max-width: 720px; margin: 0 auto; padding: 1.5rem 1rem; }

.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.page-header h2 { font-size: 1.375rem; color: #1a1a1a; }
.subtitle { font-size: 0.875rem; color: #757575; margin-top: 0.25rem; }

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #424242;
  margin: 1.5rem 0 0.75rem;
  padding-bottom: 0.375rem;
  border-bottom: 2px solid #e0e0e0;
}

/* Form card */
.form-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}
.form-group { display: flex; flex-direction: column; gap: 0.35rem; }
.form-group label { font-size: 0.875rem; font-weight: 500; color: #424242; }
.form-group input, .form-group select {
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  padding: 0.55rem 0.75rem;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.15s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--blue, #1267a8); }
.form-error { color: #c62828; font-size: 0.8125rem; }
.form-success { color: #2e7d32; font-size: 0.8125rem; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.55rem 1.1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: background 0.15s, opacity 0.15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--blue, #1267a8); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy, #0b365e); }
.btn-secondary { background: #e0e0e0; color: #212121; }
.btn-secondary:hover:not(:disabled) { background: #bdbdbd; }
.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover:not(:disabled) { background: #b71c1c; }
.btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8125rem; }

/* Member card */
.member-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}
.member-info { display: flex; flex-direction: column; gap: 0.2rem; }
.member-name { font-weight: 600; font-size: 0.9375rem; }
.member-email { font-size: 0.8125rem; color: #757575; }
.member-actions { display: flex; gap: 0.5rem; align-items: center; flex-wrap: wrap; }

/* Role badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.role-badge.read { background: #e3f2fd; color: #1565c0; }
.role-badge.collab { background: #e8f5e9; color: #2e7d32; }

/* Pending invite card */
.invite-card {
  background: #fffde7;
  border-left: 3px solid #f9a825;
  border-radius: 6px;
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.invite-email { font-size: 0.9rem; font-weight: 500; }
.invite-meta { font-size: 0.775rem; color: #795548; }

/* Progress bar */
.progress-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
}
.progress-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
  color: #424242;
}
.progress-bar-bg { background: #e0e0e0; border-radius: 4px; height: 8px; }
.progress-bar-fill { background: var(--aqua, #18a99d); border-radius: 4px; height: 8px; transition: width 0.4s; }

/* Checklist items (family view) */
.checklist-item {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 0.875rem 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.checklist-item.completed { opacity: 0.6; }
.checklist-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid #bdbdbd;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.checklist-check.done { background: var(--aqua, #18a99d); border-color: var(--aqua, #18a99d); color: #fff; font-size: 0.75rem; }
.checklist-title { font-size: 0.9375rem; }

/* Medications (family view) */
.med-card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.07);
  padding: 0.875rem 1.1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.med-info { display: flex; flex-direction: column; gap: 0.2rem; }
.med-name { font-weight: 600; font-size: 0.9375rem; }
.med-time { font-size: 0.8125rem; color: #757575; }
.status-badge {
  padding: 0.2rem 0.55rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-badge.administered { background: #e8f5e9; color: #2e7d32; }
.status-badge.pending { background: #fff3e0; color: #e65100; }
.status-badge.missed { background: #ffebee; color: #c62828; }

/* Notification badge */
.notif-badge {
  background: #c62828;
  color: #fff;
  border-radius: 10px;
  padding: 0.1rem 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  margin-left: 0.25rem;
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: #9e9e9e;
  font-size: 0.9rem;
}

/* Accept invite page */
.invite-accept-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  padding: 2rem;
  width: 100%;
  max-width: 440px;
  text-align: center;
}
.invite-accept-card .app-title { font-size: 1.5rem; color: var(--ink, #09233e); font-weight: 700; margin-bottom: 1.5rem; }
.invite-accept-card .loading { color: #757575; margin: 1rem 0; }
.invite-accept-card .success-icon { font-size: 3rem; color: #2e7d32; margin-bottom: 0.75rem; }
.invite-accept-card .error-icon { font-size: 3rem; color: #c62828; margin-bottom: 0.75rem; }
.invite-accept-card h2 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.invite-accept-card p { color: #616161; margin-bottom: 1.25rem; }

@media (max-width: 600px) {
  .page-header { flex-direction: column; }
  .member-card { flex-direction: column; align-items: flex-start; }
}
