/* Premium layer styling on top of Tailwind CDN build */
:root {
  --app-primary: #4f46e5;
  --app-secondary: #6366f1;
  --app-accent: #a855f7;
  --app-surface: rgba(255, 255, 255, 0.92);
  --app-border: rgba(99, 102, 241, 0.14);
}

body {
  font-family: "Plus Jakarta Sans", "Inter", system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", sans-serif;
  position: relative;
  min-height: 100vh;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

body::before {
  background: radial-gradient(
      circle at 10% 20%,
      rgba(99, 102, 241, 0.1),
      transparent 55%
    ),
    radial-gradient(
      circle at 90% 20%,
      rgba(236, 72, 153, 0.08),
      transparent 55%
    ),
    radial-gradient(
      circle at 50% 90%,
      rgba(14, 165, 233, 0.08),
      transparent 60%
    );
}

body::after {
  background: linear-gradient(
    135deg,
    rgba(248, 250, 252, 0.85),
    rgba(238, 242, 255, 0.9)
  );
  z-index: -3;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.5rem;
  border-radius: 9999px;
  background-image: linear-gradient(
    135deg,
    var(--app-primary),
    var(--app-accent)
  );
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 18px 35px -20px rgba(79, 70, 229, 0.8),
    0 8px 18px -12px rgba(168, 85, 247, 0.45);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px -18px rgba(79, 70, 229, 0.85),
    0 10px 25px -15px rgba(168, 85, 247, 0.5);
  filter: brightness(1.03);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.4rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(209, 213, 219, 0.6);
  color: rgb(71 85 105);
  font-size: 0.93rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 22px -18px rgba(15, 23, 42, 0.45);
  transition: transform 200ms ease, box-shadow 200ms ease,
    border-color 200ms ease;
}

.btn-secondary:hover {
  transform: translateY(-1px);
  border-color: rgba(99, 102, 241, 0.35);
  box-shadow: 0 18px 32px -22px rgba(15, 23, 42, 0.55);
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="datetime-local"],
input[type="date"],
input[type="time"],
select,
textarea {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid var(--app-border);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
  color: rgb(15 23 42);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 200ms ease, box-shadow 200ms ease,
    transform 200ms ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.6);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.12),
    inset 0 1px 2px rgba(79, 70, 229, 0.08);
}

label {
  font-size: 0.85rem;
  font-weight: 600;
  color: rgb(71 85 105);
  letter-spacing: 0.01em;
}

.card {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  background: var(--app-surface);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 20px -28px rgba(166, 173, 189, 0.55),
    0 18px 36px -24px rgba(169, 169, 205, 0.35);
  backdrop-filter: blur(12px);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.card::before {
  content: "";
  position: absolute;
  inset: -60% 30% auto -30%;
  height: 280px;
  background: linear-gradient(
    120deg,
    rgba(99, 102, 241, 0.14),
    rgba(168, 85, 247, 0.08)
  );
  filter: blur(0);
  opacity: 0.6;
  pointer-events: none;
  transform: rotate(2deg);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 28px 30px -30px rgba(116, 124, 142, 0.6),
    0 20px 40px -25px rgba(104, 104, 145, 0.38);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  background-image: linear-gradient(
    135deg,
    rgba(79, 70, 229, 0.16),
    rgba(30, 64, 175, 0.12)
  );
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: 0 22px 40px -28px rgba(30, 64, 175, 0.45);
  color: rgb(30 41 59);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: "";
  position: absolute;
  inset: auto -40% -80% 50%;
  height: 260px;
  background: radial-gradient(
    circle,
    rgba(129, 140, 248, 0.42),
    transparent 70%
  );
  opacity: 0.6;
}

.stat-card .stat-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(30, 64, 175, 0.9);
}

.stat-card .stat-value {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  color: rgba(15, 23, 42, 0.92);
}

.badge-soft {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(236, 233, 254, 0.8);
  color: rgba(79, 70, 229, 0.95);
  border: 1px solid rgba(79, 70, 229, 0.2);
}

.app-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  overflow: hidden;
  border-radius: 1.25rem;
  box-shadow: 0 16px 42px -28px rgba(15, 23, 42, 0.5);
}

.app-table thead {
  background: linear-gradient(
    135deg,
    rgba(76, 106, 255, 0.1),
    rgba(79, 70, 229, 0.2)
  );
  color: rgba(30, 41, 59, 0.9);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.app-table thead th {
  padding: 0.85rem 1.25rem;
  font-weight: 700;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.app-table tbody tr {
  background: rgba(255, 255, 255, 0.95);
  transition: transform 200ms ease, box-shadow 200ms ease,
    background-color 200ms ease;
}

.app-table tbody tr + tr td {
  border-top: 1px solid rgba(226, 232, 240, 0.7);
}

.app-table tbody tr:hover {
  background: rgba(239, 246, 255, 0.9);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px rgba(79, 70, 229, 0.08);
}

.app-table tbody td {
  padding: 0.9rem 1.25rem;
  font-size: 0.92rem;
  color: rgba(30, 41, 59, 0.92);
}

.flash-message {
  position: relative;
  padding: 0.85rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(16, 185, 129, 0.22);
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.12),
    rgba(52, 211, 153, 0.18)
  );
  color: rgba(6, 95, 70, 0.95);
  font-weight: 600;
  box-shadow: 0 15px 32px -24px rgba(16, 185, 129, 0.7);
}

.flash-error {
  border: 1px solid rgba(244, 63, 94, 0.25);
  background: linear-gradient(
    135deg,
    rgba(244, 63, 94, 0.14),
    rgba(248, 113, 113, 0.18)
  );
  color: rgba(136, 19, 55, 0.98);
  box-shadow: 0 15px 32px -24px rgba(248, 113, 113, 0.65);
}
