/* === Základní vzhled === */
body {
  margin: 0;
  background: #111;
  color: #f5f5f5;
  font-family: "Segoe UI", Arial, sans-serif;
}

/* === SJEDNOCENÁ HLAVIČKA PRO ADMIN / MEMBER / VÝBOR / KARTA === */
header {
  background: #000;
  padding: 15px 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #222;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 50px;
}

.title {
  font-size: 18px;
  font-weight: 600;
  color: #f5f5f5;
}

/* Uživatelská lišta */
.user-bar {
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  justify-content: center;
  max-width: 400px;
}

.user-name {
  flex: 1;
  text-align: center;
  font-weight: 700;
  color: #fff;
  font-size: 18px;
  min-width: 200px;
}

/* === LOGIN HEADER — LÁMÁNÍ + CENTROVÁNÍ === */
.main-header {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: #000;
  padding: 10px 0;
  gap: 2px;
  text-align: center;
}

.main-header .first-line {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 4px;
}

.main-header .slash {
  color: #ff6600;
  font-weight: bold;
  font-size: clamp(16px, 4vw, 20px);
}

.main-header .nopd {
  color: #fff;
  font-weight: bold;
  font-size: clamp(16px, 4vw, 20px);
}

.main-header .title {
  color: #fff;
  font-weight: bold;
  font-size: clamp(16px, 4vw, 20px);
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* === Tlačítka === */
.btn,
.cta {
  background: #ff8c00;
  color: #000;
  padding: 10px 18px;
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s ease;
}

.btn:hover,
.cta:hover {
  background: #ff3b30;
  color: #fff;
}

/* === Kontejner === */
.container {
  padding: 25px;
  text-align: center;
}

/* === Nadpis === */
h1 {
  margin-bottom: 25px;
  color: #ff8c00;
}

/* === Inputy === */
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 90%;
  padding: 12px 16px;
  margin-bottom: 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  box-sizing: border-box;
}

/* === Chyba === */
.error {
  color: #ff4444;
  margin-top: 15px;
}

.hidden {
  display: none;
}

/* === Dashboard layout === */
.dashboard-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 20px;
}

.welcome-box {
  max-width: 600px;
}

.cards-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

.card {
  background-color: #1a1a1a;
  color: #f5f5f5;
  text-decoration: none;
  border: 1px solid #222;
  border-radius: 8px;
  width: 220px;
  padding: 20px;
  transition: 0.3s;
}

.card:hover {
  background-color: #ff8c00;
  color: #000;
}

/* === Členská karta – přehled === */
.card-section {
  margin-top: 50px;
  text-align: center;
  width: 100%;
}

.card-section h2 {
  color: #ff8c00;
  margin-bottom: 20px;
}

.card-container {
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 25px;
  max-width: 500px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
}

.card-info p {
  margin: 8px 0;
  font-size: 16px;
  text-align: left;
}

.card-qr img {
  width: 140px;
  height: 140px;
  border: 2px solid #ff8c00;
  border-radius: 6px;
}

/* === Mobilní zobrazení členské karty === */
@media (max-width: 600px) {
  .card-container {
    flex-direction: column;
    text-align: center;
  }

  .card-info p {
    text-align: center;
  }
}

/* === Responsivní úpravy === */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 10px;
  }

  .user-bar {
    width: 100%;
    justify-content: center;
    gap: 20px;
  }

  .dashboard-main {
    padding: 20px 10px;
  }

  .cards-grid {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .card {
    width: 90%;
    max-width: 320px;
  }

  .btn,
  .cta {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .logo {
    height: 40px;
  }

  .card h2 {
    font-size: 1.1rem;
  }

  .card p {
    font-size: 0.9rem;
  }
}

/* === Pole hesla + oko — FINÁLNÍ OPRAVA === */
.password-wrapper {
  position: relative;
  width: 90%;
  margin: 0 auto;
}

.password-wrapper input {
  width: 100%;
  padding-right: 45px;
  line-height: 1.4;
  background: #fff;
  color: #000;
  border-radius: 6px;
}

/* Kontejner pro oko */
.toggle-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* SVG ikona oka */
.toggle-eye svg {
  width: 22px;
  height: 22px;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  color: #ff8c00;
  fill: currentColor;
  stroke: currentColor;
  transition: color 0.25s ease;
}

/* Hover efekt */
.toggle-eye:hover svg {
  color: #000;
}

/* === DIGITÁLNÍ ČLENSKÁ KARTA – card.html === */
.card-fullscreen {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px 20px;
  min-height: calc(100vh - 100px);
}

.member-card {
  background: #fff;
  color: #000;
  border: 2px solid #ff8c00;
  border-radius: 16px;
  padding: 30px;
  display: flex;
  gap: 30px;
  max-width: 700px;
  width: 100%;
  align-items: center;
  box-shadow: 0 0 25px rgba(255, 140, 0, 0.25);
}

.member-card-left {
  flex: 0 0 160px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.member-card-logo {
  width: 140px;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(255, 140, 0, 0.4));
}

.member-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.org-name {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #000;
  margin-bottom: 12px;
}

.member-name {
  font-size: 26px;
  font-weight: 700;
  color: #000;
}

.member-id {
  font-size: 18px;
  font-weight: 700;
  color: #000;
}

.validity {
  margin-top: 10px;
  font-size: 16px;
  font-weight: 700;
  color: #00c851;
}

/* Mobilní verze digitální karty */
@media (max-width: 700px) {
  .member-card {
    flex-direction: column;
    text-align: center;
    padding: 25px;
  }

  .member-card-left {
    flex: none;
  }

  .member-card-logo {
    width: 120px;
  }

  .org-name {
    font-size: 18px;
  }

  .member-name {
    font-size: 22px;
  }

  .member-id {
    font-size: 16px;
  }

  .validity {
    font-size: 15px;
  }
}

/* ============================================================
   LANDSCAPE FIX – adaptivní karta, zachování poměru stran
   ============================================================ */

body.landscape .card-fullscreen {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2vh 2vw;
  min-height: 100vh;
  box-sizing: border-box;
}

body.landscape .member-card {
  flex-direction: row;
  aspect-ratio: 2.2 / 1;
  width: 95vw;
  max-height: 90vh;
  padding: 2vh 3vw;
  box-sizing: border-box;
  transform: none;
}

body.landscape .member-card-left {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

body.landscape .member-card-logo {
  width: min(25vh, 25vw);
  height: auto;
}

body.landscape .member-card-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5vh;
}

body.landscape .org-name {
  font-size: min(3.2vh, 3.2vw);
}

body.landscape .member-name {
  font-size: min(4.2vh, 4.2vw);
}

body.landscape .member-id {
  font-size: min(2.8vh, 2.8vw);
}

body.landscape .validity {
  font-size: min(2.6vh, 2.6vw);
}
