/* ── Zmienne / motywy ─────────────────────────────────────── */
:root {
  --accent:       #a855f7;
  --accent-dim:   #7c3aed;
  --accent-blue:  #3b82f6;
  --radius:       14px;
  --tile-size:    240px;
  --transition:   0.2s ease;
}

[data-theme="dark"] {
  --bg:           #0f0f1a;
  --bg-surface:   #1a1a2e;
  --bg-card:      #1e1e35;
  --bg-card-hover:#252540;
  --border:       #2e2e50;
  --text:         #e2e8f0;
  --text-muted:   #8892a4;
  --shadow:       0 4px 24px rgba(0,0,0,0.5);
}

[data-theme="light"] {
  --bg:           #f0f0f8;
  --bg-surface:   #ffffff;
  --bg-card:      #ffffff;
  --bg-card-hover:#f5f3ff;
  --border:       #ddd6fe;
  --text:         #1e1b4b;
  --text-muted:   #6b7280;
  --shadow:       0 4px 24px rgba(109,40,217,0.08);
}

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

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

/* ── Topbar ───────────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 12px 24px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.topbar-user {
  font-size: 0.85rem;
  color: var(--text-muted);
}

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

.btn-icon {
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 1rem;
  line-height: 1;
  transition: background var(--transition), color var(--transition);
}

.btn-icon:hover {
  background: var(--bg-card-hover);
  color: var(--accent);
}

/* ── Główna zawartość ─────────────────────────────────────── */
.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

/* ── Nagłówek ─────────────────────────────────────────────── */
.hero {
  margin-bottom: 56px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.5px;
}

.hero .subtitle {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ── Kategoria ────────────────────────────────────────────── */
.category-section {
  margin-bottom: 48px;
}

.category-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-left: 4px;
  border-left: 3px solid var(--accent);
  padding-left: 10px;
}

/* ── Siatka kafelków ──────────────────────────────────────── */
.tile-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
}

/* ── Kafelek ──────────────────────────────────────────────── */
.tile {
  width: 280px;
  flex-shrink: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition:
    transform var(--transition),
    box-shadow var(--transition),
    background var(--transition),
    border-color var(--transition);
}

.tile:hover {
  transform: translateY(-3px);
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 8px 32px rgba(168,85,247,0.18);
}

.tile-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 14px;
  background: rgb(26, 26, 46);
  padding: 8px;
}

.tile-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.tile-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
}

/* ── Status badge ─────────────────────────────────────────── */
.tile[data-status="coming-soon"] {
  opacity: 0.6;
  cursor: default;
  pointer-events: none;
}

.tile[data-status="coming-soon"] .tile-name::after {
  content: " • wkrótce";
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* ── Strona logowania ─────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow);
}

.login-card h1 {
  font-size: 1.5rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 6px;
}

.login-card .subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

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

.btn-primary {
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-blue));
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin-top: 8px;
  transition: opacity var(--transition);
}

.btn-primary:hover { opacity: 0.88; }

.login-error {
  margin-top: 14px;
  font-size: 0.82rem;
  color: #f87171;
  text-align: center;
  min-height: 1.2em;
}

.login-divider {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin: 16px 0;
  position: relative;
}

.login-divider::before,
.login-divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 38%;
  height: 1px;
  background: var(--border);
}

.login-divider::before { left: 0; }
.login-divider::after  { right: 0; }

.btn-guest {
  width: 100%;
  padding: 11px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-family: inherit;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition);
}

.btn-guest:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Strona opisu serwisu ─────────────────────────────────── */
.service-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.service-page .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  margin-bottom: 32px;
  transition: color var(--transition);
}

.service-page .back-link:hover { color: var(--accent); }

.service-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 32px;
}

.service-header img {
  width: 72px;
  height: 72px;
  border-radius: 16px;
}

.service-header h1 {
  font-size: 1.8rem;
  font-weight: 800;
}

.service-header .service-url {
  font-size: 0.82rem;
  color: var(--accent);
  text-decoration: none;
}

.service-header .service-url:hover { text-decoration: underline; }

.service-body {
  line-height: 1.75;
  color: var(--text-muted);
}

.service-body h2 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 10px;
}

.btn-launch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-blue));
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  transition: opacity var(--transition);
}

.btn-launch:hover { opacity: 0.88; }
