*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html, body, #root { height: 100%; }
body {
  background: #000;
  color: #f5f5f7;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* Container */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: 980px;
  font-size: 0.95rem; font-weight: 400; cursor: pointer;
  transition: all 0.2s ease; letter-spacing: 0.01em;
  border: none; font-family: inherit;
}
.btn-primary { background: #f5f5f7; color: #000; }
.btn-primary:hover { background: #fff; transform: scale(1.02); }
.btn-secondary {
  background: rgba(255,255,255,0.08); color: #f5f5f7;
  border: 1px solid rgba(255,255,255,0.12);
}
.btn-secondary:hover { background: rgba(255,255,255,0.12); }
.btn-link { color: #2997ff; font-size: 1.05rem; font-weight: 400; }
.btn-link:hover { text-decoration: underline; }
.btn-link svg { transition: transform 0.2s; }
.btn-link:hover svg { transform: translateX(2px); }

/* Cards */
.card {
  background: #1d1d1f; border-radius: 18px; padding: 1.5rem;
  transition: transform 0.25s ease, background 0.25s ease;
  border: 1px solid rgba(255,255,255,0.05);
}
.card:hover { background: #252528; transform: translateY(-2px); border-color: rgba(255,255,255,0.12); }
@media (min-width: 768px) {
  .card { border-radius: 22px; padding: 2rem; }
}

/* Navbar - floating pill */
.navbar-wrap {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  padding: 0.75rem 1rem;
  transition: padding 0.35s cubic-bezier(.2,.8,.2,1);
}
.navbar-wrap.scrolled { padding: 0.5rem 1rem; }

.navbar {
  max-width: 900px; margin: 0 auto;
  background: rgba(30,30,30,0.75); backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 9999px;
  transition: all 0.35s cubic-bezier(.2,.8,.2,1);
}
.navbar-wrap.scrolled .navbar {
  background: rgba(20,20,20,0.9);
  border-color: rgba(255,255,255,0.06);
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}

.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.625rem 0.75rem 0.625rem 1.25rem;
  transition: padding 0.35s cubic-bezier(.2,.8,.2,1);
}
.navbar-wrap.scrolled .nav-inner {
  padding: 0.5rem 0.625rem 0.5rem 1rem;
}

.nav-logo { display: flex; align-items: center; gap: 0.5rem; }
.nav-logo img {
  width: 1.75rem; height: 1.75rem; border-radius: 0.375rem; object-fit: cover;
  transition: all 0.3s;
}
.navbar-wrap.scrolled .nav-logo img { width: 1.5rem; height: 1.5rem; }
.nav-logo span { font-size: 0.9375rem; font-weight: 600; letter-spacing: -0.02em; }

.nav-links { display: none; gap: 1.5rem; }
.nav-links a { font-size: 0.8125rem; color: #9ca3af; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }

.nav-actions { display: none; align-items: center; gap: 0.375rem; }
.nav-actions .btn { padding: 0.5rem 1rem; font-size: 0.75rem; }

.mobile-toggle { display: block; padding: 0.5rem; color: #d1d5db; background: none; border: none; cursor: pointer; }

/* Mobile menu - slides from navbar pill */
.mobile-menu {
  display: none;
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 49; background: rgba(0,0,0,0.97);
  padding: 5rem 2rem 2rem;
  animation: mobileIn 0.25s ease;
}
@keyframes mobileIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.mobile-menu.open { display: flex; flex-direction: column; justify-content: center; }
.mobile-menu a { display: block; font-size: 1.5rem; font-weight: 600; color: #e5e7eb; padding: 0.75rem 0; text-align: center; }
.mobile-actions { display: flex; flex-direction: column; gap: 0.75rem; padding-top: 2rem; }
.mobile-actions .btn { justify-content: center; font-size: 1rem; padding: 1rem; }

@media (min-width: 768px) {
  .nav-links { display: flex; }
  .nav-actions { display: flex; }
  .mobile-toggle { display: none; }
  .mobile-menu { display: none !important; }
}

/* Hero */
.hero { padding: 7rem 0 4rem; text-align: center; }
.hero h1 {
  font-size: 2.5rem; line-height: 1.1; font-weight: 600; letter-spacing: -0.025em;
}
.hero-desc { margin: 1.5rem auto 0; max-width: 42rem; font-size: 1rem; color: #9ca3af; padding: 0 0.5rem; }
.hero-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; }
.hero-actions .btn { font-size: 0.875rem; padding: 0.625rem 1.25rem; }

@media (min-width: 768px) {
  .hero { padding: 9rem 0 7rem; }
  .hero h1 { font-size: 4.75rem; }
  .hero-desc { font-size: 1.25rem; padding: 0; }
  .hero-actions .btn { font-size: 0.95rem; padding: 0.75rem 1.5rem; }
}

/* Badge */
.badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 9999px; border: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.05);
  padding: 0.375rem 0.75rem; font-size: 0.75rem; font-weight: 500; color: #d1d5db;
  margin-bottom: 1.5rem;
}

/* Stats */
.stats-grid {
  margin: 3.5rem auto 0; max-width: 64rem;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem;
}
.stat-value { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.025em; }
.stat-label { margin-top: 0.375rem; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; color: #6b7280; }
@media (min-width: 768px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 5rem; }
  .stat-value { font-size: 3rem; }
  .stat-label { font-size: 0.75rem; }
}

/* Sections */
.section { padding: 4rem 0; }
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-header h2 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.section-header p { margin: 0.75rem auto 0; max-width: 42rem; color: #9ca3af; font-size: 0.9375rem; }
@media (min-width: 768px) {
  .section { padding: 6rem 0; }
  .section-header { margin-bottom: 4rem; }
  .section-header h2 { font-size: 3rem; }
  .section-header p { font-size: 1rem; }
}

/* Features grid */
.features-grid { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .features-grid { grid-template-columns: repeat(3, 1fr); } }

.feature-card { position: relative; overflow: hidden; }
.feature-card .glow {
  position: absolute; top: 0; right: 0; width: 120px; height: 120px;
  opacity: 0; transition: opacity 0.3s;
  background: radial-gradient(circle, rgba(255,255,255,0.05));
  pointer-events: none;
}
.feature-card:hover .glow { opacity: 1; }
.feature-card .content { position: relative; }
.feature-icon {
  width: 3rem; height: 3rem; display: flex; align-items: center; justify-content: center;
  border-radius: 0.75rem; background: rgba(255,255,255,0.1); margin-bottom: 1rem;
  transition: background 0.3s;
}
.feature-card:hover .feature-icon { background: rgba(255,255,255,0.15); }
.feature-icon svg { width: 1.5rem; height: 1.5rem; color: #fff; }
.feature-card h3 { font-size: 1.0625rem; font-weight: 600; }
.feature-card p { margin-top: 0.5rem; font-size: 0.875rem; line-height: 1.6; color: #9ca3af; }
@media (min-width: 768px) {
  .feature-card h3 { font-size: 1.25rem; }
  .feature-card p { font-size: 0.9375rem; margin-top: 0.75rem; }
}

/* Why section */
.why-grid { display: grid; gap: 2rem; }
.why-title { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.why-desc { margin-top: 0.75rem; color: #9ca3af; font-size: 0.9375rem; }
@media (min-width: 1024px) {
  .why-grid { grid-template-columns: repeat(2, 1fr); align-items: center; gap: 3rem; }
  .why-title { font-size: 2.25rem; }
  .why-desc { font-size: 1.125rem; margin-top: 1rem; }
}
.why-cards { display: grid; gap: 0.75rem; }
@media (min-width: 640px) { .why-cards { grid-template-columns: repeat(2, 1fr); gap: 1rem; } }
.why-card { padding: 1.25rem; }
@media (min-width: 768px) { .why-card { padding: 1.5rem; } }
.why-card .check-icon {
  width: 2rem; height: 2rem; display: flex; align-items: center; justify-content: center;
  border-radius: 9999px; background: rgba(255,255,255,0.1); margin-bottom: 0.625rem;
}
.why-card .check-icon svg { width: 0.875rem; height: 0.875rem; color: #fff; }
.why-card h3 { font-size: 0.875rem; font-weight: 600; }
.why-card p { margin-top: 0.375rem; font-size: 0.8125rem; line-height: 1.5; color: #9ca3af; }
@media (min-width: 768px) {
  .why-card .check-icon { width: 2.25rem; height: 2.25rem; }
  .why-card h3 { font-size: 0.9375rem; }
}

/* Terminal */
.terminal {
  border-radius: 1rem; background: #000;
  padding: 1.25rem; border: 1px solid rgba(255,255,255,0.1);
  font-family: ui-monospace, monospace; font-size: 0.6875rem;
  overflow-x: auto;
}
@media (min-width: 768px) {
  .terminal { padding: 1.5rem; font-size: 0.75rem; }
}
.terminal-dots { display: flex; align-items: center; gap: 0.375rem; margin-bottom: 1rem; }
.terminal-dots span { width: 0.625rem; height: 0.625rem; border-radius: 9999px; background: rgba(255,255,255,0.3); }
.terminal-dots .label { margin-left: 0.5rem; font-size: 0.75rem; color: #4b5563; font-family: inherit; }
.terminal-line { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0; }
.terminal-prompt { color: #4b5563; }
.terminal-cmd { color: #9ca3af; }
.terminal-arg { color: #4b5563; }
.terminal-output { font-size: 0.75rem; color: #374151; padding: 0.375rem 0; }

/* CTA */
.cta-section { padding: 4rem 0; }
.cta-card { text-align: center; padding: 2.5rem 1.5rem; }
.cta-card h2 { font-size: 1.75rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.cta-card p { margin: 1rem auto 0; max-width: 36rem; color: #9ca3af; font-size: 0.9375rem; }
.cta-actions { margin-top: 2rem; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.625rem; }
.cta-actions .btn { font-size: 0.875rem; }
@media (min-width: 768px) {
  .cta-section { padding: 7rem 0; }
  .cta-card { padding: 4rem; }
  .cta-card h2 { font-size: 3.75rem; }
  .cta-card p { font-size: 1.125rem; margin-top: 1.5rem; }
  .cta-actions { margin-top: 2.5rem; gap: 0.75rem; }
  .cta-actions .btn { font-size: 0.95rem; }
}

/* Footer */
.footer { border-top: 1px solid rgba(255,255,255,0.05); background: rgba(0,0,0,0.5); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 3rem 1.5rem; }
.footer-grid { display: grid; gap: 2rem; margin-bottom: 2rem; grid-template-columns: 1fr 1fr; }
@media (min-width: 768px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2.5rem; } }
.footer-brand-wrap { grid-column: 1 / -1; }
@media (min-width: 768px) { .footer-brand-wrap { grid-column: auto; } }
.footer-brand { display: flex; align-items: center; gap: 0.625rem; }
.footer-brand img { width: 2rem; height: 2rem; border-radius: 0.5rem; object-fit: cover; }
.footer-brand span { font-size: 1.125rem; font-weight: 600; }
.footer-desc { margin-top: 1rem; max-width: 24rem; font-size: 0.875rem; color: #6b7280; }
.footer-col h4 { font-size: 0.875rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: #9ca3af; margin-bottom: 1rem; }
.footer-col li { margin-bottom: 0.75rem; }
.footer-col a { font-size: 0.875rem; color: #6b7280; transition: color 0.2s; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: 1.5rem; display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  gap: 0.5rem; font-size: 0.75rem; color: #4b5563; text-align: center;
}
@media (min-width: 768px) { .footer-bottom { flex-direction: row; font-size: 0.875rem; padding-top: 2rem; } }

/* SVG defaults */
svg { flex-shrink: 0; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
svg[fill="currentColor"] { fill: currentColor; stroke: none; }

/* Fade animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.fade-in { animation: fadeIn 0.6s ease-out both; }
.fade-in-2 { animation: fadeIn 0.6s ease-out 0.15s both; }
.fade-in-3 { animation: fadeIn 0.6s ease-out 0.3s both; }

/* Scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #2d2d2f; border-radius: 4px; }
.md-break { display: none; }
@media (min-width: 768px) { .md-break { display: inline; } }
.stats-grid-inner { display: grid; gap: 2rem; }
@media (min-width: 768px) { .stats-grid-inner { grid-template-columns: repeat(2, 1fr); align-items: center; } }

/* ===========================================================
   ACTIVE NAV LINK
=========================================================== */
.active-link { color: #fff !important; }

/* ===========================================================
   COOKIE BANNER
=========================================================== */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  background: rgba(20,20,20,0.97); backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.25rem 1rem;
  transform: translateY(110%);
  transition: transform 0.4s cubic-bezier(.2,.8,.2,1);
}
.cookie-banner.visible { transform: translateY(0); }
.cookie-banner-inner {
  max-width: 1100px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 1rem;
}
.cookie-text strong { font-size: 0.95rem; display: block; margin-bottom: 0.375rem; }
.cookie-text p { font-size: 0.8125rem; color: #9ca3af; line-height: 1.5; }
.cookie-text a { color: #2997ff; }
.cookie-text a:hover { text-decoration: underline; }
.cookie-actions { display: flex; gap: 0.625rem; flex-wrap: wrap; }
.cookie-actions .btn { font-size: 0.8125rem; padding: 0.625rem 1.125rem; white-space: nowrap; }
@media (min-width: 900px) {
  .cookie-banner-inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-text { flex: 1; }
}

.cookie-modal {
  display: none;
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 1.5rem;
}
.cookie-modal.visible { display: flex; }
.cookie-modal-card {
  background: #161617; border: 1px solid rgba(255,255,255,0.1);
  border-radius: 1.25rem; padding: 1.75rem; max-width: 28rem; width: 100%;
}
.cookie-modal-card h3 { font-size: 1.25rem; font-weight: 600; margin-bottom: 1.25rem; }
.cookie-option {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; padding: 1rem 0; border-top: 1px solid rgba(255,255,255,0.07);
}
.cookie-option:first-of-type { border-top: none; }
.cookie-option h4 { font-size: 0.9375rem; font-weight: 600; margin-bottom: 0.25rem; }
.cookie-option p { font-size: 0.8125rem; color: #9ca3af; line-height: 1.5; }
.cookie-modal-actions { display: flex; gap: 0.625rem; margin-top: 1.5rem; justify-content: flex-end; }
.cookie-modal-actions .btn { font-size: 0.8125rem; padding: 0.625rem 1.125rem; }

.switch { position: relative; display: inline-block; width: 2.5rem; height: 1.5rem; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute; cursor: pointer; inset: 0;
  background: rgba(255,255,255,0.15); border-radius: 9999px; transition: 0.2s;
}
.switch .slider::before {
  content: ""; position: absolute; height: 1.125rem; width: 1.125rem;
  left: 0.1875rem; bottom: 0.1875rem; background: #fff; border-radius: 50%; transition: 0.2s;
}
.switch input:checked + .slider { background: #2997ff; }
.switch input:checked + .slider::before { transform: translateX(1rem); }
.switch-disabled .slider { background: #2997ff; opacity: 0.5; cursor: not-allowed; }

/* ===========================================================
   PAGE HERO (podstrony)
=========================================================== */
.page-hero { padding: 8rem 0 3rem; text-align: center; }
.page-hero h1 { font-size: 2.25rem; font-weight: 600; letter-spacing: -0.025em; }
.page-hero p { margin: 1rem auto 0; max-width: 40rem; color: #9ca3af; font-size: 1rem; }
@media (min-width: 768px) {
  .page-hero { padding: 10rem 0 4rem; }
  .page-hero h1 { font-size: 3.25rem; }
  .page-hero p { font-size: 1.125rem; }
}

/* ===========================================================
   CHANGELOG PAGE
=========================================================== */
.changelog-list { max-width: 46rem; margin: 0 auto; display: flex; flex-direction: column; gap: 1.5rem; padding-bottom: 4rem; }
.changelog-entry { display: grid; grid-template-columns: 1fr; gap: 0.5rem; }
@media (min-width: 768px) { .changelog-entry { grid-template-columns: 140px 1fr; gap: 2rem; } }
.changelog-meta { color: #6b7280; font-size: 0.8125rem; }
.changelog-meta .version { display: block; font-weight: 600; color: #f5f5f7; font-size: 0.9375rem; margin-bottom: 0.25rem; }
.changelog-card h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 0.75rem; }
.changelog-card ul { display: flex; flex-direction: column; gap: 0.5rem; }
.changelog-card li { font-size: 0.875rem; color: #9ca3af; padding-left: 1.25rem; position: relative; line-height: 1.5; }
.changelog-card li::before { content: "—"; position: absolute; left: 0; color: #4b5563; }

/* ===========================================================
   COMMANDS PAGE
=========================================================== */
.commands-search { max-width: 32rem; margin: 0 auto 3rem; }
.commands-search input {
  width: 100%; padding: 0.875rem 1.25rem; border-radius: 9999px;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #f5f5f7; font-size: 0.9375rem; font-family: inherit;
}
.commands-search input::placeholder { color: #6b7280; }
.commands-search input:focus { outline: none; border-color: rgba(255,255,255,0.3); }
.command-group { margin-bottom: 2.5rem; }
.command-group h2 { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; color: #d1d5db; }
.command-table { display: flex; flex-direction: column; gap: 0.5rem; }
.command-row {
  display: flex; flex-direction: column; gap: 0.25rem;
  padding: 1rem 1.25rem; border-radius: 0.875rem; background: #1d1d1f;
  border: 1px solid rgba(255,255,255,0.05);
}
@media (min-width: 640px) { .command-row { flex-direction: row; align-items: center; gap: 1rem; } }
.command-row code {
  font-family: ui-monospace, monospace; font-size: 0.875rem; color: #2997ff;
  background: rgba(41,151,255,0.1); padding: 0.25rem 0.625rem; border-radius: 0.5rem;
  flex-shrink: 0; width: fit-content;
}
.command-row span { font-size: 0.875rem; color: #9ca3af; }
.command-row.hidden { display: none; }
.no-results { text-align: center; color: #6b7280; padding: 2rem 0; display: none; }
.no-results.visible { display: block; }

/* ===========================================================
   LEGAL PAGES (regulamin / polityka)
=========================================================== */
.legal-content { max-width: 42rem; margin: 0 auto; padding-bottom: 4rem; font-size: 0.9375rem; line-height: 1.75; color: #c7c7cc; }
.legal-content h2 { font-size: 1.25rem; font-weight: 600; color: #f5f5f7; margin: 2rem 0 0.875rem; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { margin-bottom: 1rem; }
.legal-content ul { margin: 0 0 1rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.legal-content li { padding-left: 1.25rem; position: relative; }
.legal-content li::before { content: "•"; position: absolute; left: 0.25rem; color: #6b7280; }
.legal-updated { color: #6b7280; font-size: 0.8125rem; margin-bottom: 2.5rem; text-align: center; }

/* ===========================================================
   SUPPORT PAGE
=========================================================== */
.support-grid { display: grid; gap: 1.25rem; max-width: 56rem; margin: 0 auto; padding-bottom: 4rem; }
@media (min-width: 768px) { .support-grid { grid-template-columns: repeat(3, 1fr); } }
.support-card { text-align: center; padding: 2rem 1.5rem; }
.support-card .feature-icon { margin: 0 auto 1rem; }
.support-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.5rem; }
.support-card p { font-size: 0.875rem; color: #9ca3af; margin-bottom: 1.25rem; line-height: 1.5; }

/* ===========================================================
   404 PAGE
=========================================================== */
.not-found { text-align: center; padding: 9rem 0 6rem; }
.not-found h1 { font-size: 5rem; font-weight: 700; letter-spacing: -0.03em; color: #2d2d2f; }
.not-found p { margin: 1rem 0 2rem; color: #9ca3af; font-size: 1.0625rem; }

/* ===========================================================
   ADMIN PANEL — LOGIN
=========================================================== */
.admin-login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 1.5rem; background: #000;
}
.admin-login-card {
  width: 100%; max-width: 24rem; background: #161617;
  border: 1px solid rgba(255,255,255,0.08); border-radius: 1.25rem;
  padding: 2.25rem 2rem;
}
.admin-login-card .logo-row { display: flex; align-items: center; gap: 0.625rem; justify-content: center; margin-bottom: 1.75rem; }
.admin-login-card .logo-row img { width: 2rem; height: 2rem; border-radius: 0.5rem; }
.admin-login-card .logo-row span { font-size: 1.125rem; font-weight: 600; }
.admin-login-card h1 { font-size: 1.25rem; font-weight: 600; text-align: center; margin-bottom: 1.75rem; }
.admin-field { margin-bottom: 1.125rem; }
.admin-field label { display: block; font-size: 0.8125rem; color: #9ca3af; margin-bottom: 0.5rem; }
.admin-field input {
  width: 100%; padding: 0.75rem 1rem; border-radius: 0.625rem;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  color: #f5f5f7; font-size: 0.9375rem; font-family: inherit;
}
.admin-field input:focus { outline: none; border-color: rgba(255,255,255,0.3); }
.admin-error {
  background: rgba(255,69,58,0.12); border: 1px solid rgba(255,69,58,0.3);
  color: #ff8a80; font-size: 0.8125rem; padding: 0.75rem 1rem;
  border-radius: 0.625rem; margin-bottom: 1.125rem;
}
.admin-success {
  background: rgba(48,209,88,0.12); border: 1px solid rgba(48,209,88,0.3);
  color: #5ce17e; font-size: 0.8125rem; padding: 0.75rem 1rem;
  border-radius: 0.625rem; margin-bottom: 1.125rem;
}
.admin-login-card button[type="submit"] { width: 100%; justify-content: center; margin-top: 0.5rem; }

/* ===========================================================
   ADMIN PANEL — LAYOUT
=========================================================== */
.admin-body { background: #000; min-height: 100vh; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 230px; flex-shrink: 0; background: #0a0a0a;
  border-right: 1px solid rgba(255,255,255,0.07);
  display: flex; flex-direction: column; padding: 1.25rem 0.875rem;
  position: sticky; top: 0; height: 100vh;
}
.admin-sidebar .logo-row { display: flex; align-items: center; gap: 0.625rem; padding: 0.5rem 0.625rem 1.5rem; }
.admin-sidebar .logo-row img { width: 1.75rem; height: 1.75rem; border-radius: 0.45rem; }
.admin-sidebar .logo-row span { font-size: 1rem; font-weight: 600; }
.admin-nav { display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.admin-nav a {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.625rem 0.75rem; border-radius: 0.625rem;
  font-size: 0.875rem; color: #9ca3af; transition: all 0.15s;
}
.admin-nav a:hover { background: rgba(255,255,255,0.05); color: #f5f5f7; }
.admin-nav a.active { background: rgba(41,151,255,0.15); color: #2997ff; }
.admin-nav a svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; }
.admin-sidebar-footer { border-top: 1px solid rgba(255,255,255,0.07); padding-top: 0.875rem; display: flex; flex-direction: column; gap: 0.25rem; }
.admin-sidebar-footer a { display: flex; align-items: center; gap: 0.625rem; padding: 0.625rem 0.75rem; border-radius: 0.625rem; font-size: 0.8125rem; color: #6b7280; }
.admin-sidebar-footer a:hover { background: rgba(255,255,255,0.05); color: #f5f5f7; }

.admin-main { flex: 1; min-width: 0; }
.admin-topbar {
  height: 64px; border-bottom: 1px solid rgba(255,255,255,0.07);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.75rem; position: sticky; top: 0; background: rgba(0,0,0,0.85);
  backdrop-filter: blur(12px); z-index: 10;
}
.admin-topbar h1 { font-size: 1.0625rem; font-weight: 600; }
.admin-content { padding: 1.75rem; max-width: 1100px; }

.admin-card {
  background: #161617; border: 1px solid rgba(255,255,255,0.07);
  border-radius: 1rem; padding: 1.5rem; margin-bottom: 1.5rem;
}
.admin-card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.25rem; }
.admin-card .card-desc { font-size: 0.8125rem; color: #6b7280; margin-bottom: 1.25rem; }
.admin-grid-2 { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .admin-grid-2 { grid-template-columns: 1fr 1fr; } }

.admin-field-row { margin-bottom: 1rem; }
.admin-field-row label { display: block; font-size: 0.8125rem; color: #9ca3af; margin-bottom: 0.4rem; }
.admin-field-row label .hint { color: #4b5563; font-weight: 400; }
.admin-field-row input[type="text"],
.admin-field-row input[type="url"],
.admin-field-row input[type="number"],
.admin-field-row input[type="password"],
.admin-field-row input[type="date"],
.admin-field-row textarea,
.admin-field-row select {
  width: 100%; padding: 0.625rem 0.875rem; border-radius: 0.5rem;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1);
  color: #f5f5f7; font-size: 0.875rem; font-family: inherit; resize: vertical;
}
.admin-field-row textarea { min-height: 80px; }
.admin-field-row input:focus, .admin-field-row textarea:focus, .admin-field-row select:focus { outline: none; border-color: rgba(255,255,255,0.3); }
.admin-field-row select option { background: #161617; }

.admin-repeat-item {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.07);
  border-radius: 0.75rem; padding: 1.125rem; margin-bottom: 0.875rem; position: relative;
}
.admin-repeat-item .remove-item-btn {
  position: absolute; top: 0.75rem; right: 0.75rem;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: rgba(255,69,58,0.12); color: #ff8a80;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; font-size: 0.875rem; transition: background 0.15s;
}
.admin-repeat-item .remove-item-btn:hover { background: rgba(255,69,58,0.25); }
.add-item-btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  font-size: 0.8125rem; color: #2997ff; background: none; border: none;
  cursor: pointer; padding: 0.5rem 0; font-family: inherit;
}
.add-item-btn:hover { text-decoration: underline; }

.admin-stat-cards { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem; }
@media (min-width: 768px) { .admin-stat-cards { grid-template-columns: repeat(4, 1fr); } }
.admin-stat-card { background: #161617; border: 1px solid rgba(255,255,255,0.07); border-radius: 0.875rem; padding: 1.25rem; }
.admin-stat-card .num { font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; }
.admin-stat-card .lbl { font-size: 0.8125rem; color: #6b7280; margin-top: 0.25rem; }

.admin-table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.admin-table th { text-align: left; color: #6b7280; font-weight: 500; padding: 0.625rem 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.07); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; }
.admin-table td { padding: 0.75rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
.admin-table tr:last-child td { border-bottom: none; }

.save-bar {
  position: sticky; bottom: 0; background: rgba(10,10,10,0.9); backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,0.08); padding: 1rem 1.75rem;
  display: flex; justify-content: flex-end; gap: 0.75rem; margin-top: -1px;
}
.toast {
  position: fixed; top: 1.25rem; right: 1.25rem; z-index: 200;
  background: #1d1d1f; border: 1px solid rgba(255,255,255,0.12);
  padding: 0.875rem 1.25rem; border-radius: 0.75rem; font-size: 0.875rem;
  display: flex; align-items: center; gap: 0.625rem;
  transform: translateY(-1rem); opacity: 0; transition: all 0.25s;
  pointer-events: none;
}
.toast.visible { transform: translateY(0); opacity: 1; }
.toast.success { border-color: rgba(48,209,88,0.3); }
.toast.error { border-color: rgba(255,69,58,0.3); }

.btn-sm { padding: 0.5rem 0.875rem; font-size: 0.8125rem; }
.btn-danger { background: rgba(255,69,58,0.12); color: #ff8a80; border: 1px solid rgba(255,69,58,0.3); }
.btn-danger:hover { background: rgba(255,69,58,0.22); }

@media (max-width: 900px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; flex-direction: row; overflow-x: auto; padding: 0.75rem; }
  .admin-sidebar .logo-row { display: none; }
  .admin-nav { flex-direction: row; flex: none; }
  .admin-sidebar-footer { display: none; }
  .admin-content { padding: 1.25rem; }
}
