/* =========================================================
   KBN Design Studio — dashboard.css
   User dashboard: saved designs, orders, account
   ========================================================= */

.kbn-dash * { box-sizing: border-box; }

.kbn-dash {
  font-family: var(--kbn-font, 'Inter', sans-serif);
  color: var(--kbn-text, #1a1a2e);
  background: var(--kbn-bg, #f5f6f7);
  padding: 20px;
  border-radius: 12px;
}

.kbn-dash__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}

.kbn-dash__title {
  font-size: 22px;
  font-weight: 800;
}

.kbn-dash__tabs {
  display: flex;
  gap: 4px;
  background: var(--kbn-surface-2, #f0f1f3);
  border-radius: 10px;
  padding: 4px;
  overflow-x: auto;
}

.kbn-dash__tab {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  background: transparent;
  color: var(--kbn-text-muted, #6b7280);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
}
.kbn-dash__tab.active {
  background: var(--kbn-green, #1DB954);
  color: #fff;
}

.kbn-dash__panel { display: none; }
.kbn-dash__panel.active {
  display: block;
  animation: kbn-fade-in 0.2s ease;
}

@keyframes kbn-fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Designs Grid ---------- */
.kbn-dash__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

.kbn-dash__card {
  background: var(--kbn-surface, #fff);
  border: 1px solid var(--kbn-border, #dde0e4);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kbn-dash__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.1);
}

.kbn-dash__thumb {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  background: var(--kbn-surface-2, #f0f1f3);
  display: block;
}

.kbn-dash__card-body {
  padding: 10px 12px;
}

.kbn-dash__card-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kbn-dash__card-meta {
  font-size: 11px;
  color: var(--kbn-text-muted, #6b7280);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kbn-dash__card-actions {
  display: flex;
  gap: 6px;
  padding: 8px 12px 12px;
}

.kbn-dash__card-actions button,
.kbn-dash__card-actions a {
  flex: 1;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 4px;
  border-radius: 6px;
  border: 1px solid var(--kbn-border, #dde0e4);
  background: var(--kbn-surface-2, #f0f1f3);
  color: var(--kbn-text, #1a1a2e);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.18s ease;
}
.kbn-dash__card-actions button:hover,
.kbn-dash__card-actions a:hover { background: var(--kbn-border, #dde0e4); }
.kbn-dash__card-actions .danger { color: var(--kbn-danger, #ef4444); }

/* ---------- Status Pills ---------- */
.kbn-pill {
  display: inline-flex;
  align-items: center;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.kbn-pill--draft     { background: #fef3c7; color: #b45309; }
.kbn-pill--saved     { background: #d4f5e2; color: #17a347; }
.kbn-pill--pending   { background: #fef3c7; color: #b45309; }
.kbn-pill--processing{ background: #dbeafe; color: #1d4ed8; }
.kbn-pill--completed { background: #d4f5e2; color: #17a347; }
.kbn-pill--cancelled { background: #fee2e2; color: #dc2626; }
.kbn-pill--refunded  { background: #f3f4f6; color: #6b7280; }

/* ---------- Orders Table ---------- */
.kbn-dash__table-wrap { overflow-x: auto; }
.kbn-dash__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: var(--kbn-surface, #fff);
  border-radius: 12px;
  overflow: hidden;
}
.kbn-dash__table th,
.kbn-dash__table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--kbn-border, #dde0e4);
  white-space: nowrap;
}
.kbn-dash__table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--kbn-text-muted, #6b7280);
  background: var(--kbn-surface-2, #f0f1f3);
}
.kbn-dash__table tr:last-child td { border-bottom: none; }
.kbn-dash__table img {
  width: 36px; height: 36px;
  object-fit: cover;
  border-radius: 6px;
  vertical-align: middle;
  margin-right: 8px;
}

/* ---------- Empty State ---------- */
.kbn-dash__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--kbn-text-muted, #6b7280);
}
.kbn-dash__empty svg { width: 56px; height: 56px; opacity: 0.4; margin-bottom: 12px; }
.kbn-dash__empty h3 { font-size: 16px; margin-bottom: 6px; color: var(--kbn-text, #1a1a2e); }
.kbn-dash__empty a {
  display: inline-block;
  margin-top: 14px;
  background: var(--kbn-green, #1DB954);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
  text-decoration: none;
}

/* ---------- Pagination ---------- */
.kbn-dash__pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
}
.kbn-dash__pagination a, .kbn-dash__pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  color: var(--kbn-text, #1a1a2e);
  background: var(--kbn-surface, #fff);
  border: 1px solid var(--kbn-border, #dde0e4);
}
.kbn-dash__pagination .current {
  background: var(--kbn-green, #1DB954);
  color: #fff;
  border-color: var(--kbn-green, #1DB954);
}

@media (max-width: 600px) {
  .kbn-dash__grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
