:root {
  --bg: #f3f7ff;
  --bg-soft: #e9f0ff;
  --card: rgba(255, 255, 255, 0.88);
  --card-solid: #ffffff;
  --text: #17223b;
  --muted: #60708f;
  --primary: #356dff;
  --primary-strong: #2a59d6;
  --success: #10b981;
  --warning: #f59e0b;
  --border: rgba(122, 149, 216, 0.24);
  --shadow: 0 14px 35px rgba(38, 71, 139, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1100px 460px at 0% 0%, #e8efff 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #e6f4ff 0%, transparent 62%),
    var(--bg);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: min(1360px, 94%);
  margin: 0 auto;
}

.glass {
  background: var(--card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: 20px;
}

.background-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
}

.orb-1 {
  width: 220px;
  height: 220px;
  left: 8%;
  top: 12%;
  background: rgba(89, 144, 255, 0.24);
}

.orb-2 {
  width: 260px;
  height: 260px;
  right: 6%;
  top: 16%;
  background: rgba(124, 138, 255, 0.2);
}

.orb-3 {
  width: 280px;
  height: 280px;
  right: 15%;
  bottom: 4%;
  background: rgba(52, 211, 153, 0.18);
}

.top-nav {
  margin-top: 26px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
}

.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #6a95ff, #7b5cff);
}

.brand-wrap h1 {
  margin: 0;
  font-size: 1.1rem;
}

.brand-wrap p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.nav-links {
  display: flex;
  gap: 8px;
}

.nav-links a {
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a.active,
.nav-links a:hover {
  color: var(--primary-strong);
  background: rgba(91, 140, 255, 0.14);
}

.hero-card {
  padding: 34px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.badge {
  display: inline-block;
  background: rgba(91, 140, 255, 0.2);
  color: #3459a8;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  margin-bottom: 8px;
}

.hero-card h2 {
  margin: 0;
  max-width: 620px;
  font-size: clamp(1.4rem, 2.8vw, 2rem);
}

.hero-card p {
  color: var(--muted);
  margin-top: 10px;
  line-height: 1.6;
  max-width: 620px;
}

.hero-actions {
  display: flex;
  align-items: start;
  gap: 10px;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary {
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), #7a6bff);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #4f80f4, #6456ea);
}

.btn-ghost {
  color: #304461;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(122, 149, 216, 0.32);
}

.controls-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
}

.search-box input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  font-size: 0.95rem;
  padding: 14px 0;
}

.search-icon {
  color: var(--muted);
}

.chip-group {
  display: flex;
  gap: 8px;
}

.chip {
  border: 1px solid rgba(122, 149, 216, 0.32);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  color: #415270;
  padding: 10px 13px;
  cursor: pointer;
}

.chip-active,
.chip:hover {
  background: rgba(91, 140, 255, 0.16);
  border-color: rgba(90, 132, 230, 0.45);
  color: #244a9a;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  padding-bottom: 30px;
}

.product-card {
  overflow: hidden;
  transition:
    transform 0.3s ease,
    border-color 0.3s ease;
}

.product-card:hover {
  transform: translateY(-6px);
  border-color: rgba(136, 168, 255, 0.45);
}

.card-media {
  position: relative;
  height: 180px;
}

.card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
}

.stock-badge.in-stock {
  background: rgba(16, 185, 129, 0.14);
  color: #0f7a56;
}

.stock-badge.low-stock {
  background: rgba(245, 158, 11, 0.15);
  color: #9a6200;
}

.card-content {
  padding: 15px;
}

.card-content h3 {
  margin: 0;
  font-size: 1.02rem;
}

.description {
  color: var(--muted);
  margin: 9px 0 13px;
  line-height: 1.5;
  font-size: 0.9rem;
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
}

.price {
  font-size: 1.16rem;
  font-weight: 800;
}

.price-row small,
.quantity {
  color: var(--muted);
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  gap: 18px;
  padding-bottom: 28px;
  align-items: start;
}

.admin-card {
  padding: 24px;
}

.admin-layout .admin-card:first-child {
  position: sticky;
  top: 20px;
}

.section-title-wrap h2 {
  padding: 20px 0;
  margin: 0 0 6px;
  font-size: 1.2rem;
}

.section-title-wrap p {
  margin: 0 0 18px;
  color: var(--muted);
}

.product-form {
  display: grid;
  gap: 12px;
}

.input-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.input-group label {
  font-size: 0.88rem;
  color: #476086;
}

.input-group input,
.input-group textarea {
  width: 100%;
  border: 1px solid rgba(160, 182, 255, 0.24);
  background: #ffffff;
  border-radius: 12px;
  padding: 12px 13px;
  color: var(--text);
  outline: none;
}

.input-group input:focus,
.input-group textarea:focus {
  border-color: rgba(114, 156, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.15);
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.table-wrap {
  overflow-x: auto;
  max-height: 72vh;
  border: 1px solid rgba(122, 149, 216, 0.2);
  border-radius: 14px;
}

.products-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 840px;
  background: #ffffff;
}

.products-table th,
.products-table td {
  border-bottom: 1px solid rgba(160, 182, 255, 0.16);
  text-align: left;
  padding: 12px 8px;
}

.products-table th {
  color: #385074;
  font-size: 0.85rem;
  font-weight: 700;
  position: sticky;
  top: 0;
  background: #f5f8ff;
  z-index: 1;
}

.products-table td {
  color: #47597a;
  font-size: 0.87rem;
}

.products-table a {
  color: #2f67dc;
}

.btn-table {
  border: 1px solid rgba(125, 167, 255, 0.45);
  color: #244a95;
  background: rgba(91, 140, 255, 0.14);
  border-radius: 8px;
  padding: 7px 11px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .hero-card {
    flex-direction: column;
    padding: 24px;
  }

  .hero-actions {
    align-items: center;
    flex-wrap: wrap;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-layout .admin-card:first-child {
    position: static;
  }

  .controls-row {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .top-nav {
    flex-direction: column;
    align-items: start;
    gap: 14px;
  }

  .input-row {
    grid-template-columns: 1fr;
  }
}

.login-main {
  min-height: calc(100vh - 150px);
  display: grid;
  place-items: center;
  padding: 20px 0 34px;
}

.login-card {
  width: min(460px, 100%);
  padding: 28px;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.forgot-link {
  font-size: 0.88rem;
  color: #2f67dc;
  font-weight: 600;
}

.forgot-link:hover {
  text-decoration: underline;
}

.login-btn {
  margin-top: 6px;
  width: 100%;
  padding: 12px 16px;
}
