:root {
  --color-primary: #2563eb;
  --color-secondary: #1e40af;
  --color-accent: #f59e0b;
  --color-background: #FFFBEB;
  --color-foreground: #0F172A;
  --color-card: #FFFFFF;
  --color-muted: #FCF6F0;
  --color-border: #FAEEE1;
  --color-surface: #FFF9F0;
  --color-surface-raised: #FFFFFF;
  --color-text: #0F172A;
  --color-text-muted: #64748b;
}

html, body {
  overflow-x: hidden;
}

input, select, textarea {
  font-size: 16px;
}

@media (max-width: 640px) {
  table {
    display: block;
    overflow-x: auto;
  }
}

/* Button safety net */
button[type="submit"] {
  background-color: var(--color-primary, #2563eb);
  color: #fff;
}

/* Navigation */
.nav-glass {
  background: rgba(37, 99, 235, 0.95);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  transition: box-shadow 0.3s ease;
}

.nav-glass.scrolled {
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.nav-link-mobile {
  color: rgba(255, 255, 255, 0.75);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link-mobile:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.nav-link-mobile-active {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

/* Cards */
.card-premium {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: all 0.2s ease;
}

.card-premium:hover {
  /* hover handled by Tailwind classes per element */
}

.stat-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.stat-card-stripe {
  height: 4px;
}

/* Inputs */
.input-premium {
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--color-border);
  border-radius: 0.75rem;
  background: var(--color-card);
  font-size: 1rem;
  transition: all 0.15s ease;
  min-height: 44px;
}

.input-premium:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Hero gradient */
.hero-gradient {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.06) 0%, transparent 50%),
              linear-gradient(225deg, rgba(245, 158, 11, 0.04) 0%, transparent 40%),
              var(--color-background);
}

/* Login brand panel */
.login-brand-panel {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
}

.honeycomb-overlay {
  position: absolute;
  inset: 0;
  opacity: 0.08;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cg fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Section styling */
.section-label {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent);
}

.section-warm {
  background: var(--color-muted);
}

.section-earth {
  background: var(--color-surface);
}

/* Dividers */
.divider-warm {
  height: 2px;
  background: linear-gradient(90deg, var(--color-accent), var(--color-primary), transparent);
  border-radius: 1px;
}

/* Footer */
.footer-gradient {
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 50%, #2563eb 100%);
}

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

.animate-in {
  animation: fadeInUp 0.4s ease-out both;
}

.animate-in:nth-child(2) { animation-delay: 0.08s; }
.animate-in:nth-child(3) { animation-delay: 0.16s; }
.animate-in:nth-child(4) { animation-delay: 0.24s; }
.animate-in:nth-child(5) { animation-delay: 0.32s; }
.animate-in:nth-child(6) { animation-delay: 0.40s; }
.animate-in:nth-child(7) { animation-delay: 0.48s; }
.animate-in:nth-child(8) { animation-delay: 0.56s; }

@media (prefers-reduced-motion: reduce) {
  .animate-in {
    animation: none;
  }
}

/* Line clamp utility */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Delete button override - prevent primary styling on inline text-link delete buttons */
form[data-confirm] button[type="submit"]:not([class*="bg-"]),
button[type="submit"].text-red-500:not([class*="bg-"]),
button[type="submit"].text-red-600:not([class*="bg-"]) {
  background: transparent;
  color: #ef4444;
  box-shadow: none;
  font-weight: 500;
  border-radius: 0.375rem;
}
form[data-confirm] button[type="submit"]:not([class*="bg-"]):hover,
button[type="submit"].text-red-500:not([class*="bg-"]):hover,
button[type="submit"].text-red-600:not([class*="bg-"]):hover {
  color: #dc2626;
  background: rgba(239, 68, 68, 0.05);
  transform: none;
  box-shadow: none;
}
