/* ===== App Layout (Dashboard, Search, Profile, Messages) ===== */

.app-layout {
  display: grid;
  grid-template-columns: 280px 1fr 300px;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  min-height: calc(100vh - 64px);
  align-items: start;
}

.app-layout-2col {
  grid-template-columns: 280px 1fr;
}

.sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }

/* ===== Profile Sidebar Card ===== */
.profile-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: white;
  border: 1px solid var(--gray-200);
}
.profile-card-banner {
  height: 72px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.profile-card-body { padding: 0 20px 20px; }
.profile-card-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 3px solid white;
  box-shadow: var(--shadow);
  margin-top: -36px;
  margin-bottom: 12px;
  object-fit: cover;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.4rem;
  font-weight: 700;
}
.profile-card-name { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.profile-card-title { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 16px; }
.profile-card-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--gray-100);
}
.profile-stat .stat-label { font-size: 0.72rem; color: var(--gray-500); }
.profile-stat .stat-value { font-size: 0.95rem; font-weight: 700; color: var(--dark); }

/* ===== Nav Sidebar ===== */
.nav-sidebar-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 8px 0;
}
.nav-sidebar-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 20px;
  font-size: 0.875rem;
  color: var(--gray-700);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none;
  background: none;
  width: 100%;
  text-decoration: none;
}
.nav-sidebar-item:hover { background: var(--gray-50); color: var(--primary); }
.nav-sidebar-item.active { color: var(--primary); background: var(--primary-light); font-weight: 600; }
.nav-sidebar-item .icon { font-size: 1.1rem; width: 22px; text-align: center; }
.nav-sidebar-item .count {
  margin-left: auto;
  background: var(--red);
  color: white;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: var(--radius-full);
}

/* ===== Main Feed ===== */
.main-feed { display: flex; flex-direction: column; gap: 16px; }

/* ===== Post Composer ===== */
.post-composer {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 18px 20px;
}
.composer-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.composer-input {
  flex: 1;
  padding: 10px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  color: var(--gray-500);
  cursor: pointer;
  background: var(--gray-50);
  transition: all 0.2s;
}
.composer-input:hover { border-color: var(--primary); background: white; }
.composer-actions { display: flex; gap: 8px; padding-top: 4px; border-top: 1px solid var(--gray-100); }
.composer-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.composer-btn:hover { background: var(--gray-50); color: var(--gray-700); }

/* ===== Feed Post ===== */
.feed-post {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}
.post-header { padding: 18px 20px 0; display: flex; align-items: flex-start; gap: 12px; }
.post-author-info { flex: 1; }
.post-author-info h4 { font-size: 0.9rem; font-weight: 700; color: var(--dark); }
.post-author-info p { font-size: 0.78rem; color: var(--gray-500); }
.post-time { font-size: 0.75rem; color: var(--gray-400); }
.post-more { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--gray-400); font-size: 1.2rem; padding: 4px 8px; border-radius: var(--radius); }
.post-more:hover { background: var(--gray-100); }
.post-body { padding: 14px 20px; font-size: 0.9rem; color: var(--gray-700); line-height: 1.7; }
.post-image { width: 100%; max-height: 300px; object-fit: cover; background: var(--gray-100); display: flex; align-items: center; justify-content: center; color: var(--gray-400); font-size: 0.8rem; }
.post-stats { padding: 10px 20px; display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; color: var(--gray-400); border-top: 1px solid var(--gray-100); }
.post-actions { padding: 4px 12px 4px; display: flex; border-top: 1px solid var(--gray-100); }
.post-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 8px;
  border-radius: var(--radius);
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--gray-500);
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.15s;
}
.post-action:hover { background: var(--gray-50); color: var(--primary); }
.post-action.liked { color: var(--primary); }

/* ===== Right Sidebar ===== */
.right-sidebar { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 88px; }

.sidebar-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 20px;
}
.sidebar-card-title { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.sidebar-card-title a { font-size: 0.78rem; color: var(--primary); font-weight: 500; }

.upcoming-session {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-100);
}
.upcoming-session:last-child { border-bottom: none; padding-bottom: 0; }
.session-time-badge {
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--primary-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.session-time-badge .month { font-size: 0.6rem; color: var(--primary); font-weight: 700; text-transform: uppercase; }
.session-time-badge .day { font-size: 1rem; font-weight: 800; color: var(--primary-dark); line-height: 1; }
.session-info h5 { font-size: 0.825rem; font-weight: 600; margin-bottom: 2px; }
.session-info p { font-size: 0.75rem; color: var(--gray-500); }

/* Educator suggestion row */
.suggestion-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.suggestion-row:last-child { border-bottom: none; }
.suggestion-info { flex: 1; min-width: 0; }
.suggestion-info h5 { font-size: 0.825rem; font-weight: 600; }
.suggestion-info p { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-connect { padding: 5px 14px; font-size: 0.75rem; border-radius: var(--radius-full); font-weight: 600; border: 1.5px solid var(--primary); color: var(--primary); background: none; cursor: pointer; transition: all 0.2s; }
.btn-connect:hover { background: var(--primary-light); }

/* ===== Search Page ===== */
.search-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  align-items: start;
}

.filter-sidebar {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 24px;
  position: sticky;
  top: 88px;
}
.filter-section { margin-bottom: 24px; }
.filter-section:last-child { margin-bottom: 0; }
.filter-title { font-size: 0.875rem; font-weight: 700; color: var(--dark); margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; }
.filter-title button { font-size: 0.75rem; color: var(--primary); background: none; border: none; cursor: pointer; font-weight: 500; }

.filter-checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  cursor: pointer;
}
.filter-checkbox-row input[type=checkbox] { accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; }
.filter-checkbox-row label { font-size: 0.855rem; color: var(--gray-700); cursor: pointer; flex: 1; }
.filter-checkbox-row .filter-count { font-size: 0.72rem; color: var(--gray-400); }

.price-range { display: flex; align-items: center; gap: 10px; }
.price-input { width: 80px; padding: 7px 10px; border: 1.5px solid var(--gray-200); border-radius: var(--radius); font-size: 0.82rem; }

.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.results-count { font-size: 0.875rem; color: var(--gray-500); }
.results-count strong { color: var(--dark); }
.sort-select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  font-size: 0.82rem;
  background: white;
  cursor: pointer;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.result-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 24px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
}
.result-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}
.result-card-header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 14px; }
.result-card-meta { flex: 1; min-width: 0; }
.result-card-meta h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 3px; }
.result-card-meta .tagline { font-size: 0.8rem; color: var(--gray-500); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.result-card-rating { display: flex; align-items: center; gap: 5px; }
.result-card-bio { font-size: 0.845rem; color: var(--gray-600); line-height: 1.6; margin-bottom: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; flex: 1; }
.result-card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }
.result-card-footer { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--gray-100); }
.result-price .amount { font-size: 1.05rem; font-weight: 800; color: var(--dark); }
.result-price .period { font-size: 0.72rem; color: var(--gray-500); }
.result-actions { display: flex; gap: 8px; }

/* View toggle */
.view-toggle { display: flex; border: 1.5px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.view-btn { padding: 6px 12px; font-size: 0.9rem; border: none; background: none; cursor: pointer; color: var(--gray-400); transition: all 0.15s; }
.view-btn.active { background: var(--primary); color: white; }

/* ===== Educator Profile Page ===== */
.profile-hero {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  margin-bottom: 24px;
}
.profile-hero-banner {
  height: 180px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--accent) 100%);
  position: relative;
}
.profile-hero-body { padding: 0 32px 28px; }
.profile-hero-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  box-shadow: var(--shadow-lg);
  margin-top: -60px;
  object-fit: cover;
  background: linear-gradient(135deg, #6366F1, #8B5CF6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2.5rem;
  font-weight: 700;
}
.profile-hero-info { padding-top: 16px; display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; }
.profile-hero-info-left h1 { font-size: 1.625rem; margin-bottom: 4px; }
.profile-hero-info-left .tagline { font-size: 0.95rem; color: var(--gray-500); margin-bottom: 10px; }
.profile-hero-badges { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.profile-hero-stats { display: flex; gap: 24px; margin-top: 16px; }
.profile-hero-stat { text-align: center; }
.profile-hero-stat .num { font-size: 1.25rem; font-weight: 800; color: var(--dark); }
.profile-hero-stat .lbl { font-size: 0.72rem; color: var(--gray-500); }
.profile-actions-col { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; flex-shrink: 0; }
.price-display { text-align: right; }
.price-display .price-num { font-size: 1.75rem; font-weight: 800; color: var(--dark); }
.price-display .price-per { font-size: 0.8rem; color: var(--gray-500); }

.profile-section-card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 28px;
  margin-bottom: 20px;
}
.profile-section-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-100); display: flex; justify-content: space-between; align-items: center; }

.credential-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--gray-100);
}
.credential-item:last-child { border-bottom: none; }
.credential-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.credential-info h5 { font-size: 0.875rem; font-weight: 600; margin-bottom: 2px; }
.credential-info p { font-size: 0.8rem; color: var(--gray-500); }
.credential-info .year { font-size: 0.75rem; color: var(--gray-400); margin-top: 2px; }

/* Category ratings */
.category-rating { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.category-name { width: 120px; font-size: 0.82rem; color: var(--gray-700); flex-shrink: 0; }
.rating-bar-track { flex: 1; height: 6px; background: var(--gray-200); border-radius: 3px; overflow: hidden; }
.rating-bar-fill { height: 100%; background: var(--amber); border-radius: 3px; }
.category-score { width: 28px; text-align: right; font-size: 0.82rem; font-weight: 600; color: var(--dark); }

/* Review card */
.review-card {
  padding: 20px 0;
  border-bottom: 1px solid var(--gray-100);
}
.review-card:last-child { border-bottom: none; }
.review-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.review-author { display: flex; align-items: center; gap: 10px; }
.review-author-info h5 { font-size: 0.875rem; font-weight: 600; }
.review-author-info p { font-size: 0.75rem; color: var(--gray-400); }
.review-text { font-size: 0.875rem; color: var(--gray-700); line-height: 1.7; }
.review-response { margin-top: 12px; padding: 12px 16px; background: var(--gray-50); border-radius: var(--radius); border-left: 3px solid var(--primary); }
.review-response p { font-size: 0.82rem; color: var(--gray-600); }
.review-response strong { font-size: 0.78rem; color: var(--primary); }

/* Booking Widget */
.booking-widget {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid var(--gray-200);
  padding: 24px;
  position: sticky;
  top: 88px;
}
.booking-widget-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }
.booking-option {
  border: 2px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.booking-option:hover { border-color: var(--primary); background: var(--primary-light); }
.booking-option.selected { border-color: var(--primary); background: var(--primary-light); }
.booking-option-info h5 { font-size: 0.875rem; font-weight: 600; }
.booking-option-info p { font-size: 0.78rem; color: var(--gray-500); }
.booking-option-price { font-size: 1rem; font-weight: 800; color: var(--dark); }
.booking-calendar { margin: 16px 0; }
.booking-calendar-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.calendar-nav { background: none; border: none; cursor: pointer; padding: 4px 8px; border-radius: var(--radius); color: var(--gray-500); font-size: 1rem; }
.calendar-nav:hover { background: var(--gray-100); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.15s;
}
.cal-day:hover:not(.disabled):not(.header) { background: var(--primary-light); color: var(--primary); }
.cal-day.available { font-weight: 600; color: var(--dark); }
.cal-day.selected { background: var(--primary); color: white; font-weight: 700; }
.cal-day.today { color: var(--primary); font-weight: 700; }
.cal-day.disabled { color: var(--gray-300); cursor: default; }
.cal-day.header { font-size: 0.7rem; color: var(--gray-400); font-weight: 600; cursor: default; }
.booking-divider { height: 1px; background: var(--gray-100); margin: 16px 0; }
.booking-total { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.booking-total .label { font-size: 0.875rem; color: var(--gray-500); }
.booking-total .amount { font-size: 1.1rem; font-weight: 800; color: var(--dark); }
.platform-fee-note { font-size: 0.72rem; color: var(--gray-400); text-align: center; margin-top: 10px; }

/* ===== Messages Page ===== */
.messages-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 64px);
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  gap: 0;
}

.messages-sidebar {
  border-right: 1px solid var(--gray-200);
  background: white;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.messages-sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--gray-100);
}
.messages-sidebar-header h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; }
.messages-search { position: relative; }
.messages-search input {
  width: 100%;
  padding: 8px 14px 8px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  background: var(--gray-50);
}
.messages-search input:focus { outline: none; border-color: var(--primary); }
.messages-search-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--gray-400); font-size: 0.85rem; }

.conversations-list { flex: 1; overflow-y: auto; }
.conversation-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  border-bottom: 1px solid var(--gray-50);
  transition: background 0.15s;
  position: relative;
}
.conversation-item:hover { background: var(--gray-50); }
.conversation-item.active { background: var(--primary-light); }
.conversation-item.unread .conv-preview { font-weight: 600; color: var(--dark); }
.conv-avatar-wrap { position: relative; flex-shrink: 0; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-size: 0.875rem; font-weight: 600; color: var(--dark); }
.conv-preview { font-size: 0.78rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { flex-shrink: 0; text-align: right; }
.conv-time { font-size: 0.7rem; color: var(--gray-400); margin-bottom: 4px; }
.unread-dot { width: 8px; height: 8px; background: var(--primary); border-radius: 50%; margin-left: auto; }

.chat-area {
  display: flex;
  flex-direction: column;
  background: var(--gray-50);
  overflow: hidden;
}
.chat-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gray-200);
  background: white;
  display: flex;
  align-items: center;
  gap: 14px;
}
.chat-header-info { flex: 1; }
.chat-header-info h4 { font-size: 0.95rem; font-weight: 700; }
.chat-header-info p { font-size: 0.78rem; color: var(--accent); font-weight: 500; }
.chat-header-actions { display: flex; gap: 8px; }
.chat-header-btn { width: 36px; height: 36px; border-radius: 50%; background: none; border: 1.5px solid var(--gray-200); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 0.9rem; color: var(--gray-500); transition: all 0.15s; }
.chat-header-btn:hover { background: var(--gray-100); }

.chat-messages { flex: 1; overflow-y: auto; padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; }
.message { display: flex; gap: 10px; max-width: 70%; }
.message.sent { flex-direction: row-reverse; margin-left: auto; }
.msg-bubble {
  padding: 10px 14px;
  border-radius: 18px;
  font-size: 0.875rem;
  line-height: 1.5;
  max-width: 100%;
}
.message.received .msg-bubble { background: white; border: 1px solid var(--gray-200); color: var(--dark); border-bottom-left-radius: 4px; }
.message.sent .msg-bubble { background: var(--primary); color: white; border-bottom-right-radius: 4px; }
.msg-time { font-size: 0.68rem; color: var(--gray-400); margin-top: 4px; align-self: flex-end; flex-shrink: 0; }
.message.sent .msg-time { color: rgba(255,255,255,0.6); }

.date-divider { text-align: center; }
.date-divider span { display: inline-block; background: var(--gray-200); color: var(--gray-500); font-size: 0.72rem; font-weight: 600; padding: 4px 12px; border-radius: var(--radius-full); }

.chat-input-area {
  padding: 16px 24px;
  background: white;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: flex-end;
  gap: 12px;
}
.chat-input-wrap { flex: 1; }
.chat-input {
  width: 100%;
  padding: 10px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 22px;
  font-size: 0.875rem;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  overflow-y: auto;
  transition: border-color 0.2s;
}
.chat-input:focus { outline: none; border-color: var(--primary); }
.chat-send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary);
  border: none;
  color: white;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); transform: scale(1.05); }

.chat-attach-btn { width: 36px; height: 36px; background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 1rem; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.15s; flex-shrink: 0; }
.chat-attach-btn:hover { background: var(--gray-100); color: var(--gray-600); }

/* Typing indicator */
.typing-indicator { display: flex; align-items: center; gap: 4px; padding: 10px 14px; background: white; border: 1px solid var(--gray-200); border-radius: 18px; border-bottom-left-radius: 4px; width: fit-content; }
.typing-dot { width: 6px; height: 6px; background: var(--gray-400); border-radius: 50%; animation: typingBounce 1.4s infinite; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typingBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-6px); } }

/* ===== Auth Pages ===== */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.auth-visual {
  background: linear-gradient(135deg, #0F172A, #0057B8, #00A36C);
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  position: relative;
  overflow: hidden;
}
.auth-visual::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.05), transparent);
  border-radius: 50%;
}
.auth-visual-content h2 { font-size: 2rem; font-weight: 800; margin-bottom: 16px; }
.auth-visual-content p { color: rgba(255,255,255,0.75); line-height: 1.7; font-size: 1rem; }
.auth-visual-stats { display: flex; gap: 32px; }
.auth-stat .num { font-size: 1.75rem; font-weight: 800; }
.auth-stat .lbl { font-size: 0.8rem; opacity: 0.7; }

.auth-form-panel {
  background: white;
  padding: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.auth-form-inner { width: 100%; max-width: 400px; }
.auth-form-inner .logo { margin-bottom: 32px; }
.auth-form-inner h2 { font-size: 1.625rem; margin-bottom: 8px; }
.auth-form-inner .auth-sub { color: var(--gray-500); font-size: 0.9rem; margin-bottom: 32px; }

.social-login-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 20px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: white;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 10px;
}
.social-login-btn:hover { border-color: var(--primary); background: var(--gray-50); }

.divider-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--gray-400);
  font-size: 0.8rem;
}
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--gray-200); }

.role-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px; }
.role-option { border: 2px solid var(--gray-200); border-radius: var(--radius-lg); padding: 16px 14px; cursor: pointer; text-align: center; transition: all 0.2s; }
.role-option:hover { border-color: var(--primary); }
.role-option.selected { border-color: var(--primary); background: var(--primary-light); }
.role-option .role-icon { font-size: 1.5rem; margin-bottom: 6px; }
.role-option .role-name { font-size: 0.85rem; font-weight: 600; color: var(--dark); }
.role-option .role-desc { font-size: 0.72rem; color: var(--gray-500); margin-top: 2px; }

.auth-switch { text-align: center; margin-top: 24px; font-size: 0.875rem; color: var(--gray-500); }
.auth-switch a { color: var(--primary); font-weight: 600; }

/* ===== Responsive App ===== */
@media (max-width: 1100px) {
  .app-layout { grid-template-columns: 240px 1fr 260px; }
}
@media (max-width: 900px) {
  .app-layout { grid-template-columns: 1fr; }
  .app-layout .sidebar, .app-layout .right-sidebar { display: none; }
  .search-layout { grid-template-columns: 1fr; }
  .search-layout .filter-sidebar { display: none; }
  .results-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-form-panel { padding: 40px 24px; }
  .messages-layout { grid-template-columns: 1fr; }
  .messages-sidebar { display: none; }
}
