:root {
  --sky-1: #f5fcff;
  --sky-2: #dff6ff;
  --water-1: #82d7ff;
  --water-2: #3f8ed2;
  --water-3: #1b5ea7;
  --deep: #062143;
  --text: #07233f;
  --muted: #55708c;
  --glass: rgba(255, 255, 255, 0.22);
  --glass-strong: rgba(255, 255, 255, 0.36);
  --border: rgba(255, 255, 255, 0.42);
  --shadow: 0 24px 70px rgba(8, 48, 89, 0.24);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/*
 * Typography baseline.
 * Space Grotesk — headings and key figures.  Inter — everything else.
 * Font-smoothing and text-rendering keep the letterforms crisp on Windows
 * instead of thin and serrated.
 */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: 0.005em;
  color: var(--text);
  background: linear-gradient(135deg, var(--sky-1) 0%, var(--sky-2) 42%, var(--water-1) 100%);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

input, select, textarea, button, table, label, nav {
  font-family: "Inter", system-ui, sans-serif;
}

body.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background-image:
    radial-gradient(circle at top left, rgba(255,255,255,0.5), transparent 28%),
    radial-gradient(circle at bottom right, rgba(120, 202, 255, 0.35), transparent 30%),
    linear-gradient(135deg, #f6fdff 0%, #dff8ff 45%, #9edcff 100%);
}

.auth-bg-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.7;
  animation: floatGlow 8s ease-in-out infinite;
}

.glow-one {
  width: 260px;
  height: 260px;
  background: rgba(85, 190, 255, 0.24);
  top: -70px;
  left: -70px;
}

.glow-two {
  width: 330px;
  height: 330px;
  background: rgba(255, 255, 255, 0.3);
  bottom: -90px;
  right: -100px;
  animation-delay: -4s;
}

.auth-wave {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  pointer-events: none;
  animation: waveFloat 10s linear infinite;
  opacity: 0.45;
}

.auth-wave-one {
  width: 220px;
  height: 220px;
  left: 6%;
  bottom: 8%;
}

.auth-wave-two {
  width: 310px;
  height: 310px;
  right: 4%;
  top: 13%;
  animation-duration: 13s;
  animation-direction: reverse;
}

.auth-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 48px;
  position: relative;
  z-index: 2;
}

.logo-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--deep);
  font-weight: 800;
  letter-spacing: 0.25rem;
  font-size: 1rem;
}

.logo-mark-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,0.9), rgba(130,215,255,0.6));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 20px rgba(34, 117, 183, 0.18);
  color: var(--water-3);
}

.logo-mark:hover {
  transform: translateY(-1px);
}

.auth-nav ul {
  list-style: none;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.auth-nav a {
  text-decoration: none;
  color: var(--deep);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.16rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.auth-nav a:hover {
  color: var(--water-3);
  transform: translateY(-1px);
}

.auth-main {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 20px 40px;
  position: relative;
  z-index: 2;
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 32px 32px 28px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(255,255,255,0.38), rgba(181, 228, 255, 0.22));
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  animation: cardRise 0.7s ease-out;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.3) 45%, transparent 100%);
  transform: translateX(-140%);
  animation: shimmer 6s ease-in-out infinite;
  pointer-events: none;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,0.35);
  pointer-events: none;
}

.auth-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14rem;
  text-transform: uppercase;
  color: var(--water-3);
  background: rgba(255,255,255,0.7);
  margin-bottom: 15px;
}

.auth-card h2 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.18rem;
  color: var(--deep);
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 18px;
}

.auth-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  margin-bottom: 12px;
  border: 1px solid rgba(255,255,255,0.4);
}

.auth-alert-error {
  background: rgba(255, 219, 219, 0.72);
  color: #8c1f1f;
}

.auth-alert-success {
  background: rgba(222, 248, 240, 0.8);
  color: #175645;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-form label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14rem;
  color: var(--deep);
}

.input-shell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(87, 155, 209, 0.4);
  background: rgba(237, 247, 255, 0.82);
  box-shadow: inset 0 1px 2px rgba(255,255,255,0.4);
}

.input-shell i {
  color: var(--water-3);
}

.auth-form input {
  flex: 1;
  height: 44px;
  border: none;
  background: transparent;
  color: var(--deep);
  font-size: 0.95rem;
  outline: none;
}

.auth-form input::placeholder {
  color: #7b95ad;
}

.auth-form button {
  margin-top: 6px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  height: 46px;
  border: none;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.16rem;
  color: white;
  background: linear-gradient(135deg, var(--water-3), var(--water-1));
  box-shadow: 0 10px 24px rgba(27, 94, 167, 0.24);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-form button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(27, 94, 167, 0.28);
}

.auth-switch {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.auth-switch a {
  color: var(--water-3);
  font-weight: 700;
  text-decoration: none;
}

.auth-switch a:hover {
  text-decoration: underline;
}

.auth-footer {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding: 16px 20px 24px;
  color: var(--deep);
  font-size: 0.9rem;
  position: relative;
  z-index: 2;
}

.auth-footer .item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(130, 215, 255, 0.25);
  color: var(--water-3);
}

@keyframes floatGlow {
  0%, 100% { transform: translateY(0px) scale(1); }
  50% { transform: translateY(16px) scale(1.04); }
}

@keyframes waveFloat {
  0% { transform: rotate(0deg) translateY(0px); }
  50% { transform: rotate(6deg) translateY(-10px); }
  100% { transform: rotate(0deg) translateY(0px); }
}

@keyframes cardRise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0% { transform: translateX(-140%); }
  100% { transform: translateX(140%); }
}

@media (max-width: 640px) {
  .auth-navbar {
    padding: 18px 20px;
    flex-direction: column;
    gap: 10px;
  }

  .auth-card {
    padding: 24px 20px 20px;
  }

  .auth-footer {
    padding-bottom: 18px;
  }
}

.auth-switch a {
  color: #0329a5;
  font-weight: 700;
  text-decoration: underline;
}

.auth-alert {
  font-size: 13px;
  border-radius: 6px;
  padding: 8px 10px;
  margin: 12px 0 6px;
}

.auth-alert-error {
  background: rgba(255, 223, 226, 0.9);
  color: #7a1320;
  border: 1px solid rgba(200, 63, 84, 0.4);
}

.auth-alert-success {
  background: rgba(222, 252, 229, 0.9);
  color: #16583a;
  border: 1px solid rgba(43, 155, 92, 0.4);
}

#footer.auth-footer {
  background: #ebebed;
  color: #000;
  min-height: 50px;
  padding: 12px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 34px;
  font-size: 14px;
}

#footer.auth-footer .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.auth-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  color: #fff;
  background: #1d2ac2;
  font-size: 12px;
}

@media (max-width: 768px) {
  .auth-navbar {
    padding: 14px 16px;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }

  .auth-nav ul {
    gap: 12px;
    flex-wrap: wrap;
  }

  #login-container.auth-card {
    max-width: 100%;
    padding: 28px 20px 22px;
  }

  #login-container h2 {
    font-size: 32px;
  }

  #footer.auth-footer {
    justify-content: flex-start;
    gap: 14px;
  }

  #footer.auth-footer .item {
    font-size: 14px;
  }
}
/* Product Management Styles */
.product-list-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  gap: 20px;
  align-items: center;
  background: #fff;
  padding: 15px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  margin-bottom: 15px;
}

.product-list-item img {
  max-width: 100px;
  max-height: 100px;
  border-radius: 4px;
  object-fit: cover;
}

.product-list-item .product-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-list-item .product-details h4 {
  margin: 0;
  color: #003366;
  font-size: 16px;
}

.product-list-item .product-details p {
  margin: 3px 0;
  font-size: 13px;
}

.product-list-item .product-actions {
  display: flex;
  gap: 8px;
  flex-direction: column;
}

form label {
  display: block;
  margin-top: 12px;
  margin-bottom: 5px;
  font-weight: bold;
  color: #003366;
}

form input[type="text"],
form input[type="number"],
form input[type="file"],
form textarea,
form select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

form textarea {
  resize: vertical;
  min-height: 100px;
}

form input[type="file"] {
  padding: 5px;
}