:root {
  --ink: #111827;
  --muted: #64748b;
  --line: #dbe3ee;
  --soft: #f5f7fb;
  --panel: #ffffff;
  --blue: #1d4ed8;
  --blue-dark: #153e95;
  --green: #15803d;
  --amber: #b45309;
  --red: #b91c1c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--soft);
  color: var(--ink);
  font-family: Inter, Arial, sans-serif;
}

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

img {
  max-width: 100%;
}

.tb-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.tb-brand {
  font-weight: 900;
  font-size: 1.35rem;
  color: var(--blue);
  letter-spacing: -0.02em;
}

.tb-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.tb-nav a,
.tb-nav button,
.tb-btn,
button.tb-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 13px;
  font-weight: 800;
  cursor: pointer;
  font-size: 0.92rem;
}

.tb-nav a.active,
.tb-btn-primary,
button.tb-btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.tb-btn-danger {
  color: #fff;
  border-color: var(--red);
  background: var(--red);
}

.tb-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 50px;
}

.tb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 24px;
  align-items: center;
  padding: 34px;
  background: #111827;
  color: #fff;
  border-radius: 8px;
  margin-bottom: 22px;
}

.tb-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2rem, 5vw, 4.5rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.tb-hero p {
  color: #cbd5e1;
  line-height: 1.6;
  max-width: 720px;
}

.tb-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
}

.tb-toolbar {
  display: grid;
  grid-template-columns: 1fr 220px 160px;
  gap: 10px;
  margin: 18px 0;
}

.tb-input,
.tb-select,
.tb-textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
}

.tb-textarea {
  min-height: 110px;
  resize: vertical;
}

.tb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 16px;
}

.tb-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.tb-card-body {
  padding: 14px;
}

.tb-product-image {
  width: 100%;
  height: 190px;
  object-fit: cover;
  background: #e2e8f0;
  display: block;
}

.tb-card-meta,
.tb-product-footer,
.tb-row-actions,
.tb-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tb-card-meta {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  font-weight: 900;
}

.tb-card h3 {
  margin: 8px 0;
  line-height: 1.2;
}

.tb-card p {
  color: var(--muted);
  line-height: 1.45;
}

.tb-product-footer strong {
  color: var(--blue);
  font-size: 1.12rem;
}

.tb-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.tb-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.tb-field {
  display: grid;
  gap: 6px;
}

.tb-field label {
  font-weight: 900;
  font-size: 0.88rem;
}

.tb-span-2 {
  grid-column: span 2;
}

.tb-table-wrap {
  overflow-x: auto;
}

.tb-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.tb-table th,
.tb-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.tb-table th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.tb-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 0.74rem;
  font-weight: 900;
  background: #e0f2fe;
  color: #075985;
}

.tb-badge.live {
  background: #dcfce7;
  color: var(--green);
}

.tb-badge.pending {
  background: #fef3c7;
  color: var(--amber);
}

.tb-badge.rejected,
.tb-badge.expired {
  background: #fee2e2;
  color: var(--red);
}

.tb-detail {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
}

.tb-detail img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 8px;
  background: #e2e8f0;
}

.tb-muted {
  color: var(--muted);
}

.tb-empty {
  padding: 34px;
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: #fff;
}

.tb-footer {
  margin-top: 34px;
  padding: 24px 16px;
  text-align: center;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

.tb-footer p {
  margin: 0;
}

@media (max-width: 760px) {
  .tb-topbar,
  .tb-card-meta,
  .tb-product-footer,
  .tb-row-actions,
  .tb-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tb-hero,
  .tb-detail,
  .tb-toolbar,
  .tb-form-grid {
    grid-template-columns: 1fr;
  }

  .tb-span-2 {
    grid-column: span 1;
  }
}
