/* ============================================
   WENAMY MODERN DASHBOARD - Clean, Soft, Premium
   ============================================ */

/* CSS Variables */
:root {
  --dash-bg: #f8f9fc;
  --dash-surface: #ffffff;
  --dash-sidebar: #ffffff;
  --dash-primary: #0a101d;
  --dash-primary-light: #1b263b;
  --dash-text: #1e293b;
  --dash-text-secondary: #64748b;
  --dash-text-muted: #94a3b8;
  --dash-border: #e2e8f0;
  --dash-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --dash-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --dash-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --dash-radius-sm: 0.5rem;
  --dash-radius: 0.75rem;
  --dash-radius-lg: 1rem;
  --dash-radius-xl: 1.25rem;
  --dash-radius-2xl: 1.5rem;
}

/* Dashboard Section */
.account-section {
  min-height: 100vh;
  background: var(--dash-bg);
  padding-top: 0;
  overflow-x: hidden;
}

.account-container {
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hide navbar and footer when dashboard is active */
body:has(.account-section.active) .navbar,
body:has(.account-section.active) .footer {
  display: none !important;
}

body:has(.account-section.active) {
  padding-top: 0 !important;
}

/* ============================================
   SIDEBAR
   ============================================ */
.account-sidebar {
  width: 260px;
  background: var(--dash-sidebar);
  border-right: 1px solid var(--dash-border);
  padding: 1rem;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 100;
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
}

/* User Profile Card */
.account-user {
  background: linear-gradient(135deg, var(--dash-primary) 0%, var(--dash-primary-light) 100%);
  border-radius: var(--dash-radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
  color: white;
  text-align: center;
  flex-shrink: 0;
}

.account-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  backdrop-filter: blur(10px);
}

.account-avatar svg {
  width: 24px;
  height: 24px;
  color: white;
}

.account-name {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.account-email {
  font-size: 0.75rem;
  opacity: 0.9;
  word-break: break-word;
}

/* Sidebar Navigation */
.account-nav {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  flex: 1;
  min-height: 0;
}

.account-nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--dash-radius);
  background: transparent;
  border: none;
  color: var(--dash-text-secondary);
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  width: 100%;
  flex-shrink: 0;
}

.account-nav-item:hover {
  background: #f1f5f9;
  color: var(--dash-text);
}

.account-nav-item.active {
  background: var(--dash-primary);
  color: white;
  box-shadow: var(--dash-shadow);
}

.account-nav-item svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.account-logout {
  margin-top: auto;
  flex-shrink: 0;
  color: #ef4444;
}

.account-logout:hover {
  background: #fef2f2;
  color: #dc2626;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.account-main {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  min-height: calc(100vh - 80px);
}

/* Welcome Header */
.welcome-header {
  margin-bottom: 2rem;
}

.welcome-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--dash-text);
  margin-bottom: 0.5rem;
}

.welcome-header p {
  color: var(--dash-text-secondary);
  font-size: 1rem;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.5rem;
}

/* Cards */
.dash-card {
  background: var(--dash-surface);
  border-radius: var(--dash-radius-xl);
  padding: 1.5rem;
  box-shadow: var(--dash-shadow-sm);
  border: 1px solid var(--dash-border);
  transition: all 0.3s ease;
}

.dash-card:hover {
  box-shadow: var(--dash-shadow);
  transform: translateY(-2px);
}

.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.dash-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dash-text);
}

.dash-card-action {
  font-size: 0.75rem;
  color: var(--dash-primary);
  background: rgba(99, 102, 241, 0.1);
  padding: 0.375rem 0.75rem;
  border-radius: var(--dash-radius);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
}

.dash-card-action:hover {
  background: var(--dash-primary);
  color: white;
}

/* Auth section visibility - shown by default for logged-out users */
.auth-split-section {
  display: flex;
}

/* Hidden when account section is active */
.auth-split-section.hidden {
  display: none;
}

/* Stats Cards */
.stat-card {
  grid-column: span 3;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--dash-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.purple {
  background: rgba(99, 102, 241, 0.1);
  color: var(--dash-primary);
}

.stat-icon.pink {
  background: rgba(236, 72, 153, 0.1);
  color: #ec4899;
}

.stat-icon.blue {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.stat-icon.orange {
  background: rgba(249, 115, 22, 0.1);
  color: #f97316;
}

.stat-icon svg {
  width: 24px;
  height: 24px;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dash-text);
  line-height: 1;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
  margin-top: 0.25rem;
}

/* Content Cards */
.content-card {
  grid-column: span 6;
}

.content-card.wide {
  grid-column: span 8;
}

.content-card.narrow {
  grid-column: span 4;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--dash-text-secondary);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  background: #f1f5f9;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
}

.empty-state-icon svg {
  width: 32px;
  height: 32px;
  color: var(--dash-text-muted);
}

.empty-state h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dash-text);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

.btn-primary-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--dash-primary);
  color: white;
  border-radius: var(--dash-radius-lg);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.btn-primary-soft:hover {
  background: #1b263b;
  transform: translateY(-1px);
  box-shadow: var(--dash-shadow);
}

/* Property Cards */
.property-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.property-card {
  background: var(--dash-surface);
  border-radius: var(--dash-radius-xl);
  overflow: hidden;
  border: 1px solid var(--dash-border);
  transition: all 0.3s ease;
}

.property-card:hover {
  box-shadow: var(--dash-shadow-lg);
  transform: translateY(-4px);
}

.property-image {
  height: 160px;
  background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
  position: relative;
}

.property-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background: var(--dash-primary);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: var(--dash-radius);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
}

.property-favorite {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 32px;
  height: 32px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  cursor: pointer;
  box-shadow: var(--dash-shadow-sm);
  transition: all 0.2s ease;
}

.property-favorite:hover {
  background: #fef2f2;
}

.property-favorite svg {
  width: 16px;
  height: 16px;
  color: #ef4444;
}

.property-info {
  padding: 1rem;
}

.property-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--dash-text);
  margin-bottom: 0.25rem;
}

.property-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text);
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-location {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--dash-text-muted);
}

.property-location svg {
  width: 14px;
  height: 14px;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem;
  border-radius: var(--dash-radius-lg);
  background: #f8fafc;
  transition: all 0.2s ease;
}

.activity-item:hover {
  background: #f1f5f9;
}

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--dash-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.activity-icon svg {
  width: 18px;
  height: 18px;
}

.activity-content {
  flex: 1;
  min-width: 0;
}

.activity-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text);
  margin-bottom: 0.125rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--dash-text-muted);
}

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

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  background: #f8fafc;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-lg);
  text-decoration: none;
  color: var(--dash-text);
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.quick-action-btn:hover {
  background: var(--dash-primary);
  color: white;
  border-color: var(--dash-primary);
}

/* Override duplicate at end of file */
.account-section {
  display: none;
}

.account-section.active {
  display: block;
}

.quick-action-btn svg {
  width: 24px;
  height: 24px;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
  display: block;
  opacity: 1;
}

/* ============================================
   MOBILE SWIPEABLE SIDEBAR
   ============================================ */

/* Edge Indicator - visible hint that sidebar can be opened */
.sidebar-edge-indicator {
  display: none;
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 80px;
  background: var(--dash-primary);
  border-radius: 0 12px 12px 0;
  z-index: 95;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 2px 0 8px rgba(99, 102, 241, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-edge-indicator:hover {
  width: 28px;
  background: #4f46e5;
}

.sidebar-edge-indicator svg {
  width: 16px;
  height: 16px;
  color: white;
  transform: rotate(180deg);
  transition: transform 0.3s ease;
}

.sidebar-edge-indicator.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) translateX(-100%);
}

/* Swipe hint text - shows on page load for 2 seconds */
.sidebar-swipe-hint {
  display: none;
  position: fixed;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dash-primary);
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0 8px 8px 0;
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 94;
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}

.sidebar-swipe-hint.show {
  opacity: 1;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .account-sidebar {
    transform: translateX(-100%);
    box-shadow: var(--dash-shadow-lg);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
  }
  
  .account-sidebar.active {
    transform: translateX(0);
  }
  
  .account-sidebar.swiping {
    transition: none;
  }
  
  .account-main {
    margin-left: 0;
    padding: 1.5rem;
  }
  
  /* Show edge indicator on mobile */
  .sidebar-edge-indicator {
    display: flex;
  }
  
  .sidebar-swipe-hint {
    display: block;
  }
  
  .stat-card {
    grid-column: span 6;
  }
  
  .content-card,
  .content-card.wide,
  .content-card.narrow {
    grid-column: span 12;
  }
}

@media (max-width: 640px) {
  .account-section {
    padding-top: 0;
    overflow-x: hidden;
    width: 100vw;
    max-width: 100%;
  }
  
  .account-container {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .account-main {
    padding: 1rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  
  .welcome-header h1 {
    font-size: 1.5rem;
  }
  
  .dashboard-grid {
    width: 100%;
    max-width: 100%;
  }
  
  .stat-card {
    grid-column: span 12;
    width: 100%;
  }
  
  /* Fix edge indicator positioning */
  .sidebar-edge-indicator {
    width: 28px;
    height: 70px;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    flex-shrink: 0;
  }
  
  .sidebar-edge-indicator.hidden {
    transform: translateY(-50%) translateX(-100%);
  }
  
  /* Center sidebar content */
  .account-sidebar {
    width: 280px;
    max-width: 85vw;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .account-user {
    width: 100%;
    max-width: 220px;
  }
  
  .account-nav {
    width: 100%;
    align-items: center;
  }
  
  .account-nav-item {
    width: 100%;
    max-width: 220px;
    justify-content: center;
  }
  
  .dashboard-grid {
    gap: 1rem;
  }
  
  .dash-card {
    padding: 1.25rem;
  }
  
  .property-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   TAB CONTENT
   ============================================ */
.account-tab {
  animation: fadeIn 0.3s ease;
}

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

/* ============================================
   PROFILE FORM
   ============================================ */
.profile-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.profile-form-group {
  display: flex;
  flex-direction: column;
}

.profile-form-group-full {
  grid-column: span 2;
}

.profile-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--dash-text);
  margin-bottom: 0.5rem;
}

.profile-form-input,
.profile-form-select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-lg);
  font-size: 0.875rem;
  background: white;
  transition: all 0.2s;
  color: var(--dash-text);
}

.profile-form-input:focus,
.profile-form-select:focus {
  outline: none;
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.profile-form-input-readonly {
  background: #f8fafc;
  cursor: not-allowed;
}

.profile-form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

@media (max-width: 640px) {
  .profile-form-grid {
    grid-template-columns: 1fr;
  }
  
  .profile-form-group-full {
    grid-column: span 1;
  }
}

/* Profile Card */
.profile-card {
  max-width: 600px;
}

/* Saved Empty State */
.saved-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--dash-text-secondary);
}

.saved-empty svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.saved-empty h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--dash-text);
  margin-bottom: 0.5rem;
}

.saved-empty p {
  font-size: 0.875rem;
  margin-bottom: 1.5rem;
}

/* Inquiry Cards */
.inquiry-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: #f8fafc;
  border-radius: var(--dash-radius-lg);
  margin-bottom: 0.75rem;
  border: 1px solid var(--dash-border);
}

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

.inquiry-info h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--dash-text);
  margin-bottom: 0.25rem;
}

.inquiry-info p {
  font-size: 0.8125rem;
  color: var(--dash-text-muted);
}

.inquiry-status {
  padding: 0.375rem 0.75rem;
  border-radius: var(--dash-radius);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.inquiry-status.pending {
  background: #fef3c7;
  color: #92400e;
}

.inquiry-status.completed {
  background: #d1fae5;
  color: #065f46;
}

.inquiry-status.replied {
  background: #dbeafe;
  color: #1e40af;
}
