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

html, body, #root {
  height: 100%;
  width: 100%;
  overflow: hidden;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Vendor Detail Page Styles */
.vendor-detail-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.vendor-detail-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vendor-detail-page .header-left {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.vendor-detail-page .header-left > div {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.vendor-detail-page .header-left h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.vendor-detail-page .header-left p {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

.vendor-detail-page .header-actions {
  display: flex;
  gap: 0.75rem;
}

.vendor-detail-page .btn-danger {
  background-color: #dc3545;
  color: white;
  border: none;
}

.vendor-detail-page .btn-danger:hover {
  background-color: #c82333;
}

/* Detail Content Grid */
.vendor-detail-content {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
}

.detail-card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.detail-card.full-width {
  grid-column: 1 / -1;
}

.detail-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 1rem 0;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Detail Info Rows */
.detail-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.info-row svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

.info-row a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-row a:hover {
  text-decoration: underline;
}

.info-label {
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 120px;
}

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.status-active {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-inactive {
  background: #f8d7da;
  color: #721c24;
}

.status-badge.status-completed {
  background: #d4edda;
  color: #155724;
}

.status-badge.status-in-progress,
.status-badge.status-in_progress {
  background: #cfe2ff;
  color: #084298;
}

.status-badge.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-badge.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

/* Priority Badge */
.priority-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
}

.priority-badge.priority-high {
  background: #f8d7da;
  color: #721c24;
}

.priority-badge.priority-medium {
  background: #fff3cd;
  color: #856404;
}

.priority-badge.priority-low {
  background: #d1ecf1;
  color: #0c5460;
}

/* Rating Display */
.rating-display {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.rating-display .star-filled {
  color: #ffc107;
  fill: #ffc107;
}

.rating-display .star-empty {
  color: #e5e7eb;
  fill: #e5e7eb;
}

.rating-value {
  font-weight: 500;
  color: var(--text-primary);
  margin-left: 0.25rem;
}

.price-value {
  font-weight: 600;
  color: var(--primary-color);
  font-size: 1.1rem;
}

/* Specialty Tags */
.specialty-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.specialty-tag {
  padding: 0.375rem 0.75rem;
  background: #f3f4f6;
  color: #374151;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
}

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

.property-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem;
  background: #f9fafb;
  border-radius: 6px;
  color: var(--text-primary);
}

.property-item svg {
  color: var(--primary-color);
  flex-shrink: 0;
}

/* Notes */
.notes-content {
  color: var(--text-secondary);
  line-height: 1.6;
  white-space: pre-wrap;
}

/* Maintenance Table */
.maintenance-table {
  overflow-x: auto;
  margin-top: 1rem;
}

.maintenance-table table {
  width: 100%;
  border-collapse: collapse;
}

.maintenance-table th {
  text-align: left;
  padding: 0.75rem;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.maintenance-table td {
  padding: 0.75rem;
  border-bottom: 1px solid #f3f4f6;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.maintenance-table tr:hover {
  background: #f9fafb;
}

/* Performance Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: #f9fafb;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: var(--primary-color);
  color: white;
  border-radius: 8px;
  flex-shrink: 0;
}

.stat-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

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

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* No Data Message */
.no-data {
  color: var(--text-secondary);
  font-style: italic;
  padding: 1rem;
  text-align: center;
  background: #f9fafb;
  border-radius: 6px;
}

/* Loading & Error States */
.loading-message,
.error-message {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.error-message {
  color: #dc3545;
}

/* Responsive Design */
@media (max-width: 768px) {
  .vendor-detail-page {
    padding: 1rem;
  }

  .vendor-detail-page .page-header {
    flex-direction: column;
    gap: 1rem;
  }

  .vendor-detail-page .header-left {
    flex-direction: column;
    width: 100%;
  }

  .vendor-detail-page .header-actions {
    width: 100%;
  }

  .vendor-detail-page .header-actions button {
    flex: 1;
  }

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

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

  .maintenance-table {
    font-size: 0.875rem;
  }

  .maintenance-table th,
  .maintenance-table td {
    padding: 0.5rem;
  }

  .info-label {
    min-width: 100px;
  }
}
/* Messages Page - Unified Communications Hub */

.messages-container {
  display: flex;
  flex-direction: column;
  height: 100vh;
  background: var(--background);
  overflow: hidden;
  padding: 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

/* Header Bar */
.messages-header {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.5rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-title {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.header-title .icon-lg {
  color: var(--primary);
}

.header-stats {
  display: flex;
  gap: 1rem;
}

.stat-badge {
  background: var(--background);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-badge-success {
  background: rgba(34, 197, 94, 0.1);
  border-color: #22c55e;
}

.stat-badge-success .stat-number {
  color: #22c55e;
}

.stat-number {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header-btn {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 0.625rem;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-btn:hover {
  background: var(--background);
  color: var(--text-primary);
}

.btn-compose {
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.btn-compose:hover {
  background: var(--primary-dark);
}

/* Main Layout */
.messages-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  gap: 1rem;
}

/* Sidebar */
.messages-sidebar {
  width: 380px;
  background: var(--surface);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  position: relative;
  transition: width 0.3s ease;
}

.messages-sidebar.collapsed {
  width: 80px;
}

.sidebar-controls {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.search-box {
  position: relative;
  margin-bottom: 0.75rem;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-secondary);
}

.search-input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  background: var(--background);
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.filter-btn {
  width: 100%;
  padding: 0.625rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s;
  position: relative;
  color: var(--text-primary);
}

.filter-btn:hover {
  background: var(--border);
}

.filter-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 6px;
  height: 6px;
  background: var(--danger);
  border-radius: 50%;
}

.filter-panel {
  padding: 1rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.filter-group {
  margin-bottom: 0.75rem;
}

.filter-group label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.filter-group select {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: var(--surface);
  cursor: pointer;
  color: var(--text-primary);
}

/* Thread List */
.thread-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.5rem;
}

.thread-item {
  padding: 1rem;
  margin-bottom: 0.5rem;
  background: var(--surface);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid var(--border);
}

.thread-item:hover {
  background: var(--background);
  border-color: var(--primary);
}

.thread-item.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.thread-item.unread {
  border-left: 3px solid var(--info);
}

.thread-header {
  display: flex;
  gap: 0.75rem;
}

.thread-avatar {
  width: 40px;
  height: 40px;
  background: var(--background);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.thread-item.active .thread-avatar {
  background: rgba(255, 255, 255, 0.2);
}

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

.thread-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.25rem;
}

.thread-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.thread-item.active .thread-name {
  color: white;
}

.thread-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  flex-shrink: 0;
}

.thread-item.active .thread-time {
  color: rgba(255, 255, 255, 0.8);
}

.thread-middle {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.thread-property {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.thread-item.active .thread-property {
  color: rgba(255, 255, 255, 0.8);
}

.thread-language {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: #6b7280;
  padding: 0.125rem 0.375rem;
  background: #fef3c7;
  border-radius: 4px;
}

.thread-item.active .thread-language {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.thread-message {
  font-size: 0.875rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.5rem;
}

.thread-item.active .thread-message {
  color: rgba(255, 255, 255, 0.9);
}

.thread-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-badges {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.priority-badge {
  padding: 0.125rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.priority-urgent {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.priority-high {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.priority-normal {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.priority-low {
  background: var(--background);
  color: var(--text-secondary);
}

.thread-item.active .priority-badge {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.tag-badge {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.125rem 0.375rem;
  background: var(--background);
  border-radius: 4px;
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.thread-item.active .tag-badge {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

.thread-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.starred {
  color: var(--warning);
  fill: var(--warning);
}

.unread-badge {
  background: var(--info);
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.thread-item.active .unread-badge {
  background: white;
  color: var(--primary);
}

/* Sidebar Toggle */
.sidebar-toggle {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 48px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0 0.5rem 0.5rem 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.sidebar-toggle:hover {
  background: var(--background);
  color: var(--primary);
}

/* Main Message Area */
.messages-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Thread Header Bar */
.thread-header-bar {
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-header-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.thread-header-avatar {
  width: 48px;
  height: 48px;
  background: var(--primary);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.thread-header-details h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0 0 0.25rem 0;
  color: var(--text-primary);
}

.thread-header-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-type-badge {
  padding: 0.25rem 0.625rem;
  background: var(--background);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.property-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.status-badge {
  padding: 0.25rem 0.625rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
}

.status-active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.status-waiting {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.status-resolved {
  background: var(--background);
  color: var(--text-secondary);
}

.status-archived {
  background: var(--background);
  color: var(--text-secondary);
  opacity: 0.7;
}

.thread-header-actions {
  display: flex;
  gap: 0.5rem;
}

.action-btn {
  padding: 0.625rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

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

/* Messages Area */
.messages-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--background);
}

.messages-list {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.message {
  display: flex;
  gap: 0.75rem;
  max-width: 70%;
}

.message-sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-received {
  align-self: flex-start;
}

.message-avatar {
  width: 36px;
  height: 36px;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.message-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.message-bubble {
  padding: 0.875rem 1.125rem;
  border-radius: 16px;
  position: relative;
  word-wrap: break-word;
}

.message-received .message-bubble {
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-sent .message-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.translation-indicator {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.message-sent .translation-indicator {
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.message-text {
  font-size: 0.9375rem;
  line-height: 1.5;
  margin: 0;
}

.message-attachments {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(229, 231, 235, 0.5);
}

.message-sent .message-attachments {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.attachment-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.625rem;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: var(--info);
  text-decoration: none;
  transition: background 0.2s;
}

.message-sent .attachment-link {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

.attachment-link:hover {
  background: rgba(59, 130, 246, 0.2);
}

.urgency-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.6875rem;
  font-weight: 500;
  text-transform: uppercase;
}

.urgency-urgent {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.urgency-high {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.message-meta {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0 0.25rem;
}

.message-sent .message-meta {
  justify-content: flex-end;
}

.message-time {
  font-size: 0.6875rem;
  color: var(--text-secondary);
}

.message-status {
  color: var(--success);
}

/* AI Suggestions */
.ai-suggestions {
  background: rgba(245, 158, 11, 0.1);
  border-top: 1px solid var(--border);
  padding: 1rem 1.5rem;
}

.ai-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--warning);
}

.ai-header button {
  margin-left: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.25rem;
}

.suggestion-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.suggestion-chip {
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8125rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}

.suggestion-chip:hover {
  background: var(--background);
  border-color: var(--primary);
}

/* Message Input */
.message-input-container {
  padding: 1rem 1.5rem;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

.input-actions-left,
.input-actions-right {
  display: flex;
  gap: 0.375rem;
  position: relative;
}

.input-action-btn {
  padding: 0.625rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.input-action-btn:hover {
  background: var(--background);
  color: var(--primary);
}

.message-input-wrapper {
  flex: 1;
}

.message-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.9375rem;
  resize: none;
  transition: all 0.2s;
  min-height: 44px;
  max-height: 120px;
  font-family: inherit;
  background: var(--background);
  color: var(--text-primary);
}

.message-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  background: var(--surface);
}

.send-btn {
  padding: 0.75rem 1.25rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.send-btn:hover:not(:disabled) {
  background: var(--primary-dark);
}

.send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Right Panel */
.messages-panel {
  width: 320px;
  background: var(--surface);
  border-radius: 0.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  padding: 1.5rem;
}

.panel-section {
  margin-bottom: 2rem;
}

.panel-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.quick-action-btn {
  padding: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.2s;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

.activity-item {
  display: flex;
  gap: 0.75rem;
  align-items: start;
}

.activity-icon {
  width: 32px;
  height: 32px;
  background: var(--background);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--text-secondary);
}

.activity-details {
  flex: 1;
}

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

.activity-time {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: var(--background);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.add-tag-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.375rem 0.75rem;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.add-tag-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* Empty State */
.empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.empty-icon {
  width: 64px;
  height: 64px;
  color: var(--border);
  margin-bottom: 1rem;
}

.empty-state h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

/* Icon Sizes */
.icon-xs {
  width: 12px;
  height: 12px;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

/* Scrollbar Styling */
.thread-list::-webkit-scrollbar,
.messages-list::-webkit-scrollbar,
.messages-panel::-webkit-scrollbar {
  width: 6px;
}

.thread-list::-webkit-scrollbar-track,
.messages-list::-webkit-scrollbar-track,
.messages-panel::-webkit-scrollbar-track {
  background: transparent;
}

.thread-list::-webkit-scrollbar-thumb,
.messages-list::-webkit-scrollbar-thumb,
.messages-panel::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.thread-list::-webkit-scrollbar-thumb:hover,
.messages-list::-webkit-scrollbar-thumb:hover,
.messages-panel::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* Responsive Design */
@media (max-width: 1280px) {
  .messages-panel {
    display: none;
  }
}

@media (max-width: 768px) {
  .messages-sidebar {
    position: absolute;
    left: -380px;
    z-index: 50;
    transition: left 0.3s ease;
  }
  
  .messages-sidebar.open {
    left: 0;
  }
  
  .header-stats {
    display: none;
  }
  
  .message {
    max-width: 85%;
  }
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message {
  animation: slideIn 0.3s ease;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.unread-badge {
  animation: pulse 2s infinite;
}
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s ease;
}

.modal-content {
  background: var(--surface, white);
  border-radius: 0.75rem;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #111827);
}

.modal-close {
  background: none;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  color: var(--text-secondary, #6b7280);
  transition: color 0.2s;
}

.modal-close:hover {
  color: var(--text-primary, #111827);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary, #111827);
}

.form-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  transition: border-color 0.2s;
  background: var(--background, #f9fafb);
}

.form-input:focus {
  outline: none;
  border-color: var(--primary, #3b82f6);
  background: white;
}

.form-input::placeholder {
  color: var(--text-tertiary, #9ca3af);
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

.btn {
  padding: 0.625rem 1.25rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary, #3b82f6);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark, #2563eb);
}

.btn-secondary {
  background: var(--surface, white);
  color: var(--text-primary, #111827);
  border: 1px solid var(--border, #e5e7eb);
}

.btn-secondary:hover {
  background: var(--background, #f9fafb);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

/* Additional Styles */
.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--surface, white);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 100;
  min-width: 180px;
  margin-top: 0.25rem;
}

.dropdown-menu button {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary, #111827);
  transition: background 0.2s;
}

.dropdown-menu button:hover {
  background: var(--background, #f9fafb);
}

.emoji-picker {
  position: absolute;
  bottom: 100%;
  left: 0;
  background: var(--surface, white);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 0.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  padding: 0.5rem;
  display: flex;
  gap: 0.25rem;
  margin-bottom: 0.25rem;
  z-index: 100;
}

.emoji-picker button {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: background 0.2s;
}

.emoji-picker button:hover {
  background: var(--background, #f9fafb);
}

.attachments-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border, #e5e7eb);
  margin-top: 0.5rem;
}

.attachment-item {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--background, #f9fafb);
  border-radius: 0.375rem;
  font-size: 0.75rem;
  color: var(--text-secondary, #6b7280);
}

.attachment-item button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: var(--text-secondary, #6b7280);
  transition: color 0.2s;
}

.attachment-item button:hover {
  color: var(--danger, #ef4444);
}

.tag-input-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem;
  background: var(--surface, white);
  border: 1px solid var(--primary, #3b82f6);
  border-radius: 0.375rem;
}

.tag-input {
  border: none;
  outline: none;
  font-size: 0.8125rem;
  padding: 0.125rem 0.25rem;
  min-width: 100px;
  background: transparent;
}

.tag-input-wrapper button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.125rem;
  color: var(--text-secondary, #6b7280);
  display: flex;
  align-items: center;
}

.tag-input-wrapper button:hover {
  color: var(--primary, #3b82f6);
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary, #111827);
  cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
  cursor: pointer;
}

.thread-header-actions {
  position: relative;
}

/* Lease Details Page Styles */
.lease-details-page,
.property-details-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  margin-bottom: 2rem;
}

.property-details-header {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

.property-main-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.property-title-section {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.property-title-section h1 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.5rem 0;
}

.property-address {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

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

.property-status {
  padding: 0.375rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: capitalize;
}

.property-status.status-active {
  background: #d4edda;
  color: #155724;
}

.property-status.status-draft {
  background: #e2e3e5;
  color: #383d41;
}

.property-status.status-expiring {
  background: #fff3cd;
  color: #856404;
}

.property-status.status-expired {
  background: #f8d7da;
  color: #721c24;
}

.property-status.status-pending {
  background: #cfe2ff;
  color: #084298;
}

.property-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  border-radius: 8px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 0.75rem;
  color: #4f46e5;
}

.stat-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}

.tabs-container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.tabs {
  display: flex;
  border-bottom: 1px solid #e5e7eb;
  background: #f9fafb;
}

.tab {
  flex: 1;
  padding: 1rem;
  background: none;
  border: none;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  text-align: center;
}

.tab:hover {
  background: rgba(79, 70, 229, 0.05);
}

.tab.active {
  color: #4f46e5;
  background: white;
}

.tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #4f46e5;
}

.tab-content {
  padding: 1.5rem;
  background: white;
}

.details-section {
  padding: 1rem;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.detail-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
}

.detail-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.detail-value {
  font-size: 0.875rem;
  color: #111827;
  text-align: right;
}

.detail-value a {
  color: #4f46e5;
  text-decoration: none;
}

.detail-value a:hover {
  text-decoration: underline;
}

.additional-info {
  margin-top: 2rem;
}

.info-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
  margin-bottom: 1rem;
}

.info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.75rem;
}

.info-card p {
  font-size: 0.875rem;
  color: #374151;
  line-height: 1.5;
}

.loading-message,
.error-message {
  text-align: center;
  padding: 3rem;
  color: #6b7280;
  font-size: 0.875rem;
}

.payments-section {
  padding: 2rem;
  text-align: center;
  color: #6b7280;
}

/* Ensure buttons match the rest of the app */
.btn.btn-danger {
  background-color: #ef4444;
  border-color: #ef4444;
  color: white;
}

.btn.btn-danger:hover {
  background-color: #dc2626;
  border-color: #dc2626;
}

/* Documents Section */
.documents-section {
  padding: 1rem;
}

.documents-section .detail-card {
  background: #f9fafb;
  border-radius: 8px;
  padding: 1.25rem;
  border: 1px solid #e5e7eb;
}

.documents-section .detail-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
}

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

.documents-section .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.documents-section .form-group select {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--background);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s;
}

.documents-section .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}
/* Amenity Management Styles */
.amenity-management-page {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.page-header h1 {
  margin: 0 0 8px;
  font-size: 1.875rem;
  color: #111827;
}

.page-header p {
  margin: 0;
  color: #6b7280;
}

.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.property-select {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #374151;
  background: white;
  min-width: 200px;
}

/* Tabs */
.amenity-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.amenity-tabs .tab-btn {
  padding: 12px 24px;
  background: transparent;
  border: none;
  color: #6b7280;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  transition: color 0.2s;
}

.amenity-tabs .tab-btn:hover {
  color: #374151;
}

.amenity-tabs .tab-btn.active {
  color: #3b82f6;
}

.amenity-tabs .tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: #3b82f6;
}

/* Amenities Grid */
.amenities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.amenity-card {
  background: white;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

.amenity-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.amenity-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.amenity-icon {
  width: 48px;
  height: 48px;
  background: #eff6ff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #3b82f6;
}

.amenity-info {
  flex: 1;
}

.amenity-info h3 {
  margin: 0 0 4px;
  font-size: 1.125rem;
  color: #111827;
}

.amenity-type {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
  text-transform: capitalize;
}

.amenity-status {
  display: flex;
  align-items: center;
}

/* Toggle Switch */
.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #10b981;
}

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

.amenity-details {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: #6b7280;
}

.detail-item svg {
  color: #9ca3af;
}

.amenity-description {
  margin: 12px 0;
  color: #4b5563;
  font-size: 0.875rem;
  line-height: 1.5;
}

.amenity-actions {
  display: flex;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

/* Bookings Section */
.bookings-section {
  background: white;
  border-radius: 12px;
  padding: 20px;
}

.bookings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.date-picker {
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #374151;
}

.booking-stats {
  display: flex;
  gap: 32px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 600;
  color: #111827;
}

.stat-label {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Timeline View */
.bookings-timeline {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-amenity {
  border-left: 2px solid #e5e7eb;
  padding-left: 20px;
  position: relative;
}

.timeline-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.timeline-header::before {
  content: '';
  position: absolute;
  left: -26px;
  width: 12px;
  height: 12px;
  background: #3b82f6;
  border-radius: 50%;
  border: 2px solid white;
}

.timeline-header h4 {
  margin: 0;
  font-size: 1rem;
  color: #111827;
}

.timeline-slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.booking-slot {
  background: #f9fafb;
  border-radius: 8px;
  padding: 12px;
  border-left: 3px solid;
}

.slot-time {
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}

.slot-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.875rem;
}

.guests {
  color: #6b7280;
  font-size: 0.75rem;
}

.slot-purpose {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 8px;
}

.slot-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.status-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-badge.confirmed {
  background: #d1fae5;
  color: #065f46;
}

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

.status-badge.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.no-bookings {
  padding: 20px;
  text-align: center;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Modal Styles */
.amenity-modal {
  max-width: 700px;
  max-height: 90vh;
  overflow-y: auto;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 0.875rem;
}

.form-group textarea {
  resize: vertical;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-label input {
  width: auto;
}

/* Empty State */
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
}

.empty-state svg {
  color: #d1d5db;
  margin-bottom: 16px;
}

.empty-state h3 {
  margin: 0 0 8px;
  color: #6b7280;
}

.empty-state p {
  margin: 0;
  color: #9ca3af;
  font-size: 0.875rem;
}

/* Responsive */
@media (max-width: 768px) {
  .amenity-management-page {
    padding: 16px;
  }

  .page-header {
    flex-direction: column;
    gap: 16px;
  }

  .header-actions {
    width: 100%;
  }

  .property-select {
    flex: 1;
  }

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

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

  .booking-stats {
    flex-direction: column;
    gap: 12px;
  }
}
/* ================================= */
/* Design System Variables           */
/* ================================= */

:root {
  /* Brand Colors */
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-light: #818cf8;
  --secondary: #64748b;
  --secondary-dark: #475569;
  --secondary-light: #94a3b8;
  
  /* Semantic Colors */
  --success: #22c55e;
  --success-dark: #16a34a;
  --success-light: #86efac;
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-light: #fbbf24;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-light: #fca5a5;
  --info: #3b82f6;
  --info-dark: #2563eb;
  --info-light: #93c5fd;
  
  /* Neutral Colors */
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Layout Colors */
  --background: #f8fafc;
  --surface: #ffffff;
  --surface-hover: #f9fafb;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --text-disabled: #9ca3af;
  --border: #e2e8f0;
  --border-hover: #cbd5e1;
  
  /* Component Specific */
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-hover: rgba(255, 255, 255, 0.05);
  --sidebar-active: #4f46e5;
  --sidebar-border: rgba(255, 255, 255, 0.1);
  
  /* Spacing Scale */
  --space-xs: 0.25rem;   /* 4px */
  --space-sm: 0.5rem;    /* 8px */
  --space-md: 1rem;      /* 16px */
  --space-lg: 1.5rem;    /* 24px */
  --space-xl: 2rem;      /* 32px */
  --space-2xl: 3rem;     /* 48px */
  --space-3xl: 4rem;     /* 64px */
  
  /* Typography Scale */
  --text-xs: 0.75rem;    /* 12px */
  --text-sm: 0.875rem;   /* 14px */
  --text-base: 1rem;     /* 16px */
  --text-lg: 1.125rem;   /* 18px */
  --text-xl: 1.25rem;    /* 20px */
  --text-2xl: 1.5rem;    /* 24px */
  --text-3xl: 1.875rem;  /* 30px */
  --text-4xl: 2.25rem;   /* 36px */
  
  /* Font Weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Border Radius */
  --radius-sm: 0.25rem;  /* 4px */
  --radius-md: 0.5rem;   /* 8px */
  --radius-lg: 0.75rem;  /* 12px */
  --radius-xl: 1rem;     /* 16px */
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 300ms ease;
  
  /* Z-index Scale */
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
  --z-toast: 700;
  
  /* Breakpoints (for reference in JS) */
  --breakpoint-sm: 640px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 1024px;
  --breakpoint-xl: 1280px;
  --breakpoint-2xl: 1536px;
}

/* Dark Mode Variables (if needed in future) */
@media (prefers-color-scheme: dark) {
  :root.dark-mode {
    --background: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --border: #334155;
    --border-hover: #475569;
  }
}
/* ================================= */
/* CSS Reset & Base Styles           */
/* ================================= */

/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Remove default margin and padding */
body,
h1, h2, h3, h4, h5, h6,
p, figure, blockquote, dl, dd {
  margin: 0;
  padding: 0;
}

/* Set core root defaults */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--background);
  color: var(--text-primary);
}

/* Remove list styles */
ul[role='list'],
ol[role='list'] {
  list-style: none;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
  color: var(--primary);
}

/* Make images easier to work with */
img,
picture,
video,
canvas,
svg {
  max-width: 100%;
  display: block;
  height: auto;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

/* Remove all animations and transitions for people who prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Remove default button styles */
button {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* Remove default fieldset styles */
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}

/* Remove default table spacing */
table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* Ensure full height for app container */
html, body, #root {
  height: 100%;
  width: 100%;
}

/* Focus styles */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection styles */
::selection {
  background-color: var(--primary);
  color: white;
}

/* Scrollbar styles */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-md);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gray-500);
}
/* ================================= */
/* Button Components                 */
/* ================================= */

/* Base Button Styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* Button Variants */
.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text-primary);
  border-color: var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--gray-50);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
}

.btn-danger:hover:not(:disabled) {
  background: var(--danger-dark);
  border-color: var(--danger-dark);
}

.btn-success {
  background: var(--success);
  color: white;
  border-color: var(--success);
}

.btn-success:hover:not(:disabled) {
  background: var(--success-dark);
  border-color: var(--success-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}

.btn-ghost:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Button Sizes */
.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--text-xs);
}

.btn-lg {
  padding: var(--space-md) var(--space-xl);
  font-size: var(--text-base);
}

/* Icon Button */
.btn-icon {
  padding: var(--space-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.btn-icon:hover:not(:disabled) {
  background: var(--gray-100);
  color: var(--primary);
}

/* Button States */
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-loading {
  color: transparent;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid currentColor;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.6s linear infinite;
}

/* Button Group */
.btn-group {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

.btn-group-vertical {
  flex-direction: column;
  width: 100%;
}

.btn-group-vertical .btn {
  width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .btn {
    padding: var(--space-sm) var(--space-md);
    min-height: 44px; /* Touch target size */
  }
  
  .btn-lg {
    padding: var(--space-md) var(--space-lg);
  }
  
  .btn-icon {
    min-width: 44px;
    min-height: 44px;
  }
  
  /* Full width on mobile by default */
  .btn-mobile-full {
    width: 100%;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn-group .btn {
    width: 100%;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:active {
    transform: scale(0.98);
  }
}

/* Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
/* ================================= */
/* Card Components                   */
/* ================================= */

/* Base Card */
.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--space-lg);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

/* Card Variants */
.card-bordered {
  border: 1px solid var(--border);
  box-shadow: none;
}

.card-flat {
  box-shadow: none;
  border: 1px solid var(--border);
}

.card-raised {
  box-shadow: var(--shadow-lg);
}

/* Card Header */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-lg);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.card-header.no-border {
  border-bottom: none;
  padding-bottom: 0;
}

.card-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: var(--space-xs);
}

.card-actions {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
}

/* Card Body */
.card-body {
  padding: 0;
}

.card-body.padded {
  padding: var(--space-lg);
}

/* Card Footer */
.card-footer {
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-footer.no-border {
  border-top: none;
  padding-top: 0;
}

/* Stat Card */
.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  gap: var(--space-md);
  min-height: 120px;
  transition: all var(--transition-base);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

/* Color Variants */
.stat-blue .stat-icon {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.stat-green .stat-icon {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.stat-yellow .stat-icon {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.stat-red .stat-icon {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.stat-purple .stat-icon {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

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

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-value {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-xs);
  line-height: 1;
}

.stat-change {
  font-size: var(--text-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.stat-change.positive {
  color: var(--success);
}

.stat-change.negative {
  color: var(--danger);
}

/* Feature Card */
.feature-card {
  text-align: center;
  padding: var(--space-xl);
  cursor: pointer;
  transition: all var(--transition-base);
}

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

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  border-radius: var(--radius-lg);
}

.feature-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
}

.feature-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Profile Card */
.profile-card {
  text-align: center;
  padding: var(--space-xl);
}

.profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  margin: 0 auto var(--space-md);
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-full);
}

.profile-name {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-xs);
}

.profile-role {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
}

.profile-stats {
  display: flex;
  justify-content: space-around;
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
}

.profile-stat {
  text-align: center;
}

.profile-stat-value {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  display: block;
}

.profile-stat-label {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  text-transform: uppercase;
}

/* List Card */
.list-card {
  padding: 0;
}

.list-card-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.list-card-item {
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-base);
  cursor: pointer;
}

.list-card-item:last-child {
  border-bottom: none;
}

.list-card-item:hover {
  background: var(--gray-50);
}

.list-card-item-content {
  flex: 1;
  min-width: 0;
}

.list-card-item-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-xs);
}

.list-card-item-subtitle {
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.list-card-item-action {
  flex-shrink: 0;
  color: var(--text-secondary);
}

/* Timeline Card */
.timeline-card {
  padding: var(--space-lg);
}

.timeline-item {
  position: relative;
  padding-left: calc(var(--space-xl) + var(--space-sm));
  margin-bottom: var(--space-lg);
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 24px;
  bottom: calc(-1 * var(--space-lg));
  width: 2px;
  background: var(--border);
}

.timeline-item:last-child::before {
  display: none;
}

.timeline-marker {
  position: absolute;
  left: 8px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 2px solid var(--primary);
}

.timeline-content {
  background: var(--gray-50);
  padding: var(--space-md);
  border-radius: var(--radius-md);
}

.timeline-time {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.timeline-title {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  margin-bottom: var(--space-xs);
}

.timeline-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border-radius: var(--radius-md);
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
  }
  
  .card-title {
    font-size: var(--text-lg);
  }
  
  .card-footer {
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
  }
  
  .stat-card {
    min-height: auto;
    padding: var(--space-md);
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
  }
  
  .stat-value {
    font-size: var(--text-2xl);
  }
  
  .feature-card {
    padding: var(--space-lg);
  }
  
  .feature-icon {
    width: 48px;
    height: 48px;
  }
  
  .profile-avatar {
    width: 60px;
    height: 60px;
  }
  
  .list-card-item {
    padding: var(--space-sm) var(--space-md);
  }
}

/* Small Mobile */
@media (max-width: 374px) {
  .card {
    padding: var(--space-sm);
  }
  
  .stat-value {
    font-size: var(--text-xl);
  }
}
/* ================================= */
/* Form Components                   */
/* ================================= */

/* Form Container */
.form-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  box-shadow: var(--shadow-sm);
}

/* Form Groups */
.form-group {
  margin-bottom: var(--space-lg);
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
}

.form-row {
  display: flex;
  gap: var(--space-lg);
}

.form-col {
  flex: 1;
  min-width: 0;
}

/* Labels */
label {
  display: block;
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

label.required::after {
  content: ' *';
  color: var(--danger);
}

.label-helper {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  font-weight: var(--font-normal);
  margin-top: var(--space-xs);
}

/* Input Base Styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
select,
textarea {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-family: inherit;
  background: var(--surface);
  color: var(--text-primary);
  transition: all var(--transition-base);
}

/* Focus States */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Disabled State */
input:disabled,
select:disabled,
textarea:disabled {
  background: var(--gray-50);
  color: var(--text-disabled);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Read-only State */
input:read-only,
textarea:read-only {
  background: var(--gray-50);
  cursor: default;
}

/* Placeholder */
input::placeholder,
textarea::placeholder {
  color: var(--gray-400);
}

/* Textarea */
textarea {
  min-height: 100px;
  resize: vertical;
}

textarea.no-resize {
  resize: none;
}

/* Select */
select {
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%2712%27 viewBox=%270 0 12 12%27%3E%3Cpath fill=%27%236b7280%27 d=%27M10.293 3.293 6 7.586 1.707 3.293A1 1 0 0 0 .293 4.707l5 5a1 1 0 0 0 1.414 0l5-5a1 1 0 1 0-1.414-1.414z%27/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-md) center;
  padding-right: calc(var(--space-md) * 2.5);
  appearance: none;
}

select[multiple] {
  background-image: none;
  padding-right: var(--space-md);
}

/* Checkboxes and Radios */
.form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--space-sm);
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: auto;
  margin-right: var(--space-sm);
  margin-top: 0.25em;
  flex-shrink: 0;
}

.form-check label {
  margin-bottom: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.form-check-inline {
  display: inline-flex;
  margin-right: var(--space-lg);
}

/* Switch Toggle */
.form-switch {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

.switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--gray-300);
  transition: var(--transition-base);
  border-radius: var(--radius-full);
}

.switch-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: var(--transition-base);
  border-radius: 50%;
}

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

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

/* Input Groups */
.input-group {
  display: flex;
  align-items: stretch;
}

.input-group input {
  border-radius: 0;
  flex: 1;
}

.input-group-prepend,
.input-group-append {
  display: flex;
  align-items: center;
  padding: var(--space-sm) var(--space-md);
  background: var(--gray-50);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.input-group-prepend {
  border-right: 0;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group-append {
  border-left: 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group input:first-child {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.input-group input:last-child {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.input-group input:not(:first-child):not(:last-child) {
  border-radius: 0;
}

/* File Input */
input[type="file"] {
  padding: var(--space-xs);
  font-size: var(--text-sm);
}

.file-input-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  left: -9999px;
}

.file-input-label {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
  cursor: pointer;
}

.file-input-label:hover {
  border-color: var(--primary);
  background: var(--gray-50);
}

/* Form Validation */
.form-group.has-error input,
.form-group.has-error select,
.form-group.has-error textarea {
  border-color: var(--danger);
}

.form-group.has-error input:focus,
.form-group.has-error select:focus,
.form-group.has-error textarea:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-group.has-success input,
.form-group.has-success select,
.form-group.has-success textarea {
  border-color: var(--success);
}

.form-group.has-success input:focus,
.form-group.has-success select:focus,
.form-group.has-success textarea:focus {
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-error {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--danger);
}

.form-success {
  display: block;
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--success);
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.form-actions-right {
  justify-content: flex-end;
}

.form-actions-center {
  justify-content: center;
}

.form-actions-between {
  justify-content: space-between;
}

/* Search Input */
.search-input {
  position: relative;
}

.search-input input {
  padding-left: calc(var(--space-md) * 2.5);
}

.search-input-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

/* Range Input */
input[type="range"] {
  width: 100%;
  height: 6px;
  background: var(--gray-200);
  border-radius: var(--radius-full);
  outline: none;
  appearance: none;
}

input[type="range"]::-webkit-slider-thumb {
  appearance: none;
  width: 20px;
  height: 20px;
  background: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-base);
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.2);
  box-shadow: var(--shadow-md);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .form-container {
    padding: var(--space-lg);
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .form-row {
    flex-direction: column;
  }
  
  .form-actions {
    flex-direction: column-reverse;
  }
  
  .form-actions button {
    width: 100%;
  }
  
  /* Larger touch targets on mobile */
  input,
  select,
  textarea {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }
  
  .form-check input[type="checkbox"],
  .form-check input[type="radio"] {
    min-width: 20px;
    min-height: 20px;
  }
}
/* ================================= */
/* Modal Components                  */
/* ================================= */

/* Modal Backdrop */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-xl);
  opacity: 0;
  animation: fadeIn var(--transition-base) forwards;
}

.modal-backdrop.closing {
  animation: fadeOut var(--transition-base) forwards;
}

/* Modal Container */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-xl);
}

/* Modal Content */
.modal-content {
  background: var(--surface);
  border-radius: var(--radius-lg);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-xl);
  transform: scale(0.9);
  opacity: 0;
  animation: modalIn var(--transition-base) forwards;
}

.modal-content.closing {
  animation: modalOut var(--transition-base) forwards;
}

/* Modal Sizes */
.modal-sm .modal-content {
  max-width: 400px;
}

.modal-lg .modal-content {
  max-width: 800px;
}

.modal-xl .modal-content {
  max-width: 1200px;
}

.modal-full .modal-content {
  max-width: calc(100vw - var(--space-xl) * 2);
  max-height: calc(100vh - var(--space-xl) * 2);
}

/* Modal Header */
.modal-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  padding: var(--space-xs);
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-base);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Modal Body */
.modal-body {
  padding: var(--space-lg);
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
}

.modal-body::-webkit-scrollbar {
  width: 6px;
}

.modal-body::-webkit-scrollbar-track {
  background: var(--gray-100);
}

.modal-body::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-sm);
}

/* Modal Footer */
.modal-footer {
  padding: var(--space-lg);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.modal-footer-left {
  justify-content: flex-start;
}

.modal-footer-center {
  justify-content: center;
}

.modal-footer-between {
  justify-content: space-between;
}

/* Dialog Modal */
.modal-dialog {
  text-align: center;
}

.modal-dialog-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
}

.modal-dialog-icon.success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.modal-dialog-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.modal-dialog-icon.danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.modal-dialog-icon.info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.modal-dialog-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  margin-bottom: var(--space-sm);
}

.modal-dialog-message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Drawer Modal */
.modal-drawer {
  padding: 0;
  justify-content: flex-end;
}

.modal-drawer .modal-content {
  max-width: 400px;
  height: 100vh;
  max-height: 100vh;
  border-radius: 0;
  animation: slideInRight var(--transition-base) forwards;
}

.modal-drawer.left {
  justify-content: flex-start;
}

.modal-drawer.left .modal-content {
  animation: slideInLeft var(--transition-base) forwards;
}

.modal-drawer.closing .modal-content {
  animation: slideOutRight var(--transition-base) forwards;
}

.modal-drawer.left.closing .modal-content {
  animation: slideOutLeft var(--transition-base) forwards;
}

/* Bottom Sheet Modal */
.modal-bottom-sheet {
  padding: 0;
  align-items: flex-end;
}

.modal-bottom-sheet .modal-content {
  max-width: 100%;
  width: 100%;
  max-height: 90vh;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  animation: slideInUp var(--transition-base) forwards;
}

.modal-bottom-sheet.closing .modal-content {
  animation: slideOutDown var(--transition-base) forwards;
}

/* Modal Animations */
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
  }
}

@keyframes modalIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes modalOut {
  to {
    opacity: 0;
    transform: scale(0.9);
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutRight {
  to {
    transform: translateX(100%);
  }
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

@keyframes slideOutLeft {
  to {
    transform: translateX(-100%);
  }
}

@keyframes slideInUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes slideOutDown {
  to {
    transform: translateY(100%);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .modal,
  .modal-backdrop {
    padding: var(--space-md);
  }
  
  .modal-content {
    width: 100%;
    max-width: calc(100vw - var(--space-xl));
    margin: var(--space-md);
    max-height: calc(100vh - var(--space-xl));
  }
  
  .modal-header {
    padding: var(--space-md);
    position: sticky;
    top: 0;
    background: var(--surface);
    z-index: 10;
  }
  
  .modal-body {
    padding: var(--space-md);
  }
  
  .modal-footer {
    padding: var(--space-md);
    flex-direction: column-reverse;
    gap: var(--space-sm);
    position: sticky;
    bottom: 0;
    background: var(--surface);
  }
  
  .modal-footer button {
    width: 100%;
  }
  
  /* Full screen modals on mobile */
  .modal-lg .modal-content,
  .modal-xl .modal-content {
    max-width: 100%;
    max-height: 100%;
    height: 100vh;
    border-radius: 0;
  }
  
  /* Drawer takes full screen */
  .modal-drawer .modal-content {
    max-width: 100%;
    width: 100%;
  }
  
  /* Bottom sheet with handle */
  .modal-bottom-sheet .modal-content::before {
    content: '';
    position: absolute;
    top: var(--space-sm);
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--gray-300);
    border-radius: var(--radius-full);
  }
}

/* Small Mobile */
@media (max-width: 374px) {
  .modal,
  .modal-backdrop {
    padding: 0;
  }
  
  .modal-content {
    max-width: 100%;
    max-height: 100%;
    height: 100vh;
    border-radius: 0;
  }
}
/* ================================= */
/* Table Components                  */
/* ================================= */

/* Base Table Styles */
.table-container {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  background: var(--surface);
  border-collapse: collapse;
}

/* Table Header */
thead {
  background: var(--gray-50);
  border-bottom: 2px solid var(--border);
}

th {
  padding: var(--space-md) var(--space-lg);
  text-align: left;
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

th.sortable {
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  transition: color var(--transition-base);
}

th.sortable:hover {
  color: var(--text-primary);
}

th.sortable.sorted {
  color: var(--primary);
}

/* Table Body */
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color var(--transition-base);
}

tbody tr:last-child {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--gray-50);
}

tbody tr.selected {
  background: rgba(79, 70, 229, 0.05);
}

td {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-primary);
}

/* Table Variants */
.table-striped tbody tr:nth-child(even) {
  background: var(--gray-50);
}

.table-compact th,
.table-compact td {
  padding: var(--space-sm) var(--space-md);
}

.table-bordered {
  border: 1px solid var(--border);
}

.table-bordered th,
.table-bordered td {
  border: 1px solid var(--border);
}

/* Table Actions */
.table-actions {
  display: flex;
  gap: var(--space-xs);
  align-items: center;
}

.table-action-btn {
  padding: var(--space-xs);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.table-action-btn:hover {
  background: var(--gray-100);
  color: var(--primary);
  border-color: var(--border);
}

/* Empty State */
.table-empty {
  padding: var(--space-2xl) var(--space-xl);
  text-align: center;
  color: var(--text-secondary);
}

.table-empty-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto var(--space-md);
  color: var(--gray-400);
}

.table-empty-title {
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-xs);
}

.table-empty-description {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* Table Pagination */
.table-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-md) var(--space-lg);
  border-top: 1px solid var(--border);
  background: var(--gray-50);
}

.pagination-info {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.pagination-controls {
  display: flex;
  gap: var(--space-xs);
}

.pagination-btn {
  padding: var(--space-xs) var(--space-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: all var(--transition-base);
}

.pagination-btn:hover:not(:disabled) {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Responsive Tables */
.table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Mobile Card View */
@media (max-width: 768px) {
  /* Hide table on mobile */
  .table-mobile-cards table {
    display: none;
  }
  
  /* Show mobile cards */
  .mobile-table-cards {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .mobile-table-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    position: relative;
  }
  
  .mobile-table-card:hover {
    box-shadow: var(--shadow-md);
  }
  
  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
  }
  
  .mobile-card-title {
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
  }
  
  .mobile-card-badge {
    padding: var(--space-xs) var(--space-sm);
    background: var(--gray-100);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
  }
  
  .mobile-card-body {
    display: grid;
    gap: var(--space-sm);
  }
  
  .mobile-card-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--text-sm);
  }
  
  .mobile-card-label {
    color: var(--text-secondary);
    font-weight: var(--font-medium);
  }
  
  .mobile-card-value {
    color: var(--text-primary);
    text-align: right;
  }
  
  .mobile-card-actions {
    display: flex;
    gap: var(--space-sm);
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border);
  }
  
  .mobile-card-actions button {
    flex: 1;
  }
  
  /* Pagination mobile */
  .table-pagination {
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
  }
  
  .pagination-info {
    text-align: center;
  }
  
  .pagination-controls {
    justify-content: center;
  }
}

/* Loading State */
.table-loading {
  position: relative;
  min-height: 200px;
}

.table-loading::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Skeleton Loading */
.table-skeleton {
  animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
  100% {
    opacity: 1;
  }
}
/* Template Editor Styles */
.template-editor {
  max-height: 60vh;
  overflow-y: auto;
}

.rooms-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.room-section {
  background: var(--gray-50);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-md);
}

.room-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.room-header h3 {
  flex: 1;
  margin: 0;
  cursor: pointer;
  font-size: var(--text-lg);
  font-weight: var(--font-semibold);
}

.room-header h3:hover {
  color: var(--primary);
}

.room-toggle {
  background: transparent;
  border: none;
  padding: var(--space-xs);
  cursor: pointer;
  color: var(--text-secondary);
  transition: color var(--transition-base);
}

.room-toggle:hover {
  color: var(--text-primary);
}

.room-actions {
  display: flex;
  gap: var(--space-xs);
}

.items-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding-left: var(--space-xl);
}

.item-row {
  display: grid;
  grid-template-columns: 1fr 2fr auto auto auto;
  gap: var(--space-sm);
  align-items: center;
  padding: var(--space-sm);
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.item-row:hover {
  border-color: var(--border-hover);
}

.item-name {
  font-weight: var(--font-medium);
  color: var(--text-primary);
}

.item-description {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.item-row input[type="text"] {
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}

.item-row input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
}

.item-row label {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-size: var(--text-sm);
  white-space: nowrap;
}

.badge {
  background: var(--primary-light);
  color: var(--primary);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
}

.add-room-form {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--gray-50);
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
}

.add-room-form input {
  flex: 1;
  padding: var(--space-sm);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.add-room-btn {
  width: 100%;
  padding: var(--space-md);
  border: 2px dashed var(--border);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  color: var(--text-secondary);
  transition: all var(--transition-base);
}

.add-room-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .item-row {
    grid-template-columns: 1fr;
    gap: var(--space-xs);
  }
  
  .items-list {
    padding-left: var(--space-md);
  }
}
/* ================================= */
/* Navigation & Layout Components    */
/* ================================= */

/* Main Layout Structure */
.layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
  transition: all var(--transition-slow);
}

.sidebar-header {
  padding: var(--space-lg);
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.sidebar-header h2 {
  color: white;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  margin: 0;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  color: white;
  text-decoration: none;
}

.sidebar-logo img {
  width: 32px;
  height: 32px;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: var(--space-xs);
  border-radius: var(--radius-sm);
  transition: all var(--transition-base);
}

.sidebar-close:hover {
  background: var(--sidebar-hover);
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: var(--space-md) 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: var(--space-lg);
}

.nav-section-title {
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  color: var(--sidebar-text);
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all var(--transition-base);
  position: relative;
  white-space: nowrap;
  font-size: var(--text-sm);
}

.nav-item:hover {
  background: var(--sidebar-hover);
  color: white;
}

.nav-item.active {
  background: rgba(79, 70, 229, 0.1);
  color: white;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sidebar-active);
}

.nav-item-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.nav-item-badge {
  margin-left: auto;
  padding: 2px 6px;
  background: var(--primary);
  color: white;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
}

/* Sidebar Footer */
.sidebar-footer {
  padding: var(--space-md);
  border-top: 1px solid var(--sidebar-border);
  margin-top: auto;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  color: var(--sidebar-text);
  transition: all var(--transition-base);
}

.sidebar-user:hover {
  background: var(--sidebar-hover);
}

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--gray-600);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: white;
}

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

.sidebar-user-name {
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: white;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-role {
  font-size: var(--text-xs);
  color: var(--sidebar-text);
  opacity: 0.8;
}

/* Main Content Area */
.main-content {
  flex: 1;
  overflow-y: auto;
  height: 100vh;
  background: var(--background);
  padding: 0;
  position: relative;
}

.main-content main {
  padding: var(--space-xl);
}

/* Top Navigation Bar */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.topbar-search {
  position: relative;
  width: 300px;
}

.topbar-search input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  padding-left: calc(var(--space-md) * 2.5);
  background: var(--gray-50);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  transition: all var(--transition-base);
}

.topbar-search input:focus {
  background: var(--surface);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.topbar-search-icon {
  position: absolute;
  left: var(--space-md);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  pointer-events: none;
}

/* Notification Bell */
.notification-bell {
  position: relative;
}

.notification-bell-btn {
  position: relative;
  padding: var(--space-sm);
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
}

.notification-bell-btn:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.notification-bell-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: var(--radius-full);
  border: 2px solid var(--surface);
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
}

.breadcrumb-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.breadcrumb-link {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition-base);
}

.breadcrumb-link:hover {
  color: var(--primary);
}

.breadcrumb-separator {
  color: var(--gray-400);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: var(--font-medium);
}

/* Tabs Navigation */
.tabs {
  display: flex;
  gap: var(--space-sm);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-xl);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tabs::-webkit-scrollbar {
  height: 4px;
}

.tabs::-webkit-scrollbar-track {
  background: var(--border);
}

.tabs::-webkit-scrollbar-thumb {
  background: var(--gray-400);
  border-radius: var(--radius-sm);
}

.tab {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
  flex-shrink: 0;
}

.tab:hover {
  color: var(--text-primary);
}

.tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-icon {
  margin-right: var(--space-xs);
}

/* Pills Navigation */
.pills {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-xs);
  background: var(--gray-100);
  border-radius: var(--radius-md);
}

.pill {
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: none;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  white-space: nowrap;
}

.pill:hover {
  background: rgba(0, 0, 0, 0.05);
  color: var(--text-primary);
}

.pill.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: var(--space-md);
  left: var(--space-md);
  z-index: var(--z-sticky);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm);
  box-shadow: var(--shadow-md);
  cursor: pointer;
}

/* Sidebar Overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: calc(var(--z-modal) - 1);
}

/* Mobile Responsive - Defined in responsive.css */
/* ================================= */
/* Responsive Layout System          */
/* ================================= */

/* Container */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 640px) {
  .container { max-width: 640px; }
}

@media (min-width: 768px) {
  .container { max-width: 768px; }
}

@media (min-width: 1024px) {
  .container { max-width: 1024px; }
}

@media (min-width: 1280px) {
  .container { max-width: 1280px; }
}

/* ================================= */
/* Mobile First Responsive System    */
/* ================================= */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
  /* Grid adjustments */
  .stats-grid,
  .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* Mobile (max-width: 767px) */
@media (max-width: 767px) {
  /* Layout */
  .layout {
    position: relative;
  }

  /* Mobile Navigation */
  .mobile-menu-toggle {
    display: block !important;
    position: fixed;
    top: var(--space-md);
    left: var(--space-md);
    z-index: var(--z-sticky);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    box-shadow: var(--shadow-md);
  }

  /* Sidebar Mobile */
  .sidebar {
    position: fixed;
    left: -100%;
    top: 0;
    bottom: 0;
    width: 280px;
    z-index: var(--z-modal);
    transition: left var(--transition-slow);
    box-shadow: var(--shadow-xl);
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay {
    display: block !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-overlay);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-slow);
  }

  .sidebar-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  .sidebar-close {
    display: block !important;
  }

  /* Main Content */
  .main-content {
    width: 100%;
    padding-top: 60px;
  }

  .main-content main {
    padding: var(--space-md);
  }

  /* Page Headers */
  .page-header {
    flex-direction: column;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
  }

  .page-header h1 {
    font-size: var(--text-2xl);
  }

  .header-actions {
    width: 100%;
    flex-direction: column;
    gap: var(--space-sm);
  }

  .header-actions .btn {
    width: 100%;
  }

  /* Grid Systems */
  .stats-grid,
  .dashboard-grid,
  .cards-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  /* Cards */
  .card {
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-sm);
  }

  .card-header h2 {
    font-size: var(--text-lg);
  }

  /* Tables - Convert to Cards */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-mobile-cards {
    display: block;
  }

  .table-mobile-cards table {
    display: none;
  }

  .mobile-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-md);
  }

  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    padding-bottom: var(--space-sm);
    border-bottom: 1px solid var(--border);
  }

  .mobile-card-body {
    display: grid;
    gap: var(--space-sm);
  }

  .mobile-card-item {
    display: flex;
    justify-content: space-between;
    font-size: var(--text-sm);
  }

  .mobile-card-label {
    color: var(--text-secondary);
  }

  /* Forms */
  .form-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .form-row {
    flex-direction: column;
    gap: var(--space-md);
  }

  .form-group {
    width: 100%;
  }

  input,
  select,
  textarea {
    width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: var(--space-sm);
    min-height: 44px;
  }

  /* Modals */
  .modal {
    padding: var(--space-md);
  }

  .modal-content {
    width: calc(100% - var(--space-xl));
    margin: var(--space-md);
    max-height: calc(100vh - var(--space-xl));
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--space-md);
  }

  .modal-footer {
    flex-direction: column-reverse;
    gap: var(--space-sm);
  }

  .modal-footer button {
    width: 100%;
  }

  /* Tabs */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: var(--space-xs);
    padding-bottom: var(--space-sm);
  }

  .tabs::-webkit-scrollbar {
    height: 4px;
  }

  .tab {
    white-space: nowrap;
    padding: var(--space-sm) var(--space-md);
    font-size: var(--text-sm);
    flex-shrink: 0;
  }

  /* Dropdowns */
  .dropdown-menu {
    position: fixed;
    left: var(--space-md);
    right: var(--space-md);
    width: auto;
    max-width: none;
  }

  /* Stats */
  .stat-card {
    min-height: auto;
    padding: var(--space-md);
  }

  .stat-value {
    font-size: var(--text-2xl);
  }

  /* Messages */
  .messages-container {
    height: calc(100vh - 120px);
  }

  .messages-list {
    width: 100%;
    border-right: none;
  }

  .message-detail {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface);
    z-index: var(--z-modal);
  }

  .message-detail.active {
    display: block;
  }

  /* Filters */
  .filters-container {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .search-input,
  .filter-select {
    width: 100%;
  }
}

/* Small Mobile (max-width: 374px) */
@media (max-width: 374px) {
  .sidebar {
    width: 100%;
  }

  .page-header h1 {
    font-size: var(--text-xl);
  }

  .stat-value {
    font-size: var(--text-xl);
  }

  .card {
    padding: var(--space-sm);
  }

  .btn {
    padding: var(--space-xs) var(--space-sm);
    font-size: var(--text-xs);
  }
}

/* Landscape Mobile */
@media (max-width: 767px) and (orientation: landscape) {
  .sidebar {
    width: 240px;
  }

  .main-content {
    padding-top: 48px;
  }

  .card {
    padding: var(--space-sm);
  }
}

/* Utility Classes for Responsive */
@media (max-width: 767px) {
  .hide-mobile { display: none !important; }
  .show-mobile { display: block !important; }
  .text-center-mobile { text-align: center !important; }
  .full-width-mobile { width: 100% !important; }
  .stack-mobile { flex-direction: column !important; }
  .no-padding-mobile { padding: 0 !important; }
  .small-padding-mobile { padding: var(--space-sm) !important; }
  .small-text-mobile { font-size: var(--text-sm) !important; }
}

@media (min-width: 768px) {
  .hide-desktop { display: none !important; }
  .show-desktop { display: block !important; }
}

/* Print Styles */
@media print {
  .sidebar,
  .mobile-menu-toggle,
  .header-actions,
  .btn-group,
  .tabs,
  .no-print {
    display: none !important;
  }

  .main-content {
    padding: 0 !important;
  }

  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}
/* ================================= */
/* Main Style Entry Point            */
/* All styles are now modularized    */
/* ================================= */

/* Base Styles - Order matters! */

/* Component Styles */

/* Layout & Responsive */

/* ================================= */
/* Page-Specific Styles              */
/* ================================= */

/* Page Container */
.dashboard,
.properties-page,
.residents-page,
.leases-page,
.leads-page,
.financials-page,
.vendors-page,
.maintenance-page,
.settings-page {
  padding: var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

/* Page Headers */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
  gap: var(--space-md);
}

.page-header h1 {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.page-header p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

.header-actions {
  display: flex;
  gap: var(--space-md);
  align-items: center;
}

/* Grid Systems */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg);
}

/* ================================= */
/* Component Helpers                 */
/* ================================= */

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-success {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.status-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.status-error,
.status-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.status-info {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.status-pending {
  background: rgba(100, 116, 139, 0.1);
  color: var(--secondary);
}

/* Priority Badges */
.priority-badge {
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
}

.priority-badge.high {
  background: #fee2e2;
  color: #dc2626;
}

.priority-badge.medium {
  background: #fed7aa;
  color: #ea580c;
}

.priority-badge.low {
  background: #dbeafe;
  color: #2563eb;
}

/* Loading States */
.spinner {
  animation: spin 1s linear infinite;
  border: 3px solid var(--gray-200);
  border-top: 3px solid var(--primary);
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.loading-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: var(--space-2xl) var(--space-xl);
  color: var(--text-secondary);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-lg);
  color: var(--gray-400);
}

.empty-state-title {
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state-description {
  font-size: var(--text-sm);
  margin-bottom: var(--space-lg);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Dropdown Menus */
.dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--space-xs);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  min-width: 200px;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all var(--transition-base);
}

.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-item {
  display: block;
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  text-align: left;
  background: transparent;
  border: none;
  color: var(--text-primary);
  font-size: var(--text-sm);
  cursor: pointer;
  transition: background var(--transition-base);
}

.dropdown-item:hover {
  background: var(--gray-50);
}

.dropdown-divider {
  height: 1px;
  margin: var(--space-xs) 0;
  background: var(--border);
}

/* ================================= */
/* Utility Classes                   */
/* ================================= */

/* Text Alignment */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Text Colors */
.text-primary { color: var(--text-primary); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-info { color: var(--info); }

/* Font Weights */
.font-normal { font-weight: var(--font-normal); }
.font-medium { font-weight: var(--font-medium); }
.font-semibold { font-weight: var(--font-semibold); }
.font-bold { font-weight: var(--font-bold); }

/* Spacing - Margin */
.m-0 { margin: 0; }
.mt-1 { margin-top: var(--space-xs); }
.mt-2 { margin-top: var(--space-sm); }
.mt-3 { margin-top: var(--space-md); }
.mt-4 { margin-top: var(--space-lg); }
.mt-5 { margin-top: var(--space-xl); }

.mb-1 { margin-bottom: var(--space-xs); }
.mb-2 { margin-bottom: var(--space-sm); }
.mb-3 { margin-bottom: var(--space-md); }
.mb-4 { margin-bottom: var(--space-lg); }
.mb-5 { margin-bottom: var(--space-xl); }

.ml-1 { margin-left: var(--space-xs); }
.ml-2 { margin-left: var(--space-sm); }
.ml-3 { margin-left: var(--space-md); }
.ml-4 { margin-left: var(--space-lg); }

.mr-1 { margin-right: var(--space-xs); }
.mr-2 { margin-right: var(--space-sm); }
.mr-3 { margin-right: var(--space-md); }
.mr-4 { margin-right: var(--space-lg); }

/* Spacing - Padding */
.p-0 { padding: 0; }
.p-1 { padding: var(--space-xs); }
.p-2 { padding: var(--space-sm); }
.p-3 { padding: var(--space-md); }
.p-4 { padding: var(--space-lg); }
.p-5 { padding: var(--space-xl); }

/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }
.flex-1 { flex: 1; }
.flex-grow { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

/* Gap */
.gap-1 { gap: var(--space-xs); }
.gap-2 { gap: var(--space-sm); }
.gap-3 { gap: var(--space-md); }
.gap-4 { gap: var(--space-lg); }
.gap-5 { gap: var(--space-xl); }

/* Display */
.hidden { display: none; }
.block { display: block; }
.inline-block { display: inline-block; }
.inline { display: inline; }

/* Width */
.w-full { width: 100%; }
.w-auto { width: auto; }

/* Height */
.h-full { height: 100%; }
.h-auto { height: auto; }

/* Border Radius */
.rounded-sm { border-radius: var(--radius-sm); }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadows */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-xl { box-shadow: var(--shadow-xl); }
.shadow-none { box-shadow: none; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-Index */
.z-0 { z-index: 0; }
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }
.cursor-wait { cursor: wait; }

/* User Select */
.select-none { 
  -webkit-user-select: none;
  user-select: none; 
}
.select-text { 
  -webkit-user-select: text;
  user-select: text; 
}
.select-all { 
  -webkit-user-select: all;
  user-select: all; 
}

/* Transitions */
.transition-all { transition: all var(--transition-base); }
.transition-none { transition: none; }
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --secondary: #64748b;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --background: #f8fafc;
  --surface: #ffffff;
  --text-primary: #1e293b;
  --text-secondary: #64748b;
  --border: #e2e8f0;
  --sidebar-bg: #1e293b;
  --sidebar-text: #cbd5e1;
  --sidebar-active: #4f46e5;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--background);
  color: var(--text-primary);
}

/* Layout */
.layout {
  display: flex;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.sidebar {
  width: 260px;
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  height: 100vh;
  flex-shrink: 0;
  overflow-y: auto;
}

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

.sidebar-header h2 {
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
}

.sidebar-close {
  display: none;
  background: transparent;
  border: none;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1001;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.5rem;
  color: var(--text-primary);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  color: var(--sidebar-text);
  text-decoration: none;
  transition: all 0.2s;
  position: relative;
  white-space: nowrap;
}

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

.nav-item.active {
  background: rgba(79, 70, 229, 0.1);
  color: white;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--sidebar-active);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  height: 100vh;
  background: var(--background);
  padding: 0;
  position: relative;
}

/* Admin Header */
.admin-header {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 999;
}

/* Page Container */
.dashboard,
.properties-page,
.residents-page,
.leases-page,
.leads-page,
.financials-page,
.vendors-page,
.maintenance-page,
.settings-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 768px) {
  .dashboard,
  .properties-page,
  .residents-page,
  .leases-page,
  .leads-page,
  .financials-page,
  .vendors-page,
  .maintenance-page,
  .settings-page {
    padding: 1rem;
  }
}

/* Page Headers */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.page-header > div:first-child {
  flex: 1;
  min-width: 200px;
}

.page-header h1 {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  color: var(--text-primary);
}

.page-header p {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}

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

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--background);
}

.btn-danger {
  background: #dc2626;
  color: white;
  border: 1px solid #dc2626;
}

.btn-danger:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  background: var(--background);
}

.btn-icon {
  padding: 0.5rem;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

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

.units-table .btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.units-table .btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

/* Cards */
.card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1.25rem;
}

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

.card-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

/* Dashboard Specific */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  min-height: 120px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(79, 70, 229, 0.1);
  color: var(--primary);
}

.stat-blue .stat-icon { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.stat-green .stat-icon { background: rgba(34, 197, 94, 0.1); color: #22c55e; }
.stat-purple .stat-icon { background: rgba(168, 85, 247, 0.1); color: #a855f7; }
.stat-emerald .stat-icon { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.stat-red .stat-icon { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.stat-content {
  flex: 1;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.25rem;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-change {
  font-size: 0.875rem;
  color: var(--success);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

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

.activity-item {
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.activity-description {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

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

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

.task-item {
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.task-title {
  font-size: 0.875rem;
  margin-bottom: 0.25rem;
}

.task-due {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.priority-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.priority-badge.high { background: #fee2e2; color: #dc2626; }
.priority-badge.medium { background: #fed7aa; color: #ea580c; }
.priority-badge.low { background: #dbeafe; color: #2563eb; }

.occupancy-stats {
  padding: 1rem 0;
}

.occupancy-item {
  margin-bottom: 1rem;
}

.occupancy-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.occupancy-value {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.occupancy-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 0.25rem;
}

.occupancy-fill {
  height: 100%;
  background: var(--success);
  transition: width 0.3s;
}

.occupancy-percentage {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Messages Page */
.messages-page,
.maintenance-page {
  padding: 2rem;
}

.messages-page .tabs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.messages-page .tab {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-content {
  padding: 1.5rem;
}

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

.setting-item {
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.setting-info h3 {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.setting-info p {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-active {
  background: #dcfce7;
  color: #16a34a;
}

.status-paused {
  background: #f3f4f6;
  color: #6b7280;
}

.stat-change {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.stat-change.positive {
  color: #16a34a;
}

/* Properties Page */
.filters-bar {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.search-box {
  flex: 1;
  min-width: 250px;
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0 1rem;
}

.search-box input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.75rem;
  font-size: 0.875rem;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0 1rem;
}

.filter-group select {
  border: none;
  outline: none;
  padding: 0.75rem;
  font-size: 0.875rem;
  background: transparent;
}

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

.property-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.property-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.status-active { background: #dcfce7; color: #16a34a; }
.status-maintenance { background: #fed7aa; color: #ea580c; }
.status-pending { background: #fef3c7; color: #d97706; }

.property-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.property-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
}

.property-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.property-stats {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.property-stats .stat {
  text-align: center;
}

.property-stats .stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.25rem;
}

.property-stats .stat-value {
  font-size: 1.125rem;
  font-weight: 600;
}

.property-actions {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

/* Tables */
.table-container {
  background: var(--surface);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--background);
  padding: 1rem;
  text-align: left;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr.table-row-clickable {
  transition: background-color 0.2s;
}

.data-table tbody tr.table-row-clickable:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

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

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.resident-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.status-badge.status-active { background: #dcfce7; color: #16a34a; }
.status-badge.status-late { background: #fee2e2; color: #dc2626; }
.status-badge.status-pending { background: #fef3c7; color: #d97706; }

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.unit-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.unit-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.property-name {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.lease-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lease-item {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.lease-end {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.rent-amount {
  font-weight: 600;
  color: var(--primary);
}

.payment-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.badge-success { background: #dcfce7; color: #16a34a; }
.badge-warning { background: #fef3c7; color: #d97706; }
.badge-danger { background: #fee2e2; color: #dc2626; }

.summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.summary-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.summary-card h3 {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.summary-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

/* Leads Page */
.leads-pipeline {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.pipeline-stage {
  flex: 1;
  min-width: 150px;
  padding: 1rem;
  background: var(--surface);
  border-radius: 0.5rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pipeline-stage h3 {
  font-size: 0.875rem;
  font-weight: 600;
}

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

.lead-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lead-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.lead-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lead-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.priority-icon {
  font-size: 1rem;
}

.status-new { background: #dbeafe; color: #2563eb; }
.status-contacted { background: #e0e7ff; color: #6366f1; }
.status-qualified { background: #ede9fe; color: #8b5cf6; }
.status-tour { background: #fce7f3; color: #ec4899; }
.status-negotiating { background: #fed7aa; color: #ea580c; }
.status-closed { background: #dcfce7; color: #16a34a; }
.status-lost { background: #fee2e2; color: #dc2626; }

.lead-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.lead-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.info-row strong {
  color: var(--text-secondary);
}

.lead-notes {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 0.5rem;
  margin-bottom: 1rem;
}

.lead-notes p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-style: italic;
}

.lead-footer {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.footer-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.lead-actions {
  display: flex;
  gap: 0.75rem;
}

.leads-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.leads-stats .stat-card {
  text-align: center;
}

.stat-description {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Financials Page */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.metric-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.metric-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 1.875rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.metric-change {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.metric-change.up { color: var(--success); }
.metric-change.down { color: var(--danger); }

.financial-content {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.transactions-section {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.section-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
}

.transaction-table {
  width: 100%;
  border-collapse: collapse;
}

.transaction-table th {
  text-align: left;
  padding: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  border-bottom: 2px solid var(--border);
}

.transaction-table td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--border);
}

.category-badge {
  padding: 0.25rem 0.5rem;
  background: var(--background);
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.amount {
  font-weight: 600;
}

.amount.income { color: var(--success); }
.amount.expense { color: var(--danger); }

.status-completed { background: #dcfce7; color: #16a34a; }
.status-pending { background: #fef3c7; color: #d97706; }

.expense-breakdown {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.breakdown-info {
  display: flex;
  justify-content: space-between;
  font-size: 0.875rem;
}

.breakdown-category {
  font-weight: 500;
}

.breakdown-amount {
  color: var(--text-secondary);
}

.breakdown-bar {
  height: 8px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.breakdown-fill {
  height: 100%;
  background: var(--primary);
}

.breakdown-percentage {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.financial-summary {
  margin-top: 2rem;
}

.cash-flow {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.flow-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.flow-value {
  font-weight: 600;
}

.flow-item.income .flow-value { color: var(--success); }
.flow-item.expense .flow-value { color: var(--danger); }
.flow-item.net { background: var(--primary); color: white; }
.flow-item.net .flow-value { color: white; }

.flow-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 0;
}

/* Property Details Page */
.property-details-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.property-details-header {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.property-main-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

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

.property-title-section {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.property-title-section svg {
  color: var(--primary);
  margin-top: 0.25rem;
}

.property-title-section h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.property-address {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.property-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--background);
  border-radius: 8px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: white;
  border-radius: 8px;
}

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

.property-description {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.property-description h3 {
  margin-bottom: 1rem;
}

.property-description p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.property-meta {
  display: flex;
  gap: 2rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.units-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.section-header h2 {
  font-size: 1.5rem;
}

.units-summary {
  display: flex;
  gap: 2rem;
}

.summary-item {
  font-size: 0.9rem;
  font-weight: 500;
}

.summary-item.occupied {
  color: var(--success);
}

.summary-item.vacant {
  color: var(--warning);
}

.summary-item.maintenance {
  color: var(--danger);
}

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

.unit-card {
  background: var(--background);
  border-radius: 8px;
  padding: 1.5rem;
  border: 2px solid var(--border);
  transition: all 0.3s ease;
}

.unit-card:hover {
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.unit-card.status-occupied {
  border-left: 4px solid var(--success);
}

.unit-card.status-vacant {
  border-left: 4px solid var(--warning);
}

.unit-card.status-maintenance {
  border-left: 4px solid var(--danger);
}

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

.unit-header h4 {
  font-size: 1.1rem;
}

.unit-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  text-transform: capitalize;
}

.status-icon {
  display: flex;
  align-items: center;
}

.status-icon.occupied {
  color: var(--success);
}

.status-icon.vacant {
  color: var(--warning);
}

.status-icon.maintenance {
  color: var(--danger);
}

.unit-details {
  margin-bottom: 1rem;
}

.unit-info-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.unit-info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.info-value {
  font-weight: 500;
}

.tenant-info {
  background: var(--surface);
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
}

.tenant-info h5 {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
}

.tenant-name {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.lease-dates {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.unit-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

.error-message {
  text-align: center;
  padding: 2rem;
  color: var(--danger);
}

/* Vendors Page */
.vendors-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.vendors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.5rem;
}

.vendor-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  position: relative;
}

.vendor-status {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
}

.vendor-status.status-active { background: #dcfce7; color: #16a34a; }
.vendor-status.status-inactive { background: #f3f4f6; color: #6b7280; }
.vendor-status.status-pending { background: #fef3c7; color: #d97706; }

.vendor-header {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.vendor-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.vendor-title h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.vendor-category {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.vendor-rating {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.stars {
  display: flex;
  gap: 0.125rem;
}

.star-filled {
  color: #fbbf24;
  fill: #fbbf24;
}

.star-empty {
  color: #e5e7eb;
  fill: #e5e7eb;
}

.rating-value {
  font-weight: 600;
}

.jobs-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.vendor-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.vendor-metrics {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.metric {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
}

.metric-value {
  font-size: 0.875rem;
  font-weight: 600;
}

.vendor-specialties {
  margin-bottom: 1rem;
}

.specialties-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

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

.specialty-tag {
  padding: 0.25rem 0.5rem;
  background: var(--background);
  border-radius: 0.25rem;
  font-size: 0.75rem;
}

.vendor-footer {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.last-job {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 1rem;
}

.vendor-actions {
  display: flex;
  gap: 0.75rem;
}

.vendor-categories {
  margin-top: 2rem;
}

.vendor-categories h2 {
  margin-bottom: 1rem;
}

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

.category-card {
  background: var(--surface);
  padding: 1.5rem;
  border-radius: 0.75rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.category-card h4 {
  margin-bottom: 0.5rem;
}

.category-count {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Settings Page */
.settings-container {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  background: var(--surface);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.settings-sidebar {
  background: var(--background);
  padding: 1.5rem 0;
}

.settings-tab {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
  transition: all 0.2s;
}

.settings-tab:hover {
  background: var(--surface);
  color: var(--text-primary);
}

.settings-tab.active {
  background: var(--surface);
  color: var(--primary);
  border-left: 3px solid var(--primary);
}

.settings-content {
  padding: 2rem;
}

.settings-panel h2 {
  margin-bottom: 1.5rem;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  outline: none;
}

.form-input:focus {
  border-color: var(--primary);
}

.notification-section {
  margin-bottom: 2rem;
}

.notification-section h3 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

.toggle-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.toggle-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.toggle-label {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.toggle-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 24px;
}

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

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

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

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

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

.security-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.security-description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

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

.session-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.session-device {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.session-location {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.appearance-section {
  margin-bottom: 2rem;
}

.theme-options {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.theme-option {
  flex: 1;
  cursor: pointer;
}

.theme-option input {
  display: none;
}

.theme-preview {
  display: block;
  width: 100%;
  height: 100px;
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  margin-bottom: 0.5rem;
  position: relative;
  overflow: hidden;
}

.theme-preview.light {
  background: white;
}

.theme-preview.dark {
  background: #1e293b;
}

.theme-preview.auto {
  background: linear-gradient(90deg, white 50%, #1e293b 50%);
}

.preview-header {
  display: block;
  width: 100%;
  height: 20px;
  background: rgba(0, 0, 0, 0.1);
}

.preview-content {
  display: block;
  width: 80%;
  height: 10px;
  background: rgba(0, 0, 0, 0.05);
  margin: 10px;
}

.theme-option input:checked + .theme-preview {
  border-color: var(--primary);
}

.theme-option span {
  display: block;
  text-align: center;
  font-size: 0.875rem;
}

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

.integration-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: var(--background);
  border-radius: 0.5rem;
}

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

.integration-icon {
  width: 48px;
  height: 48px;
  border-radius: 0.5rem;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.integration-item h3 {
  margin-bottom: 0.25rem;
}

.integration-item p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.status-connected {
  background: #dcfce7;
  color: #16a34a;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  margin-top: 0.5rem;
  display: inline-block;
}

.date-range-select {
  padding: 0.625rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  background: var(--surface);
  cursor: pointer;
}

/* Maintenance Page Styles */
.maintenance-page .maintenance-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.maintenance-page .stat-card.urgent-requests {
  background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
}

.maintenance-page .stat-icon.urgent {
  background: #ef4444;
  color: white;
}

.maintenance-page .stat-icon.pending {
  background: #f59e0b;
  color: white;
}

.maintenance-page .stat-icon.in-progress {
  background: #3b82f6;
  color: white;
}

.maintenance-page .stat-icon.completed {
  background: #22c55e;
  color: white;
}

.cost-metrics-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.cost-metrics-row .metric-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.cost-metrics-row .metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}

.cost-metrics-row .metric-title {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.cost-metrics-row .metric-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cost-metrics-row .metric-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.cost-metrics-row .trend-icon {
  color: var(--text-secondary);
}

.cost-metrics-row .trend-icon.up {
  color: #ef4444;
}

.cost-metrics-row .trend-icon.down {
  color: #22c55e;
}

.maintenance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.25rem;
}

.maintenance-card {
  background: var(--surface);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  border-left: 4px solid transparent;
}

.maintenance-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.maintenance-card.priority-urgent {
  border-left-color: #ef4444;
}

.maintenance-card.priority-high {
  border-left-color: #f59e0b;
}

.maintenance-card.priority-medium {
  border-left-color: #3b82f6;
}

.maintenance-card.priority-low {
  border-left-color: #6b7280;
}

.maintenance-card .card-header {
  padding: 1rem 1.25rem;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.maintenance-card .header-badges {
  display: flex;
  gap: 0.5rem;
}

.maintenance-card .priority-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.maintenance-card .priority-urgent {
  background: #fee2e2;
  color: #dc2626;
}

.maintenance-card .priority-high {
  background: #fed7aa;
  color: #ea580c;
}

.maintenance-card .priority-medium {
  background: #dbeafe;
  color: #2563eb;
}

.maintenance-card .priority-low {
  background: #f3f4f6;
  color: #6b7280;
}

.maintenance-card .category-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
}

.maintenance-card .status-indicator {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.875rem;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  text-transform: capitalize;
  font-weight: 500;
}

/* Status color coding */
.maintenance-card .status-indicator.status-open,
.maintenance-card .status-indicator.status-pending {
  background-color: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.maintenance-card .status-indicator.status-in-progress,
.maintenance-card .status-indicator.status-in_progress {
  background-color: #dbeafe;
  color: #1e40af;
  border: 1px solid #60a5fa;
}

.maintenance-card .status-indicator.status-completed {
  background-color: #d1fae5;
  color: #065f46;
  border: 1px solid #34d399;
}

.maintenance-card .status-indicator.status-cancelled {
  background-color: #fee2e2;
  color: #991b1b;
  border: 1px solid #fca5a5;
}

.maintenance-card .card-body {
  padding: 1.25rem;
}

.maintenance-card .card-body h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.maintenance-card .description {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.maintenance-card .info-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 8px;
  margin-bottom: 1rem;
}

.maintenance-card .info-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.maintenance-card .info-group svg {
  color: var(--text-secondary);
}

.maintenance-card .property-name {
  font-weight: 500;
}

.maintenance-card .timeline-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.maintenance-card .timeline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.maintenance-card .timeline-item {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

.maintenance-card .timeline-item.completed {
  color: #22c55e;
}

.maintenance-card .days-badge {
  padding: 0.25rem 0.5rem;
  background: var(--background);
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 500;
}

.maintenance-card .days-badge.overdue {
  background: #fee2e2;
  color: #ef4444;
}

.maintenance-card .cost-info {
  padding: 0.75rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border-radius: 8px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.maintenance-card .cost-info strong {
  color: var(--primary);
  font-size: 1rem;
}

.maintenance-card .notes-section {
  padding: 0.75rem;
  background: var(--background);
  border-radius: 8px;
}

.maintenance-card .notes-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.maintenance-card .note-item {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin-left: 0.5rem;
}

.maintenance-card .card-footer {
  padding: 1rem 1.25rem;
  background: var(--background);
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* New Dashboard Styles */
.top-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-box-large {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.75rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stat-box-large .stat-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  color: var(--primary);
}

.stat-box-large h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.stat-main-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.stat-breakdown {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.breakdown-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.breakdown-value {
  font-size: 1.5rem;
  font-weight: 600;
}

.breakdown-value.occupied {
  color: var(--success);
}

.breakdown-value.pre-leased {
  color: var(--info);
}

.breakdown-value.vacant {
  color: var(--warning);
}

.stat-subtext {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.collection-rate {
  padding-top: 1rem;
}

.rate-bar {
  height: 10px;
  background: var(--border);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.rate-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--success) 0%, var(--primary) 100%);
  transition: width 0.3s ease;
}

.rate-percentage {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-align: center;
  display: block;
}

/* Operations Overview Section */
.operations-section {
  margin-bottom: 2rem;
}

.tabs {
  display: flex;
  flex-direction: column;
}

.tab-list {
  display: flex;
  gap: 0.5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: 0;
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.tab-button {
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-button:hover {
  color: var(--text-primary);
}

.tab-button.active {
  color: var(--primary);
}

.tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.tab-count {
  background: var(--background);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
}

.tab-button.active .tab-count {
  background: var(--primary);
  color: white;
}

.tab-content {
  min-height: 300px;
}

.operations-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.operation-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.operation-item:hover {
  background: var(--border);
}

.operation-item.clickable {
  cursor: pointer;
  transition: all 0.2s ease;
}

.operation-item.clickable:hover {
  background: #f0f9ff;
  transform: translateX(4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.operation-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.operation-title {
  font-weight: 500;
  color: var(--text-primary);
}

.operation-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.operation-status {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.operation-status.vacant {
  background: #fef3c7;
  color: #d97706;
}

.operation-status.delinquent {
  background: #fee2e2;
  color: #dc2626;
}

.operation-date {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.operation-amount {
  font-weight: 600;
  color: var(--primary);
}

/* Historical Performance Section */
.historical-section {
  margin-bottom: 2rem;
}

.historical-section h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.historical-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.historical-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.historical-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

.chart-container {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  height: 150px;
  padding: 1rem 0;
}

.chart-bar-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.bar-wrapper {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 100px;
}

.bar {
  width: 60%;
  border-radius: 4px 4px 0 0;
  transition: height 0.3s ease;
}

.vacancy-bar {
  background: linear-gradient(180deg, #fbbf24 0%, #f59e0b 100%);
}

.turnover-bar {
  background: linear-gradient(180deg, #fb7185 0%, #f43f5e 100%);
}

.bar-label {
  font-size: 0.625rem;
  color: var(--text-secondary);
}

.bar-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.noi-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.noi-total {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.noi-trend {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--success);
  font-weight: 500;
}

.trend-up {
  color: var(--success);
}

.chart-line-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chart-line-item:last-child {
  border-bottom: none;
}

.line-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.line-value {
  font-weight: 500;
  color: var(--text-primary);
}

/* NOI Vertical Chart */
.noi-chart-container {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  max-height: 200px;
  overflow-y: auto;
}

.noi-bar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
}

.noi-month {
  min-width: 35px;
  color: var(--text-secondary);
  font-weight: 500;
}

.noi-bar-wrapper {
  flex: 1;
  height: 20px;
  background: var(--border);
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}

.noi-bar {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.5rem;
  transition: width 0.3s ease;
  min-width: fit-content;
}

.noi-value {
  font-size: 0.625rem;
  color: white;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 0.5rem;
}

/* Action Items Section */
.action-items-section {
  margin-bottom: 2rem;
}

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

.action-count {
  background: var(--danger);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 600;
}

.action-items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.action-category h3 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.category-count {
  background: var(--background);
  padding: 0.125rem 0.5rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-left: auto;
}

.action-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.action-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--background);
  border-radius: 0.5rem;
}

.action-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.action-title {
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.action-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.action-button {
  padding: 0.375rem 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.action-button:hover {
  background: var(--primary-dark);
}

.action-button.approve {
  background: var(--success);
}

.action-button.approve:hover {
  background: #16a34a;
}

/* Legal and Risk Section */
.legal-risk-section {
  margin-bottom: 2rem;
}

.legal-risk-section .card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

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

.risk-category {
  padding: 1.25rem;
  background: var(--background);
  border-radius: 0.5rem;
  text-align: center;
}

.risk-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.risk-icon {
  font-size: 1.25rem;
}

.risk-icon.critical {
  color: var(--danger);
}

.risk-icon.warning {
  color: var(--warning);
}

.risk-icon.info {
  color: var(--info);
}

.risk-count {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.risk-status {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.no-data {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

/* Portal Status Badge */
.portal-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.portal-status-badge.active {
  background: #c6f6d5;
  color: #22543d;
}

/* Edit Resident Page */
.edit-resident-page {
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.edit-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
}

.edit-header h1 {
  font-size: 1.5rem;
  color: var(--text-primary);
  margin: 0;
}

.edit-form {
  background: var(--background);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.form-section {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--background);
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

/* Responsive Design */
@media (max-width: 1200px) {
  .financial-content {
    grid-template-columns: 1fr;
  }
  
  .vendors-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
  
  .maintenance-grid {
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  }
  
  .historical-grid {
    grid-template-columns: 1fr;
  }
  
  .action-items-grid {
    grid-template-columns: 1fr;
  }
  
  .risk-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .top-stats-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  /* Mobile Navigation */
  .layout {
    position: relative;
  }
  
  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .sidebar-overlay {
    display: block;
  }
  
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    width: 280px;
    max-width: 85vw;
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .sidebar-close {
    display: block;
  }
  
  .main-content {
    width: 100%;
    padding-top: 60px;
  }
  
  /* Mobile Page Containers */
  .dashboard,
  .properties-page,
  .residents-page,
  .leases-page,
  .leads-page,
  .financials-page,
  .vendors-page,
  .settings-page {
    padding: 0 1rem 1rem 1rem;
  }
  
  /* Mobile Headers */
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
  }
  
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .header-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .header-actions button,
  .header-actions select {
    width: 100%;
  }
  
  /* Mobile Grids */
  .stats-grid,
  .metrics-grid,
  .summary-cards,
  .vendors-stats,
  .leads-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .properties-grid,
  .leads-grid,
  .vendors-grid,
  .maintenance-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .cost-metrics-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Mobile Pipeline */
  .leads-pipeline {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .pipeline-stage {
    min-width: 100%;
  }
  
  /* Mobile Settings */
  .settings-container {
    grid-template-columns: 1fr;
    border-radius: 0;
  }
  
  .settings-sidebar {
    display: flex;
    overflow-x: auto;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0;
  }
  
  .settings-tab {
    padding: 1rem;
    white-space: nowrap;
    border-left: none;
    border-bottom: 3px solid transparent;
  }
  
  .settings-tab.active {
    border-left: none;
    border-bottom-color: var(--primary);
  }
  
  .settings-content {
    padding: 1rem;
  }
  
  /* Mobile Tables */
  .table-container {
    overflow-x: auto;
    margin: 0 -1rem;
    padding: 0 1rem;
  }
  
  .data-table {
    min-width: 650px;
    font-size: 0.875rem;
  }
  
  .data-table th,
  .data-table td {
    padding: 0.75rem 0.5rem;
  }
  
  /* Mobile Forms */
  .filters-bar {
    flex-direction: column;
  }
  
  .search-box,
  .filter-group {
    width: 100%;
  }
  
  /* Mobile Cards */
  .property-card,
  .lead-card,
  .vendor-card {
    padding: 1rem;
  }
  
  .property-actions,
  .lead-actions,
  .vendor-actions {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .property-actions button,
  .lead-actions button,
  .vendor-actions button {
    width: 100%;
  }
  
  /* Mobile Buttons */
  .btn {
    padding: 0.75rem 1rem;
    width: 100%;
    justify-content: center;
  }
  
  .page-header .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  /* Extra small screens */
  .page-header h1 {
    font-size: 1.25rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .card {
    padding: 1rem;
  }
  
  .theme-options {
    flex-direction: column;
  }
  
  .category-grid {
    grid-template-columns: 1fr;
  }
}

/* Authentication Styles */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.auth-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  padding: 40px;
  width: 100%;
  max-width: 400px;
}

.auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-logo {
  color: #667eea;
  margin-bottom: 10px;
}

.auth-header h1 {
  font-size: 24px;
  color: #1a202c;
  margin: 10px 0;
}

.auth-header p {
  color: #718096;
  font-size: 14px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.auth-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form .form-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #4a5568;
  font-size: 14px;
  font-weight: 500;
}

.auth-form .form-group input {
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s;
}

.auth-form .form-group input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.auth-form .form-group input:disabled {
  background-color: #f7fafc;
  cursor: not-allowed;
}

.auth-submit {
  width: 100%;
  padding: 12px;
  font-size: 16px;
  font-weight: 500;
  margin-top: 10px;
}

.error-message {
  background-color: #fed7d7;
  color: #9b2c2c;
  padding: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.success-message {
  background-color: #c6f6d5;
  color: #22543d;
  padding: 12px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #e2e8f0;
}

.auth-footer p {
  color: #718096;
  font-size: 14px;
}

.auth-footer a {
  color: #667eea;
  text-decoration: none;
  font-weight: 500;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 20px;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e2e8f0;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Unit Details Page */
.unit-details-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.unit-details-header {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.unit-main-info {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 2rem;
}

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

.unit-title-section {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.unit-title-section h1 {
  font-size: 2rem;
  margin-bottom: 0.25rem;
}

.property-name {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.unit-details-page .property-address {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.unit-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-weight: 500;
  text-transform: capitalize;
}

.unit-status.status-occupied {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.unit-status.status-vacant {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.unit-status.status-maintenance {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.unit-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.unit-details-info {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.unit-details-info h3 {
  margin-bottom: 1rem;
}

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

.info-item {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
}

.info-label {
  color: var(--text-secondary);
  font-weight: 500;
}

.info-value {
  color: var(--text-primary);
}

.resident-section,
.residents-history-section,
.payments-section,
.maintenance-section {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resident-card {
  background: var(--background);
  border-radius: 8px;
  padding: 1.5rem;
  transition: all 0.2s ease;
}

.resident-card.clickable:hover {
  background: var(--card-hover, #f8f9fa);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
  cursor: pointer;
}

.resident-header {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.resident-header h4 {
  margin-bottom: 0.25rem;
}

.resident-contact {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.lease-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.lease-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.payments-list,
.maintenance-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.payment-item,
.maintenance-item {
  background: var(--background);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.payment-info {
  display: flex;
  gap: 2rem;
}

.payment-date {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.payment-amount {
  font-weight: 600;
  color: var(--text-primary);
}

.payment-status {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
}

.payment-status.status-completed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.payment-status.status-pending {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.maintenance-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.maintenance-title {
  font-weight: 500;
}

.maintenance-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.maintenance-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.maintenance-status {
  padding: 0.25rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
}

.maintenance-status.status-open,
.maintenance-status.status-pending {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.maintenance-status.status-in_progress {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.maintenance-status.status-completed,
.maintenance-status.status-closed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.vacant-actions {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.vacant-actions h2 {
  margin-bottom: 0.5rem;
}

.vacant-actions p {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.action-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

/* Residents History Section Styles */
.residents-history-section .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.residents-history-section .resident-count {
  font-size: 0.9rem;
  color: var(--text-secondary);
  background: var(--background);
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
}

.residents-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.residents-group {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.residents-group-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--border);
}

.resident-card.past-resident {
  opacity: 0.9;
  border: 1px solid var(--border);
}

.resident-card.past-resident:hover {
  opacity: 1;
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: capitalize;
  margin-left: auto;
}

.status-badge.status-active {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.status-badge.status-inactive {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-secondary);
}

.status-badge.status-evicted {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.status-badge.status-pending {
  background: rgba(251, 191, 36, 0.1);
  color: var(--warning);
}

.status-badge.status-no_lease,
.status-badge.status-no.lease {
  background: rgba(107, 114, 128, 0.1);
  color: var(--text-secondary);
}

.no-residents {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  text-align: center;
}

.no-residents-icon {
  color: var(--text-secondary);
  opacity: 0.3;
  margin-bottom: 1rem;
}

.no-residents p {
  color: var(--text-secondary);
  font-size: 1rem;
}

.loading-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
}

/* Units Page Styles */
.units-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.units-page .page-header {
  margin-bottom: 2rem;
}

.units-page .page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

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

.kpi-cards {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

@media (max-width: 1400px) {
  .kpi-cards {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  .kpi-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

.kpi-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 120px;
}

.kpi-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #f1f5f9;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
  margin-bottom: 0.75rem;
}

.kpi-icon.occupied {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.kpi-icon.vacant {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.kpi-icon.maintenance {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.kpi-icon.notice {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.kpi-icon.warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.kpi-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.kpi-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
}

.kpi-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.filters-section {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  color: var(--text-primary);
}

.search-bar input::placeholder {
  color: var(--text-secondary);
}

.filter-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.filter-select {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 0.875rem;
  cursor: pointer;
  outline: none;
}

.filter-select:hover {
  border-color: var(--primary);
}

.filter-checkbox {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
}

.filter-checkbox input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  cursor: pointer;
}

.clear-filters-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  background: var(--background);
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.units-table-container {
  background: var(--surface);
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.units-table {
  width: 100%;
  border-collapse: collapse;
}

.units-table thead {
  background: var(--background);
  border-bottom: 1px solid var(--border);
}

.units-table th {
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.units-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background-color 0.2s;
}

.units-table tbody tr:last-child {
  border-bottom: none;
}

.units-table tbody tr.clickable-row {
  cursor: pointer;
}

.units-table tbody tr.clickable-row:hover {
  background: var(--background);
}

.units-table td {
  padding: 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.unit-number {
  font-weight: 600;
  color: var(--primary);
}

.status-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.status-badge.status-occupied {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
}

.status-badge.status-vacant {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

.status-badge.status-maintenance {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
}

.status-badge.status-notice {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
}

.no-results {
  padding: 3rem;
  text-align: center;
  color: var(--text-secondary);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-content {
  background: var(--surface);
  border-radius: 0.75rem;
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 1.5rem;
}

.modal-tabs .tab-button {
  background: transparent;
  border: none;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
  display: flex;
  align-items: center;
}

.modal-tabs .tab-button:hover {
  color: var(--text-primary);
}

.modal-tabs .tab-button.active {
  color: var(--primary);
}

.modal-tabs .tab-button.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary);
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--background);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.photo-upload-section {
  min-height: 400px;
}

/* Photo Gallery Styles */
.photo-gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.photo-gallery-empty {
  text-align: center;
  padding: 3rem;
}

.photo-gallery-single {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
}

.photo-gallery-single .photo-container {
  position: relative;
  cursor: pointer;
  background: var(--background);
}

.photo-gallery-single .single-photo {
  width: 100%;
  height: auto;
  object-fit: cover;
  display: block;
}

.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  border-radius: 0.5rem;
  overflow: hidden;
}

.photo-gallery-grid .gallery-item {
  position: relative;
  cursor: pointer;
  background: var(--background);
  aspect-ratio: 1;
  overflow: hidden;
}

.photo-gallery-grid .gallery-item.main-photo {
  grid-column: span 2;
  grid-row: span 2;
}

.photo-gallery-grid .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-gallery-grid .gallery-item:hover img {
  transform: scale(1.05);
}

.primary-badge {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: var(--success);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 500;
}

.photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  padding: 1rem;
  font-size: 0.875rem;
}

.more-photos-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  font-weight: 600;
}

/* Lightbox Styles */
.photo-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 0.5rem;
  border-radius: 0.25rem;
  cursor: pointer;
  z-index: 10;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-image-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 1rem 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.lightbox-nav:hover {
  background: rgba(0, 0, 0, 0.8);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  color: white;
  margin-top: 1rem;
}

.lightbox-caption {
  font-size: 0.875rem;
}

.lightbox-download {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.lightbox-download:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.5);
}

.lightbox-thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.8);
  overflow-x: auto;
  margin-top: 0.5rem;
}

.lightbox-thumbnail {
  width: 60px;
  height: 60px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
  border: 2px solid transparent;
}

.lightbox-thumbnail:hover {
  opacity: 0.8;
}

.lightbox-thumbnail.active {
  opacity: 1;
  border-color: white;
}

/* Property and Unit Photo Sections */
.property-photos-section,
.unit-photos-section {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--surface);
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.property-photos-section h3,
.unit-photos-section h2 {
  margin-bottom: 1rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Form Styles for Modal */
.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

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

.modal-body .form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

.modal-body .form-group input,
.modal-body .form-group select {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color 0.2s;
}

.modal-body .form-group input:focus,
.modal-body .form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.modal-body .form-group input[type="number"] {
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
}

.modal-body .form-group input[type="number"]::-webkit-inner-spin-button,
.modal-body .form-group input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Add Property Modal Specific Styles */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.modal-body textarea {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  font-size: 0.875rem;
  background: var(--surface);
  color: var(--text-primary);
  transition: border-color 0.2s;
  resize: vertical;
  font-family: inherit;
}

.modal-body textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.amenity-input-group {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.amenity-input-group input {
  flex: 1;
}

.amenity-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.amenity-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.remove-tag {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0;
  margin-left: 0.25rem;
  transition: color 0.2s;
}

.remove-tag:hover {
  color: var(--danger);
}

/* Form Elements for Modal */
.form-select {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-input {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-textarea {
  width: 100%;
  padding: 0.625rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: white;
  font-size: 0.875rem;
  transition: all 0.2s;
  resize: vertical;
}

.form-hint {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

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

.button-group .btn {
  flex: 1;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
}

.btn-close {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.btn-close:hover {
  background: var(--background);
  color: var(--text-primary);
}

/* Resident Details Page Styles */
.resident-details-page {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.resident-details-page .btn-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1.5rem;
}

.resident-details-page .btn-back:hover {
  background: var(--background);
  color: var(--text-primary);
  border-color: var(--primary);
}

.resident-details-page .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.resident-details-page .header-actions {
  display: flex;
  gap: 0.75rem;
}

.resident-details-page .resident-header {
  background: var(--surface);
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resident-details-page .resident-header-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.resident-details-page .resident-avatar {
  width: 80px;
  height: 80px;
  background: var(--background);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}

.resident-details-page .resident-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.resident-details-page .unit-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.75rem;
  background: var(--background);
  border-radius: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.resident-details-page .tabs-container {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 0.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resident-details-page .tabs-nav {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.resident-details-page .tab-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: transparent;
  border: none;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.resident-details-page .tab-button:hover {
  background: var(--background);
  color: var(--text-primary);
}

.resident-details-page .tab-button.active {
  background: var(--primary);
  color: white;
}

.resident-details-page .tab-button svg {
  flex-shrink: 0;
}

.resident-details-page .tab-content {
  min-height: 400px;
}

.resident-details-page .overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.resident-details-page .info-card {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resident-details-page .info-card.full-width {
  grid-column: span 2;
}

.resident-details-page .info-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.resident-details-page .info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.resident-details-page .info-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.resident-details-page .info-item label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.resident-details-page .info-value {
  font-size: 0.875rem;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.resident-details-page .notes-content {
  font-size: 0.875rem;
  color: var(--text-primary);
  line-height: 1.5;
}

.resident-details-page .payments-section,
.resident-details-page .vehicles-section,
.resident-details-page .pets-section,
.resident-details-page .documents-section {
  background: var(--surface);
  border-radius: 0.75rem;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.resident-details-page .section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.resident-details-page .section-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.resident-details-page .payment-method {
  padding: 0.25rem 0.5rem;
  background: var(--background);
  border-radius: 0.25rem;
  font-size: 0.75rem;
  text-transform: capitalize;
}

.resident-details-page .amount {
  font-weight: 600;
  color: var(--primary);
}

.resident-details-page .cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}

.resident-details-page .vehicle-card,
.resident-details-page .pet-card {
  background: var(--background);
  border-radius: 0.5rem;
  padding: 1.25rem;
  display: flex;
  gap: 1rem;
  position: relative;
}

.resident-details-page .vehicle-icon,
.resident-details-page .pet-icon {
  width: 48px;
  height: 48px;
  background: var(--surface);
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.resident-details-page .vehicle-info,
.resident-details-page .pet-info {
  flex: 1;
}

.resident-details-page .vehicle-info h4,
.resident-details-page .pet-info h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.resident-details-page .vehicle-details,
.resident-details-page .pet-details {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.resident-details-page .detail-item {
  display: flex;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.resident-details-page .detail-item label {
  color: var(--text-secondary);
}

.resident-details-page .detail-item span {
  color: var(--text-primary);
}

.resident-details-page .detail-item .vaccinated {
  color: var(--success);
  font-weight: 500;
}

.resident-details-page .detail-item .not-vaccinated {
  color: var(--danger);
  font-weight: 500;
}

.resident-details-page .documents-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.resident-details-page .document-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background: var(--background);
  border-radius: 0.5rem;
  transition: background 0.2s;
}

.resident-details-page .document-item:hover {
  background: var(--border);
}

.resident-details-page .document-info {
  flex: 1;
}

.resident-details-page .document-name {
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.resident-details-page .document-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.resident-details-page .empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--text-secondary);
  font-style: italic;
}

.resident-details-page .card-actions {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  gap: 0.5rem;
}

.resident-details-page .card-actions .btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.resident-details-page .card-actions .btn-icon:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.resident-details-page .card-actions .btn-icon.delete:hover {
  background: var(--danger);
  border-color: var(--danger);
  color: white;
}

@media (max-width: 1024px) {
  .resident-details-page .overview-grid {
    grid-template-columns: 1fr;
  }
  
  .resident-details-page .info-card.full-width {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .resident-details-page {
    padding: 1rem;
  }
  
  .resident-details-page .page-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .resident-details-page .header-actions {
    flex-direction: column;
  }
  
  .resident-details-page .tabs-container {
    padding: 0.375rem;
    border-radius: 0.5rem;
  }
  
  .resident-details-page .tabs-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
  }
  
  .resident-details-page .tabs-nav::-webkit-scrollbar {
    display: none;
  }
  
  .resident-details-page .tab-button {
    padding: 0.625rem 0.875rem;
    font-size: 0.8125rem;
  }
  
  .resident-details-page .info-grid {
    grid-template-columns: 1fr;
  }
  
  .resident-details-page .cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Messages Page Styles */
.messages-page {
  padding: 1.5rem;
  height: calc(100vh - 3rem);
  display: flex;
  flex-direction: column;
}

.messages-container {
  display: flex;
  gap: 1rem;
  height: calc(100vh - 8rem);
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.threads-sidebar {
  width: 380px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  background: var(--background);
}

.threads-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.threads-header h2 {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--text-primary);
}

.threads-controls {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.threads-controls .search-box {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}

.threads-controls .search-box input {
  flex: 1;
  border: none;
  background: none;
  outline: none;
  font-size: 0.875rem;
  color: var(--text-primary);
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.filter-btn:hover {
  background: var(--primary-light);
  border-color: var(--primary);
  color: var(--primary);
}

.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.threads-list {
  flex: 1;
  overflow-y: auto;
}

.thread-item {
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.2s;
}

.thread-item:hover {
  background: var(--surface);
}

.thread-item.active {
  background: var(--primary-light);
  border-left: 3px solid var(--primary);
  padding-left: calc(1.5rem - 3px);
}

.thread-item.unread {
  background: rgba(59, 130, 246, 0.05);
}

.thread-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.thread-contact {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.thread-contact h4 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.contact-type {
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
}

.contact-resident {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.contact-vendor {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.contact-lead {
  background: rgba(251, 146, 60, 0.1);
  color: #fb923c;
}

.contact-other {
  background: rgba(148, 163, 184, 0.1);
  color: #94a3b8;
}

.thread-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
}

.thread-time {
  font-size: 0.75rem;
}

.thread-preview {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.thread-preview p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 280px;
}

.unread-badge {
  background: var(--primary);
  color: white;
  padding: 0.125rem 0.375rem;
  border-radius: 10px;
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.message-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.message-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--background);
}

.message-contact-info h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.contact-details {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.message-actions {
  display: flex;
  gap: 0.5rem;
}

.messages-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(to bottom, #f9fafb, white);
}

.message {
  display: flex;
  max-width: 70%;
}

.message.sent {
  align-self: flex-end;
}

.message.received {
  align-self: flex-start;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  position: relative;
}

.message.sent .message-bubble {
  background: var(--primary);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.received .message-bubble {
  background: var(--surface);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.message-bubble p {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.message-info {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.25rem;
  font-size: 0.6875rem;
  opacity: 0.7;
}

.message.received .message-info {
  color: var(--text-secondary);
}

.message-input {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 0.75rem;
  background: var(--background);
}

.message-input input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.2s;
  background: white;
}

.message-input input:focus {
  border-color: var(--primary);
}

.message-input .btn {
  border-radius: 50%;
  width: 44px;
  height: 44px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.no-thread-selected {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  gap: 1rem;
}

.no-thread-selected h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
}

.no-thread-selected p {
  font-size: 0.9375rem;
}

/* Responsive styles for Messages */
@media (max-width: 768px) {
  .messages-container {
    flex-direction: column;
    height: calc(100vh - 6rem);
  }
  
  .threads-sidebar {
    width: 100%;
    height: 40%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  
  .message-view {
    height: 60%;
  }
  
  .message {
    max-width: 85%;
  }
}

/* Team Management Component Styles */
.tabs-container {
  border-bottom: 1px solid var(--border);
  margin: -1.25rem -1.25rem 0;
}

.tabs {
  display: flex;
  gap: 0;
}

.tab {
  padding: 1rem 1.5rem;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.tab:hover {
  color: var(--text-primary);
}

.tab-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.card-body {
  padding: 1.25rem;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.team-member-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  transition: all 0.2s;
}

.team-member-card:hover {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.team-member-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.avatar {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 0.875rem;
}

.invitation-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.member-details {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
  flex: 1;
}

.member-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  margin: 0;
}

.member-email {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
}

.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.role-badge.bg-purple-100 {
  background: rgba(147, 51, 234, 0.1);
  color: rgb(147, 51, 234);
}

.role-badge.bg-blue-100 {
  background: rgba(59, 130, 246, 0.1);
  color: rgb(59, 130, 246);
}

.role-badge.bg-gray-100 {
  background: rgba(107, 114, 128, 0.1);
  color: rgb(107, 114, 128);
}

.role-badge.bg-orange-100 {
  background: rgba(251, 146, 60, 0.1);
  color: rgb(251, 146, 60);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.btn-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 0.375rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.btn-icon:hover {
  background: var(--background);
}

.btn-icon.btn-danger {
  color: var(--danger);
}

.btn-icon.btn-danger:hover {
  background: rgba(239, 68, 68, 0.1);
}

.invitation-actions {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.btn.btn-link {
  background: transparent;
  color: var(--primary);
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn.btn-link:hover {
  background: rgba(79, 70, 229, 0.05);
}

.btn.btn-link.btn-danger {
  color: var(--danger);
}

.btn.btn-link.btn-danger:hover {
  background: rgba(239, 68, 68, 0.05);
}

.empty-state {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Photo Upload Styles */
.photo-upload-container {
  padding: 0;
}

.photo-upload-dropzone {
  position: relative;
  border: 2px dashed var(--border);
  border-radius: 0.5rem;
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--surface);
  margin-bottom: 1.5rem;
}

.photo-upload-dropzone:hover {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.02);
}

.photo-upload-dropzone.drag-active {
  border-color: var(--primary);
  background: rgba(79, 70, 229, 0.05);
}

.photo-upload-dropzone.uploading {
  opacity: 0.6;
  pointer-events: none;
}

.upload-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--text-secondary);
}

.upload-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.upload-info {
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.upload-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 0.5rem;
}

.upload-spinner-container {
  text-align: center;
}

.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-bottom-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.upload-status {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Photo Bulk Actions */
.photo-bulk-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: rgba(79, 70, 229, 0.05);
  border: 1px solid var(--primary);
  border-radius: 0.5rem;
  margin-bottom: 1.5rem;
}

.bulk-actions-text {
  font-size: 0.875rem;
  color: var(--primary);
  font-weight: 500;
}

.bulk-actions-buttons {
  display: flex;
  gap: 0.5rem;
}

.btn.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
}

.btn.btn-danger {
  background: var(--danger);
  color: white;
}

.btn.btn-danger:hover {
  background: #dc2626;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.photo-item {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
  background: white;
  transition: all 0.2s;
}

.photo-item:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.photo-item.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.photo-checkbox {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 10;
  background: white;
  border-radius: 0.25rem;
  padding: 0.125rem;
}

.photo-checkbox input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--primary);
}

.photo-badge {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 10;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  border-radius: 0.25rem;
}

.badge.badge-primary {
  background: var(--success);
  color: white;
}

.photo-image-container {
  aspect-ratio: 1;
  background: var(--background);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.photo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.2s;
  pointer-events: none;
}

.photo-item:hover .photo-overlay {
  background: rgba(0, 0, 0, 0.5);
  opacity: 1;
  pointer-events: all;
}

.photo-actions {
  display: flex;
  gap: 0.5rem;
}

.photo-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-primary);
}

.photo-action-btn:hover {
  background: var(--background);
  transform: scale(1.1);
}

.photo-action-btn.delete {
  color: var(--danger);
}

.photo-action-btn .icon-sm {
  width: 1rem;
  height: 1rem;
}

.photo-caption {
  padding: 0.5rem;
  background: white;
  border-top: 1px solid var(--border);
}

.caption-input {
  width: 100%;
  padding: 0.25rem;
  border: none;
  font-size: 0.75rem;
  color: var(--text-primary);
  background: transparent;
  outline: none;
  transition: all 0.2s;
}

.caption-input:focus {
  background: var(--background);
  padding: 0.25rem 0.5rem;
  margin: -0.25rem -0.25rem;
  border-radius: 0.25rem;
}

.caption-input::placeholder {
  color: var(--text-secondary);
}

/* Photo Empty State */
.photo-empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 1rem;
  color: var(--text-tertiary);
}

.empty-text {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Additional Maintenance Tab Styles */
.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--border);
  border-radius: 50%;
  border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary);
}

.empty-state svg {
  margin: 0 auto 1rem;
  color: var(--text-secondary);
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.125rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.btn-icon {
  background: transparent;
  border: none;
  padding: 0.5rem;
  border-radius: 0.375rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Dashboard Loading Skeleton Animation */
.dashboard-loading {
  animation: fadeIn 0.3s ease-in;
}

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

.skeleton {
  position: relative;
  overflow: hidden;
}

.skeleton::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.2) 20%,
    rgba(255, 255, 255, 0.5) 60%,
    rgba(255, 255, 255, 0)
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

.skeleton-header {
  height: 28px;
  width: 150px;
  background: #e2e8f0;
  border-radius: 6px;
  margin-bottom: 16px;
}

.skeleton-value {
  height: 48px;
  width: 200px;
  background: #e2e8f0;
  border-radius: 8px;
  margin-bottom: 16px;
}

.skeleton-breakdown {
  display: flex;
  gap: 24px;
  margin-top: 20px;
}

.skeleton-item {
  flex: 1;
  height: 40px;
  background: #e2e8f0;
  border-radius: 6px;
}

.skeleton-bar {
  height: 40px;
  background: #e2e8f0;
  border-radius: 6px;
  margin-top: 16px;
}

.skeleton-tabs {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  padding-bottom: 20px;
  border-bottom: 1px solid #e2e8f0;
}

.skeleton-tab {
  height: 36px;
  width: 100px;
  background: #e2e8f0;
  border-radius: 6px;
}

.skeleton-list {
  padding: 20px 0;
}

.skeleton-list-item {
  height: 60px;
  background: #e2e8f0;
  border-radius: 8px;
  margin-bottom: 12px;
}

.skeleton-chart {
  height: 200px;
  background: #e2e8f0;
  border-radius: 8px;
}

.historical-section.skeleton .skeleton-header {
  margin-bottom: 24px;
}

.stat-box-large.skeleton {
  padding: 24px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.operations-section.skeleton,
.historical-card.skeleton {
  padding: 24px;
  background: white;
}

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

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  border: 1px solid transparent;
}

.status-completed {
  background: rgba(34, 197, 94, 0.1);
  color: var(--success);
  border-color: rgba(34, 197, 94, 0.2);
}

.status-in-progress {
  background: rgba(59, 130, 246, 0.1);
  color: var(--info);
  border-color: rgba(59, 130, 246, 0.2);
}

.status-pending {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning);
  border-color: rgba(245, 158, 11, 0.2);
}

.status-overdue {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  border-color: rgba(239, 68, 68, 0.2);
}

.status-cancelled {
  background: rgba(100, 116, 139, 0.1);
  color: var(--text-secondary);
  border-color: rgba(100, 116, 139, 0.2);
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #16a34a;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.25);
}


/* ============================= */
/* MOBILE RESPONSIVE STYLES */
/* ============================= */

/* Tablet Styles */
@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
  
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile Styles */
@media (max-width: 768px) {
  /* Stats Grid Mobile */
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .stat-card {
    min-height: auto;
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  /* Cards Mobile */
  .card {
    padding: 1rem;
    border-radius: 0.5rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  .card-header h2 {
    font-size: 1.125rem;
  }
  
  /* Tables Mobile */
  .table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  table {
    min-width: 600px;
  }
  
  /* Forms Mobile */
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  
  .form-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .form-group {
    width: 100%;
  }
  
  /* Modals Mobile */
  .modal-content {
    width: calc(100% - 2rem);
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
  
  .modal-header {
    padding: 1rem;
  }
  
  .modal-body {
    padding: 1rem;
    max-height: calc(100vh - 150px);
    overflow-y: auto;
  }
  
  .modal-footer {
    padding: 1rem;
    flex-direction: column-reverse;
    gap: 0.5rem;
  }
  
  .modal-footer button {
    width: 100%;
  }
  
  /* Buttons Mobile */
  .header-actions {
    flex-direction: column;
    width: 100%;
    gap: 0.5rem;
  }
  
  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }
  
  /* Filters Mobile */
  .filters-container {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .search-input,
  .filter-select {
    width: 100% !important;
  }
  
  /* Activity & Tasks Mobile */
  .activity-item,
  .task-item {
    padding: 0.75rem;
  }
  
  .task-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  /* Priority Badge Mobile */
  .priority-badge {
    font-size: 0.625rem;
    padding: 0.125rem 0.5rem;
  }
  
  /* Dropdown Mobile */
  .dropdown-menu {
    position: fixed;
    left: 1rem;
    right: 1rem;
    width: auto;
  }
  
  /* Tabs Mobile */
  .tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    gap: 0.25rem;
  }
  
  .tab {
    white-space: nowrap;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
  }
}

/* Small Mobile Devices */
@media (max-width: 375px) {
  .page-header h1 {
    font-size: 1.5rem;
  }
  
  .stat-value {
    font-size: 1.25rem;
  }
  
  .card {
    padding: 0.75rem;
  }
  
  .btn {
    padding: 0.5rem 1rem;
    font-size: 0.813rem;
  }
  
  .modal-content {
    margin: 0.5rem;
    width: calc(100% - 1rem);
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn,
  .nav-item,
  .tab {
    min-height: 44px;
  }
  
  .btn:active {
    transform: scale(0.98);
  }
  
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .mobile-menu-toggle,
  .header-actions,
  .btn-group,
  .tabs {
    display: none !important;
  }
  
  .main-content {
    padding: 0 !important;
  }
  
  .card {
    box-shadow: none;
    border: 1px solid #ddd;
    break-inside: avoid;
  }
}


/*# sourceMappingURL=style-fb57b6afd7fc65551ca3.css.map*/