:root {
  --bg: #000000;
  --surface: #0a0a0a;
  --surface-2: #121212;
  --border: #1f1f1f;
  --muted: #8a8a8a;
  --text: #ffffff;
  --accent: #e2ff00;
  --accent-dim: #b8cc00;
  --pattern: #2a2a2a;
  --danger: #ff4d4d;
  --ok: #5cff8a;
  --radius: 10px;
  --font: "Montserrat", system-ui, sans-serif;
}

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

html,
body {
  height: 100%;
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

body {
  overflow-x: hidden;
}

.bg-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 48px,
      rgba(226, 255, 0, 0.04) 48px,
      rgba(226, 255, 0, 0.04) 49px
    ),
    radial-gradient(circle at 20% 10%, rgba(226, 255, 0, 0.08), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(226, 255, 0, 0.06), transparent 35%),
    linear-gradient(135deg, #0a0a0a 0%, #000 50%, #0a0a0a 100%);
  z-index: 0;
}

.app-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100%;
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
}

.sidebar {
  background: linear-gradient(180deg, #050505, #000);
  border-right: 1px solid var(--border);
  padding: 1.25rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.brand {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0.75rem 0.5rem 1rem;
  border: 1px solid rgba(226, 255, 0, 0.35);
  border-radius: 999px;
  background: radial-gradient(
    circle at 50% 30%,
    rgba(226, 255, 0, 0.08),
    transparent 55%
  );
}

.brand__aztek {
  font-size: 1.75rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.04em;
  line-height: 1;
}

.brand__w {
  color: var(--text);
}

.brand__z {
  color: var(--accent);
  font-size: 2rem;
  margin: 0 0.02em;
  text-shadow: 0 0 24px rgba(226, 255, 0, 0.35);
}

.brand__outlet {
  margin-top: 0.35rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  color: var(--accent);
}

.brand__line {
  flex: 1;
  height: 1px;
  background: var(--accent);
  opacity: 0.7;
  min-width: 12px;
}

.brand__tag {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nav a {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border);
}

.nav a.is-active {
  color: #000;
  background: var(--accent);
  border-color: var(--accent);
}

.nav__ico {
  width: 1.25rem;
  text-align: center;
  opacity: 0.9;
}

.sidebar__foot {
  margin-top: auto;
}

.hint {
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0;
  padding: 0 0.25rem;
}

.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: rgba(0, 0, 0, 0.35);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.topbar__title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.02em;
}

.topbar__cluster {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  margin-left: auto;
}

.topbar__session {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  font-size: 0.82rem;
}

.topbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.content {
  padding: 1.25rem 1.5rem 2rem;
  flex: 1;
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem 1.2rem;
  margin-bottom: 1rem;
}

.panel__title {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

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

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

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1rem 1.1rem;
}

.kpi__label {
  font-size: 0.75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.35rem;
}

.kpi__value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--accent);
}

.kpi__sub {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.btn {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.55rem 0.95rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn:hover {
  border-color: #333;
  background: #181818;
}

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

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

.btn--ghost {
  background: transparent;
}

.btn--danger {
  border-color: rgba(255, 77, 77, 0.45);
  color: #ffb4b4;
}

.btn--danger:hover {
  background: rgba(255, 77, 77, 0.12);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.85rem;
}

.field label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.input,
.textarea,
.select {
  font-family: inherit;
  font-size: 0.9rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #0c0c0c;
  color: var(--text);
}

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

.textarea--mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: 2px solid rgba(226, 255, 0, 0.35);
  outline-offset: 1px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

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

th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #080808;
}

tr:hover td {
  background: rgba(226, 255, 0, 0.03);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  border: 1px solid var(--border);
}

.badge--borrador {
  color: var(--muted);
}

.badge--listo {
  color: #b8e7ff;
  border-color: rgba(91, 198, 255, 0.35);
}

.badge--publicado {
  color: var(--ok);
  border-color: rgba(92, 255, 138, 0.35);
}

.badge--error {
  color: #ffb4b4;
  border-color: rgba(255, 77, 77, 0.35);
}

.row-actions {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.row-actions .btn {
  padding: 0.35rem 0.55rem;
  font-size: 0.72rem;
}

.dropzone {
  border: 1px dashed rgba(226, 255, 0, 0.45);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  background: rgba(226, 255, 0, 0.03);
}

.dropzone strong {
  color: var(--accent);
}

.chart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 180px;
  padding: 0.5rem 0 0;
}

.chart__bar-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.chart__bar {
  width: 100%;
  max-width: 36px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, var(--accent), rgba(226, 255, 0, 0.25));
  min-height: 4px;
}

.chart__label {
  font-size: 0.65rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.toast-wrap {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

.toast {
  background: #111;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 0.65rem 0.85rem;
  border-radius: 10px;
  font-size: 0.85rem;
  max-width: 320px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

.toast--ok {
  border-color: rgba(92, 255, 138, 0.35);
}

.toast--err {
  border-color: rgba(255, 77, 77, 0.45);
}

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

.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.8rem;
  background: #0c0c0c;
  border: 1px solid var(--border);
  padding: 0.75rem;
  border-radius: 10px;
  overflow: auto;
  color: #d6ffd0;
}

.steps {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.steps li {
  margin-bottom: 0.45rem;
}

.steps strong {
  color: var(--text);
}

.pill-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
}

.pill {
  appearance: none;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.pill:hover {
  color: var(--text);
  border-color: #333;
}

.pill.is-active {
  background: var(--accent);
  color: #000;
  border-color: var(--accent);
}

.field-hint {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.35;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.image-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.img-slot {
  position: relative;
  width: 96px;
  height: 96px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0c0c0c;
}

.img-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.img-slot .btn {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 0.2rem 0.35rem;
  font-size: 0.62rem;
}

.btn--tiny {
  padding: 0.25rem 0.45rem;
  font-size: 0.68rem;
}

.thumb-cell {
  width: 56px;
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  background: #0c0c0c;
}

.thumb--ph {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  border: 1px dashed var(--border);
  color: var(--muted);
  font-size: 0.85rem;
}

.badge--por-enviar {
  color: #ffe08a;
  border-color: rgba(255, 224, 138, 0.35);
}

.badge--enviado {
  color: #9af0ff;
  border-color: rgba(120, 220, 255, 0.35);
}

.chart--tall {
  height: 200px;
}

.chart__bar--sales {
  background: linear-gradient(180deg, #ffffff, rgba(255, 255, 255, 0.2));
  max-width: 28px;
}

.conn-status {
  margin-top: 0.75rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #080808;
}

.conn-grid {
  margin-top: 0.5rem;
}

.inline-copy {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-copy .input {
  flex: 1;
  min-width: 200px;
}

.conn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
}

.check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.panel a {
  color: var(--accent);
}

.panel a:hover {
  text-decoration: underline;
}
