/* 
Generated by Claude Code
Good luck trying to change this slop 🫡

*/

:root {
  --accent: #54b4f0;
  --accent-dark: #0c6fad;
  --accent-light: #e8f4fb;
  --sidebar-width: 12rem;
  --header-height: 4rem;
  --font: system-ui, -apple-system, sans-serif;
  --text: #1a1a1a;
  --text-muted: #3f3f3f;
  --border: #ddd;
  --bg: #f7f8fa;
  --bg-white: #fff;
  --danger: #c0392b;
  --success: #27ae60;
  --warning: #e67e22;
  font-size: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg);
}

a {
  color: var(--accent-dark);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* ── Header ── */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  z-index: 100;
  gap: 1rem;
}

.header-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.header-logo img {
  height: 2rem;
}

.header-spacer {
  flex: 1;
}

/* ── Sidebar ── */
.sidebar {
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-white);
  border-right: 1px solid var(--border);
  padding: 1.25rem 0;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 0.25rem;
}

.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 0.5rem 1rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  color: var(--text);
  font-size: 0.875rem;
  text-decoration: none;
  transition: background 0.1s;
}

.nav-link:hover {
  background: var(--accent-light);
  text-decoration: none;
}

.nav-link.active {
  background: var(--accent-light);
  font-weight: 500;
  color: var(--accent-dark);
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 0.75rem;
  min-width: 1.25rem;
  text-align: center;
}

/* ── Main content ── */
.main-wrap {
  margin-left: var(--sidebar-width);
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  padding: 1.75rem 2rem;
  max-width: 68.75rem;
}

/* ── Announcement bar ── */
.announcement-bar {
  background: #fff8e1;
  border-bottom: 1px solid #f9ca52;
  color: #7a5c00;
  padding: 0.75rem 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.announcement-bar a {
  color: #7a5c00;
  font-weight: 600;
  text-decoration: underline;
}

/* ── Messages ── */
.messages {
  padding: 0.75rem 2rem 0;
  margin-bottom: 0;
}

.message {
  padding: 0.75rem 1rem;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.message-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.message-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
.message-warning {
  background: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}
.message-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* ── Page heading ── */
.page-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text);
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  margin-top: 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* ── Cards row ── */
.cards-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.75rem;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem;
  flex: 1;
  min-width: 11.25rem;
}

.card-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.card-count {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1;
}

.card-count a {
  color: inherit;
  text-decoration: none;
}

.card-count a:hover {
  color: var(--accent-dark);
  text-decoration: none;
}

/* ── Stats grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9.25rem, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.stat-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

.stat-item a {
  color: inherit;
  text-decoration: none;
}
.stat-item a:hover .stat-value {
  color: var(--accent-dark);
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-family: var(--font);
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  line-height: 1.4;
  transition:
    background 0.1s,
    border-color 0.1s;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  text-decoration: none;
}

.btn-secondary {
  background: var(--bg-white);
  color: var(--text);
  border-color: var(--border);
}

.btn-secondary:hover {
  background: var(--bg);
  text-decoration: none;
}

.btn-danger {
  background: var(--bg-white);
  color: var(--danger);
  border-color: #e0b4b4;
}

.btn-danger:hover {
  background: #fdf0f0;
  text-decoration: none;
}

.btn-sm {
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
}

.btn-group {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-wrap: wrap;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Tables ── */
.table-wrap {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  overflow: hidden;
}

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

th,
td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 0.875rem;
}

th {
  background: var(--bg);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

tbody tr:hover {
  background: var(--accent-light);
}

tbody tr:last-child td {
  border-bottom: none;
}

.td-check {
  width: 2.25rem;
}
.td-source {
  width: 5.75rem;
}

.empty-state {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
}

/* ── Source badge ── */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-shopify {
  background: #96bf48;
  color: #fff;
}
.badge-tiktok {
  background: #010101;
  color: #fff;
}

/* ── Table actions bar ── */
.table-actions {
  padding: 0.75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.table-filter-tabs {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.tab-link {
  padding: 0.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.875rem;
  color: var(--text);
  background: var(--bg-white);
  text-decoration: none;
}

.tab-link:hover {
  background: var(--accent-light);
  text-decoration: none;
}
.tab-link.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* ── Error cards ── */
.error-cards {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.error-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-left: 0.25rem solid var(--danger);
  border-radius: 0.25rem;
  padding: 1rem 1.25rem;
}

.error-card-header {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.error-card-name {
  color: var(--text-muted);
  font-weight: 400;
  font-size: 0.875rem;
}

.error-detail {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  padding: 0.75rem;
  font-size: 0.75rem;
  font-family: monospace;
  margin-bottom: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.address-block {
  font-size: 0.875rem;
  line-height: 1.7;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
}

/* ── Integration sections ── */
.integration-section {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.center-content {
  display: grid;
  justify-items: center;
}

.integration-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

.status-dot-ok {
  background: var(--success);
}
.status-dot-warn {
  background: var(--warning);
}
.status-dot-error {
  background: var(--danger);
}

.integration-meta {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.integration-shops {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.integration-shops li {
  font-size: 0.75rem;
  color: var(--text-muted);
  padding: 0.2rem 0.6rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 999px;
}

/* ── Login page ── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}

.login-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 2.25rem 2.5rem;
  width: 22.5rem;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.login-logo img {
  height: 2.25rem;
}

.login-title {
  font-size: 1.25rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.form-input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-size: 1rem;
  font-family: var(--font);
  border: 1px solid var(--border);
  border-radius: 0.25rem;
  outline: none;
  transition: border-color 0.15s;
}

.form-input:focus {
  border-color: var(--accent);
}

.form-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 0.25rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.btn-block {
  width: 100%;
  text-align: center;
  justify-content: center;
}

/* ── Footer ── */
.footer {
  padding: 1rem 2rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  background: var(--bg-white);
}

/* ── Utility ── */
.text-muted {
  color: var(--text-muted);
}
.mt-0 {
  margin-top: 0;
}
.logout-btn {
  background: none;
  border: 1px solid var(--border);
  padding: 0.25rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-family: var(--font);
  cursor: pointer;
  color: var(--text);
}
.logout-btn:hover {
  background: var(--bg);
}

/* ── State card ── */
.state-card {
  position: relative;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  min-height: 15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.state-card-error {
  background: #fdf0f0;
  border-color: var(--danger);
}

.state-card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2.5rem 2rem;
  text-align: center;
}

.state-card-icon {
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.state-card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text);
}

.state-card-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.state-card-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 0.5rem;
}

.state-card-spinner {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: var(--text-muted);
  line-height: 0;
}

.spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
