:root {
  
  --az-sky: #87CEEB;           
  --az-sand: #E6D5B8;          
  --az-adobe: #D2691E;         
  --az-cactus: #6B8E23;        
  --az-sunset: #FF6B35;        
  --az-stone: #8B7355;         
  --az-cream: #FFF8DC;         
  --az-rust: #B7410E;          
  
  
  --bg: #ffffff;
  --bg-page: var(--az-cream);
  --muted: #6b7280;
  --text: #2d1810;
  --accent: var(--az-adobe);
  --accent-hover: var(--az-rust);
  --danger: #dc2626;
  --danger-hover: #b91c1c;
  --success: var(--az-cactus);
  --card: #fffef9;
  --border: #e4d5c4;
  --shadow: 0 1px 3px rgba(139, 115, 85, 0.1);
  --shadow-lg: 0 10px 25px rgba(139, 115, 85, 0.15);
  
  
  --desert-sand: var(--az-sand);
  --warm-sand: var(--az-cream);
  --white: #ffffff;
  --terracotta: var(--az-adobe);
  --text-dark: var(--text);
  --text-muted: var(--muted);
  --cactus-green: var(--az-cactus);
  --sun-yellow: #fbbf24;
  --sun-orange: var(--az-sunset);
  --error: var(--danger);
  --shadow-strong: rgba(139, 115, 85, 0.3);
}

* {
  box-sizing: border-box;
}

body {
  font-family: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--bg-page);
  color: var(--text);
  margin: 0;
  line-height: 1.6;
}


.admin-header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.admin-header h1 {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

nav {
  display: flex;
  gap: 8px;
  align-items: center;
}

nav .tab {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
  color: var(--text);
}

nav .tab:hover {
  background: var(--card);
}

nav .tab.active {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 4px rgba(139, 115, 85, 0.2);
}

nav .danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

nav .danger:hover {
  background: var(--danger);
  color: #fff;
}


.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}


.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: linear-gradient(135deg, #fff 0%, var(--card) 100%);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.stat-card h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 8px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}


.admin-main {
  padding: 24px 0;
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  padding: 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
}

.panel h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 16px 0;
  color: var(--text);
}

.hidden {
  display: none;
}


.toolbar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 16px;
}

.toolbar input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  transition: border-color 0.2s;
}

.toolbar input:focus {
  outline: none;
  border-color: var(--accent);
}


.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}

.item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  transition: all 0.2s;
}

.item:hover {
  box-shadow: var(--shadow);
  border-color: #cbd5e1;
}

.item-body {
  flex: 1;
}

.item-body strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.item-body .muted {
  font-size: 13px;
}

.item-actions {
  display: flex;
  gap: 8px;
}


button {
  cursor: pointer;
  border: none;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.2s;
}

button:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

button:active {
  transform: translateY(0);
}

button.secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--accent);
}

button.secondary:hover {
  background: var(--card);
  border-color: var(--accent);
}

button.danger {
  background: var(--danger);
  color: #fff;
}

button.danger:hover {
  background: var(--danger-hover);
}

button.success {
  background: var(--success);
  color: #fff;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}


.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;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.modal-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  background: #fff;
  border-radius: 12px;
  max-width: 600px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.9);
  transition: transform 0.2s;
}

.modal-overlay.show .modal {
  transform: scale(1);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s;
}

.modal-close:hover {
  background: var(--card);
  transform: none;
}

.modal-body {
  padding: 24px;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}


.form-group {
  margin-bottom: 16px;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
}

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

.form-group small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-group.checkbox input {
  width: auto;
  margin: 0;
}


.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  background: #fff;
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  padding: 16px 20px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  min-width: 300px;
  display: flex;
  align-items: center;
  gap: 12px;
  transform: translateX(400px);
  animation: slideIn 0.3s forwards;
}

@keyframes slideIn {
  to {
    transform: translateX(0);
  }
}

.toast.success {
  border-left-color: var(--success);
}

.toast.error {
  border-left-color: var(--danger);
}

.toast-icon {
  font-size: 20px;
}

.toast-message {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
}


.loading {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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


.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 80vh;
}

.auth-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  padding: 32px;
  border-radius: 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.auth-card h1 {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 24px 0;
  text-align: center;
}

.auth-card label {
  display: block;
  font-weight: 500;
  margin-bottom: 20px;
  color: var(--text);
  font-size: 14px;
}

.auth-card input {
  width: 100%;
  padding: 12px 14px;
  margin-top: 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 14px;
  transition: border-color 0.2s;
}

.auth-card input:focus {
  outline: none;
  border-color: var(--accent);
}

.auth-card button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
}

.muted {
  color: var(--muted);
}


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

.mt-2 {
  margin-top: 8px;
}

.mb-2 {
  margin-bottom: 8px;
}


@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
  }
  
  .dashboard-stats {
    grid-template-columns: 1fr;
  }
  
  .admin-header h1 {
    font-size: 18px;
  }
  
  nav {
    flex-wrap: wrap;
  }
  
  .toast-container {
    right: 10px;
    left: 10px;
  }
  
  .toast {
    min-width: auto;
  }
}





.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 260px;
  background: #fff;
  border-right: 1px solid var(--border);
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 200;
  transition: transform 0.3s ease;
}

.admin-sidebar.collapsed {
  transform: translateX(-260px);
}

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

.admin-sidebar-header h1 {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

.sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 6px;
  font-size: 18px;
  color: var(--muted);
  transition: all 0.2s;
}

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

.admin-sidebar-nav {
  padding: 12px;
  display: flex;
  flex-direction: column;
}

.sidebar-section {
  margin-bottom: 20px;
  display: block;
  width: 100%;
}

.sidebar-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  padding: 8px 12px;
  margin: 0;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  width: 100%;
  text-align: left;
  transition: all 0.2s;
}

.sidebar-nav-item:hover {
  background: var(--card);
  transform: none;
}

.sidebar-nav-item.active {
  background: var(--accent);
  color: #fff;
}

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

.sidebar-logout {
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--border);
}

.sidebar-logout button {
  width: 100%;
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.sidebar-logout button:hover {
  background: var(--danger);
  color: #fff;
}


.admin-main-wrapper {
  flex: 1;
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

.admin-main-wrapper.sidebar-collapsed {
  margin-left: 0;
}


.mobile-sidebar-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 150;
  background: var(--accent);
  color: #fff;
  border: none;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  display: none;
}

.admin-main-wrapper.sidebar-collapsed .mobile-sidebar-toggle {
  display: block;
}


.sidebar-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 199;
}

.sidebar-backdrop.show {
  display: block;
}


.stat-card.mini {
  padding: 12px 16px;
}

.stat-card.mini h4 {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 4px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-card.mini .stat-value {
  font-size: 24px;
}


@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-260px);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-main-wrapper {
    margin-left: 0;
  }
  
  .mobile-sidebar-toggle {
    display: block !important;
  }
  
  .sidebar-backdrop.show {
    display: block;
  }
}



.modal-large {
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
}

.import-step {
  padding: 12px 0;
}

.import-step h4 {
  margin-top: 0;
  color: var(--accent);
}

#import-text {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
}

.import-list {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px;
  background: var(--bg);
}

.import-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  transition: all 0.2s ease;
}

.import-item:hover {
  box-shadow: var(--shadow);
}

.import-item-duplicate {
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
}

.import-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}

.import-item-location {
  color: var(--muted);
  font-size: 14px;
}

.import-item-desc {
  color: var(--text);
  font-size: 14px;
  margin: 6px 0;
  line-height: 1.4;
}

.import-item-url,
.import-item-phone {
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}

.import-item-classification {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
  flex-wrap: wrap;
}

.import-item-classification label {
  font-weight: 600;
  font-size: 14px;
}

.import-category-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 14px;
  background: white;
  cursor: pointer;
}

.import-item-score {
  font-size: 13px;
  color: var(--muted);
  margin-left: auto;
}

.import-item-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 6px 0;
  font-size: 12px;
}

.import-item-tags .tag {
  display: inline-block;
  background: var(--az-sand);
  color: var(--text);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
}

.import-item-duplicate-info {
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 13px;
  margin-top: 6px;
  color: #92400e;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}

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

.badge-info {
  background: #dbeafe;
  color: #1e40af;
}

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

.badge-secondary {
  background: #f3f4f6;
  color: #4b5563;
}

.import-results-success {
  background: #d1fae5;
  border: 1px solid #10b981;
  border-radius: 6px;
  padding: 16px;
  margin: 12px 0;
}

.import-results-success p {
  margin: 8px 0;
  color: #065f46;
}

.import-results-success strong {
  color: #047857;
}


.pricing-section {
  margin-bottom: 32px;
}

.pricing-section h3 {
  font-size: 1.25rem;
  margin-bottom: 8px;
  color: var(--text, #2d1810);
}

.pricing-section .muted {
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 16px;
}

.pricing-item-card {
  transition: all 0.2s ease;
}

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

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin: 16px 0;
  font-size: 0.95rem;
}

.alert-info {
  background: #dbeafe;
  border: 1px solid #3b82f6;
  color: #1e40af;
}

.alert-info strong {
  color: #1e3a8a;
}


.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.detail-section {
  padding: 16px;
  background: var(--bg-page);
  border-radius: 8px;
  border: 1px solid var(--border);
}

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

.detail-section h4 {
  margin: 0 0 12px 0;
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
}

.detail-section p {
  margin: 8px 0;
  font-size: 14px;
}


.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.badge-blue {
  background: #dbeafe;
  color: #1e40af;
}

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

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

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

.badge-gray {
  background: #f3f4f6;
  color: #4b5563;
}

.badge-orange {
  background: #ffedd5;
  color: #9a3412;
}


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

@media (max-width: 768px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}
