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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #78c2ad;
  min-height: 100vh;
  padding: 20px;
  color: #212529;
}

@media (max-width: 768px) {
  body {
    padding: 0;
  }
}

.container {
  max-width: 1200px;
  margin: 12px auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

@media (max-width: 768px) {
  .container {
    border-radius: 0;
    box-shadow: none;
    margin: 0 auto;
  }
}

header {
  background: #78c2ad;
  color: white;
  padding: 30px;
  text-align: center;
  margin: -20px -20px 0 -20px;
  border-radius: 20px 20px 0 0;
}

header h1 {
  font-size: 2rem;
  margin-bottom: 10px;
}

#patient-info {
  margin-top: 10px;
}

.patient-name {
  font-size: 1.1rem;
  opacity: 0.95;
}

.therapist-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.1);
  padding: 10px 16px;
  border-radius: 12px;
  backdrop-filter: blur(10px);
}

.therapist-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.therapist-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.therapist-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
}

.therapist-credentials {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 400;
}

.therapist-logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-left: 12px;
}

.therapist-logout-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.therapist-logout-btn:active {
  transform: translateY(0);
}

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

@media (max-width: 768px) {
  .therapist-profile {
    width: 100%;
    justify-content: center;
  }

  .therapist-logout-btn span {
    display: none;
  }

  .therapist-logout-btn {
    padding: 8px;
    margin-left: 8px;
  }
}

/* Patient Header Unified */
.patient-header {
  background: #78c2ad;
  color: white;
  padding: 20px 30px;
  border-radius: 0px 0px 0 0;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
  padding-top: 35px;
}

@media (max-width: 768px) {
  .header-top {
    padding-top: 5px;
  }
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-text {
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
}

.logout-btn-header {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.logout-btn-header:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

.logout-btn-header:active {
  transform: translateY(0);
}

.page-title {
  margin: 0;
  font-size: 1.4rem;
  color: #ffffff;
  font-weight: 600;
}

/* Tarjeta unificada de info */
.info-card {
  display: flex;
  align-items: stretch;
  gap: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 30px;
}

.info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.patient-section {
  justify-content: center;
  align-items: center;
  text-align: center;
}

.therapist-section {
  align-items: center;
  text-align: center;
}

.therapist-data {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

.info-divider {
  width: 1px;
  background: #e5e7eb;
  margin: 0 16px;
}

.info-label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #78c2ad;
}

.info-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: #212529;
  line-height: 1.3;
}

.info-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #78c2ad;
  flex-shrink: 0;
}

.info-details {
  display: flex;
  flex-direction: column;
  gap: 0px;
  align-items: flex-start;
  text-align: left;
}

.info-credentials {
  font-size: 0.8rem;
  color: #6b7280;
  font-weight: 400;
  line-height: 1.3;
}

@media (max-width: 768px) {
  .patient-header {
    padding: 15px 20px;
  }

  .header-top {
    gap: 10px;
    margin-bottom: 12px;
  }

  .logout-btn-header {
    padding: 6px 12px;
    font-size: 0.85rem;
  }

  .logout-btn-header svg {
    width: 12px;
    height: 12px;
  }

  .page-title {
    font-size: 1.1rem;
  }

  .info-card {
    flex-direction: column;
    gap: 12px;
    padding: 14px;
  }

  .info-divider {
    width: 100%;
    height: 1px;
    margin: 0;
  }

  .info-avatar {
    width: 40px;
    height: 40px;
  }
}

main {
  padding: 30px;
}

/* ============ BOTONES ============ */

button {
  cursor: pointer;
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: #78c2ad;
  color: white;
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(120, 194, 173, 0.4);
}

.btn-secondary {
  background: #fef0f1;
  color: #f3969a;
}

.btn-secondary:hover:not(:disabled) {
  background: #fde3e4;
}

.btn-success {
  background: #56cc9d;
  color: white;
}

.btn-success:hover:not(:disabled) {
  background: #3fbf89;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(86, 204, 157, 0.4);
}

.btn-danger {
  background: #fef0f1;
  color: #ff7851;
  padding: 8px;
  border-radius: 8px;
}

.btn-danger:hover {
  background: #fde3e4;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============ PÁGINA DEL PACIENTE ============ */

.patient-main {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px 40px 20px;
}

@media (max-width: 768px) {
  .patient-main {
    padding: 40px 4px 0 4px;
    margin: 0 0;
  }
}

/* ============ GUIDANCE SECTION ============ */

.therapist-guidance-section {
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .therapist-guidance-section {
    margin-top: 12px;
  }
}

.guidance-card {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(120, 194, 173, 0.2);
  border: 2px solid #78c2ad;
}

@media (max-width: 768px) {
  .guidance-card {
    border-radius: 12px;
    margin-bottom: 20px;
  }
}

.guidance-header {
  background: #78c2ad;
  padding: 18px 24px;
  color: white;
  font-weight: 700;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.guidance-body {
  padding: 24px;
  background: #f0faf7;
}

.guidance-text {
  color: #2c3e50;
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
  padding-left: 16px;
  border-left: 4px solid #78c2ad;
}

@media (max-width: 768px) {
  .guidance-body {
    padding: 16px 12px;
  }

  .guidance-text {
    font-size: 15px;
    line-height: 1.6;
    padding-left: 12px;
  }
}

.guidance-images {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 16px;
}

.guidance-image {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 3px solid #78c2ad;
  background: white;
}

.guidance-image:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(120, 194, 173, 0.3);
  border-color: #5da793;
}

.recorder-section {
  background: #f1f3f4;
  border-radius: 15px;
  padding: 30px;
  margin-bottom: 30px;
}

@media (max-width: 768px) {
  .recorder-section {
    padding: 20px 12px;
    border-radius: 12px;
    margin-top: 12px;
    margin-bottom: 20px;
  }
}

/* ============ VOICE RECORDER WHATSAPP STYLE ============ */

.voice-recorder-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  padding: 0px;
  position: relative;
}

@media (max-width: 768px) {
  .voice-recorder-container {
    padding: 0px;
  }
}

.recorder-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  position: absolute;
  transition: opacity 0.2s ease, visibility 0s linear 0.2s;
}

.recorder-state.active {
  opacity: 1;
  visibility: visible;
  position: relative;
  transition: opacity 0.2s ease, visibility 0s linear 0s;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Estado inicial - Botón de grabar */
.voice-record-btn {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #78c2ad 0%, #56cc9d 100%);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(120, 194, 173, 0.3);
}

.voice-record-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(120, 194, 173, 0.4);
}

.voice-record-btn:active {
  transform: scale(0.95);
}

.mic-icon {
  width: 40px;
  height: 40px;
  filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Estado grabando */
.audio-visualizer-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  margin: 15px 0;
}

@media (max-width: 768px) {
  .audio-visualizer-container {
    max-width: 250px;
  }
}

.audio-visualizer {
  border-radius: 12px;
  background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
  width: 100%;
  height: 80px;
  display: block;
}

@media (max-width: 768px) {
  .audio-visualizer {
    height: 70px;
  }
}

.recording-timer-overlay {
  position: absolute;
  bottom: 8px;
  right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0px 0px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #1f2937;
}

@media (max-width: 768px) {
  .recording-timer-overlay {
    font-size: 0.9rem;
    bottom: 6px;
    right: 6px;
  }
}

.recording-time {
  font-variant-numeric: tabular-nums;
  min-width: 40px;
}

/* Controles estilo WhatsApp */
.recording-controls-whatsapp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 320px;
  margin-top: 0px;
  gap: 15px;
}

.whatsapp-control-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  position: relative;
}

.whatsapp-control-btn:hover {
  transform: scale(1.1);
}

.whatsapp-control-btn:active {
  transform: scale(0.9);
}

.whatsapp-control-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.whatsapp-delete {
  color: #ff7851;
  background: rgba(255, 120, 81, 0.1);
}

.whatsapp-delete:hover {
  background: rgba(255, 120, 81, 0.2);
}

.whatsapp-pause {
  width: 64px;
  height: 64px;
  background: #78c2ad;
  color: white;
  box-shadow: 0 4px 12px rgba(120, 194, 173, 0.3);
}

.whatsapp-pause:hover {
  background: #6ab39d;
  box-shadow: 0 6px 16px rgba(120, 194, 173, 0.4);
}

.whatsapp-pause.paused {
  background: #ff7851;
}

.whatsapp-pause.paused:hover {
  background: #ff5c2b;
}

.whatsapp-send {
  color: white;
  background: #56cc9d;
  width: 56px;
  height: 56px;
  box-shadow: 0 4px 12px rgba(86, 204, 157, 0.3);
}

.whatsapp-send:hover {
  background: #3fbf89;
  box-shadow: 0 6px 16px rgba(86, 204, 157, 0.4);
}

@media (max-width: 768px) {
  .recording-controls-whatsapp {
    max-width: 280px;
    gap: 10px;
  }

  .whatsapp-pause {
    width: 56px;
    height: 56px;
  }

  .whatsapp-send {
    width: 48px;
    height: 48px;
  }

  .whatsapp-control-btn {
    padding: 10px;
  }
}

.recording-dot {
  width: 12px;
  height: 12px;
  background: #ff7851;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.recording-time {
  font-variant-numeric: tabular-nums;
  min-width: 60px;
}

.voice-stop-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #ff7851;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(255, 120, 81, 0.3);
}

.voice-stop-btn:hover {
  background: #ff5c2b;
  transform: scale(1.05);
}

.voice-stop-btn:active {
  transform: scale(0.95);
}

.stop-icon {
  font-size: 1.5rem;
}

/* Estado preview */
.audio-preview-container {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.audio-preview-container audio {
  width: 100%;
  outline: none;
}

.preview-duration {
  text-align: center;
  font-size: 0.9rem;
  color: #6b7280;
  font-weight: 500;
}

.preview-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
}

.btn-delete, .btn-send {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-delete {
  background: #fef0f1;
  color: #f3969a;
}

.btn-delete:hover {
  background: #fde3e4;
  transform: translateY(-2px);
}

.btn-icon-svg {
  width: 18px;
  height: 18px;
  filter: brightness(0) saturate(100%) invert(70%) sepia(23%) saturate(1077%) hue-rotate(305deg) brightness(101%) contrast(95%);
}

.btn-danger .btn-icon-svg {
  filter: invert(53%) sepia(54%) saturate(2571%) hue-rotate(334deg) brightness(101%) contrast(101%);
}

.btn-secondary .btn-icon-svg {
  filter: brightness(0) saturate(100%) invert(70%) sepia(19%) saturate(377%) hue-rotate(305deg) brightness(97%) contrast(92%);
}

.btn-send {
  background: #56cc9d;
  color: white;
}

.btn-send:hover {
  background: #3fbf89;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(86, 204, 157, 0.4);
}

.recorder-hint {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
  text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
  .voice-record-btn {
    width: 70px;
    height: 70px;
  }

  .mic-icon {
    width: 35px;
    height: 35px;
  }

  .preview-actions {
    flex-direction: column;
    width: 100%;
  }

  .btn-delete, .btn-send {
    width: 100%;
    justify-content: center;
  }
}

.mood-selector {
  margin-bottom: 30px;
  text-align: center;
}

@media (max-width: 768px) {
  .mood-selector {
    padding: 0;
  }
}

.mood-selector h3 {
  margin-bottom: 15px;
  color: #4b5563;
}

.mood-icons {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.mood-btn {
  font-size: 2.5rem;
  padding: 15px;
  background: white;
  border: 3px solid transparent;
  border-radius: 15px;
  transition: all 0.3s ease;
}

.mood-btn:hover {
  transform: scale(1.1);
  border-color: #78c2ad;
}

.mood-btn.selected {
  border-color: #78c2ad;
  background: #f0faf7;
  transform: scale(1.15);
}

.recorder-controls {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.status-message {
  text-align: center;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 15px;
  font-weight: 600;
}

/* Ocultar status-message cuando está vacío */
.status-message:empty {
  display: none;
  margin: 0;
  padding: 0;
}

.status-message.recording {
  background: #ffe8e0;
  color: #ff7851;
}

.status-message.success {
  background: #e0f7ee;
  color: #56cc9d;
}

#audio-preview {
  text-align: center;
}

#audio-preview audio {
  width: 100%;
  max-width: 500px;
  margin-top: 15px;
}

.notes-history {
  margin-top: 30px;
}

@media (max-width: 768px) {
  .notes-history {
    margin-top: 12px;
  }
}

.notes-history h2 {
  margin-bottom: 20px;
  color: #1f2937;
  text-align: center;
}

@media (max-width: 768px) {
  .notes-history h2 {
    margin-bottom: 15px;
  }
}

.note-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
}

@media (max-width: 768px) {
  .note-item {
    padding: 15px 12px;
    border-radius: 8px;
  }
}

.note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  gap: 10px;
}

.delete-note-btn {
  background: transparent;
  border: none;
  color: #ff7851;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.note-mood {
  font-size: 1.5rem;
}

.note-session-info {
  background: #f0faf7;
  border-left: 3px solid #78c2ad;
  padding: 8px 12px;
  margin-bottom: 10px;
  border-radius: 5px;
  font-size: 0.9rem;
  color: #5a5a5a;
}

.notes-section {
  margin-bottom: 30px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.notes-section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  padding: 15px 20px;
  background: #f9fafb;
  cursor: pointer;
  user-select: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.3s ease;
}

.notes-section-title:hover {
  background: #f0faf7;
}

.notes-section-title .toggle-icon {
  font-size: 1.2rem;
  color: #78c2ad;
  transition: transform 0.3s ease;
}

.notes-section-content {
  padding: 15px;
  display: none;
}

.notes-section-content.expanded {
  display: block;
}

.note-date {
  color: #6b7280;
  font-size: 0.9rem;
}

.note-item audio {
  width: 100%;
}

.empty-state {
  text-align: center;
  padding: 40px;
  color: #9ca3af;
  font-style: italic;
}

/* Sesiones del paciente */
.patient-session-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .patient-session-card {
    padding: 15px;
    border-radius: 12px;
  }
}

.session-date {
  font-size: 1.1rem;
  font-weight: 600;
  color: #78c2ad;
  margin-bottom: 20px;
  line-height: 1.6;
}

.session-content-display {
  margin-top: 15px;
}

.session-content-display h4 {
  color: #1f2937;
  margin-bottom: 10px;
}

.session-content-display p {
  color: #4b5563;
  line-height: 1.6;
  white-space: pre-wrap;
}

.session-attachments-display {
  margin-top: 20px;
}

.session-attachments-display h4 {
  color: #1f2937;
  margin-bottom: 10px;
}

.attachment-display {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.attachment-preview {
  max-width: 100%;
  max-height: 300px;
  border-radius: 8px;
  object-fit: contain;
}

.attachment-file {
  flex: 1;
  color: #4b5563;
  font-weight: 500;
}

/* ============ PÁGINA DEL TERAPEUTA ============ */

.therapist-main .view {
  display: none;
}

.therapist-main .view.active {
  display: block;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  flex-wrap: wrap;
  gap: 15px;
}

.patient-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  padding: 25px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
  flex-wrap: wrap;
  gap: 15px;
}

.patient-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.patient-info h3 {
  margin-bottom: 8px;
  color: #1f2937;
}

.patient-email, .patient-date {
  color: #6b7280;
  font-size: 0.9rem;
  margin-bottom: 4px;
}

.notes-badge {
  display: inline-block;
  background: #ff6b6b;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-top: 8px;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

.patient-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notes-controls {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.therapist-note-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  gap: 15px;
}

.note-checkbox {
  display: flex;
  align-items: flex-start;
  padding-top: 10px;
}

.note-checkbox input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.note-content {
  flex: 1;
}

.note-title {
  font-size: 17px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 10px;
  line-height: 1.4;
}

.note-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.note-title-text {
  font-size: 17px;
  font-weight: 600;
  color: #2c3e50;
  line-height: 1.4;
  flex: 1;
  min-width: 200px;
}

.note-title-row .note-date {
  font-size: 14px;
  color: #6c757d;
  white-space: nowrap;
  flex-shrink: 0;
}

.note-audio-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 15px 0;
}

.note-audio-row audio {
  flex: 1;
  min-width: 0;
}

.note-content audio {
  width: 100%;
  margin: 15px 0;
}

.note-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  flex-wrap: wrap;
}

/* ============ MODALES ============ */

.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-content.modal-large {
  max-width: 800px;
}

.modal-header {
  background: #78c2ad;
  color: white;
  padding: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
}

.close-btn {
  background: transparent;
  color: white;
  font-size: 1.5rem;
  padding: 0;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

.modal-body {
  padding: 30px;
}

/* Selector de sesiones personalizado */
#session-list-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 400px;
  overflow-y: auto;
  padding: 5px;
}

.session-select-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  transition: all 0.3s ease;
}

.session-select-card:hover {
  border-color: #78c2ad;
  background: #f9fafb;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(120, 194, 173, 0.1);
}

.session-select-card.selected {
  border-color: #78c2ad;
  background: #f0faf7;
  box-shadow: 0 4px 12px rgba(120, 194, 173, 0.2);
}

.session-select-radio {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  border: 2px solid #d1d5db;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.session-select-card.selected .session-select-radio {
  border-color: #78c2ad;
}

.radio-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
}

.radio-dot.active {
  background: #78c2ad;
}

.session-select-info {
  flex-grow: 1;
}

.session-select-date {
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 5px;
}

.session-select-time {
  font-size: 0.9rem;
  color: #6b7280;
}

.modal-footer {
  padding: 20px 30px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e5e7eb;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
}

.form-group input {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus {
  outline: none;
  border-color: #78c2ad;
}

.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
  resize: vertical;
  font-family: inherit;
  min-height: 150px;
}

.form-group textarea:focus {
  outline: none;
  border-color: #78c2ad;
}

.form-group input[type="file"] {
  padding: 10px;
  border: 2px dashed #d1d5db;
  background: #f9fafb;
  cursor: pointer;
}

.form-group input[type="file"]:hover {
  border-color: #78c2ad;
  background: #f0faf7;
}

/* Estilos específicos para el modal de guías */
#guidance-modal .modal-body {
  padding: 30px;
}

#guidance-modal .form-group {
  margin-bottom: 30px;
}

#guidance-modal .form-group label {
  color: white;
  font-size: 15px;
  font-weight: 600;
  background: #78c2ad;
  padding: 12px 20px;
  border-radius: 8px 8px 0 0;
  margin-bottom: 0;
  display: block;
  width: calc(100% + 2px);
  margin-left: -1px;
  margin-top: -1px;
}

#guidance-modal .form-group textarea {
  border-radius: 0 0 8px 8px;
  border-top: 2px solid #78c2ad;
  min-height: 200px;
  font-size: 15px;
  line-height: 1.6;
}

#guidance-modal .form-group input[type="file"] {
  border-radius: 0 0 8px 8px;
  border-top: 2px solid #78c2ad;
  font-size: 14px;
}

#guidance-modal #guidance-images-preview {
  padding: 15px;
  background: #f9fafb;
  border-radius: 8px;
  min-height: 40px;
  border: 1px solid #e5e7eb;
}

#guidance-modal #guidance-images-preview:empty {
  display: none;
}

#guidance-modal .modal-footer {
  margin-top: 10px;
  padding-top: 25px;
}

.summary-text, .transcription-text {
  line-height: 1.8;
  color: #374151;
  white-space: pre-wrap;
}

.quick-summary-container h3 {
  color: #78c2ad;
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.quick-summary-text {
  background: #f0faf7;
  padding: 20px 25px;
  border-radius: 12px;
  line-height: 1.6;
  color: #212529;
  font-weight: 500;
  border-left: 5px solid #78c2ad;
  box-shadow: 0 2px 8px rgba(120, 194, 173, 0.15);
}

details summary {
  transition: color 0.2s ease;
}

details summary:hover {
  color: #78c2ad;
}

details[open] summary {
  color: #78c2ad;
  margin-bottom: 10px;
}

.loading {
  text-align: center;
  color: #78c2ad;
  padding: 40px;
  font-size: 1.1rem;
}

.error {
  text-align: center;
  color: #ff7851;
  padding: 40px;
}

/* ============ PESTAÑAS ============ */

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #e5e7eb;
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.3s ease;
}

.tab-btn:hover {
  color: #78c2ad;
}

.tab-btn.active {
  color: #78c2ad;
  border-bottom-color: #78c2ad;
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* ============ SESIONES ============ */

.session-controls {
  margin-bottom: 20px;
}

.session-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.session-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Sesiones expandibles inline (terapeuta) */
.session-card-expandable {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.session-card-expandable:hover {
  border-color: #78c2ad;
  box-shadow: 0 4px 12px rgba(120, 194, 173, 0.1);
}

.session-header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background: #f9fafb;
  transition: background 0.3s ease;
}

.session-header-main:hover {
  background: #f0faf7;
}

.session-info-left h4 {
  margin: 0 0 5px 0;
  font-size: 1.1rem;
  color: #1f2937;
}

.session-info-left .session-time {
  font-size: 0.9rem;
  color: #6b7280;
}

.session-info-left .session-title {
  margin-top: 8px;
  font-size: 0.95rem;
  color: #4b5563;
  font-weight: 500;
  padding: 6px 12px;
  background: #f3f4f6;
  border-radius: 6px;
  display: inline-block;
}

.session-actions-inline {
  display: flex;
  align-items: center;
  gap: 15px;
}

.toggle-detail-icon {
  font-size: 0.9rem;
  color: #78c2ad;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  padding: 8px 12px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.toggle-detail-icon:hover {
  background: rgba(120, 194, 173, 0.1);
}

.session-detail-expanded {
  padding: 0 20px 20px 20px;
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
}

.session-loading {
  text-align: center;
  padding: 20px;
  color: #6b7280;
  font-style: italic;
}

.session-detail-content {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding-top: 20px;
}

.session-header h4 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 1.1rem;
}

.session-time {
  color: #6b7280;
  font-size: 0.95rem;
}

.session-actions {
  display: flex;
  gap: 10px;
}

.session-detail {
  padding: 20px 0;
}

.session-metadata-section,
.session-content-section,
.session-attachments-section,
.session-notes-section {
  margin-bottom: 30px;
}

.session-metadata-section h4,
.session-content-section h4,
.session-attachments-section h4,
.session-notes-section h4 {
  margin-bottom: 15px;
  color: #1f2937;
}

.session-metadata-form {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 20px;
}

.form-group-inline {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group-inline label {
  font-weight: 500;
  color: #374151;
  font-size: 0.95rem;
}

.form-input-inline {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
}

.form-input-inline:focus {
  outline: none;
  border-color: #78c2ad;
  box-shadow: 0 0 0 3px rgba(120, 194, 173, 0.1);
}

.save-session-metadata-btn {
  margin-top: 10px;
}

.session-content-edit {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  margin-bottom: 10px;
}

.session-content-edit:focus {
  outline: none;
  border-color: #78c2ad;
}

.attachment-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.attachment-image {
  max-width: 200px;
  max-height: 150px;
  border-radius: 8px;
  object-fit: cover;
}

.attachment-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.attachment-actions {
  display: flex;
  gap: 10px;
}

.session-note-item {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 15px;
}

.session-note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.session-note-item audio {
  width: 100%;
  margin-bottom: 10px;
}

.session-note-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.session-notes-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.session-notes-header h4 {
  margin: 0;
}

/* ============ FORMULARIOS MODERNOS ============ */

.form-group-modern {
  margin-bottom: 24px;
}

.form-label-modern {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
}

.label-icon {
  font-size: 1.2rem;
}

.label-text {
  color: #1f2937;
}

.optional-text {
  font-weight: 400;
  color: #9ca3af;
  font-size: 0.85rem;
  font-style: italic;
}

.form-input-modern {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: #f9fafb;
  font-family: inherit;
}

.form-input-modern:focus {
  outline: none;
  border-color: #78c2ad;
  background: white;
  box-shadow: 0 0 0 3px rgba(120, 194, 173, 0.1);
}

.form-textarea-modern {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: #f9fafb;
  font-family: inherit;
  resize: vertical;
  line-height: 1.6;
}

.form-textarea-modern:focus {
  outline: none;
  border-color: #78c2ad;
  background: white;
  box-shadow: 0 0 0 3px rgba(120, 194, 173, 0.1);
}

.form-textarea-modern::placeholder {
  color: #9ca3af;
  font-style: italic;
}

/* ============ KPIs ============ */

.kpis-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  padding: 20px 0;
}

.kpi-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 15px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.kpi-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.kpi-card h3 {
  margin: 0 0 8px 0;
  color: #1f2937;
  font-size: 1.3rem;
}

.kpi-description {
  margin: 0 0 20px 0;
  color: #6b7280;
  font-size: 0.9rem;
  line-height: 1.5;
}

.kpi-card canvas {
  max-height: 400px;
}

/* ============ RESPONSIVE ============ */

@media (max-width: 768px) {
  header {
    padding: 20px;
  }

  header h1 {
    font-size: 1.5rem;
  }

  main {
    padding: 20px 12px;
  }

  .section-header {
    flex-direction: column;
    align-items: stretch;
  }

  .section-header h2 {
    text-align: center;
  }

  .patient-card {
    flex-direction: column;
    align-items: stretch;
  }

  .patient-actions {
    justify-content: center;
  }

  .therapist-note-card {
    flex-direction: column;
  }

  .note-checkbox {
    flex-direction: row;
    justify-content: center;
  }

  .recorder-controls {
    flex-direction: column;
  }

  .recorder-controls button {
    width: 100%;
    justify-content: center;
  }

  .notes-controls {
    flex-direction: column;
  }

  .note-actions {
    flex-direction: column;
  }

  button {
    font-size: 0.9rem;
    padding: 10px 16px;
  }

  .mood-btn {
    font-size: 2rem;
    padding: 10px;
  }

  .modal-content {
    margin: 10px;
  }

  /* Pestañas responsive - wrapping en múltiples líneas */
  .tabs {
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: none;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
  }

  .tab-btn {
    padding: 10px 14px;
    font-size: 0.85rem;
    flex: 0 1 auto;
    min-width: fit-content;
  }
}

@media (max-width: 480px) {
  .mood-icons {
    gap: 8px;
    flex-wrap: nowrap;
  }

  .mood-btn {
    font-size: 1.8rem;
    padding: 8px;
  }
}

/* ============ SESIONES COLAPSABLES (PACIENTE) ============ */

.patient-sessions-container {
  margin-top: 40px;
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .patient-sessions-container {
    margin-top: 12px;
  }
}

.patient-sessions-container h2 {
  font-size: 1.8rem;
  color: #1f2937;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .patient-sessions-container h2 {
    margin-bottom: 15px;
  }
}

.patient-session-collapsible, .session-collapsed {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .patient-session-collapsible, .session-collapsed {
    border-radius: 12px;
    border-width: 1px;
    margin-bottom: 15px;
  }
}

.patient-session-collapsible:hover, .session-collapsed:hover {
  border-color: #78c2ad;
  box-shadow: 0 4px 12px rgba(120, 194, 173, 0.1);
}

.session-collapsed[open] {
  border-color: #78c2ad;
  box-shadow: 0 2px 8px rgba(120, 194, 173, 0.15);
}

.session-info-collapsed {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.session-header-collapsed {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  cursor: pointer;
  background: #f9fafb;
  transition: background 0.3s ease;
}

.session-header-collapsed:hover {
  background: #f0faf7;
}

.session-date-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.session-date-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
}

.session-time-main {
  font-size: 0.95rem;
  color: #6b7280;
}

.toggle-icon {
  font-size: 1.2rem;
  color: #78c2ad;
  transition: transform 0.3s ease;
  user-select: none;
}

.session-content-collapsed {
  padding: 0 20px 20px 20px;
}

details:not([open]) .session-content-collapsed {
  display: none;
}

details[open] .session-content-collapsed {
  display: block;
  animation: slideDown 0.3s ease;
}

details[open] .expand-icon {
  transform: rotate(180deg);
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.session-content-display {
  background: #f9fafb;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .session-content-display {
    padding: 12px;
  }
}

.session-content-display h4 {
  font-size: 1rem;
  color: #78c2ad;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.session-content-display p {
  color: #4b5563;
  line-height: 1.6;
  white-space: pre-wrap;
}

.session-notes-display {
  margin-bottom: 20px;
}

.session-notes-display h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 15px;
}

.patient-session-note {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
}

@media (max-width: 768px) {
  .patient-session-note {
    padding: 12px;
  }
}

.patient-session-note .note-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.patient-session-note .note-mood {
  font-size: 1.5rem;
}

.patient-session-note .note-date {
  font-size: 0.85rem;
  color: #92400e;
}

.patient-session-note audio {
  width: 100%;
  margin-top: 8px;
}

.session-attachments-display {
  margin-top: 20px;
}

.session-attachments-display h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 15px;
}

.attachment-display {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.attachment-preview {
  max-width: 200px;
  max-height: 200px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.attachment-file {
  flex: 1;
  font-size: 0.95rem;
  color: #4b5563;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.attachment-file > div:first-child {
  font-weight: 500;
  color: #1f2937;
  word-break: break-word;
}

@media (max-width: 768px) {
  .session-date-main {
    font-size: 1rem;
  }

  .session-time-main {
    font-size: 0.9rem;
  }

  .session-header-collapsed {
    padding: 15px 16px;
  }

  .session-content-collapsed {
    padding: 0 8px 15px 8px;
  }

  .attachment-display {
    flex-direction: column;
    align-items: flex-start;
  }

  .attachment-preview {
    max-width: 100%;
  }
}

/* ============ VISOR DE IMÁGENES ============ */

.modal-image-viewer {
  max-width: 95vw;
  max-height: 95vh;
  width: auto;
  height: auto;
  padding: 0;
  background: #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

#image-viewer-modal .close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 1001;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

#image-viewer-modal .close-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.image-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 1001;
  display: none;
}

.image-nav-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.image-nav-prev {
  left: 20px;
}

.image-nav-next {
  right: 20px;
}

#image-viewer-img {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.image-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
  z-index: 1001;
}

.clickable-image {
  cursor: pointer;
  transition: all 0.3s ease;
}

.clickable-image:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .image-nav-btn {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .image-nav-prev {
    left: 10px;
  }

  .image-nav-next {
    right: 10px;
  }

  #image-viewer-modal .close-btn {
    top: 10px;
    right: 10px;
    width: 35px;
    height: 35px;
  }

  .image-counter {
    bottom: 10px;
    font-size: 0.8rem;
    padding: 6px 12px;
  }
}

/* ============ TARJETAS DE NOTAS PARA PACIENTE ============ */

.patient-note-card {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
  .patient-note-card {
    padding: 16px;
    border-radius: 12px;
    margin-bottom: 15px;
  }
}

.note-card-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.note-mood-indicator {
  font-size: 2.5rem;
  line-height: 1;
  flex-shrink: 0;
}

.note-info-main {
  flex: 1;
  min-width: 0;
}

.note-title-main {
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
  line-height: 1.3;
}

.note-datetime {
  font-size: 0.9rem;
  color: #6b7280;
}

.note-card-body {
  padding-top: 15px;
  border-top: 1px solid #f3f4f6;
}

.clinical-analysis-patient {
  background: #f9fafb;
  border-left: 4px solid #78c2ad;
  padding: 12px 15px;
  border-radius: 8px;
  margin-top: 12px;
}

.clinical-analysis-patient h5 {
  margin: 0 0 10px 0;
  color: #374151;
  font-size: 1rem;
  font-weight: 600;
}

.clinical-analysis-patient p {
  margin: 0;
  color: #4b5563;
  line-height: 1.6;
  font-size: 0.95rem;
}

@media (max-width: 768px) {
  .note-card-header {
    flex-direction: row;
    align-items: flex-start;
  }

  .note-mood-indicator {
    font-size: 2rem;
  }

  .note-title-main {
    font-size: 1rem;
  }

  .patient-note-card {
    padding: 15px;
  }
}
/* Modal de confirmación */
.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  margin: 0;
  color: #333;
  font-size: 1.5rem;
}
