/* TVGO Panel — spójne z landing: ciemne tło, szkło, czytelna typografia */

:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --surface: rgba(28, 28, 30, 0.72);
  --surface-solid: #141418;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --text: #f5f5f7;
  --text-muted: #86868b;
  --accent: #5ac8fa;
  --accent-warm: #ff9f0a;
  --radius: 16px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

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

.panel-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 16px 22px;
  background: var(--surface);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.panel-brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.panel-brand strong {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.panel-brand span {
  font-size: 0.78rem;
  color: var(--text-muted);
}

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

.panel-header .link-btn {
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-family: inherit;
  padding: 6px 10px;
  border-radius: 8px;
}
.panel-header .link-btn:hover {
  background: rgba(90, 200, 250, 0.12);
  text-decoration: none;
}

.panel-layout {
  display: grid;
  grid-template-columns: minmax(0, 220px) minmax(0, 1fr);
  flex: 1;
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px 48px;
  gap: 24px;
}

@media (max-width: 860px) {
  .panel-layout {
    grid-template-columns: 1fr;
    padding-bottom: 32px;
  }
  .panel-nav {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 12px 0 16px;
  }
}

.panel-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 0;
  border-right: 1px solid var(--border);
}

.panel-nav button {
  text-align: left;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.panel-nav button:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.panel-nav button.active {
  color: var(--text);
  background: rgba(90, 200, 250, 0.1);
  border-color: rgba(90, 200, 250, 0.25);
}

.panel-main {
  padding: 20px 0 40px;
  min-width: 0;
}

.panel-section {
  display: none;
  animation: fadeIn 0.2s ease;
}

.panel-section.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.hero-card {
  background: linear-gradient(145deg, rgba(90, 200, 250, 0.08) 0%, var(--surface-solid) 48%, var(--bg-elevated) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
  margin-bottom: 22px;
  box-shadow: var(--shadow);
}

.hero-card h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.card {
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}

.card h2,
.card h3 {
  font-size: 1rem;
  margin: 0 0 12px;
  font-weight: 600;
}

.card h3 {
  font-size: 0.95rem;
  margin-top: 18px;
}

.muted {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 12px;
  margin-bottom: 4px;
}

label:first-of-type {
  margin-top: 0;
}

input,
select,
textarea,
button.field {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(90, 200, 250, 0.45);
  box-shadow: 0 0 0 3px rgba(90, 200, 250, 0.12);
}

textarea.code {
  min-height: 120px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 12px;
  transition: transform 0.1s, box-shadow 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, #5ac8fa 0%, #0a84ff 100%);
  color: #fff;
  box-shadow: 0 4px 16px rgba(10, 132, 255, 0.25);
}

.btn-primary:hover {
  box-shadow: 0 6px 20px rgba(10, 132, 255, 0.35);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border: 1px solid var(--border-strong);
}

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

.row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
}

.row .btn {
  margin-top: 4px;
  width: auto;
  flex: 1;
  min-width: 120px;
}

.err {
  color: #ff6b6b;
}

.ok {
  color: #6bcf7f;
}

.account-card {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.65;
  border: 1px solid var(--border);
}

.account-card code {
  font-size: 0.85em;
  color: var(--accent);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 159, 10, 0.15);
  color: #ffd60a;
  border: 1px solid rgba(255, 159, 10, 0.35);
}

.badge.fashion {
  background: rgba(90, 200, 250, 0.12);
  color: var(--accent);
  border-color: rgba(90, 200, 250, 0.35);
}

.msg {
  margin-top: 10px;
  font-size: 0.9rem;
  min-height: 1.2em;
}

details.dev {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

details.dev pre {
  max-height: 200px;
  overflow: auto;
  background: var(--bg);
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.product-tile {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: 0.8rem;
}

.product-tile img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  background: #1c1c1e;
}

.product-tile .meta {
  padding: 8px 10px 10px;
}

.product-tile .meta strong {
  display: block;
  font-size: 0.82rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.rag-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.rag-list li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.rag-list li:last-child {
  border-bottom: none;
}

.rag-list .rag-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.rag-list .rag-preview {
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.preview-stage {
  background: linear-gradient(180deg, #0a0a0a 0%, #12121a 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 12px;
}

.preview-vertical {
  text-align: center;
  margin-bottom: 16px;
}

.preview-avatar {
  max-width: 200px;
  margin: 0 auto 20px;
  aspect-ratio: 3/4;
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(90, 200, 250, 0.2) 0%, rgba(20, 20, 24, 0.9) 60%);
  border: 1px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 16px;
  line-height: 1.4;
}

.preview-products {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

@media (max-width: 520px) {
  .preview-products {
    grid-template-columns: repeat(2, 1fr);
  }
}

.preview-products .mini {
  aspect-ratio: 3/4;
  border-radius: 10px;
  background: #1c1c1e center/cover;
  border: 1px solid var(--border);
}

.preview-products .mini.empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 6px;
}

.hint-box {
  background: rgba(90, 200, 250, 0.06);
  border: 1px solid rgba(90, 200, 250, 0.2);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: 10px;
}

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