/* =============================================================================
   public/account/account.css
   SZATA GRAFICZNA: Jackbox Party Games Teleturniej
   Panel Organizatora i Konta Gracza (Dashboard, Licencje, Ustawienia, Historia)
   ============================================================================= */

@import url('https://fonts.googleapis.com/css2?family=Titan+One&family=Fredoka:wght@400;500;600;700;800;900&family=Outfit:wght@600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --bg-page: #120d26;
  --bg-page-warm: #181135;
  --bg-card: #201742;
  --bg-card-hover: #291e54;
  --bg-card-alt: #191236;
  --bg-input: #140d2e;

  --ink: #181824;
  --ink-shadow: #0e091b;
  --border-ink: 2.5px solid var(--ink);
  --border-ink-thick: 3.5px solid var(--ink);

  --accent: #ffd23f;
  --accent-hover: #ffe066;
  --accent-dark: #e0aa00;

  --pop-blue: #35a7ff;
  --pop-coral: #ff4757;
  --pop-green: #2ed573;
  --pop-purple: #6c5ce7;
  --pop-orange: #ffa502;

  --text-main: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.90);
  --text-muted: rgba(255, 255, 255, 0.65);
  --text-light: #ffffff;
  --text-dark: #181824;

  --shadow-xs: 2px 2px 0 var(--ink-shadow);
  --shadow-sm: 3px 3px 0 var(--ink-shadow);
  --shadow-md: 5px 5px 0 var(--ink-shadow);
  --shadow-lg: 8px 8px 0 var(--ink-shadow);

  --font-display: 'Titan One', 'Fredoka', cursive, sans-serif;
  --font-body: 'Fredoka', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'Space Mono', monospace;
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

html {
  background-color: var(--bg-page);
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-page);
  background-image: 
    radial-gradient(circle at 50% 10%, #26194e 0%, #170f35 40%, #100a24 100%),
    radial-gradient(rgba(255, 210, 63, 0.08) 1.5px, transparent 1.5px);
  background-size: 100% 100%, 28px 28px;
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100%;
  min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  padding-bottom: max(32px, env(safe-area-inset-bottom, 32px));
}

/* Dekoracyjne tło komiksowe / Aury */
.account-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.comic-bg-shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.25;
}

.shape-1 {
  top: -80px;
  right: -80px;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, #6c5ce7 0%, transparent 70%);
}

.shape-2 {
  bottom: -100px;
  left: -100px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #ffd23f 0%, transparent 70%);
}

/* Układ Aplikacji */
.app-layout {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  min-height: 100dvh;
}

/* Górny pasek nawigacji */
.top-nav {
  height: 74px;
  background: rgba(18, 13, 38, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-ink-thick);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 2.2rem;
  filter: drop-shadow(2px 2px 0 var(--ink));
  transform: rotate(-6deg);
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: 1.2px;
  color: var(--accent);
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink-shadow);
  line-height: 1;
}

.brand-tag {
  font-family: var(--font-display);
  background: var(--pop-coral);
  color: #ffffff;
  border: 2px solid var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 999px;
  box-shadow: var(--shadow-xs);
  letter-spacing: 0.8px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.btn-launch-tv {
  background: linear-gradient(180deg, #ffd23f 0%, #ffbe1a 100%);
  color: var(--ink);
  border: var(--border-ink-thick);
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  padding: 9px 18px;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-launch-tv:hover {
  background: var(--accent-hover);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}

.user-pill {
  background: #1c143c;
  border: var(--border-ink);
  border-radius: 999px;
  padding: 4px 14px 4px 6px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-xs);
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--accent);
  border: 2px solid var(--ink);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.user-name {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.95rem;
  color: #ffffff;
}

.btn-logout {
  background: #251b4c;
  color: #ffffff;
  border: var(--border-ink);
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-logout:hover {
  background: var(--pop-coral);
  color: #ffffff;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}

/* Układ główny Dashboard */
.dashboard-body {
  display: flex;
  gap: 28px;
  max-width: 1300px;
  width: 100%;
  margin: 28px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* Pasek boczny (Sidebar) */
.sidebar {
  width: 270px;
  flex-shrink: 0;
  background: #1c143c;
  border: var(--border-ink-thick);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  align-self: flex-start;
  position: sticky;
  top: 96px;
}

.sidebar-menu {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.nav-item .icon {
  font-size: 1.25rem;
}

.nav-item:hover:not(.active) {
  background: #281d52;
  color: var(--accent);
  border-color: rgba(255, 210, 63, 0.3);
  transform: translate(-1px, -1px);
}

.nav-item.active {
  background: linear-gradient(180deg, #ffd23f 0%, #ffbe1a 100%);
  color: var(--ink);
  border: 2.5px solid var(--ink);
  box-shadow: var(--shadow-xs);
  transform: translate(-2px, -2px);
  font-weight: 800;
}

.sidebar-footer {
  border-top: 2px dashed rgba(255, 255, 255, 0.15);
  padding-top: 14px;
}

.license-mini-badge {
  background: #120d26;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  box-shadow: var(--shadow-xs);
}

.license-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pop-green);
  border: 1.5px solid var(--ink);
  flex-shrink: 0;
  box-shadow: 0 0 8px var(--pop-green);
}

/* Główny obszar treści */
.content-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hidden {
  display: none !important;
}

.tab-section {
  display: block;
}

.tab-section.hidden {
  display: none !important;
}

.section-header {
  margin-bottom: 20px;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: 2.3rem;
  letter-spacing: 1px;
  color: #ffffff;
  text-shadow: 2px 2px 0 var(--ink), 4px 4px 0 var(--ink-shadow);
  line-height: 1.1;
  margin-bottom: 6px;
}

.section-header p {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* Hero Launch Card */
.hero-launch-card {
  background: linear-gradient(135deg, #2a1b52 0%, #1b123a 100%);
  border: var(--border-ink-thick);
  border-radius: 22px;
  padding: 30px 32px;
  box-shadow: var(--shadow-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  gap: 24px;
}

.hero-badge {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--pop-coral);
  color: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 12px;
  box-shadow: var(--shadow-xs);
  display: inline-block;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

.hero-launch-card h3 {
  font-family: var(--font-display);
  font-size: 2.1rem;
  color: #ffffff;
  text-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 8px;
  line-height: 1.1;
}

.hero-launch-card p {
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--text-secondary);
  max-width: 620px;
  line-height: 1.5;
  margin-bottom: 20px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-hero-primary {
  background: linear-gradient(180deg, #ffd23f 0%, #ffbe1a 100%);
  color: var(--ink);
  border: var(--border-ink-thick);
  border-radius: 14px;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-hero-primary:hover {
  background: var(--accent-hover);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

.btn-hero-secondary {
  background: #251b4c;
  color: #ffffff;
  border: var(--border-ink);
  border-radius: 14px;
  padding: 13px 20px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: var(--shadow-xs);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-hero-secondary:hover {
  background: #312464;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
}

.hero-decor {
  flex-shrink: 0;
}

.decor-trophy {
  font-size: 5.5rem;
  filter: drop-shadow(4px 4px 0 var(--ink));
  display: block;
}

/* Siatka statystyk */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-card);
  border: var(--border-ink);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
  background: var(--bg-card-hover);
}

.stat-icon {
  font-size: 2.2rem;
  width: 56px;
  height: 56px;
  background: #140d2e;
  border: 2px solid var(--ink);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-xs);
}

.stat-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Panele Kart */
.card-panel,
.recent-box {
  background: var(--bg-card);
  border: var(--border-ink-thick);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.recent-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.recent-header h3,
.card-panel h3 {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-shadow: 2px 2px 0 var(--ink);
}

.card-desc {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin: 6px 0 18px;
  line-height: 1.5;
}

.btn-link {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
}

.btn-link:hover {
  color: #ffffff;
}

.empty-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  font-style: italic;
  padding: 12px 0;
}

/* Formularze w Panelu */
.form-row {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.form-col {
  flex: 1;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-col.full-width {
  flex: 100%;
}

label {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-secondary);
}

input[type="text"],
input[type="email"],
input[type="password"],
.custom-select {
  background: var(--bg-input);
  border: var(--border-ink);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  color: #ffffff;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.4);
  outline: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  width: 100%;
}

input:focus,
.custom-select:focus {
  transform: translate(-1px, -1px);
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 210, 63, 0.35);
}

small {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

.btn-action-gold {
  background: linear-gradient(180deg, #ffd23f 0%, #ffbe1a 100%);
  color: var(--ink);
  border: var(--border-ink-thick);
  border-radius: 14px;
  padding: 12px 24px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  margin-top: 14px;
}

.btn-action-gold:hover {
  background: var(--accent-hover);
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

.btn-action-gold:active {
  transform: translate(2px, 2px);
  box-shadow: var(--shadow-xs);
}

.btn-action-primary {
  background: var(--pop-blue);
  color: #ffffff;
  border: var(--border-ink-thick);
  border-radius: 14px;
  padding: 12px 22px;
  font-family: var(--font-display);
  font-size: 1.05rem;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-action-primary:hover {
  background: #50b6ff;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-md);
}

/* Awatary */
.avatar-select-group {
  margin: 18px 0;
}

.avatar-grid {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.avatar-choice {
  width: 54px;
  height: 54px;
  font-size: 1.85rem;
  background: #140d2e;
  border: 2.5px solid var(--ink);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.avatar-choice:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
  background: #251b4c;
}

.avatar-choice.selected {
  background: var(--accent);
  border: 3px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink-shadow);
  transform: translate(-2px, -2px);
}

/* Wiersz informacyjny (ID konta, rejestracja itp.) */
.info-row {
  display: flex;
  gap: 16px;
  margin: 20px 0;
  flex-wrap: wrap;
  background: #140d2e;
  border: 2px solid var(--ink);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: inset 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.info-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 150px;
}

.info-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  font-family: var(--font-mono);
}

.info-val {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
}

/* Licencja i Kody */
.license-details-card {
  background: linear-gradient(135deg, #251b4c 0%, #191238 100%);
  border: var(--border-ink-thick);
  border-radius: 20px;
  padding: 28px;
  box-shadow: var(--shadow-md);
  margin-bottom: 24px;
}

.lic-status-header h3 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  color: #ffffff;
  text-shadow: 2px 2px 0 var(--ink);
  margin: 8px 0 4px;
}

.lic-status-header p {
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.lic-badge-lg {
  font-family: var(--font-display);
  font-size: 0.85rem;
  background: var(--accent);
  color: var(--ink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 4px 14px;
  box-shadow: var(--shadow-xs);
  display: inline-block;
}

.lic-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 2px dashed rgba(255, 255, 255, 0.15);
}

.lic-meta-item .label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
  display: block;
}

.lic-meta-item .val {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}

.success-text {
  color: var(--pop-green) !important;
}

/* Formularz vouchera */
.inline-form {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin: 16px 0;
}

.inline-form .input-wrapper {
  flex: 1;
  min-width: 240px;
  position: relative;
}

.inline-form .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.15rem;
  pointer-events: none;
}

.inline-form input {
  padding-left: 44px;
  font-family: var(--font-mono);
  font-weight: 700;
  letter-spacing: 1px;
}

.vouchers-history-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 2px dashed rgba(255, 255, 255, 0.15);
}

.vouchers-history-box h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 10px;
}

.voucher-tags-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
}

.voucher-tags-list li {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 700;
  background: #140d2e;
  border: 1.5px solid var(--ink);
  color: var(--accent);
  border-radius: 8px;
  padding: 4px 10px;
  box-shadow: 2px 2px 0 var(--ink-shadow);
}

.voucher-tags-list .empty-tag {
  background: transparent;
  border: none;
  box-shadow: none;
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--text-muted);
  font-style: italic;
  padding: 0;
}

/* Ustawienia Teleturnieju */
.setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 0;
  border-bottom: 2px dashed rgba(255, 255, 255, 0.12);
  gap: 16px;
}

.setting-desc h4 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.setting-desc p {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.setting-ctrl {
  flex-shrink: 0;
}

/* Przełącznik Toggle Switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 56px;
  height: 32px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #140d2e;
  border: 2.5px solid var(--ink);
  border-radius: 34px;
  box-shadow: var(--shadow-xs);
  transition: all 0.2s ease;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 50%;
  transition: all 0.2s ease;
}

input:checked + .slider {
  background-color: var(--accent);
}

input:checked + .slider:before {
  transform: translateX(24px);
  background-color: var(--ink);
}

/* Sekcja Niebezpieczna / RODO */
.danger-panel {
  background: #2a1122;
  border: var(--border-ink-thick);
  border-color: var(--pop-coral);
  box-shadow: var(--shadow-md);
  margin-top: 24px;
}

.danger-title {
  font-family: var(--font-display);
  font-size: 1.85rem;
  color: var(--pop-coral);
  text-shadow: 2px 2px 0 var(--ink);
  margin-bottom: 8px;
}

.danger-warning-box {
  background: rgba(255, 71, 87, 0.15);
  border: 2px solid var(--pop-coral);
  border-left: 5px solid var(--pop-coral);
  padding: 12px 16px;
  border-radius: 10px;
  margin: 14px 0 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #ff8591;
  line-height: 1.4;
}

.danger-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}

.btn-danger-delete {
  background: var(--pop-coral);
  color: #ffffff;
  border: var(--border-ink);
  border-radius: 12px;
  padding: 12px 20px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: var(--shadow-xs);
  transition: all 0.15s ease;
}

.btn-danger-delete:hover {
  background: #e83a4a;
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-sm);
}

.danger-link {
  font-size: 0.92rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
}

.danger-link:hover {
  color: var(--pop-coral);
}

/* Tabela Historii */
.table-responsive {
  overflow-x: auto;
  border-radius: 14px;
}

.history-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border: var(--border-ink);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow-xs);
}

.history-table thead th {
  background: #140d2e;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.92rem;
  padding: 12px 16px;
  text-align: left;
  border-bottom: var(--border-ink);
  border-right: 1.5px solid var(--ink);
}

.history-table thead th:last-child {
  border-right: none;
}

.history-table tbody td {
  background: #1d153e;
  padding: 12px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.08);
  border-right: 1.5px solid rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-family: var(--font-mono);
}

.history-table tbody td:last-child {
  border-right: none;
}

.history-table tbody tr:nth-child(even) td {
  background: #231a48;
}

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

.empty-row {
  text-align: center;
  font-family: var(--font-body) !important;
  font-style: italic;
  color: var(--text-muted) !important;
  padding: 24px 16px !important;
}

/* Globalny Alert */
.account-alert {
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 1rem;
  border: var(--border-ink);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
  line-height: 1.4;
  position: relative;
  z-index: 50;
}

.account-alert.success {
  background: #10ac84;
  color: #181824;
  border-color: var(--ink);
}

.account-alert.error {
  background: var(--pop-coral);
  color: #ffffff;
  border-color: var(--ink);
}

/* RWD */
@media (max-width: 900px) {
  .top-nav {
    padding: 10px 14px;
    height: auto;
    min-height: 64px;
    flex-wrap: wrap;
    gap: 10px;
    overflow-x: clip;
  }

  .nav-brand {
    gap: 8px;
  }

  .brand-name {
    font-size: 1.4rem;
  }

  .brand-tag {
    font-size: 0.62rem;
    padding: 2px 8px;
  }

  .nav-actions {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .btn-launch-tv {
    padding: 7px 12px;
    font-size: 0.84rem;
  }

  .user-pill {
    padding: 3px 10px 3px 4px;
    gap: 6px;
  }

  .user-avatar {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
  }

  .user-name {
    font-size: 0.85rem;
  }

  .btn-logout {
    padding: 7px 10px;
    font-size: 0.82rem;
  }

  .dashboard-body {
    flex-direction: column;
    padding: 0 14px;
    margin-top: 16px;
    gap: 18px;
  }

  .sidebar {
    width: 100%;
    position: static;
    top: auto;
    padding: 14px;
  }

  .sidebar-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 8px;
  }

  .nav-item {
    font-size: 0.88rem;
    padding: 9px 10px;
    gap: 8px;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .section-header p {
    font-size: 0.95rem;
  }

  .hero-launch-card {
    flex-direction: column;
    text-align: center;
    padding: 22px 16px;
    gap: 16px;
  }

  .hero-launch-card h3 {
    font-size: 1.6rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .hero-decor {
    display: none;
  }

  .card-panel {
    padding: 18px 14px;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .stat-card {
    padding: 14px;
    gap: 10px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 1.7rem;
  }

  .stat-value {
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .nav-actions {
    flex-wrap: wrap;
    gap: 6px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}
