/* ==========================================================================
   Aurelia Estates - Admin Dashboard & Lead Management CSS
   ========================================================================== */

/* Main Container */
.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 140px 24px 60px 24px;
  min-height: 80vh;
  opacity: 0;
  transform: translateY(20px);
  animation: adminFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes adminFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Header Section */
.admin-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding-bottom: 24px;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.admin-title-area h2 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 32px;
  color: #fff;
  letter-spacing: 2px;
  margin-bottom: 6px;
}

.admin-title-area p {
  font-size: 13px;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-title-area p i {
  color: #d4af37;
  font-size: 11px;
}

/* Metrics Dashboard Cards Grid */
.admin-metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}

.admin-metric-card {
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-left: 4px solid #d4af37;
  border-radius: 12px;
  padding: 28px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}

.admin-metric-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.03) 0%, transparent 70%);
  pointer-events: none;
}

.admin-metric-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.08);
}

.admin-metric-card-info h4 {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
  font-weight: 600;
}

.admin-metric-card-info .metric-value {
  font-family: 'Playfair Display', serif;
  font-size: 36px;
  font-weight: 700;
  color: #fff;
}

.admin-metric-card-icon {
  width: 60px;
  height: 60px;
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #d4af37;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.1);
}

/* Control Panel (Search & Actions) */
.admin-control-panel {
  background: rgba(18, 18, 18, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
}

.admin-search-wrapper {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 12px 18px;
  width: 100%;
  max-width: 450px;
  gap: 12px;
  transition: all 0.3s ease;
}

.admin-search-wrapper:focus-within {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.05);
}

.admin-search-wrapper i {
  color: #888;
  font-size: 14px;
}

.admin-search-wrapper input {
  background: transparent;
  border: none;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  outline: none;
  width: 100%;
}

.admin-search-wrapper input::placeholder {
  color: #555;
}

.admin-actions {
  display: flex;
  gap: 16px;
}

.admin-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  color: #d4af37;
  border-radius: 6px;
  padding: 12px 20px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.admin-btn:hover {
  background: #d4af37;
  color: #0c0c0c;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(212, 175, 55, 0.2);
}

/* Leads Relational Table */
.admin-table-container {
  background: rgba(18, 18, 18, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  overflow-x: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  margin-bottom: 40px;
}

.admin-leads-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-leads-table th {
  background: rgba(212, 175, 55, 0.04);
  border-bottom: 1px solid rgba(212, 175, 55, 0.15);
  padding: 20px 24px;
  font-size: 11px;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-weight: 700;
}

.admin-leads-table td {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 14px;
  color: #eee;
  vertical-align: middle;
}

.admin-leads-table tr {
  transition: background 0.3s ease;
}

.admin-leads-table tr:hover {
  background: rgba(255, 255, 255, 0.01);
}

.admin-leads-table tr:last-child td {
  border-bottom: none;
}

/* Ticket Tag */
.admin-td-ticket {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: #d4af37;
  letter-spacing: 1px;
}

/* Client Details Cell */
.admin-client-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-client-name {
  font-weight: 600;
  color: #fff;
}

.admin-client-email {
  font-size: 12px;
  color: #777;
}

/* Interest Estate info */
.admin-interest-estate {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-estate-title {
  font-weight: 500;
  color: #fff;
}

.admin-estate-value {
  font-size: 11px;
  color: #887a64;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Glassmorphic Interactive Select Dropdown */
.admin-select-wrapper {
  position: relative;
  display: inline-block;
  width: 150px;
}

.admin-select-wrapper select {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 8px 12px;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: all 0.3s ease;
}

.admin-select-wrapper::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: #888;
  font-size: 12px;
  pointer-events: none;
}

.admin-select-wrapper select:focus {
  border-color: rgba(212, 175, 55, 0.5);
  background: rgba(212, 175, 55, 0.04);
}

/* Row-level dropdown color schemes based on active status */
.admin-select-wrapper select[data-status="New"] {
  border-color: rgba(59, 130, 246, 0.3); /* Blue */
  color: #3b82f6;
}
.admin-select-wrapper select[data-status="In Progress"] {
  border-color: rgba(245, 158, 11, 0.3); /* Orange */
  color: #f59e0b;
}
.admin-select-wrapper select[data-status="Contacted"] {
  border-color: rgba(16, 185, 129, 0.3); /* Emerald Green */
  color: #10b981;
}

/* Lead Delete action button */
.admin-btn-delete {
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border-radius: 4px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.admin-btn-delete:hover {
  background: #ef4444;
  color: #fff;
  border-color: #ef4444;
  transform: translateY(-1px);
}

.admin-btn-delete:active {
  transform: translateY(0);
}

/* Source Badge Styles */
.admin-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 4px;
  margin-top: 6px;
  width: fit-content;
}

.admin-source-badge.gold-badge {
  background: rgba(212, 175, 55, 0.08);
  border: 1px solid rgba(212, 175, 55, 0.25);
  color: #d4af37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.05);
}

/* Admin Tabs */
.admin-tabs-nav {
  display: flex;
  gap: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 12px;
}

.admin-tab-btn {
  background: transparent;
  border: none;
  color: #888;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  position: relative;
  padding: 8px 4px;
  transition: all 0.3s ease;
}

.admin-tab-btn:hover {
  color: #fff;
}

.admin-tab-btn.active {
  color: #d4af37;
}

.admin-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -13px;
  left: 0;
  width: 100%;
  height: 2px;
  background: #d4af37;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.admin-tab-content {
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.admin-tab-content.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Property CMS Assets Grid & Cards */
.cms-assets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
  margin-bottom: 48px;
}

.cms-asset-card {
  background: rgba(18, 18, 18, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  height: 100%;
}

.cms-asset-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212, 175, 55, 0.25);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.08);
}

.cms-card-img-wrapper {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.cms-card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-asset-card:hover .cms-card-img-wrapper img {
  transform: scale(1.05);
}

.cms-card-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(12, 12, 12, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #d4af37;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.cms-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.cms-card-body h3 {
  font-size: 20px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.3;
}

.cms-card-tagline {
  font-size: 13px;
  color: #aaa;
  margin-bottom: 20px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 36px;
}

.cms-card-metrics {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 18px;
  margin-top: auto;
}

.cms-card-price {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  font-size: 18px;
  color: #d4af37;
}

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

.cms-btn-edit, .cms-btn-delete {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-btn-edit:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: rgba(212, 175, 55, 0.3);
  color: #d4af37;
  transform: translateY(-1px);
}

.cms-btn-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
  transform: translateY(-1px);
}

.cms-card-placeholder {
  border: 2px dashed rgba(212, 175, 55, 0.2);
  border-radius: 12px;
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 30px;
  text-align: center;
  color: #aaa;
  background: rgba(212, 175, 55, 0.01);
  height: 100%;
}

.cms-card-placeholder:hover {
  border-color: #d4af37;
  background: rgba(212, 175, 55, 0.03);
  color: #fff;
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(212, 175, 55, 0.05);
}

.cms-card-placeholder i {
  font-size: 36px;
  color: #d4af37;
  margin-bottom: 16px;
  transition: transform 0.4s ease;
}

.cms-card-placeholder:hover i {
  transform: scale(1.1);
}

.cms-card-placeholder h3 {
  font-size: 18px;
  color: #fff;
  margin-bottom: 8px;
}

.cms-card-placeholder p {
  font-size: 13px;
  max-width: 220px;
  line-height: 1.4;
}

/* CMS Slide-over Panel */
.cms-panel-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.cms-panel-container {
  position: fixed;
  top: 0;
  right: -620px;
  width: 100%;
  max-width: 600px;
  height: 100%;
  background: #0d0d0d;
  border-left: 1px solid rgba(212, 175, 55, 0.15);
  z-index: 2001;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-panel-overlay.active .cms-panel-container {
  right: 0;
}

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

.cms-panel-header h3 {
  font-family: 'Cinzel Decorative', serif;
  font-size: 22px;
  color: #fff;
  letter-spacing: 1px;
  font-weight: 700;
}

.cms-panel-close-btn {
  background: transparent;
  border: none;
  color: #aaa;
  font-size: 22px;
  cursor: pointer;
  transition: color 0.2s ease;
}

.cms-panel-close-btn:hover {
  color: #fff;
}

.cms-panel-body {
  padding: 30px;
  overflow-y: auto;
  flex-grow: 1;
}

/* Form elements */
.cms-form-group {
  margin-bottom: 24px;
}

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

.cms-form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 10px;
}

.cms-input, .cms-select, .cms-textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px 18px;
  color: #fff;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-input:focus, .cms-select:focus, .cms-textarea:focus {
  border-color: rgba(212, 175, 55, 0.4);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.05);
}

.cms-select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.cms-select-wrapper {
  position: relative;
}

.cms-select-wrapper::after {
  content: '\f107';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  color: #888;
  font-size: 14px;
  pointer-events: none;
}

.cms-panel-footer {
  padding: 24px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 16px;
  justify-content: flex-end;
  background: #0a0a0a;
}

.cms-btn-cancel {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #aaa;
  border-radius: 6px;
  padding: 14px 28px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cms-btn-cancel:hover {
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.cms-btn-submit {
  background: #d4af37;
  border: 1px solid #d4af37;
  color: #0c0c0c;
  border-radius: 6px;
  padding: 14px 36px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.15);
}

.cms-btn-submit:hover {
  background: #fff;
  border-color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(255, 255, 255, 0.25);
}

.cms-form-section-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 32px 0 18px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cms-form-section-title i {
  color: #d4af37;
  font-size: 11px;
}
