/* Rubicon Partner Hub admin styles. Plain CSS, safe to edit. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1d2330;
  --muted: #667085;
  --border: #dde1e7;
  --accent: #b3261e;
  --accent-text: #ffffff;
  --ok-bg: #e7f6ec;
  --ok-text: #14532d;
  --error-bg: #fdecea;
  --error-text: #8a1c14;
  --warn-bg: #fff6e0;
  --warn-text: #7a4b00;
  --radius: 8px;
  font-family:
    system-ui,
    -apple-system,
    'Segoe UI',
    Roboto,
    sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
}

* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
}
a {
  color: var(--accent);
}
h1 {
  font-size: 1.5rem;
  margin: 0 0 1rem;
}
h2 {
  font-size: 1.15rem;
  margin: 2rem 0 0.75rem;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 0.75rem 1.25rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}
.topbar nav {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1;
}
.topbar nav a {
  color: var(--muted);
  text-decoration: none;
}
.topbar nav a:hover {
  color: var(--text);
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}
.narrow {
  max-width: 380px;
}
.login-page main {
  margin-top: 10vh;
}

form label {
  display: block;
  margin-bottom: 0.9rem;
  font-weight: 500;
}
input,
select,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.3rem;
  padding: 0.5rem 0.6rem;
  font: inherit;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
}
input[type='checkbox'] {
  display: inline;
  width: auto;
  margin-right: 0.4rem;
}
button,
.button {
  display: inline-block;
  padding: 0.5rem 1rem;
  font: inherit;
  font-weight: 600;
  background: var(--accent);
  color: var(--accent-text);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none;
}
button.secondary,
.button.secondary {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}
button.link {
  background: none;
  color: var(--muted);
  padding: 0;
  font-weight: 400;
}
.inline {
  display: inline;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}
th,
td {
  text-align: left;
  padding: 0.55rem 0.7rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.flash {
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
}
.flash-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}
.flash-error {
  background: var(--error-bg);
  color: var(--error-text);
}
.alert {
  background: var(--warn-bg);
  color: var(--warn-text);
  padding: 0.65rem 0.9rem;
  border-radius: 6px;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.badge {
  display: inline-block;
  padding: 0.1rem 0.5rem;
  border-radius: 999px;
  font-size: 0.8rem;
  background: var(--bg);
  border: 1px solid var(--border);
}
.badge.ok {
  background: var(--ok-bg);
  color: var(--ok-text);
  border-color: transparent;
}
.badge.error {
  background: var(--error-bg);
  color: var(--error-text);
  border-color: transparent;
}
.badge.warn {
  background: var(--warn-bg);
  color: var(--warn-text);
  border-color: transparent;
}
.muted {
  color: var(--muted);
}
code,
.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
}
.copy {
  background: var(--bg);
  padding: 0.4rem 0.6rem;
  border-radius: 6px;
  word-break: break-all;
}

.tabs {
  display: flex;
  gap: 0.25rem;
  border-bottom: 1px solid var(--border);
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}
.tabs a {
  padding: 0.5rem 0.9rem;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.tabs a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

.art-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.art-card {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.art-thumb {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 0.4rem;
  overflow: hidden;
}
.art-thumb img {
  max-width: 100%;
  max-height: 100%;
}
.upload-row {
  margin-top: 0.75rem;
}
.upload-row progress {
  width: 100%;
  height: 0.8rem;
}

.product-card {
  padding: 1rem;
}
.product-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.product-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  background: var(--bg);
  border-radius: 6px;
}

.filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.filters select {
  width: auto;
  margin: 0;
}
.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--text);
}
.stat strong {
  display: block;
  font-size: 1.6rem;
}
.stat span {
  color: var(--muted);
  font-size: 0.9rem;
}
