* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #11100e;
  --sidebar: #171613;
  --panel: #1b1a17;
  --panel-hover: #211f1b;

  --border: rgba(255, 255, 255, 0.08);

  --text: #f3efe7;
  --muted: #918c82;

  --accent: #c8a96b;
  --accent-soft: rgba(200, 169, 107, 0.12);

  --danger: #d87575;
  --success: #82b68c;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

/* ==========================================
   LOGIN
========================================== */

.login-page {
  min-height: 100vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 30px;

  background:
    radial-gradient(
      circle at 50% 20%,
      rgba(200, 169, 107, 0.08),
      transparent 35%
    ),
    var(--bg);
}

.login-wrapper {
  width: 100%;
  max-width: 430px;
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: center;

  gap: 14px;

  margin-bottom: 45px;
}

.brand-mark {
  width: 48px;
  height: 48px;

  display: grid;
  place-items: center;

  border: 1px solid var(--accent);

  color: var(--accent);

  font-family: Georgia, serif;
  font-size: 22px;
}

.login-brand h1 {
  font-family: Georgia, serif;
  font-size: 22px;
  letter-spacing: 4px;
}

.login-brand p {
  margin-top: 3px;

  color: var(--muted);

  font-size: 9px;
  letter-spacing: 3px;
}

.login-card {
  padding: 42px;

  background: rgba(27, 26, 23, 0.92);

  border: 1px solid var(--border);

  box-shadow:
    0 30px 80px rgba(0, 0, 0, 0.35);
}

.login-heading {
  margin-bottom: 32px;
}

.login-heading span {
  color: var(--accent);

  font-size: 10px;
  letter-spacing: 3px;
}

.login-heading h2 {
  margin-top: 8px;

  font-family: Georgia, serif;

  font-size: 32px;
  font-weight: 400;
}

.login-heading p {
  margin-top: 10px;

  color: var(--muted);

  font-size: 13px;
  line-height: 1.6;
}

.input-group {
  margin-bottom: 22px;
}

.input-group label {
  display: block;

  margin-bottom: 9px;

  color: #b5afa4;

  font-size: 11px;
  letter-spacing: 1px;
}

.input-group input {
  width: 100%;

  padding: 14px 15px;

  border: 1px solid var(--border);

  outline: none;

  background: #12110f;

  color: var(--text);

  font-size: 14px;

  transition: 0.25s;
}

.input-group input:focus {
  border-color: rgba(200, 169, 107, 0.6);
}

.login-btn {
  width: 100%;

  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 17px;

  border: 1px solid var(--accent);

  background: var(--accent);

  color: #17140e;

  cursor: pointer;

  font-size: 11px;
  font-weight: 700;

  letter-spacing: 2px;

  transition: 0.25s;
}

.login-btn:hover {
  background: transparent;
  color: var(--accent);
}

.login-message {
  min-height: 20px;

  margin-top: 15px;

  font-size: 12px;
  text-align: center;
}

.login-message.error {
  color: var(--danger);
}

.login-message.success {
  color: var(--success);
}

.login-footer {
  margin-top: 25px;

  color: #5f5b54;

  text-align: center;

  font-size: 10px;
  letter-spacing: 1px;
}

/* ==========================================
   ADMIN LAYOUT
========================================== */

.admin-layout {
  min-height: 100vh;

  display: flex;
}

/* ==========================================
   SIDEBAR
========================================== */

.sidebar {
  position: fixed;

  left: 0;
  top: 0;
  bottom: 0;

  width: 245px;

  display: flex;
  flex-direction: column;

  padding: 28px 18px;

  background: var(--sidebar);

  border-right: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;

  gap: 12px;

  padding: 0 10px;

  margin-bottom: 45px;
}

.sidebar-brand .brand-mark {
  width: 40px;
  height: 40px;

  font-size: 18px;
}

.sidebar-brand h2 {
  font-family: Georgia, serif;

  font-size: 16px;

  letter-spacing: 3px;
}

.sidebar-brand span {
  display: block;

  margin-top: 2px;

  color: var(--muted);

  font-size: 8px;

  letter-spacing: 2px;
}

.sidebar-nav {
  flex: 1;
}

.nav-label {
  margin: 0 10px 10px;

  color: #5f5b54;

  font-size: 9px;

  letter-spacing: 2px;
}

.nav-label:not(:first-child) {
  margin-top: 28px;
}

.nav-item {
  display: flex;
  align-items: center;

  gap: 13px;

  padding: 12px 13px;

  margin-bottom: 4px;

  border: 1px solid transparent;

  color: #aaa59b;

  text-decoration: none;

  font-size: 12px;

  transition: 0.25s;
}

.nav-item span {
  width: 18px;

  color: #777168;

  text-align: center;
}

.nav-item:hover,
.nav-item.active {
  border-color: var(--border);

  background: var(--accent-soft);

  color: var(--text);
}

.nav-item.active span {
  color: var(--accent);
}

.logout-btn {
  width: 100%;

  display: flex;
  align-items: center;

  gap: 13px;

  padding: 12px 13px;

  border: 1px solid transparent;

  background: transparent;

  color: #aaa59b;

  cursor: pointer;

  font-size: 12px;

  text-align: left;

  transition: 0.25s;
}

.logout-btn:hover {
  color: var(--danger);

  border-color: rgba(216, 117, 117, 0.2);
}

/* ==========================================
   MAIN
========================================== */

.main-content {
  width: calc(100% - 245px);

  margin-left: 245px;

  min-height: 100vh;
}

.topbar {
  min-height: 90px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  padding: 20px 42px;

  border-bottom: 1px solid var(--border);
}

.eyebrow {
  margin-bottom: 5px;

  color: var(--accent);

  font-size: 9px;

  letter-spacing: 3px;
}

.topbar h1 {
  font-family: Georgia, serif;

  font-size: 28px;

  font-weight: 400;
}

.admin-profile {
  display: flex;
  align-items: center;

  gap: 10px;
}

.profile-avatar {
  width: 38px;
  height: 38px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: var(--accent-soft);

  border: 1px solid rgba(200, 169, 107, 0.3);

  color: var(--accent);

  font-family: Georgia, serif;
}

.admin-profile strong {
  display: block;

  font-size: 12px;
}

.admin-profile span {
  display: block;

  margin-top: 2px;

  color: var(--muted);

  font-size: 9px;
}

/* ==========================================
   DASHBOARD
========================================== */

.dashboard-content {
  padding: 35px 42px;
}

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(4, 1fr);

  gap: 15px;

  margin-bottom: 20px;
}

.stat-card {
  display: flex;
  align-items: center;

  gap: 16px;

  padding: 22px;

  background: var(--panel);

  border: 1px solid var(--border);

  transition: 0.25s;
}

.stat-card:hover {
  background: var(--panel-hover);

  border-color: rgba(200, 169, 107, 0.2);
}

.stat-icon {
  width: 42px;
  height: 42px;

  display: grid;
  place-items: center;

  border: 1px solid rgba(200, 169, 107, 0.25);

  color: var(--accent);

  font-size: 16px;
}

.stat-card span {
  display: block;

  color: var(--muted);

  font-size: 10px;

  letter-spacing: 0.5px;
}

.stat-card strong {
  display: block;

  margin-top: 4px;

  font-family: Georgia, serif;

  font-size: 25px;

  font-weight: 400;
}

/* ==========================================
   PANELS
========================================== */

.content-grid {
  display: grid;

  grid-template-columns: 1.6fr 1fr;

  gap: 20px;
}

.panel {
  min-height: 300px;

  padding: 25px;

  background: var(--panel);

  border: 1px solid var(--border);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;

  margin-bottom: 24px;
}

.panel-eyebrow {
  color: var(--accent);

  font-size: 8px;

  letter-spacing: 2px;
}

.panel h2 {
  margin-top: 5px;

  font-family: Georgia, serif;

  font-size: 21px;

  font-weight: 400;
}

.outline-btn {
  padding: 9px 12px;

  border: 1px solid var(--border);

  background: transparent;

  color: var(--muted);

  cursor: pointer;

  font-size: 9px;

  letter-spacing: 1px;

  transition: 0.25s;
}

.outline-btn:hover {
  border-color: var(--accent);

  color: var(--accent);
}

.loading {
  padding: 30px 0;

  color: var(--muted);

  font-size: 12px;
}

/* ==========================================
   PRODUCT LIST
========================================== */

.product-row {
  display: flex;
  align-items: center;

  gap: 14px;

  padding: 12px 0;

  border-bottom: 1px solid var(--border);
}

.product-row:last-child {
  border-bottom: none;
}

.product-image {
  width: 50px;
  height: 60px;

  object-fit: cover;

  background: #111;
}

.product-info {
  flex: 1;
}

.product-info strong {
  display: block;

  font-family: Georgia, serif;

  font-size: 14px;

  font-weight: 400;
}

.product-info span {
  display: block;

  margin-top: 4px;

  color: var(--muted);

  font-size: 10px;
}

.product-price {
  color: var(--accent);

  font-size: 12px;
}

/* ==========================================
   INVENTORY
========================================== */

.inventory-row {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 13px 0;

  border-bottom: 1px solid var(--border);
}

.inventory-row:last-child {
  border-bottom: none;
}

.inventory-name {
  font-size: 12px;
}

.inventory-stock {
  font-size: 10px;
}

.status {
  display: inline-block;

  margin-left: 7px;

  padding: 4px 7px;

  font-size: 8px;

  letter-spacing: 0.5px;
}

.status.in-stock {
  color: var(--success);

  background: rgba(130, 182, 140, 0.1);
}

.status.low-stock {
  color: var(--accent);

  background: var(--accent-soft);
}

.status.out-of-stock {
  color: var(--danger);

  background: rgba(216, 117, 117, 0.1);
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 1000px) {

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 700px) {

  .sidebar {
    width: 70px;

    padding: 20px 10px;
  }

  .sidebar-brand {
    justify-content: center;
    padding: 0;
  }

  .sidebar-brand > div:last-child,
  .nav-label,
  .nav-item:not(.active)::after,
  .nav-item {
    font-size: 0;
  }

  .nav-item {
    justify-content: center;
  }

  .nav-item span {
    font-size: 15px;
  }

  .logout-btn {
    justify-content: center;
    font-size: 0;
  }

  .logout-btn span {
    font-size: 15px;
  }

  .main-content {
    width: calc(100% - 70px);

    margin-left: 70px;
  }

  .topbar {
    padding: 18px 20px;
  }

  .dashboard-content {
    padding: 20px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

}