/* ============================================
   SKYPLEX PANEL – přesný styl dle skyplex.cz
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- Variables ---- */
:root {
  --bg:           #0f1923;
  --bg-nav:       #111c2d;
  --bg-card:      #162234;
  --bg-card-2:    #1c2e45;
  --bg-input:     #0f1c2e;
  --border:       #1e3352;
  --border-hover: #2d4f7a;
  --yellow:       #f5c518;
  --blue:         #5b8de8;
  --blue-btn:     #4a7de0;
  --blue-btn-h:   #3a6acc;
  --green:        #22c55e;
  --green-h:      #16a34a;
  --gold:         #f5c518;
  --text:         #e8edf5;
  --text-sub:     #8fa8c8;
  --text-muted:   #4d6a8a;
  --nav-h:        64px;
  --radius:       8px;
  --radius-lg:    12px;
  --radius-pill:  999px;
  --transition:   0.18s ease;
}

/* Light mode */
[data-theme="light"] {
  --bg:           #dce8f5;
  --bg-nav:       #cdddf0;
  --bg-card:      #e8f1fa;
  --bg-card-2:    #dce8f5;
  --bg-input:     #f0f6fc;
  --border:       #b8cfe4;
  --border-hover: #90b4d0;
  --text:         #1a2535;
  --text-sub:     #4a6280;
  --text-muted:   #7a98b4;
}

[data-theme="light"] a:hover { color: #1a2535; }
[data-theme="light"] .navbar { box-shadow: 0 1px 8px rgba(0,0,0,0.08); border-bottom: 1px solid var(--border); }
[data-theme="light"] .auth-card,
[data-theme="light"] .card { box-shadow: 0 2px 12px rgba(0,0,0,0.07); }

/* Light mode – quick-links */
[data-theme="light"] .quick-link { background: #fff; }
[data-theme="light"] .quick-link:hover { background: #f0f6ff; }
[data-theme="light"] .ql-name { color: #1a2535; }
[data-theme="light"] .ql-desc { color: #6b7f96; }

/* Light mode – finance items */
[data-theme="light"] .finance-item { background: #fff; }
[data-theme="light"] .fi-value { color: var(--blue); }
[data-theme="light"] .finance-item.gold .fi-value { color: var(--gold); }
[data-theme="light"] .info-item { background: #fff; }
[data-theme="light"] .ii-value { color: #1a2535; }
[data-theme="light"] .ii-label { color: #6b7f96; }

/* Light mode – profile */
[data-theme="light"] .profile-header { background: #fff; }
[data-theme="light"] .profile-info h2 { color: #1a2535; }
[data-theme="light"] .profile-meta { color: #4a6280; }

/* Light mode – auth card */
[data-theme="light"] .auth-header { background: #f0f4f8; }
[data-theme="light"] .auth-header h1 { color: #1a2535; }
[data-theme="light"] .auth-header p { color: #4a6280; }
[data-theme="light"] .auth-tab { color: #4a6280; }
[data-theme="light"] .auth-tab.active { color: #1a2535; background: #fff; }
[data-theme="light"] .form-label { color: #2d3f55; }
[data-theme="light"] .form-input { color: #1a2535; background: #fff; }
[data-theme="light"] .form-input::placeholder { color: #9ab0c4; }

/* Light mode – footer */
[data-theme="light"] .site-footer { background: #dce8f5; border-top-color: #c0d4e8; }
[data-theme="light"] .footer-col-title { color: #1a2535; }
[data-theme="light"] .footer-about,
[data-theme="light"] .footer-link,
[data-theme="light"] .footer-copy-year,
[data-theme="light"] .footer-sub { color: #4a6280; }
[data-theme="light"] .footer-brand { color: #1a2535; }
[data-theme="light"] .footer-socials a { border-color: #c0d4e8; color: #4a6280; }
[data-theme="light"] .footer-socials a:hover { border-color: var(--blue); color: var(--blue); }

/* Light mode – card titles */
[data-theme="light"] .card-title { color: #6b7f96; border-bottom-color: #d1dde8; }

/* Light mode – toggle */
[data-theme="light"] .toggle-slider { background: #c8d5e0; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }
input, button, select, textarea { font-family: inherit; font-size: 1rem; }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
}

/* Logo vlevo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.navbar__logo:hover { color: #fff; opacity: 0.9; }
.navbar__logo .logo-icon {
  width: 36px;
  height: 36px;
  object-fit: contain;
  image-rendering: auto;
}

/* Střed – absolutně pozicovaný pro přesné vycentrování */
.navbar__center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

/* Vpravo */
.navbar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

/* Domů tlačítko */
.navbar__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  white-space: nowrap;
  text-decoration: none;
}
.navbar__btn--home {
  background: var(--blue-btn);
  color: #fff;
}
.navbar__btn--home:hover {
  background: var(--blue-btn-h);
  color: #fff;
}
.navbar__btn--logout {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  padding: 7px 14px;
  font-size: 0.82rem;
}
.navbar__btn--logout:hover {
  background: rgba(239,68,68,0.1);
  border-color: rgba(239,68,68,0.4);
  color: #f87171;
}

/* User chip */
.navbar__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--text-sub);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
}
.navbar__user img {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  image-rendering: pixelated;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--transition);
  font-size: 0.95rem;
}
.theme-toggle:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(74,125,224,0.08);
}

/* Skrýt sep */
.navbar__sep { display: none; }

/* ============================================
   PAGE WRAPPER
   ============================================ */
.page {
  padding-top: calc(var(--nav-h) + 28px);
  padding-bottom: 60px;
  min-height: 100vh;
}

.container {
  max-width: 1060px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============================================
   AUTH PAGE
   ============================================ */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--nav-h) 20px 48px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.4);
  animation: fadeUp 0.3s ease;
}

.auth-header {
  background: var(--bg-nav);
  padding: 28px 28px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.auth-header h1 {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #fff;
}

.auth-header h1 .logo-sky  { color: var(--yellow); }
.auth-header h1 .logo-plex { color: var(--blue); }
.auth-header h1 .logo-cz   { color: var(--text-sub); font-weight: 400; font-size: 1.4rem; }

.auth-header p {
  color: var(--text-muted);
  margin-top: 5px;
  font-size: 0.85rem;
}

.auth-body { padding: 24px 28px 28px; }

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  background: var(--bg-input);
  border-radius: var(--radius-pill);
  padding: 4px;
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
  transition: all var(--transition);
  color: var(--text-muted);
  user-select: none;
}

.auth-tab.active {
  background: var(--blue-btn);
  color: #fff;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-sub);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
}

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

.form-input:focus {
  border-color: var(--blue-btn);
  box-shadow: 0 0 0 3px rgba(74,125,224,0.12);
}

.form-input::placeholder { color: var(--text-muted); }
.form-input:disabled { opacity: 0.45; cursor: not-allowed; }

/* ============================================
   BUTTONS – pill styl jako na skyplex.cz
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  width: 100%;
  letter-spacing: 0.2px;
}

.btn-primary {
  background: var(--blue-btn);
  color: #fff;
  box-shadow: 0 2px 10px rgba(74,125,224,0.25);
}
.btn-primary:hover {
  background: var(--blue-btn-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(74,125,224,0.35);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
}
.btn-secondary:hover {
  background: var(--bg-card-2);
  border-color: var(--border-hover);
  color: var(--text);
}

.btn-green {
  background: var(--green);
  color: #fff;
}
.btn-green:hover { background: var(--green-h); }

.btn-danger {
  background: rgba(239,68,68,0.1);
  color: #f87171;
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: rgba(239,68,68,0.18); }

.btn-sm { padding: 7px 16px; font-size: 0.8rem; width: auto; }

/* ============================================
   ALERTS
   ============================================ */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 16px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.5;
}

.alert-error   { background: rgba(239,68,68,0.07);  border: 1px solid rgba(239,68,68,0.18);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,0.07);  border: 1px solid rgba(34,197,94,0.18);  color: #86efac; }
.alert-info    { background: rgba(74,125,224,0.07); border: 1px solid rgba(74,125,224,0.18); color: #93c5fd; }

/* ============================================
   DASHBOARD – profile header
   ============================================ */
.profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 20px;
  animation: fadeUp 0.25s ease;
}

.profile-avatar {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  border: 2px solid var(--border-hover);
  image-rendering: pixelated;
  flex-shrink: 0;
  background: var(--bg-card-2);
}

.profile-info h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.2px;
}

.profile-rank {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  background: rgba(245,197,24,0.1);
  color: var(--yellow);
  border: 1px solid rgba(245,197,24,0.25);
  margin-top: 5px;
}

.profile-meta {
  margin-top: 7px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

.profile-meta span {
  color: var(--text-muted);
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 5px;
}

.profile-meta span strong { color: var(--text-sub); font-weight: 500; }

/* ============================================
   DASHBOARD GRID
   ============================================ */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.dashboard-grid .card-wide { grid-column: 1 / -1; }

/* ============================================
   CARD
   ============================================ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  animation: fadeUp 0.3s ease both;
}

.card-title {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 11px;
}
.card-title i {
  color: var(--blue);
  font-size: 0.85rem;
}

/* ============================================
   FINANCE CARDS
   ============================================ */
.finance-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.finance-item {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.finance-item .fi-label {
  font-size: 0.7rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.finance-item .fi-value {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--blue);
}

.finance-item.gold .fi-value { color: var(--yellow); }

/* ============================================
   INFO GRID
   ============================================ */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.info-item {
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}

.info-item .ii-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-bottom: 3px;
}

.info-item .ii-value {
  font-weight: 600;
  color: var(--text);
  font-size: 0.875rem;
}

/* ============================================
   QUICK LINKS
   ============================================ */
.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.quick-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 24px 16px 18px;
  background: var(--bg-card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text-sub);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all var(--transition);
  text-decoration: none;
  text-align: center;
}

.quick-link:hover {
  border-color: var(--blue-btn);
  background: rgba(74,125,224,0.06);
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(74,125,224,0.12);
}

.ql-icon-wrap {
  width: 58px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(74,125,224,0.12);
  border-radius: 50%;
  color: var(--blue);
  font-size: 1.5rem;
  transition: all var(--transition);
  margin-bottom: 2px;
}
.quick-link:hover .ql-icon-wrap {
  background: rgba(74,125,224,0.2);
}

.ql-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  transition: color var(--transition);
}
.quick-link:hover .ql-name { color: #fff; }

.ql-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.ql-badge {
  display: inline-block;
  padding: 3px 12px;
  background: rgba(74,125,224,0.15);
  color: var(--blue);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 4px;
  transition: all var(--transition);
}
.quick-link:hover .ql-badge {
  background: var(--blue-btn);
  color: #fff;
}

/* ============================================
   CHANGE FORMS
   ============================================ */
.change-form { display: flex; flex-direction: column; gap: 12px; }
.change-form .form-group { margin-bottom: 0; }

/* ============================================
   TOGGLE SWITCH
   ============================================ */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.toggle input { position: absolute; opacity: 0; width: 0; height: 0; }

.toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--text-muted);
  transition: all 0.2s;
}

.toggle input:checked + .toggle-slider {
  background: rgba(74,125,224,0.2);
  border-color: var(--blue-btn);
}

.toggle input:checked + .toggle-slider::after {
  transform: translateX(18px);
  background: var(--blue-btn);
}

.toggle-label { font-size: 0.875rem; color: var(--text-sub); font-weight: 500; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(3px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  width: 100%;
  max-width: 400px;
  animation: fadeUp 0.2s ease;
}

.modal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 18px;
  color: #fff;
}

/* ============================================
   SPINNER
   ============================================ */
.spinner {
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.15);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #0a0f1a;
  border-top: 1px solid var(--border);
  margin-top: 48px;
}

.footer-top {
  max-width: 1100px;
  margin: 0 auto;
  padding: 48px 32px;
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 40px;
  align-items: start;
}

.footer-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-col-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 18px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--blue);
  display: inline-block;
}

.footer-link {
  display: block;
  color: var(--text-sub);
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color var(--transition);
  text-align: center;
}
.footer-link:hover { color: var(--blue); }

/* Střed */
.footer-col--center {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-logo {
  width: 110px;
  height: auto;
  margin-bottom: 12px;
  filter: drop-shadow(0 0 12px rgba(91,141,232,0.3));
}

.footer-copy-year {
  color: var(--text-muted);
  font-size: 0.78rem;
  margin-bottom: 2px;
}

.footer-brand {
  font-size: 1.5rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.footer-sub {
  color: var(--text-sub);
  font-size: 0.82rem;
  line-height: 1.6;
  max-width: 280px;
  margin-bottom: 16px;
  text-align: center;
}

.footer-socials {
  display: flex;
  gap: 14px;
}

.footer-socials a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 2px solid var(--border);
  border-radius: 50%;
  color: var(--text-sub);
  font-size: 1rem;
  transition: all var(--transition);
  text-decoration: none;
}
.footer-socials a:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(91,141,232,0.1);
}

/* Pravý sloupec */
.footer-col--right { align-items: center; text-align: center; }
.footer-col--right .footer-col-title { display: inline-block; }

.footer-about {
  color: var(--text-sub);
  font-size: 0.88rem;
  line-height: 1.7;
  text-align: center;
}

@media (max-width: 768px) {
  .footer-top {
    grid-template-columns: 1fr;
    gap: 32px;
    padding: 32px 20px;
  }
}