:root {
  --bg: #0f172a;
  --text: #111827;
  --muted: #6b7280;
  --primary: #7c3aed;
  --primary-dark: #6d28d9;
  --danger: #dc2626;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: #f4f5f7;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 7%;
  background: rgba(15, 23, 42, 0.95);
  color: white;
}

.brand {
  font-size: 1.4rem;
  font-weight: 800;
}

.navlinks {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.navlinks a,
.link-button {
  color: #e5e7eb;
  font-size: 0.95rem;
}

.link-button {
  background: none;
  border: none;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.hero {
  min-height: 70vh;
  padding: 90px 7%;
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  align-items: center;
  gap: 40px;
  color: white;
  background:
    radial-gradient(circle at 15% 10%, rgba(124,58,237,0.55), transparent 30%),
    linear-gradient(135deg, #020617, #111827 55%, #312e81);
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  line-height: 0.95;
}

.hero-text {
  max-width: 650px;
  color: #d1d5db;
  font-size: 1.15rem;
  line-height: 1.7;
}

.hero-card {
  padding: 34px;
  border-radius: 28px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  font-weight: 800;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 44px 22px;
}

.page-head {
  margin-bottom: 26px;
  padding: 32px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.page-head h1 {
  margin: 0;
  font-size: 2.4rem;
}

.actions,
.toolbar {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.btn {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  padding: 13px 18px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 700;
}

.primary {
  background: var(--primary);
  color: white;
}

.primary:hover {
  background: var(--primary-dark);
}

.secondary {
  background: #e5e7eb;
  color: #111827;
}

.danger {
  background: var(--danger);
  color: white;
}

.full {
  width: 100%;
}

.auth-page {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 30px;
  background:
    radial-gradient(circle at top left, rgba(124,58,237,0.18), transparent 35%),
    #f4f5f7;
}

.auth-card,
.panel,
.info-card,
.product-card,
.order-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

.auth-card {
  width: min(430px, 100%);
  padding: 32px;
}

label {
  display: block;
  margin: 16px 0 7px;
  font-weight: 700;
}

input {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid #d1d5db;
  border-radius: 14px;
  font-size: 1rem;
  outline: none;
}

input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(124,58,237,0.12);
}

.small,
.muted {
  color: var(--muted);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.info-card {
  padding: 26px;
}

.toolbar {
  margin-bottom: 24px;
}

.toolbar input {
  max-width: 420px;
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}

.product-card {
  position: relative;
  padding: 24px;
  overflow: hidden;
}

.product-image {
  display: grid;
  place-items: center;
  height: 160px;
  margin-bottom: 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, #ede9fe, #f5f3ff);
  font-size: 4rem;
}

.product-card h2 {
  margin: 0 0 10px;
}

.product-card p {
  min-height: 44px;
  color: var(--muted);
}

.product-card strong {
  display: block;
  margin: 16px 0;
  font-size: 1.2rem;
}

.badge {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #111827;
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.order-list {
  display: grid;
  gap: 16px;
}

.order-card {
  padding: 22px;
}

.status {
  margin-top: 22px;
  padding: 18px;
  min-height: 50px;
  background: #020617;
  color: #22c55e;
  border-radius: 18px;
  overflow-x: auto;
}

.cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  margin-left: 4px;
  border-radius: 999px;
  background: var(--primary);
  color: white;
  font-size: 0.75rem;
  font-weight: 800;
}

.cart-layout {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
}

.cart-panel,
.cart-summary {
  background: white;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 32px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.07);
}

.cart-items {
  display: grid;
  gap: 18px;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  padding: 22px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 22px;
}

.cart-item h3 {
  margin: 0 0 8px;
}

.cart-item p {
  margin: 0 0 10px;
  color: var(--muted);
}

.cart-item strong {
  color: var(--primary);
}

.cart-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.cart-quantity {
  min-width: 34px;
  text-align: center;
  font-weight: 900;
  font-size: 1.1rem;
}

.cart-summary {
  position: sticky;
  top: 100px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.summary-row strong {
  font-size: 1.2rem;
}

.cart-summary button {
  margin-top: 24px;
}

.admin-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 48px 32px 80px;
}

.admin-hero {
  background:
    linear-gradient(135deg, rgba(124,58,237,0.12), rgba(17,24,39,0.04)),
    white;
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 46px;
  margin-bottom: 34px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.08);
}

.admin-hero h1 {
  margin: 0 0 14px;
  font-size: clamp(2.2rem, 5vw, 4rem);
  letter-spacing: -0.05em;
}

.admin-hero p {
  max-width: 780px;
  color: var(--muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-bottom: 34px;
}

.stat-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 30px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.07);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 12px;
}

.stat-card strong {
  display: block;
  font-size: 2.1rem;
  color: var(--primary);
  letter-spacing: -0.04em;
}

.admin-section-grid {
  display: grid;
  grid-template-columns: 430px 1fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 34px;
}

.admin-panel {
  background: white;
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 32px;
  box-shadow: 0 18px 55px rgba(15, 23, 42, 0.07);
}

.panel-title {
  margin-bottom: 26px;
}

.panel-title h2,
.panel-header h2 {
  margin: 0 0 8px;
  font-size: 1.6rem;
}

.panel-title p,
.panel-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 28px;
}

.product-form label {
  margin-top: 20px;
}

.product-form button {
  margin-top: 26px;
}

.admin-product-list {
  display: grid;
  gap: 18px;
}

.admin-product-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 26px;
  padding: 22px;
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 22px;
}

.admin-product-card h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.admin-product-card p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.5;
}

.admin-product-card strong {
  color: var(--primary);
}

.orders-panel {
  margin-top: 34px;
}

.orders-card-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 22px;
  margin-bottom: 34px;
}

.order-admin-card {
  background: #f9fafb;
  border: 1px solid var(--border);
  border-radius: 26px;
  padding: 24px;
}

.order-card-top {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.order-id {
  font-weight: 800;
  color: var(--primary);
}

.order-date {
  color: var(--muted);
  font-size: 0.85rem;
}

.order-user-block {
  display: grid;
  gap: 6px;
  padding: 18px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  margin-bottom: 18px;
}

.order-user-block strong {
  font-size: 1.05rem;
}

.order-user-block span {
  color: var(--muted);
}

.order-product-block h3 {
  margin: 0 0 8px;
}

.order-product-block p {
  margin: 0 0 10px;
  color: var(--muted);
}

.order-product-block strong {
  color: var(--text);
  font-size: 1.1rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 22px;
}

.orders-table {
  width: 100%;
  min-width: 1000px;
  border-collapse: collapse;
  background: white;
}

.orders-table th {
  padding: 18px 20px;
  text-align: left;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.orders-table td {
  padding: 20px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.orders-table tr:hover {
  background: #fafafa;
}

.empty-text {
  color: var(--muted);
  padding: 20px;
  background: #f9fafb;
  border: 1px dashed var(--border);
  border-radius: 18px;
}

@media (max-width: 1000px) {
  .hero,
  .grid-3,
  .admin-section-grid,
  .stats-grid,
  .cart-layout {
    grid-template-columns: 1fr;
  }

  .navbar {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .hero {
    padding-top: 55px;
  }

  .cart-summary {
    position: static;
  }

  .cart-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .admin-container {
    padding: 28px 18px 60px;
  }

  .admin-hero,
  .admin-panel {
    padding: 26px;
  }

  .panel-header {
    flex-direction: column;
  }

  .admin-product-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .order-items {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.order-item-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
}