/* Stylesheet para o aplicativo NeuroPed - Dr. Diego Funahashi */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #59b060;
  --secondary-color: #849bc0;
  --accent-light: #daa086;
  --accent-medium: #b9664f;
  --text-dark: #344e59;
  --text-light: #6c7a85;
  --bg-light: #e6e1e5;
  --white: #ffffff;
  --hover-green: #4a9a50;
  --shadow-sm: 0 2px 8px rgba(52, 78, 89, 0.08);
  --shadow-md: 0 4px 20px rgba(52, 78, 89, 0.12);
  --shadow-lg: 0 10px 30px rgba(52, 78, 89, 0.16);
  --border-radius-sm: 8px;
  --border-radius: 12px;
  --border-radius-lg: 20px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font-title: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
  --sidebar-width: 280px;
}

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

body {
  font-family: var(--font-body);
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  overflow-x: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Scrollbar Customizada */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}
::-webkit-scrollbar-thumb {
  background: var(--secondary-color);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-medium);
}

/* App Container */
.app-container {
  display: flex;
  height: 100vh;
  width: 100vw;
  position: relative;
  overflow: hidden;
}

/* Sidebar Navigation (Desktop) */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 2rem 1.5rem;
  z-index: 100;
  transition: var(--transition);
}

.logo-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--accent-medium);
  text-decoration: none;
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

.nav-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
}

.nav-item a i {
  font-size: 1.2rem;
  width: 24px;
  text-align: center;
}

.nav-item a:hover {
  color: var(--accent-medium);
  background-color: rgba(185, 102, 79, 0.08);
}

.nav-item.active a {
  color: var(--white);
  background: linear-gradient(135deg, var(--accent-medium), var(--accent-light));
  box-shadow: 0 4px 15px rgba(185, 102, 79, 0.3);
}

/* User Card Bottom Sidebar */
.user-profile-card {
  background: linear-gradient(135deg, rgba(132, 155, 192, 0.1), rgba(218, 160, 134, 0.1));
  padding: 1rem;
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.5);
  margin-top: auto;
}

.avatar-circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--secondary-color);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 0.7rem;
  color: var(--text-light);
}

/* Main Content Area */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: relative;
  overflow-y: auto;
  background-color: var(--bg-light);
}

/* Header Area */
.app-header {
  background-color: var(--white);
  padding: 1.2rem 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(52, 78, 89, 0.08);
  position: sticky;
  top: 0;
  z-index: 90;
}

.page-title-container h1 {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--text-dark);
}

/* Floating Doctor Switcher */
.mode-switcher-container {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.mode-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-light);
}

.switch {
  position: relative;
  display: inline-block;
  width: 52px;
  height: 28px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--secondary-color);
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

input:checked + .slider {
  background-color: var(--primary-color);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--primary-color);
}

input:checked + .slider:before {
  transform: translateX(24px);
}

/* App Views Container */
.view-container {
  padding: 2.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.view-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
  height: 100%;
}

.view-section.active {
  display: flex;
  flex-direction: column;
}

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

/* DASHBOARD VIEW */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
}

/* Welcome Card */
.welcome-card {
  background: linear-gradient(135deg, var(--secondary-color), rgba(132, 155, 192, 0.8));
  color: var(--white);
  padding: 2.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.welcome-card::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  pointer-events: none;
}

.welcome-card h2 {
  font-family: var(--font-title);
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.welcome-card p {
  font-size: 1rem;
  opacity: 0.9;
  max-width: 80%;
}

/* Quick Actions */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.action-card {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid rgba(52, 78, 89, 0.04);
}

.action-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(185, 102, 79, 0.2);
}

.action-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.action-card:nth-child(1) .action-icon-wrapper {
  background-color: rgba(89, 176, 96, 0.12);
  color: var(--primary-color);
}
.action-card:nth-child(2) .action-icon-wrapper {
  background-color: rgba(185, 102, 79, 0.12);
  color: var(--accent-medium);
}
.action-card:nth-child(3) .action-icon-wrapper {
  background-color: rgba(132, 155, 192, 0.12);
  color: var(--secondary-color);
}

.action-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
}

.action-card p {
  font-size: 0.8rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* Info Cards Block */
.dashboard-block {
  background-color: var(--white);
  padding: 1.8rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 2rem;
  border: 1px solid rgba(52, 78, 89, 0.04);
}

.block-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.block-header h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--text-dark);
  font-weight: 600;
}

.block-header .btn-link {
  font-size: 0.85rem;
  color: var(--accent-medium);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  cursor: pointer;
}

.block-header .btn-link:hover {
  color: var(--primary-color);
}

/* Appointment Widget Card */
.appointment-list-item {
  background: linear-gradient(135deg, rgba(255,255,255,1), rgba(230, 225, 229, 0.2));
  border: 1px solid rgba(52, 78, 89, 0.08);
  border-radius: var(--border-radius);
  padding: 1.2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
}

.appointment-list-item:hover {
  border-color: var(--secondary-color);
}

.appointment-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.app-child-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-dark);
}

.app-date-time {
  font-size: 0.85rem;
  color: var(--accent-medium);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.app-reason {
  font-size: 0.8rem;
  color: var(--text-light);
}

.badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-pending {
  background-color: rgba(218, 160, 134, 0.15);
  color: var(--accent-medium);
}

.badge-confirmed {
  background-color: rgba(89, 176, 96, 0.15);
  color: var(--primary-color);
}

.badge-cancelled {
  background-color: rgba(244, 67, 54, 0.1);
  color: #f44336;
}

/* Right Column Dashboard */
.doctor-info-widget {
  background-color: var(--white);
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(52, 78, 89, 0.04);
}

.doctor-photo-wrapper {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--accent-light);
  margin-bottom: 1.2rem;
  overflow: hidden;
  border: 3px solid var(--white);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.doctor-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doctor-photo-placeholder {
  font-size: 3rem;
  color: var(--white);
}

.doctor-name {
  font-family: var(--font-title);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.doctor-specialty {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.doctor-desc {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

.doctor-contacts {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  border-top: 1px solid rgba(52, 78, 89, 0.08);
  padding-top: 1.5rem;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.85rem;
  color: var(--text-dark);
  text-align: left;
}

.contact-row i {
  color: var(--accent-medium);
  font-size: 1rem;
  width: 20px;
  text-align: center;
}

/* ARTICLES VIEW */
.articles-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.search-wrapper {
  position: relative;
  flex-grow: 1;
  max-width: 400px;
}

.search-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.8rem;
  border: 1px solid rgba(52, 78, 89, 0.15);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.9rem;
  background-color: var(--white);
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-medium);
  box-shadow: 0 0 0 3px rgba(185, 102, 79, 0.1);
}

.search-wrapper i {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
}

.category-tags {
  display: flex;
  gap: 0.5rem;
}

.tag-btn {
  background-color: var(--white);
  color: var(--text-light);
  border: 1px solid rgba(52, 78, 89, 0.1);
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

.tag-btn:hover, .tag-btn.active {
  background-color: var(--accent-medium);
  color: var(--white);
  border-color: var(--accent-medium);
}

.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(52, 78, 89, 0.04);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  transition: var(--transition);
}

.article-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: rgba(132, 155, 192, 0.3);
}

.article-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  flex-grow: 1;
}

.article-meta-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-light);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.article-category {
  color: var(--accent-medium);
}

.article-card h3 {
  font-family: var(--font-title);
  font-size: 1.2rem;
  color: var(--text-dark);
  line-height: 1.3;
}

.article-card p {
  font-size: 0.85rem;
  color: var(--text-light);
  line-height: 1.5;
  flex-grow: 1;
}

.article-footer {
  padding: 1rem 1.5rem;
  background-color: rgba(230, 225, 229, 0.2);
  border-top: 1px solid rgba(52, 78, 89, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.read-more-btn {
  background: none;
  border: none;
  color: var(--accent-medium);
  font-weight: 600;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  transition: var(--transition);
}

.read-more-btn:hover {
  color: var(--primary-color);
}

/* EXAMS VIEW */
.exams-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.upload-area {
  background-color: var(--white);
  border: 2px dashed rgba(132, 155, 192, 0.5);
  border-radius: var(--border-radius-lg);
  padding: 3rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  box-shadow: var(--shadow-sm);
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--accent-medium);
  background-color: rgba(185, 102, 79, 0.03);
}

.upload-icon-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background-color: rgba(132, 155, 192, 0.1);
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  transition: var(--transition);
}

.upload-area:hover .upload-icon-circle {
  background-color: rgba(185, 102, 79, 0.1);
  color: var(--accent-medium);
}

.upload-area h3 {
  font-size: 1.15rem;
  color: var(--text-dark);
}

.upload-area p {
  font-size: 0.85rem;
  color: var(--text-light);
  max-width: 80%;
}

.file-input {
  display: none;
}

.uploaded-exams-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.exam-card {
  background-color: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid rgba(52, 78, 89, 0.08);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: var(--transition);
}

.exam-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.exam-title-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.exam-file-icon {
  font-size: 1.8rem;
  color: #f44336; /* Red for PDF */
}

.exam-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-dark);
  word-break: break-all;
}

.exam-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.exam-feedback-box {
  background-color: rgba(89, 176, 96, 0.06);
  border-left: 3px solid var(--primary-color);
  padding: 0.8rem 1rem;
  border-radius: 0 var(--border-radius-sm) var(--border-radius-sm) 0;
  font-size: 0.85rem;
}

.feedback-doctor {
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.2rem;
}

.feedback-text {
  color: var(--text-light);
  font-style: italic;
}

/* CHAT VIEW */
.chat-layout {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(52, 78, 89, 0.06);
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  overflow: hidden;
}

.chat-header {
  padding: 1.2rem 1.8rem;
  border-bottom: 1px solid rgba(52, 78, 89, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--white);
}

.chat-partner-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.chat-partner-avatar {
  position: relative;
}

.status-dot {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  background-color: var(--primary-color);
  border: 2px solid var(--white);
  border-radius: 50%;
}

.chat-partner-name {
  font-weight: 600;
  color: var(--text-dark);
  font-size: 0.95rem;
}

.chat-partner-status {
  font-size: 0.75rem;
  color: var(--primary-color);
  font-weight: 500;
}

.chat-messages {
  flex-grow: 1;
  padding: 1.5rem;
  overflow-y: auto;
  background-color: #f7f6f7;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message-bubble {
  max-width: 70%;
  padding: 0.9rem 1.2rem;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  position: relative;
  line-height: 1.4;
  animation: messageFadeIn 0.3s ease forwards;
}

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

.message-bubble.doctor-msg {
  background-color: var(--white);
  color: var(--text-dark);
  align-self: flex-start;
  border-bottom-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.message-bubble.parent-msg {
  background: linear-gradient(135deg, var(--accent-medium), var(--accent-light));
  color: var(--white);
  align-self: flex-end;
  border-bottom-right-radius: 2px;
  box-shadow: 0 4px 12px rgba(185, 102, 79, 0.15);
}

.message-time {
  font-size: 0.65rem;
  margin-top: 0.4rem;
  text-align: right;
  opacity: 0.7;
}

.chat-input-area {
  padding: 1.2rem;
  background-color: var(--white);
  border-top: 1px solid rgba(52, 78, 89, 0.08);
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.chat-input {
  flex-grow: 1;
  border: 1px solid rgba(52, 78, 89, 0.15);
  border-radius: 24px;
  padding: 0.8rem 1.2rem;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: #f7f6f7;
  transition: var(--transition);
}

.chat-input:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--accent-medium);
  box-shadow: 0 0 0 3px rgba(185, 102, 79, 0.1);
}

.btn-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background-color: var(--accent-medium);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-icon:hover {
  background-color: var(--primary-color);
  transform: scale(1.05);
}

/* BOOKING VIEW */
.booking-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.booking-layout.full-width {
  grid-template-columns: 1fr;
  max-width: 600px;
  margin: 0 auto;
}

.booking-form-card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(52, 78, 89, 0.04);
}

.booking-form-card h2 {
  font-family: var(--font-title);
  font-size: 1.4rem;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(52, 78, 89, 0.15);
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 0.9rem;
  transition: var(--transition);
  background-color: var(--white);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-medium);
  box-shadow: 0 0 0 3px rgba(185, 102, 79, 0.1);
}

/* Date/Time Slots Grid */
.slots-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.dates-slider {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.date-slot {
  flex: 0 0 auto;
  border: 1px solid rgba(52, 78, 89, 0.15);
  border-radius: var(--border-radius);
  padding: 0.8rem 1rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--white);
  transition: var(--transition);
  min-width: 90px;
}

.date-slot:hover {
  border-color: var(--accent-medium);
  background-color: rgba(185, 102, 79, 0.03);
}

.date-slot.selected {
  background-color: var(--accent-medium);
  color: var(--white);
  border-color: var(--accent-medium);
  box-shadow: var(--shadow-sm);
}

.date-day {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.date-num {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0.1rem 0;
}

.date-month {
  font-size: 0.7rem;
  font-weight: 600;
}

.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.time-slot {
  border: 1px solid rgba(52, 78, 89, 0.15);
  border-radius: var(--border-radius-sm);
  padding: 0.6rem 0.4rem;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  background-color: var(--white);
  transition: var(--transition);
  color: var(--text-dark);
}

.time-slot:hover {
  border-color: var(--accent-medium);
  background-color: rgba(185, 102, 79, 0.03);
}

.time-slot.selected {
  background-color: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

.btn-submit {
  width: 100%;
  padding: 1rem;
  background: var(--primary-color);
  color: var(--white);
  border: none;
  border-radius: var(--border-radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
  box-shadow: 0 4px 12px rgba(89, 176, 96, 0.2);
}

.btn-submit:hover {
  background-color: var(--hover-green);
  transform: translateY(-2px);
}

.appointments-history {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.appointment-card-booking {
  background-color: var(--white);
  border-radius: var(--border-radius);
  border: 1px solid rgba(52, 78, 89, 0.08);
  padding: 1.2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  position: relative;
}

.btn-cancel-booking {
  background: none;
  border: none;
  color: #f44336;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  align-self: flex-end;
}

.btn-cancel-booking:hover {
  text-decoration: underline;
}

/* DOCTOR PANEL (MODO MEDICO) */
.doctor-dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  height: calc(100vh - 80px);
  background-color: var(--bg-light);
}

.doctor-sub-sidebar {
  background-color: var(--white);
  border-right: 1px solid rgba(52, 78, 89, 0.08);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sub-sidebar-title {
  padding: 1.5rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--text-light);
  font-weight: 700;
  letter-spacing: 1px;
  border-bottom: 1px solid rgba(52, 78, 89, 0.05);
}

.patient-list {
  list-style: none;
}

.patient-item {
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(52, 78, 89, 0.05);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.patient-item:hover, .patient-item.active {
  background-color: rgba(132, 155, 192, 0.06);
}

.patient-item.active {
  border-left: 4px solid var(--accent-medium);
}

.patient-details {
  display: flex;
  flex-direction: column;
}

.patient-name {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dark);
}

.patient-parent {
  font-size: 0.75rem;
  color: var(--text-light);
}

.doctor-main-area {
  padding: 2rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.doctor-section-card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(52, 78, 89, 0.04);
}

.doctor-section-card h3 {
  font-family: var(--font-title);
  font-size: 1.25rem;
  color: var(--text-dark);
  margin-bottom: 1.2rem;
  border-bottom: 1px solid rgba(52, 78, 89, 0.06);
  padding-bottom: 0.6rem;
}

.doctor-exam-item {
  display: grid;
  grid-template-columns: 2fr 1.5fr;
  gap: 1.5rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid rgba(52, 78, 89, 0.05);
}

.doctor-exam-item:last-child {
  border-bottom: none;
}

.doctor-exam-desc {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.doctor-exam-actions {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.doctor-feedback-input {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid rgba(52, 78, 89, 0.15);
  border-radius: var(--border-radius-sm);
  font-family: inherit;
  font-size: 0.85rem;
  resize: vertical;
}

.btn-group-row {
  display: flex;
  gap: 0.5rem;
}

.btn-action-small {
  padding: 0.5rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.btn-action-approve {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-action-approve:hover {
  background-color: var(--hover-green);
}

.btn-action-reject {
  background-color: #f44336;
  color: var(--white);
}

.doctor-app-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(52, 78, 89, 0.05);
}

.doctor-app-item:last-child {
  border-bottom: none;
}

/* MODAL READ ARTICLE & GENERAL MODALS */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(52, 78, 89, 0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.modal-content {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  padding: 2.5rem;
  position: relative;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-close-btn {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--accent-medium);
}

.modal-article-category {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent-medium);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.modal-article-title {
  font-family: var(--font-title);
  font-size: 1.8rem;
  color: var(--text-dark);
  line-height: 1.3;
  margin-bottom: 1rem;
}

.modal-article-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-light);
  border-bottom: 1px solid rgba(52, 78, 89, 0.08);
  padding-bottom: 1.2rem;
  margin-bottom: 1.5rem;
}

.modal-article-body {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-dark);
}

.modal-article-body p {
  margin-bottom: 1.2rem;
}

.modal-article-body h3 {
  font-family: var(--font-title);
  font-size: 1.3rem;
  margin: 1.8rem 0 0.8rem;
  color: var(--text-dark);
}

.modal-article-body ul, .modal-article-body ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}

.modal-article-body li {
  margin-bottom: 0.4rem;
}

/* MOBILE RESPONSIVE ADAPTATIONS */
@media (max-width: 992px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    display: none; /* We will use a bottom navigation for mobile */
  }

  .main-content {
    height: calc(100vh - 65px);
  }

  .app-header {
    padding: 1rem 1.5rem;
  }

  .page-title-container h1 {
    font-size: 1.4rem;
  }

  .view-container {
    padding: 1.5rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .exams-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .booking-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  /* Bottom Navigation (Mobile Only) */
  .mobile-nav-bar {
    display: flex;
    justify-content: space-around;
    background-color: var(--white);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    height: 65px;
    z-index: 100;
    border-top: 1px solid rgba(52, 78, 89, 0.05);
  }

  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 500;
    gap: 0.2rem;
    transition: var(--transition);
  }

  .mobile-nav-item i {
    font-size: 1.2rem;
  }

  .mobile-nav-item.active {
    color: var(--accent-medium);
  }

  .mobile-nav-item.active i {
    color: var(--accent-medium);
  }
  
  .doctor-dashboard {
    grid-template-columns: 1fr;
    height: auto;
  }
  
  .doctor-sub-sidebar {
    border-right: none;
    border-bottom: 1px solid rgba(52, 78, 89, 0.08);
    max-height: 200px;
  }
}

/* Hide mobile-nav-bar on desktop by default */
@media (min-width: 993px) {
  .mobile-nav-bar {
    display: none;
  }
}

/* Custom video card thumbnail styles */
.video-preview-thumbnail:hover i {
  transform: scale(1.15);
  opacity: 1 !important;
}

.video-preview-thumbnail:hover {
  filter: brightness(0.95);
  cursor: pointer;
}

/* Doctor Profile Page Details Card Layout */
.doctor-profile-card-large {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
  background-color: var(--white);
  border-radius: var(--border-radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(52, 78, 89, 0.05);
}

.doctor-profile-sidebar-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-right: 1px solid rgba(52, 78, 89, 0.08);
  padding-right: 2.5rem;
}

@media (max-width: 768px) {
  .doctor-profile-card-large {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1.5rem;
  }
  
  .doctor-profile-sidebar-card {
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid rgba(52, 78, 89, 0.08);
    padding-bottom: 1.5rem;
  }
  
  .doctor-profile-card-large ul {
    grid-template-columns: 1fr !important;
  }
}

/* ====================================================
   8. MOCK LOGIN SCREEN OVERLAY STYLES
   ==================================================== */
.login-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: radial-gradient(circle at 10% 20%, rgba(52, 78, 89, 0.98) 0%, rgba(38, 57, 66, 1) 90%);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  box-sizing: border-box;
}

/* If logged in, hide the login screen */
.login-overlay.logged-in {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  display: none !important;
}

.login-card {
  background-color: var(--white);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  box-sizing: border-box;
  animation: loginCardSlideUp 0.5s ease forwards;
  border: 1px solid rgba(132, 155, 192, 0.1);
}

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

/* Floating Action Button for Mobile Booking (Fixed at bottom right on phones) */
.mobile-fab {
  display: none; /* Hidden on desktop */
}

@media (max-width: 768px) {
  .mobile-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: fixed;
    bottom: 85px; /* Floats perfectly above the mobile bottom nav bar (65px) */
    right: 1.2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border: none;
    padding: 0.8rem 1.4rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    box-shadow: 0 4px 16px rgba(89, 176, 96, 0.45);
    z-index: 99;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
  }

  .mobile-fab:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(89, 176, 96, 0.35);
  }
}

