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

/* === SJEDNOCENÁ HLAVIČKA PRO ADMIN / MEMBER / VÝBOR / KARTA === */
header {
  background: #000;
  padding: 10px 15px;
  display: flex;
  flex-wrap: nowrap;
  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: #ff8c00;
  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: #e65c00;
  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;
  }
}

/* === Pole hesla + oko === */
.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;
}

.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;
}

.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;
}

.toggle-eye:hover svg {
  color: #000;
}

/* === DIGITÁLNÍ ČLENSKÁ KARTA === */
.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 === */
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;
}

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

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);
}

/* === TOAST + LOADER === */
.toast {
  position: fixed;
  bottom: 20px;
  right: -300px;
  background: #ff8c00;
  color: #000;
  padding: 12px 18px;
  border-radius: 6px;
  font-weight: 600;
  transition: right 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  z-index: 9999;
}

.toast.visible {
  right: 20px;
  opacity: 1;
}

.toast-success {
  background: #00c851;
  color: #fff;
}

.toast-error {
  background: #ff4444;
  color: #fff;
}

.toast-warning {
  background: #ffc107;
  color: #000;
}

/* Loader */
#globalLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9998;
}

#globalLoader .loader {
  width: 40px;
  height: 40px;
  border: 4px solid #ff8c00;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* === SEND-NOTIFICATIONS === */
.content {
  padding: 25px;
  max-width: 900px;
  margin: 0 auto;
}

.card {
  background-color: #1a1a1a;
  color: #f5f5f5;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 25px;
}

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

.input-select {
  width: 100%;
  padding: 12px 16px;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 16px;
  margin-top: 10px;
}

.input-textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px 16px;
  background: #222;
  color: #fff;
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 16px;
  resize: vertical;
  box-sizing: border-box;
}

.char-counter {
  text-align: right;
  font-size: 14px;
  color: #aaa;
  margin-top: 5px;
}

.btn-primary {
  background: #ff8c00;
  color: #000;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  width: 100%;
  margin-top: 20px;
  transition: 0.3s;
}

.btn-primary:hover {
  background: #e65c00;
  color: #fff;
}

/* === PROFILE PAGE === */
.page-profile {
  max-width: 700px;
  margin: 40px auto;
  padding: 0 20px;
}

.tile-profile {
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 10px;
  padding: 25px;
  margin-top: 20px;
}

.tile-header h2 {
  margin: 0;
  color: #ff8c00;
}

.tile-subtitle {
  font-size: 14px;
  color: #aaa;
}

.tile-section {
  margin-top: 25px;
}

.field-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 18px;
}

.field-group label {
  font-size: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.field-group input {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #333;
  border-radius: 6px;
  background: #222;
  color: #fff;
  box-sizing: border-box;
  height: 46px;
  line-height: 46px;
}

.field-group input[readonly] {
  background: #2a2a2a;
  color: #ccc;
}

.notifications-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.btn-ghost {
  background: transparent;
  border: 1px solid #555;
  color: #ccc;
  padding: 10px 16px;
  border-radius: 6px;
  cursor: pointer;
}

.btn-ghost:hover {
  background: #333;
}

/* Mobilní úpravy */
@media (max-width: 600px) {
  .notifications-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-ghost {
    width: 100%;
  }
}
/* === HOME BUTTON === */
.home-btn {
  background: #ff8c00;
  color: #000;
  padding: 8px 14px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.25s ease;
}

.home-btn:hover {
  background: #e65c00;
  color: #fff;
}

/* Mobilní úprava – zarovnání pod logo */
@media (max-width: 768px) {
  .home-btn {
    width: 100%;
    margin-top: 10px;
  }
}

/* === ACCORDION – SPRÁVA ČLENŮ === */
.accordion-list {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 8px;
  overflow: hidden;
  transition: border-color 0.25s ease;
}

.accordion-item.open {
  border-color: #ff8c00;
}

.accordion-header {
  padding: 16px 20px;
  font-size: 18px;
  font-weight: 700;
  cursor: pointer;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.accordion-header:hover {
  background: #222;
}

.accordion-arrow {
  transition: transform 0.25s ease;
  color: #ff8c00;
  font-size: 20px;
}

.accordion-item.open .accordion-arrow {
  transform: rotate(90deg);
}

.accordion-detail {
  display: none;
  padding: 15px 20px 20px;
  background: #141414;
  border-top: 1px solid #333;
}

.accordion-item.open .accordion-detail {
  display: block;
}

.accordion-detail p {
  margin: 6px 0;
  font-size: 15px;
  color: #ddd;
}

/* === KONTAKTNÍ STRÁNKA – DPP CONTACTS === */
.contact-container {
  max-width: 900px;
  margin: 20px auto 0 auto;
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.contact-section {
  background: #1a1a1a;
  border: 1px solid #222;
  border-radius: 8px;
  padding: 20px 25px;
}

.contact-section h2 {
  margin-top: 0;
  margin-bottom: 12px;
  color: #ff8c00;
  font-size: 20px;
  font-weight: 700;
}

.contact-section p {
  margin: 6px 0;
  font-size: 16px;
  color: #ddd;
  line-height: 1.5;
}

.contact-section a[href^="tel"] {
  color: #ff8c00;
  font-weight: 700;
  text-decoration: none;
}

.contact-section a[href^="tel"]:hover {
  color: #fff;
  text-decoration: underline;
}

.contact-section .note {
  font-size: 14px;
  color: #aaa;
  display: block;
  margin-top: 6px;
}

.contact-section-special {
  margin-top: 40px;
  border-color: #444;
  background: #141414;
  box-shadow: 0 0 12px rgba(255, 140, 0, 0.15);
}

.contact-section-special h2 {
  color: #ff8c00;
}

.contact-section-special p {
  color: #e0e0e0;
}
/* Mobilní úpravy kontaktů */
@media (max-width: 600px) {
  .contact-container {
    padding: 0 15px;
  }

  .contact-section {
    padding: 18px;
  }

  .contact-section h2 {
    font-size: 18px;
  }

  .contact-section p {
    font-size: 15px;
  }
}

/* === MOBILNÍ ÚPRAVY — POUZE PRO LOGIN STRÁNKU === */
@media (max-width: 768px) {

  header.main-header {
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
  }

  header.main-header .logo-wrap {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }

  header.main-header .logo {
    height: 70px;
  }

  header.main-header .title {
    font-size: 26px;
  }

  header.main-header .header-buttons {
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 12px;
  }

  header.main-header .home-btn,
  header.main-header .btn-ghost {
    font-size: 18px;
    padding: 12px 20px;
    width: 100%;
  }
}

/* === ADAPTIVNÍ HEADER PODLE ORIENTACE — FINÁLNÍ SJEDNOCENÁ VERZE === */

/* 💻 Na šířku – kompaktní původní styl */
@media (orientation: landscape) {

  header:not(.main-header) {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 20px !important;
    gap: 0 !important;
  }

  header:not(.main-header) .logo-wrap,
  header:not(.main-header) .user-bar,
  header:not(.main-header) .header-buttons {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  header:not(.main-header) .user-bar {
    max-width: 300px !important;
  }

  header:not(.main-header) .home-btn,
  header:not(.main-header) .btn-ghost {
    width: auto !important;
    font-size: 14px !important;
    padding: 8px 14px !important;
  }
}
/* === FINÁLNÍ SJEDNOCENÍ PORTRAIT HEADERU NA VŠECH STRÁNKÁCH === */
@media (orientation: portrait) {

  header:not(.main-header) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    flex-wrap: nowrap !important;
    gap: 12px !important;
    padding: 16px 18px !important;
    text-align: center !important;
  }

  header:not(.main-header) .logo-wrap {
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
  }

  header:not(.main-header) .user-bar {
    justify-content: center !important;
    width: 100% !important;
    max-width: none !important;
    font-size: 18px !important;
  }

  header:not(.main-header) .header-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 10px !important;
  }

  header:not(.main-header) .home-btn,
  header:not(.main-header) .btn-ghost,
  header:not(.main-header) button {
    width: 180px !important;
    font-size: 16px !important;
    padding: 10px 18px !important;
    margin: 2px 0 !important;
  }

}  /* ← TADY KONČÍ MEDIA QUERY */

/* === Dvě samostatné dlaždice JPM / JPT vedle sebe === */
.tile-row {
  display: flex;
  gap: 25px;
}

/* Každá dlaždice je normální contact-section */
.tile-row .contact-section {
  flex: 1;
}

/* Celá dlaždice je klikací */
.tile-full-link {
  display: block;
  height: 100%;
  color: #fff;
  text-decoration: none;
}

/* Hover efekt */
.tile-full-link:hover {
  color: #ff8c00;
}

/* === Univerzální styl pro kontaktní stránky (JPT, JPM, další) === */

/* Základní dlaždice */
.contact-section {
    background: #1a1a1a;
    border: 1px solid #222;
    border-radius: 8px;
    padding: 22px 25px;
    margin-bottom: 25px;
    color: #fff;
}

/* Nadpisy – oranžové, tučné, stejná velikost jako text */
.contact-section h2 {
    color: #ff8c00;
    font-weight: 700;
    font-size: 18px; /* stejná velikost jako text */
    margin-bottom: 10px;
}

/* Text – bílý */
.contact-section p {
    color: #fff;
    font-size: 18px;
    line-height: 1.45;
    margin: 0 0 10px 0;
}

/* Klikací telefonní čísla */
.contact-section a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-section a:hover {
    color: #ff8c00;
    text-decoration: underline;
}

/* Pokud bys někdy chtěl dvou-sloupcové rozložení (JPM/JPT dlaždice) */
.tile-row {
    display: flex;
    gap: 25px;
}

.tile-row .contact-section {
    flex: 1;
}

/* ========================================= */
/*  BAREVNÉ IKONY PRO DISPEČINK JPT          */
/* ========================================= */

.icon-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    top: 1px;
}

.icon-white { background: #ffffff; }
.icon-yellow { background: #ffd800; }
.icon-blue { background: #007bff; }
.icon-green { background: #00c851; }

/* ============================= */
/* SEKČNÍ NADPISY (nad dlaždicí) */
/* ============================= */

.section-title {
    color: #ff8c00;
    font-weight: 700;
    font-size: 22px;
    text-align: center;
    margin: 40px 0 20px 0;
    letter-spacing: 1px;
}

/* Speciální nadpis pro Metro C */
.metroc-title {
    color: #ff0000; /* červená */
}

/* Speciální nadpis pro Metro B */
.metrob-title {
    color: #ffd700; /* žlutá */
}

/* Speciální nadpis pro Metro A */
.metroa-title {
    color: #00cc44; /* zelená */
}

/* ===================================== */
/* NÁZVY KONTAKTŮ UVNITŘ DLAŽDICE        */
/* ===================================== */

.contact-section h2 {
    color: #fff; /* názvy kontaktů bílé */
    font-weight: 700;
    font-size: 18px;
    margin-top: 20px;
    margin-bottom: 5px;
}

/* ===================================== */
/* TEXT UVNITŘ DLAŽDICE                  */
/* ===================================== */

.contact-section p {
    color: #fff; /* text bílý */
    font-size: 18px;
    line-height: 1.45;
    margin: 0 0 15px 0; /* mezera mezi kontakty */
}

/* ===================================== */
/* TELEFONNÍ ČÍSLA (ORANŽOVÁ)            */
/* ===================================== */

.contact-section a[href^="tel"] {
    color: #ff8c00; /* telefonní čísla oranžová */
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-section a[href^="tel"]:hover {
    color: #fff;
    text-decoration: underline;
}

/* Ostatní odkazy uvnitř dlaždic dědí barvu rodiče */
.contact-section a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

/* ===================================== */
/* BAREVNÉ IKONY PRO DISPEČINK JPT       */
/* ===================================== */

.icon-mark {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 8px;
    position: relative;
    top: 1px;
}

.icon-white { background: #ffffff; }
.icon-yellow { background: #ffd800; }
.icon-blue { background: #007bff; }
.icon-green { background: #00c851; }}

/* ========================================================= */
/* ZÁKLADNÍ STYL PRO iOS BANNER – platí pro iOS 13–18, Android */
/* ========================================================= */

.ios-banner {
    display: block;
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 15px;
    margin: 20px auto;
    text-align: center;
    font-size: 16px;
    color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 320px;
}

/* ========================================================= */
/* Fallback styl pro starší iOS (iOS 12 a níže) – iOS banner */
/* ========================================================= */

@supports (-webkit-touch-callout: none) {
    /* Moderní fallback – použije iOS 13+ */
    .ios-banner {
        display: block !important;
        background: #1a1a1a;
        border: 1px solid #444;
        padding: 15px;
        margin: 20px auto;
        text-align: center;
        font-size: 16px;
        color: #fff;
        border-radius: 8px;
        max-width: 320px;
    }
}

/* Dodatečný fix pro iOS 12 – Safari 12 ignoruje @supports */
.ios-banner {
    display: block;
    background: #1a1a1a;
    border: 1px solid #444;
    padding: 15px;
    margin: 20px auto;
    text-align: center;
    font-size: 16px;
    color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 320px;
}
