:root {
  --bg: #070708;
  --bg-image: url("/static/img/bg_tree.png");
  --surface: #070708;
  --surface-2: #0e0e0e;
  --surface-3: #222222;
  --text: #e8ecf8;
  --muted: #9aa6cc;
  --primary: #6366f1;
  --primary-600: #5458ee;
  --accent: #22d3ee;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --border: rgba(148, 163, 184, 0.22);
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(5, 5, 5, 0.723);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 600px at 10% -10%, #1d2b5f 0%, var(--bg) 50%),
    var(--bg-image) center / cover no-repeat fixed;
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.5;
}

a { color: #c7d2fe; text-decoration: none; }
a:hover { color: #e0e7ff; }

.container, .dashboard-container, .product-ctn {
  width: min(1180px, 92%);
  margin-inline: auto;
}

.section {
  padding: 2.5rem 0;
}

.section-header {
  margin-bottom: 1.25rem;
  padding: 1rem 1.2rem;
  background: linear-gradient(135deg, rgba(99,102,241,.16), rgba(34,211,238,.12));
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.section-header h2, .section-header h3 {
  margin: 0 0 .3rem;
  letter-spacing: .2px;
}

.section-header p {
  margin: 0;
  color: var(--muted);
}

/* Cards + panels */
.dashboard-section, .product, .data-table, .edit-form {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.dashboard-section {
  padding: 1rem;
  margin-bottom: 1rem;
}

.edit-form {
  padding: .9rem;
  margin-top: .8rem;
  display: grid;
  gap: .7rem;
}

/* Inputs */
input, select, textarea {
  width: 100%;
  background: #0d1530;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .62rem .72rem;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(99, 102, 241, .8);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .18);
}

/* Buttons */
.btn, button {
  border: 0;
  border-radius: 10px;
  padding: .58rem .85rem;
  font-weight: 600;
  cursor: pointer;
  transition: .2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-600); transform: translateY(-1px); }

.btn-danger {
  background: rgba(239, 68, 68, .15);
  color: #fecaca;
  border: 1px solid rgba(239, 68, 68, .35);
}
.btn-danger:hover { background: rgba(239, 68, 68, .22); }

.btn-success {
  background: rgba(34, 197, 94, .15);
  color: #bbf7d0;
  border: 1px solid rgba(34, 197, 94, .35);
}

.btn-small { font-size: .82rem; padding: .45rem .65rem; }

/* Tables */
.data-table {
  overflow: hidden;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  background: rgba(99, 102, 241, .08);
  color: #c7d2fe;
  font-size: .84rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

th, td {
  padding: .78rem .7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

tbody tr:hover {
  background: rgba(99, 102, 241, .06);
}

/* Status pills */
.status {
  display: inline-block;
  padding: .18rem .5rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
}
.status.active {
  background: rgba(34, 197, 94, .15);
  color: #86efac;
}
.status.banned {
  background: rgba(239, 68, 68, .15);
  color: #fca5a5;
}

/* Shop grid */
.product-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.product {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.product-badge {
  width: fit-content;
  margin: .8rem .8rem 0;
  font-size: .75rem;
  color: #c4b5fd;
  background: rgba(139, 92, 246, .16);
  border: 1px solid rgba(139, 92, 246, .4);
  border-radius: 999px;
  padding: .2rem .55rem;
}

.product-image-wrapper {
  height: 170px;
  margin: .7rem .8rem 0;
  border-radius: 12px;
  overflow: hidden;
  background: #0b132c;
  border: 1px solid var(--border);
}

.product-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-content {
  padding: .9rem;
  display: grid;
  gap: .7rem;
}

.product-content h3 { margin: 0; font-size: 1.05rem; }

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

.product-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: .8rem;
}

.price {
  font-size: 1.1rem;
  font-weight: 700;
  color: #e0e7ff;
}

.stock.in-stock { color: #86efac; }
.stock.out-stock { color: #fca5a5; }

.buy-button {
  background: var(--primary);
  color: #fff;
  padding: .48rem .72rem;
  border-radius: 10px;
  font-weight: 600;
}
.buy-button:hover { background: var(--primary-600); }

.no-products {
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.saas-section {
  padding: 2.2rem 0;
}

.saas-section.alt {
  background: rgba(255, 255, 255, 0.02);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.vouch-grid,
.kb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.vouch-card,
.kb-card {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}

.vouch-card span {
  display: inline-block;
  margin-top: .55rem;
  color: var(--muted);
  font-size: .88rem;
}

.vouch-form,
.ticket-form {
  display: grid;
  gap: .8rem;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
}

.kb-search {
  margin-bottom: 1rem;
}

.ticket-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .8rem;
}

@media (max-width: 760px) {
  .ticket-grid {
    grid-template-columns: 1fr;
  }
}