/* Forest Trails CMS - Admin Panel Styles */

:root {
  --primary: #2d5a27;
  --primary-dark: #1e3d1a;
  --primary-light: #3d7a35;
  --secondary: #6c757d;
  --success: #28a745;
  --danger: #dc3545;
  --warning: #ffc107;
  --info: #17a2b8;
  --light: #f8f9fa;
  --dark: #343a40;
  --white: #ffffff;
  --gray-100: #f8f9fa;
  --gray-200: #e9ecef;
  --gray-300: #dee2e6;
  --gray-400: #ced4da;
  --gray-500: #adb5bd;
  --gray-600: #6c757d;
  --gray-700: #495057;
  --gray-800: #343a40;
  --gray-900: #212529;
  --sidebar-width: 250px;
  --header-height: 60px;
  --shadow: 0 2px 10px rgba(0,0,0,0.1);
  --shadow-lg: 0 5px 25px rgba(0,0,0,0.15);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--gray-100);
  color: var(--gray-800);
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
}

/* Login Screen */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  padding: 20px;
}

.login-box {
  background: var(--white);
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
}

.login-header {
  text-align: center;
  margin-bottom: 30px;
}

.login-header i {
  font-size: 48px;
  color: var(--primary);
  margin-bottom: 10px;
}

.login-header h1 {
  font-size: 24px;
  color: var(--gray-800);
  margin-bottom: 5px;
}

.login-header p {
  color: var(--gray-600);
  font-size: 14px;
}

.login-hint {
  text-align: center;
  margin-top: 20px;
  color: var(--gray-500);
  font-size: 12px;
}

/* App Layout */
.app {
  display: flex;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  background: var(--gray-900);
  color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: var(--transition);
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header i {
  font-size: 28px;
  color: var(--primary-light);
}

.sidebar-header span {
  font-size: 18px;
  font-weight: 600;
}

.sidebar-nav {
  flex: 1;
  padding: 20px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  color: var(--gray-400);
  transition: var(--transition);
}

.nav-item:hover, .nav-item.active {
  background: rgba(255,255,255,0.1);
  color: var(--white);
  text-decoration: none;
}

.nav-item i {
  width: 20px;
  text-align: center;
}

.sidebar-footer {
  padding: 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
}

/* Header */
.header {
  height: var(--header-height);
  background: var(--white);
  padding: 0 30px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 20px;
  color: var(--gray-700);
  cursor: pointer;
}

.header h1 {
  font-size: 20px;
  font-weight: 600;
  flex: 1;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--gray-600);
}

.user-info i {
  font-size: 24px;
}

/* Pages */
.page {
  padding: 30px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 20px;
}

.stat-icon {
  width: 60px;
  height: 60px;
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.green { background: var(--success); }
.stat-icon.blue { background: var(--info); }
.stat-icon.purple { background: #6f42c1; }

.stat-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-800);
}

.stat-info p {
  color: var(--gray-600);
  font-size: 13px;
}

/* Quick Actions */
.quick-actions {
  background: var(--white);
  padding: 25px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.quick-actions h2 {
  margin-bottom: 20px;
  font-size: 18px;
}

.action-buttons {
  display: flex;
  gap: 15px;
}

/* Page Header */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
}

.page-header h2 {
  font-size: 20px;
}

/* Properties List */
.properties-list {
  display: grid;
  gap: 20px;
}

.property-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  transition: var(--transition);
}

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

.property-image {
  width: 200px;
  height: 150px;
  background: var(--gray-200);
  position: relative;
  overflow: hidden;
}

.property-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-image .no-image {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: 40px;
}

.property-info {
  flex: 1;
  padding: 20px;
}

.property-info h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.property-info .location {
  color: var(--gray-600);
  font-size: 13px;
  margin-bottom: 12px;
}

.property-info .location i {
  margin-right: 5px;
}

.property-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 13px;
}

.property-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--gray-600);
}

.property-price {
  font-size: 18px;
  font-weight: 600;
  color: var(--primary);
}

.property-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding: 20px;
  border-left: 1px solid var(--gray-200);
}

.property-actions .btn {
  padding: 8px 16px;
  font-size: 13px;
}

/* Status Badges */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}

.status-available { background: #d4edda; color: #155724; }
.status-sold_out { background: #f8d7da; color: #721c24; }
.status-coming_soon { background: #fff3cd; color: #856404; }
.status-draft { background: var(--gray-200); color: var(--gray-700); }

.featured-badge {
  background: var(--warning);
  color: var(--dark);
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 500;
  color: var(--gray-700);
}

.form-group label i {
  margin-right: 6px;
  color: var(--gray-500);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.form-group input[readonly] {
  background: var(--gray-100);
  color: var(--gray-600);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--gray-200);
}

.form-section h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--gray-700);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 30px;
}

/* Settings Form */
.settings-form, .password-form {
  background: var(--white);
  padding: 30px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 800px;
}

.settings-section {
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--gray-200);
}

.settings-section:last-of-type {
  border-bottom: none;
}

.settings-section h3 {
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--gray-700);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
}

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

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

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

.btn-secondary {
  background: var(--gray-600);
  color: var(--white);
}

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

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

.btn-danger:hover:not(:disabled) {
  background: #c82333;
}

.btn-text {
  background: none;
  color: var(--gray-400);
  padding: 10px;
}

.btn-text:hover {
  color: var(--white);
}

.btn-block {
  width: 100%;
  justify-content: center;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-large {
  max-width: 900px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 25px;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 10;
}

.modal-header h2 {
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: var(--gray-500);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--gray-800);
}

.modal-body {
  padding: 25px;
}

/* Upload Area */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  margin-bottom: 25px;
}

.upload-area:hover, .upload-area.dragover {
  border-color: var(--primary);
  background: rgba(45, 90, 39, 0.05);
}

.upload-area i {
  font-size: 48px;
  color: var(--gray-400);
  margin-bottom: 15px;
}

.upload-area p {
  color: var(--gray-600);
  margin-bottom: 15px;
}

/* Images Grid */
.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 15px;
}

.image-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--gray-200);
}

.image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-item .image-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  opacity: 0;
  transition: var(--transition);
}

.image-item:hover .image-overlay {
  opacity: 1;
}

.image-item .primary-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: var(--primary);
  color: var(--white);
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--gray-800);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideIn 0.3s ease;
  max-width: 400px;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--dark); }

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Error Message */
.error-message {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 15px;
  min-height: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .main-content {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .stat-card {
    padding: 20px;
  }

  .property-card {
    flex-direction: column;
  }

  .property-image {
    width: 100%;
    height: 200px;
  }

  .property-actions {
    flex-direction: row;
    border-left: none;
    border-top: 1px solid var(--gray-200);
    justify-content: flex-end;
  }

  .modal-content {
    max-height: 100vh;
    border-radius: 0;
  }

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

/* Loading Spinner */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray-500);
}

.empty-state i {
  font-size: 48px;
  margin-bottom: 15px;
  color: var(--gray-400);
}

.empty-state p {
  margin-bottom: 20px;
}
