/* Shared admin styles used across the admin pages */
:root {
  --admin-bg: rgba(5, 21, 40, 0.92);
  --admin-card-border: rgba(136, 186, 240, 0.25);
  --admin-card-bg: rgba(11, 21, 35, 0.85);
}

.admin-page {
  background: radial-gradient(circle at top left, rgba(136, 186, 240, 0.25), transparent 55%),
    radial-gradient(circle at bottom right, rgba(21, 39, 59, 0.9), rgba(5, 33, 64, 0.97));
  color: var(--aidan-white);
  position: relative;
  overflow-x: hidden;
}

/* Hexagon background pattern for admin pages */
.admin-page::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 140'%3E%3Cg opacity='0.08' stroke='%237dd4ff' stroke-width='1.5' fill='none'%3E%3Cpath d='M30 15 L60 0 L90 15 L90 45 L60 60 L30 45 Z'/%3E%3Cpath d='M30 75 L60 60 L90 75 L90 105 L60 120 L30 105 Z'/%3E%3C/g%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 140'%3E%3Cg opacity='0.05' stroke='%2388baf0' stroke-width='1' fill='none'%3E%3Cpath d='M30 15 L60 0 L90 15 L90 45 L60 60 L30 45 Z'/%3E%3Cpath d='M30 75 L60 60 L90 75 L90 105 L60 120 L30 105 Z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 300px 350px, 450px 525px;
  background-position: 0 0, 75px 87px;
  background-repeat: repeat;
  pointer-events: none;
  z-index: 0;
  animation: hexagonDrift 40s ease-in-out infinite;
}

@keyframes hexagonDrift {
  0%, 100% {
    background-position: 0 0, 75px 87px;
  }
  50% {
    background-position: 30px -20px, 105px 67px;
  }
}

.admin-page,
.admin-page * {
  color: #ffffff !important;
}

.aidan-form-card,
.aidan-form-card * {
  color: #ffffff !important;
}

main {
  position: relative;
  z-index: 1;
}

.admin-header {
  padding: 3.5rem 1.5rem 2rem;
  text-align: center;
  position: relative;
  z-index: 1;
}

.admin-header h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw + 1rem, 3rem);
  letter-spacing: -0.03em;
  background: linear-gradient(90deg, #7dd4ff, #c4e1ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 20px rgba(125, 212, 255, 0.3));
}

.admin-main {
  margin: 0 0 0.35rem;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  color: var(--aidan-white);
}

.admin-header p {
  margin: 0.75rem auto 0;
  max-width: 54rem;
  color: rgba(203, 213, 225, 0.85);
}

.admin-section {
  padding: 2.5rem 1.5rem 3.5rem;
  position: relative;
  z-index: 1;
}

.admin-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2.25rem;
}

.admin-card {
  background: linear-gradient(135deg, rgba(20, 45, 90, .97), rgba(10, 20, 45, .96), rgba(15, 30, 65, .95));
  border: 2px solid rgba(100, 180, 255, .35);
  border-radius: 20px;
  padding: 1.6rem 1.5rem;
  box-shadow: 0 18px 55px rgba(0, 0, 0, 0.45), 0 0 30px rgba(50, 120, 255, 0.15);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  animation: cardReveal 0.6s ease-out backwards;
}

.admin-card:nth-child(1) { animation-delay: 0.1s; }
.admin-card:nth-child(2) { animation-delay: 0.2s; }
.admin-card:nth-child(3) { animation-delay: 0.3s; }
.admin-card:nth-child(4) { animation-delay: 0.4s; }
.admin-card:nth-child(5) { animation-delay: 0.5s; }

@keyframes cardReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.admin-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 212, 255, 0.5), transparent);
}

.admin-card:hover {
  transform: translateY(-4px);
  border-color: rgba(100, 180, 255, .6);
  box-shadow: 0 24px 68px rgba(0, 0, 0, 0.55), 0 0 40px rgba(50, 120, 255, 0.25);
}

.admin-card h3 {
  margin: 0 0 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #c4e1ff;
}

.admin-card p {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: linear-gradient(90deg, #7dd4ff, #a0d8ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.admin-card p:last-child {
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  background: none;
  -webkit-text-fill-color: unset;
  color: rgba(203, 213, 225, 0.75);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: linear-gradient(135deg, rgba(15, 40, 80, 0.8), rgba(10, 25, 50, 0.75));
  border: 2px solid rgba(100, 180, 255, .3);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 30px rgba(50, 120, 255, 0.1);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}

.admin-table::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 212, 255, 0.3), transparent);
  z-index: 2;
}

.admin-table th,
.admin-table td {
  padding: 1rem;
  text-align: left;
  font-size: 0.92rem;
  color: rgba(226, 232, 240, 0.9);
  border-bottom: 1px solid rgba(136, 186, 240, 0.12);
}

.admin-table thead th {
  color: #e8f0ff;
  font-weight: 700;
  background: linear-gradient(90deg, rgba(30, 60, 120, 0.5), rgba(20, 45, 90, 0.3));
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.admin-table tbody tr {
  transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
  background: rgba(100, 150, 255, 0.15);
  cursor: pointer;
  border-left: 3px solid rgba(125, 212, 255, 0.5);
}

.admin-table tbody tr td:last-child {
  text-align: right;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1.5px solid;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.status-new {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.15));
  color: #52d9ff;
  border-color: rgba(52, 152, 219, 0.5);
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.3);
}

.status-default {
  background: linear-gradient(135deg, rgba(149, 165, 166, 0.2), rgba(127, 140, 141, 0.15));
  color: rgba(189, 195, 199, 0.95);
  border-color: rgba(149, 165, 166, 0.4);
}

.status-sold {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.15));
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.25);
}

.status-attention {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(230, 126, 34, 0.15));
  color: #f1c40f;
  border-color: rgba(241, 196, 15, 0.5);
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.25);
}

.status-archived {
  background: linear-gradient(135deg, rgba(149, 165, 166, 0.2), rgba(127, 140, 141, 0.15));
  color: rgba(189, 195, 199, 0.75);
  border-color: rgba(149, 165, 166, 0.3);
}

.status-in-progress {
  background: linear-gradient(135deg, rgba(52, 152, 219, 0.2), rgba(41, 128, 185, 0.15));
  color: #52d9ff;
  border-color: rgba(52, 152, 219, 0.5);
  box-shadow: 0 0 12px rgba(52, 152, 219, 0.3);
  border: 1.5px solid;
}

.status-estimated {
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.2), rgba(39, 174, 96, 0.15));
  color: #2ecc71;
  border-color: rgba(46, 204, 113, 0.5);
  box-shadow: 0 0 12px rgba(46, 204, 113, 0.25);
  border: 1.5px solid;
}

.status-needs-estimate {
  background: linear-gradient(135deg, rgba(241, 196, 15, 0.2), rgba(230, 126, 34, 0.15));
  color: #f1c40f;
  border-color: rgba(241, 196, 15, 0.5);
  box-shadow: 0 0 12px rgba(241, 196, 15, 0.25);
  border: 1.5px solid;
}

.admin-actions {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.admin-actions a {
  text-decoration: none;
  color: #d5e6ff;
  background: linear-gradient(135deg, rgba(100, 150, 255, 0.2), rgba(80, 130, 255, 0.1));
  border: 1.5px solid rgba(125, 180, 255, 0.4);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s ease;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.2);
}

.admin-actions a:hover {
  background: linear-gradient(135deg, rgba(125, 180, 255, 0.3), rgba(100, 160, 255, 0.2));
  border-color: rgba(150, 210, 255, 0.6);
  color: #f4f8ff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(125, 212, 255, 0.2);
}

@media (max-width: 768px) {
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.75rem;
  }

  .admin-header {
    padding: 2.5rem 1rem 1.5rem;
  }

  .admin-section {
    padding: 1.5rem 1rem 2.5rem;
  }

  .admin-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Aidan form card styling for admin pages */
.aidan-form-card {
  background: linear-gradient(135deg, rgba(15, 40, 80, 0.85), rgba(10, 25, 50, 0.8));
  border: 2px solid rgba(100, 180, 255, 0.3);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55), 0 0 30px rgba(50, 120, 255, 0.1);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
}

.aidan-form-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(125, 212, 255, 0.3), transparent);
}

.aidan-form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #e8f0ff;
  margin: 0 0 0.5rem;
  background: linear-gradient(90deg, #7dd4ff, #c4e1ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.aidan-form-detail {
  color: rgba(203, 213, 225, 0.85);
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
}
