/* App Layout */
body {
  margin: 0;
  overflow-x: hidden;
}

.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--panel-bg);
  border-right: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-nav {
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  color: var(--text-muted);
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-item:hover, .nav-item.active {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-item.active {
  border-left: 3px solid var(--primary-color);
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
}

.sidebar-footer {
  padding: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Main Content */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  position: relative;
}

.topbar {
  padding: 1rem 2rem;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
}

.topbar-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.content-area {
  padding: 2rem;
  flex-grow: 1;
}

/* Mobile responsive */
.mobile-only {
  display: none;
}

@media (max-width: 1024px) {
  .mobile-only {
    display: inline-flex;
  }
  
  .sidebar {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
}

/* Grid Layouts for Views */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  padding: 1.5rem;
}

.stat-title {
  color: var(--text-muted);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
}

/* Kanban Board */
.kanban-board {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  padding-bottom: 1rem;
  height: calc(100vh - 160px);
}

.kanban-column {
  min-width: 300px;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
}

.kanban-header {
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-cards {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  overflow-y: auto;
}

.lead-card {
  background: var(--panel-bg);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  cursor: grab;
}

.lead-card:active {
  cursor: grabbing;
}

.lead-title { margin-bottom: 0.25rem; font-weight: 500; }
.lead-subtitle { font-size: 0.875rem; color: var(--text-muted); }

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

.property-card {
  padding: 0;
  overflow: hidden;
}

.property-image {
  height: 180px;
  background-color: rgba(255,255,255,0.05);
  background-size: cover;
  background-position: center;
}

.property-info {
  padding: 1.5rem;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  margin-bottom: 1rem;
}
