:root {
  --f7-theme-color: #4A90E2;
  --f7-theme-color-rgb: 74, 144, 226;
  --f7-theme-color-shade: #3A7BC8;
  --f7-theme-color-tint: #6BA3E8;
  --f7-safe-area-top: env(safe-area-inset-top);
  --f7-safe-area-bottom: env(safe-area-inset-bottom);
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}

/* Connection Banner */
.connection-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #FF3B30;
  color: white;
  padding: 12px 16px;
  z-index: 13000;
  transform: translateY(-100%);
  transition: transform 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.connection-banner.show {
  transform: translateY(0);
}

.connection-banner.hidden {
  display: none;
}

.connection-banner.slow {
  background: #FF9500;
}

.connection-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.connection-content i {
  font-size: 20px;
}

/* Login Page */
.login-screen-content {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-screen-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/medico.webp') 35% center / cover no-repeat;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
}

.login-header {
  text-align: center;
  padding: 80px 20px 60px;
  color: white;
  position: relative;
  z-index: 1;
}

.login-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: white;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  color: #4A90E2;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.login-title {
  font-size: 32px;
  font-weight: 700;
  margin: 0 0 8px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-subtitle {
  font-size: 16px;
  opacity: 0.95;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.login-form-container {
  flex: 1;
  background: white;
  border-radius: 30px 30px 0 0;
  padding: 40px 20px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  z-index: 1;
}

.form-title {
  font-size: 24px;
  font-weight: 600;
  color: #1a1a1a;
  margin: 0 0 24px;
  text-align: center;
}

.list {
  margin: 0 0 24px;
}

.item-input-wrap input {
  font-size: 16px;
}

/* Password toggle - ONLY positioning and styling for the icon */
.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #8E8E93;
  font-size: 22px;
  padding: 8px;
  z-index: 10;
  user-select: none;
  font-family: 'Framework7 Icons';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1;
  pointer-events: auto;
}

.password-toggle:active {
  color: #4A90E2;
}

/* ONLY add padding for the icon - NO height changes */
.item-input-wrap.has-toggle input {
  padding-right: 50px;
}

.button-large {
  height: 50px;
  font-size: 17px;
  font-weight: 600;
  border-radius: 12px;
  text-transform: none;
}

.button-fill {
  background: #4A90E2;
}

.link-divider {
  text-align: center;
  margin: 20px 0;
  color: #8E8E93;
  font-size: 14px;
}

.secondary-link {
  text-align: center;
  margin-top: 16px;
}

.secondary-link a {
  color: #4A90E2;
  text-decoration: none;
  font-weight: 500;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 14000;
}

.loading-content {
  text-align: center;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid #E5E5EA;
  border-top-color: #4A90E2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Optimizations */
.page-content {
  will-change: transform;
}

img {
  will-change: transform;
}

/* Professional touches */
.elevation-1 {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.elevation-2 {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.text-muted {
  color: #8E8E93;
}

/* Register Profile Selection - Horizontal with Images */
.register-step {
  display: none;
}

.register-step.active {
  display: block;
  animation: slideInRight 0.3s ease;
}

.profile-selection-wrapper {
  padding: 20px;
}

.profile-selection-title {
  text-align: center;
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 10px;
  letter-spacing: -0.5px;
}

.profile-selection-subtitle {
  text-align: center;
  font-size: 15px;
  color: #6b7280;
  margin: 0 0 30px;
  line-height: 1.5;
}

.profile-selection-grid {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 10px;
}

.profile-selection-grid::-webkit-scrollbar {
  display: none;
}

.profile-card {
  flex: 0 0 280px;
  background: white;
  border: 3px solid #E5E5EA;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  scroll-snap-align: center;
  position: relative;
}

.profile-card:active {
  transform: scale(0.98);
}

.profile-card.selected {
  border-color: #4A90E2;
  box-shadow: 0 8px 24px rgba(74, 144, 226, 0.25);
  transform: translateY(-4px);
}

.profile-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.profile-card-content {
  padding: 40px 20px 20px;
  text-align: center;
  position: relative;
}

.profile-icon {
  width: 70px;
  height: 70px;
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
  border: 5px solid white;
  transition: all 0.3s ease;
  z-index: 10;
}

.profile-card.selected .profile-icon {
  transform: translateX(-50%) scale(1.15);
  box-shadow: 0 8px 24px rgba(74, 144, 226, 0.6);
}

.profile-icon svg {
  width: 32px;
  height: 32px;
}

.profile-badge {
  display: inline-block;
  background: #f0f4ff;
  color: #4A90E2;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-card.selected .profile-badge {
  background: #4A90E2;
  color: white;
}

.profile-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}

.profile-card.selected .profile-title {
  color: #4A90E2;
}

.profile-description {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
  line-height: 1.6;
}

.profile-card.selected .profile-description {
  color: #4b5563;
}

/* Scroll indicator */
.scroll-indicator {
  text-align: center;
  padding: 15px 20px 5px;
  color: #8E8E93;
  font-size: 13px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .profile-selection-grid {
    justify-content: center;
    overflow-x: visible;
  }

  .profile-card {
    flex: 0 0 260px;
  }

  .scroll-indicator {
    display: none;
  }
}

/* Animation for step transitions */
@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.register-step.active {
  animation: slideInRight 0.3s ease;
}


/* ========== Registration Wizard Styles ========== */

/* Progress Bar */
.wizard-progress {
  height: 4px;
  background: #e5e7eb;
  border-radius: 4px;
  margin: 16px 20px 0;
  overflow: hidden;
}

.wizard-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #4A90E2, #357ABD, #6BA3E8);
  background-size: 200% 100%;
  border-radius: 4px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  animation: progressShimmer 2s ease infinite;
}

@keyframes progressShimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Step Indicators */
.wizard-steps-indicator {
  display: flex;
  justify-content: center;
  gap: 32px;
  padding: 16px 20px 8px;
}

.wizard-step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.wizard-step-dot.active {
  opacity: 1;
}

.wizard-step-dot.completed {
  opacity: 0.8;
}

.dot-number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.3s ease;
}

.wizard-step-dot.active .dot-number {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
}

.wizard-step-dot.completed .dot-number {
  background: #10B981;
  color: white;
}

.dot-label {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.wizard-step-dot.active .dot-label {
  color: #4A90E2;
}

/* Wizard Panels */
.wizard-panel {
  display: none;
  padding: 0 20px 20px;
}

.wizard-panel.active {
  display: block;
  animation: slideInRight 0.35s ease;
}

.wizard-panel.slide-left {
  animation: slideInLeft 0.35s ease;
}

/* Wizard Section Header */
.wizard-header {
  text-align: center;
  padding: 20px 0 24px;
}

.wizard-header-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.3);
}

.wizard-header-icon i {
  font-size: 26px;
}

.wizard-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}

.wizard-subtitle {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

/* Wizard Form Fields - Using F7 native list inputs */
.wizard-list {
  margin: 0 0 8px;
}

.wizard-list ul {
  background: transparent;
}

.wizard-list .item-input-wrap input {
  font-size: 16px;
  font-family: 'Poppins', sans-serif;
}

.wizard-list .item-title.item-label {
  font-weight: 600;
  color: #374151;
}

/* Validation error highlight */
.item-content.input-invalid {
  background: rgba(239, 68, 68, 0.06) !important;
  animation: shake 0.4s ease;
}

.item-content.input-invalid .item-input-wrap input {
  color: #EF4444;
}

.item-content.input-invalid .item-title.item-label {
  color: #EF4444;
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20% {
    transform: translateX(-6px);
  }

  40% {
    transform: translateX(6px);
  }

  60% {
    transform: translateX(-4px);
  }

  80% {
    transform: translateX(4px);
  }
}

/* Wizard Actions */
.wizard-actions {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  padding: 0 16px 8px;
}

.wizard-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.25s ease;
  border: none;
  outline: none;
}

.wizard-btn i {
  font-size: 18px;
}

.wizard-btn-next {
  flex: 1;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(74, 144, 226, 0.35);
}

.wizard-btn-next:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
}

.wizard-btn-back {
  background: #f3f4f6;
  color: #4b5563;
  padding: 14px 18px;
}

.wizard-btn-back:active {
  background: #e5e7eb;
}

.wizard-btn-submit {
  flex: 1;
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.wizard-btn-submit:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

/* Responsive wizard on tablet+ */
@media (min-width: 768px) {
  .wizard-panel {
    max-width: 500px;
    margin: 0 auto;
  }

  .wizard-progress {
    max-width: 500px;
    margin: 16px auto 0;
  }

  .wizard-steps-indicator {
    max-width: 500px;
    margin: 0 auto;
  }
}

/* Instant load - no white flash */
.page {
  background: transparent;
}

.view-main {
  background: transparent;
}

.page-content {
  background: transparent;
}

/* Navbar transparent for other pages */
.navbar:not(.login-navbar) {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
}


/* Fix overlay issue - white background for register and forgot password */
.page[data-name="register"],
.page[data-name="forgot-password"] {
  background: #ffffff !important;
}

.page[data-name="register"] .page-content,
.page[data-name="forgot-password"] .page-content {
  background: #ffffff !important;
}

/* Register & Forgot Password navbar: white bg with dark text/icons */
.page[data-name="register"] .navbar,
.page[data-name="forgot-password"] .navbar {
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.page[data-name="register"] .navbar-bg,
.page[data-name="forgot-password"] .navbar-bg {
  background: #ffffff !important;
}

.page[data-name="register"] .navbar .title,
.page[data-name="forgot-password"] .navbar .title {
  color: #1a1a1a !important;
}

.page[data-name="register"] .navbar .link,
.page[data-name="forgot-password"] .navbar .link {
  color: #1a1a1a !important;
}

.page[data-name="register"] .navbar .icon-back,
.page[data-name="forgot-password"] .navbar .icon-back {
  color: #1a1a1a !important;
}

/* Override F7's default back button color for these pages */
.page[data-name="register"] .navbar .link.icon-only i,
.page[data-name="forgot-password"] .navbar .link.icon-only i {
  color: #1a1a1a !important;
}

/* Ensure login page keeps blue background */
.page[data-name="login"] {
  background: transparent !important;
}

.page[data-name="login"] .page-content {
  background: transparent !important;
}

/* Password toggle icon */
.password-toggle {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #8E8E93;
  font-size: 22px;
  padding: 8px;
  z-index: 10;
  user-select: none;
  font-family: 'Framework7 Icons';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1;
  pointer-events: auto;
}

.password-toggle:active {
  color: #4A90E2;
}

.item-input-wrap.has-toggle {
  position: relative;
}

.item-input-wrap.has-toggle input {
  padding-right: 50px;
}


/* Fix navbar alignment */
.navbar-inner {
  display: flex;
  align-items: center;
  position: relative;
  padding: 0 12px;
}

.navbar-inner .left {
  position: absolute;
  left: 12px;
  display: flex;
  align-items: center;
  z-index: 20;
  pointer-events: auto;
}

.navbar-inner .title {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  z-index: 1;
  pointer-events: none;
}

.navbar-inner .right {
  position: absolute;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 20;
  pointer-events: auto;
}

/* Ensure back button is vertically centered and clickable */
.navbar .link.icon-only {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  pointer-events: auto;
  cursor: pointer;
}


/* Phone input with country selector */
.phone-input-wrapper {
  display: flex;
  gap: 8px;
  align-items: center;
}

.country-selector {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: #f8f9fa;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s ease;
  user-select: none;
}

.country-selector:active {
  background: #e9ecef;
}

.country-flag {
  font-size: 24px;
  line-height: 1;
}

.country-code {
  font-size: 15px;
  font-weight: 600;
  color: #4A90E2;
  min-width: 45px;
}

.phone-input-wrapper input[type="tel"] {
  flex: 1;
  min-width: 0;
}

/* Country picker modal */
.country-picker-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 13000;
  display: none;
  align-items: flex-end;
  animation: fadeIn 0.3s ease;
}

.country-picker-modal.active {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.country-picker-content {
  background: white;
  width: 100%;
  max-height: 70vh;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }

  to {
    transform: translateY(0);
  }
}

.country-picker-header {
  padding: 20px;
  border-bottom: 1px solid #e5e5ea;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.country-picker-title {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}

.country-picker-close {
  font-size: 28px;
  color: #8E8E93;
  cursor: pointer;
  line-height: 1;
  padding: 0 8px;
}

.country-picker-search {
  padding: 12px 20px;
  border-bottom: 1px solid #e5e5ea;
}

.country-picker-search input {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid #e5e5ea;
  border-radius: 10px;
  font-size: 16px;
}

.country-picker-list {
  overflow-y: auto;
  max-height: calc(70vh - 140px);
}

.country-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  cursor: pointer;
  transition: background 0.2s ease;
  border-bottom: 1px solid #f5f5f5;
}

.country-item:active {
  background: #f8f9fa;
}

.country-item-flag {
  font-size: 28px;
  line-height: 1;
}

.country-item-info {
  flex: 1;
}

.country-item-name {
  font-size: 16px;
  font-weight: 500;
  color: #1a1a1a;
  margin: 0 0 2px;
}

.country-item-code {
  font-size: 14px;
  color: #8E8E93;
  margin: 0;
}


/* intl-tel-input integration with Framework7 */
.iti {
  width: 100%;
  display: block;
}

.iti__flag-container {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 10;
}

.iti__selected-flag {
  padding: 0 8px 0 12px;
  height: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
  background: transparent !important;
}

.iti--separate-dial-code .iti__selected-flag {
  background-color: transparent;
}

.iti--separate-dial-code .iti__selected-dial-code {
  color: #4A90E2;
  font-weight: 600;
  margin-left: 6px;
  font-size: 14px;
}

/* Dropdown styling */
.iti__country-list {
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  max-height: 300px;
  border: none;
  background: white;
  z-index: 15000 !important;
  overflow-y: auto;
}

.iti__country {
  padding: 12px 16px;
}

.iti__country:hover {
  background-color: #f8f9fa;
}

.iti__country.iti__highlight {
  background-color: #e3f2fd;
}

/* Adjust input padding for flag */
.iti input[type="tel"] {
  padding-left: 90px !important;
}

/* Fix dropdown positioning within Framework7 list items */
.item-input-wrap .iti {
  position: relative;
}

/* Arrow indicator */
.iti__arrow {
  margin-left: 4px;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid #8E8E93;
}

.iti__arrow--up {
  border-top: none;
  border-bottom: 5px solid #8E8E93;
}


/* Dashboard / Home Page Styles - Feed Style */
.page[data-name="home"] {
  background: #f5f7fa;
}

.page[data-name="home"] .page-content {
  background: #f5f7fa;
  padding-bottom: 60px;
}

/* Dashboard Navbar */
.page[data-name="home"] .navbar {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  border-bottom: none;
}

.page[data-name="home"] .navbar-bg {
  background: transparent;
}

.navbar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-text {
  font-size: 24px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.5px;
}

.navbar .right {
  display: flex;
  gap: 16px;
}

.navbar .link.icon-only {
  position: relative;
  color: white;
  width: 40px;
  height: 40px;
}

.navbar .link.icon-only i {
  font-size: 26px;
}

.navbar .badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  font-size: 11px;
  font-weight: 700;
  line-height: 18px;
  border-radius: 9px;
}

/* Stories Section */
.stories-container {
  background: white;
  border-radius: 12px;
  padding: 16px 0;
  margin: 16px 16px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Home Greeting */
.home-greeting {
  padding: 16px 20px 8px;
}

.home-greeting h2 {
  font-size: 22px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 2px;
}

.home-greeting p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

.stories-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding: 0 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.stories-scroll::-webkit-scrollbar {
  display: none;
}

.story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  cursor: pointer;
  scroll-snap-align: start;
}

.story-avatar {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.story-avatar.add-story {
  background: white;
  border: 2px dashed #4A90E2;
}

.story-avatar.add-story i {
  font-size: 28px;
  color: #4A90E2;
}

.story-avatar img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
}

.story-avatar:not(.has-story):not(.add-story) {
  background: #e5e5ea;
}

.story-name {
  font-size: 12px;
  color: #262626;
  max-width: 70px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

/* Feed Container */
.feed-container {
  margin-top: 0;
}

/* Feed Post */
.feed-post {
  background: white;
  border-radius: 12px;
  margin: 0 16px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.post-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.post-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.post-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #4A90E2;
}

.post-user-info {
  display: flex;
  flex-direction: column;
}

.post-username {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.post-specialty {
  font-size: 13px;
  color: #4A90E2;
  line-height: 1.3;
}

.post-menu {
  color: #8e8e8e;
  padding: 8px;
}

.post-menu i {
  font-size: 24px;
}

.post-content {
  padding: 0 16px 12px;
}

.post-content p {
  margin: 0;
  font-size: 14px;
  color: #262626;
  line-height: 1.5;
}

.post-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
}

.post-actions-left {
  display: flex;
  gap: 16px;
}

.post-action {
  color: #1a1a1a;
  padding: 8px 0;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.post-action i {
  font-size: 26px;
}

.post-action:active {
  color: #4A90E2;
}

.post-likes {
  padding: 0 16px 8px;
}

.post-likes span {
  font-size: 14px;
  font-weight: 600;
  color: #262626;
}

.post-time {
  padding: 0 16px 12px;
}

.post-time span {
  font-size: 12px;
  color: #8e8e8e;
  text-transform: uppercase;
}

/* Bottom Navigation (Instagram style) */
.toolbar-bottom {
  background: white;
  border-top: 1px solid #dbdbdb;
  height: 50px;
}

.toolbar-bottom .toolbar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0;
}

.toolbar-bottom .tab-link {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  color: #262626;
}

.toolbar-bottom .tab-link i {
  font-size: 26px;
}

.toolbar-bottom .tab-link-active {
  color: #4A90E2;
}

.toolbar-bottom .tab-link:active {
  opacity: 0.5;
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .feed-container {
    max-width: 614px;
    margin: 0 auto;
  }

  .feed-post {
    border-radius: 8px;
  }

  .stories-container {
    border-radius: 8px;
    margin: 24px auto;
    max-width: 614px;
  }
}


/* Bottom Toolbar Navigation */
.page[data-name="home"] .toolbar-bottom {
  background: white;
  border-top: 1px solid #e5e5ea;
  height: 50px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}

.page[data-name="home"] .toolbar-bottom .toolbar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0;
}

.page[data-name="home"] .toolbar-bottom .tab-link {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 50px;
  color: #8e8e8e;
  transition: color 0.2s ease;
}

.page[data-name="home"] .toolbar-bottom .tab-link i {
  font-size: 26px;
}

.page[data-name="home"] .toolbar-bottom .tab-link-active {
  color: #4A90E2;
}

.page[data-name="home"] .toolbar-bottom .tab-link:active {
  transform: scale(0.95);
}


/* Skeleton Loader Styles */
.skeleton-container {
  padding: 16px;
}

.skeleton-stories {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  display: flex;
  gap: 16px;
  overflow-x: auto;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skeleton-story-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.skeleton-circle {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

.skeleton-circle.skeleton-avatar {
  width: 40px;
  height: 40px;
}

.skeleton-text {
  height: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
  width: 100%;
}

.skeleton-text-small {
  width: 60px;
  height: 10px;
}

.skeleton-post {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.skeleton-post-header {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.skeleton-post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skeleton-post-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* Fade in animation for real content */
#home-content {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}