/* ==========================================================
   ROOT VARIABLES
   ========================================================== */
:root {
  --bg: #0f1115;
  --panel: #161923;
  --muted: #8aa0b4;
  --txt: #e8eef5;
  --accent: #43b0ff;
}

/* ==========================================================
   GLOBAL RESET & BODY
   ========================================================== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font: 15px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: #0b0d12;
  color: var(--txt);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px;
}

/* ==========================================================
   HEADER / NAVIGATION
   ========================================================== */
.topbar {
  background: #0b0d12;
  border-bottom: 1px solid #1c2230;
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  color: var(--txt);
  text-decoration: none;
  font-weight: 700;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  margin-left: 12px;
}

/* ==========================================================
   LAYOUT
   ========================================================== */
.main-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid #1f2736;
  border-radius: 12px;
  padding: 16px;
}

/* ==========================================================
   SHOP ITEMS
   ========================================================== */
.items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.item {
  background: #101521;
  border: 1px solid #1d2433;
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item img {
  width: 32px;
  height: 32px;
  object-fit: contain;   /* keeps proportions */
  border-radius: 4px;
  background: #0e1320;
  display: block;
  margin-bottom: 6px;
}


.item .name {
  font-weight: 600;
}

.item .sku {
  color: var(--muted);
  font-size: 12px;
}

.item .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ==========================================================
   BUTTONS
   ========================================================== */
button,
input[type="submit"],
.btn {
  background: var(--accent);
  color: #001423;
  border: none;
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background 0.2s, transform 0.1s;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
  background: #5cc2ff;
}

button:active,
input[type="submit"]:active,
.btn:active {
  transform: scale(0.97);
}

/* ==========================================================
   FORM ELEMENTS
   ========================================================== */
input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 8px;
  background: #0d1220;
  border: 1px solid #1f2736;
  color: var(--txt);
  border-radius: 8px;
}

/* ==========================================================
   CART
   ========================================================== */
.cart-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 60vh;
  overflow: auto;
}

.cart-item {
  display: grid;
  grid-template-columns: 1fr 70px 80px 24px;
  gap: 8px;
  align-items: center;
}

.cart-item .price,
.cart-item .sub {
  text-align: right;
}

.cart-empty {
  color: var(--muted);
  padding: 10px;
  text-align: center;
}

.coupon-chip {
  display:inline-flex; align-items:center; gap:8px;
  padding:6px 10px; border-radius:999px;
  background:#0d1b2a; border:1px solid #1b2a3d; color:var(--txt);
}


/* ==========================================================
   FOOTER
   ========================================================== */
.footer {
  border-top: 1px solid #1c2230;
  margin-top: 24px;
  color: var(--muted);
}

/* ==========================================================
   UTILITIES
   ========================================================== */
.small {
  color: var(--muted);
  font-size: 12px;
}

hr.sep {
  border: 0;
  border-top: 1px solid #1c2230;
  margin: 10px 0;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.notice {
  background: #0d1b2a;
  border: 1px solid #1b2a3d;
  padding: 10px;
  border-radius: 8px;
}

/* ==========================================================
   STATUS / LABELS
   ========================================================== */
.status-pill {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
}

.pending {
  background: #2b1c00;
  color: #f2c270;
}

.fulfilled {
  background: #062b15;
  color: #8ce5b6;
}

a.clean {
  color: var(--accent);
  text-decoration: none;
}

/* ==========================================================
   TABLES (ADMIN)
   ========================================================== */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid #1f2736;
  padding: 8px;
  text-align: left;
}

/* ==========================================================
   FORM ELEMENTS  (unified)
   ========================================================== */
label {
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
  color: var(--muted);
  font-size: 13px;
}

/* Style all text-like inputs, even if the type attribute is missing */
:where(
  input:not([type]),
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select
) {
  width: 100%;
  padding: 10px 12px;
  background: #0d1220;
  border: 1px solid #1f2736;
  border-radius: 8px;
  color: var(--txt);
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

:where(
  input:not([type]),
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="url"],
  input[type="search"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select
):focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(67, 176, 255, 0.25);
}

/* Prevent Chrome autofill yellow */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--txt);
  -webkit-box-shadow: 0 0 0 1000px #0d1220 inset;
  transition: background-color 9999s ease-out 0s;
}

/* ==========================================================
   CATEGORY FILTER TABS
   ========================================================== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.tab-btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 10px;
  background: #101521;
  border: 1px solid #1d2433;
  color: var(--txt);
  text-decoration: none;
  font-weight: 600;
}
.tab-btn:hover {
  background: #142033;
  border-color: #23304a;
}
.tab-btn.active {
  background: #11263d;
  border-color: #294b70;
  color: #9fd1ff;
}


/* ==========================================================
   ADMIN LAYOUT
   ========================================================== */
.admin-header {
  background:#0b0d12;
  border-bottom:1px solid #1c2230;
  position: sticky;
  top: 0;
  z-index: 12;
}
.admin-header-inner {
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px 16px;
}
.brand { display:flex; align-items:center; gap:10px; }
.brand img { width:32px; height:32px; object-fit:contain; border-radius:6px; background:#0e1320; }
.brand-text { color:var(--txt); font-weight:700; }
.admin-user { display:flex; align-items:center; gap:10px; }

.admin-shell {
  display:grid;
  grid-template-columns: 240px 1fr;
  gap:16px;
  margin-top:16px;
}
.admin-sidebar { position: sticky; top: 72px; align-self:start; }
.admin-nav { display:flex; flex-direction:column; gap:6px; }
.admin-nav a {
  display:block;
  padding:10px 12px;
  border-radius:8px;
  text-decoration:none;
  color:var(--txt);
  background:#101521;
  border:1px solid #1d2433;
}
.admin-nav a:hover { background:#142033; border-color:#23304a; }
.admin-nav a.active { background:#11263d; border-color:#294b70; color:#9fd1ff; }

.admin-content { min-width:0; } /* allow tables to shrink */
@media (max-width: 900px) {
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position:static; }
}

/* ==========================================================
   ADMIN ORDERS ACTIONS
   ========================================================== */
.admin-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.admin-actions details { display:inline-block; }
.admin-actions summary { cursor:pointer; color:var(--accent); }
.admin-actions form { display:inline; }

