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

/* Definice pro celý CSS k dalšímu použití a jednoduché změně */
:root {
  --color-bg: #f5f7fa;
  --color-text: #333;
  --color-primary: #007bff;
  --color-primary-dark: #0069d9;
  --color-link: #0066cc;
  --color-link-hover: #004999;
  --color-topbar-bg: #2c3e50;
  --color-table-header-bg: #2c3e50;
  /* barvy tlačítek */
  --color-bg-success: #00aa00;
  --color-tx-success: #181818;
  --color-bg-danger: #ff0000;
  --color-tx-danger: #ffffff;
  --color-bg-info: #aaaa7f;
  --color-tx-info: #181818;
}

/* ---------------------------------------------------------------------------------------------------
WEB BASIC SETTING
--------------------------------------------------------------------------------------------------- */
body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
}

section {
  margin-bottom: 20px;
}

/* Nadpisy */
h1, h2, h3, h4, h5 {
  margin-bottom: 9px;
  font-weight: bold;
}
h1 {
  font-size: 190%;
}
h2 {
  font-size: 160%;
}
h3 {
  font-size: 135%;
}
h4 {
  font-size: 120%;
}
h5 {
  font-size: 110%;
}

/* Odstavce */
p {
  margin-bottom: 10px;
}

/* Jednotný styl odkazů */
a,
a:visited {
  color: var(--color-link);
  text-decoration: none;
}
a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;
}
a:active {
  color: #003366;
  font-weight: 500;
}

/* Odrážky */

ul {
  list-style-position: outside;
  padding-left: 1.2rem;
  text-indent: 1.2rem;
}

/* Fomtáty písma */
.bold, .strong {
  font-weight: bold;
}
.underline-on {
  text-decoration: underline;
}
.underline-off {
  text-decoration: none;
}
.italic {
  font-style: italic;
}
.normal {
  font-style: normal;
}
.text-xxxxlarge {
  font-size: 200%;
}
.text-xxxlarge {
  font-size: 180%;
}
.text-xxlarge {
  font-size: 160%;
}
.text-xlarge {
  font-size: 140%;
}
.text-large {
  font-size: 120%;
}
.text-standard {
  font-size: 100%;
}
.text-smal {
  font-size: 80%;
}
.text-xsmall {
  font-size: 60%;
}
.text-xxsmall {
  font-size: 40%;
}
.text-xxxsmall {
  font-size: 20%;
}
.font-8 {
  font-size: 8px;
}
.font-9 {
  font-size: 9px;
}
.font-10 {
  font-size: 10px;
}
.font-11 {
  font-size: 11px;
}
.font-12 {
  font-size: 12px;
}
.font-13 {
  font-size: 13px;
}
.font-14 {
  font-size: 14px;
}
.font-15 {
  font-size: 15px;
}
.font-16 {
  font-size: 16px;
}
.font-17 {
  font-size: 17px;
}
.font-18 {
  font-size: 18px;
}
.font-19 {
  font-size: 19px;
}
.font-20 {
  font-size: 20px;
}
.font-21 {
  font-size: 21px;
}
.font-22 {
  font-size: 22px;
}

/* Skrytý */
.hidden {
  display: none !important;
}

/* Align */
.left {
  float: left;
}
.right {
  float: right;
}
.center-align  {
  text-align: center;
}
.left-align  {
  text-align: left;
}
.right-align  {
  text-align: right;
}
.top-align {
  vertical-align: top;
}
.middle-align {
  vertical-align: middle;
}
.bottom-align {
  vertical-align: bottom;
}

/* Margin - Padding */
.mx-0 {
  margin-left: 0px;
  margin-right: 0px;
}
.mx-xsmall {
  margin-left: 3px;
  margin-right: 3px;
}
.mx-small {
  margin-left: 6px;
  margin-right: 6px;
}
.mx-large {
  margin-left: 12px;
  margin-right: 12px;
}
.mx-xlarge {
  margin-left: 18px;
  margin-right: 18px;
}
.mx-xxlarge {
  margin-left: 24px;
  margin-right: 0px;
}
.px-0 {
  padding-left: 0px;
  padding-right: 0px;
}
.px-xsmall {
  padding-left: 3px;
  padding-right: 3px;
}
.px-small {
  padding-left: 6px;
  padding-right: 6px;
}
.px-large {
  padding-left: 12px;
  padding-right: 12px;
}
.px-xlarge {
  padding-left: 18px;
  padding-right: 18px;
}
.px-xxlarge {
  padding-left: 24px;
  padding-right: 0px;
}
.my-0 {
  margin-top: 0py;
  margin-bottom: 0py;
}
.my-xsmall {
  margin-top: 3py;
  margin-bottom: 3py;
}
.my-small {
  margin-top: 6py;
  margin-bottom: 6py;
}
.my-large {
  margin-top: 12py;
  margin-bottom: 12py;
}
.my-xlarge {
  margin-top: 18py;
  margin-bottom: 18py;
}
.my-xxlarge {
  margin-top: 24py;
  margin-bottom: 0py;
}
.py-0 {
  padding-top: 0py;
  padding-bottom: 0py;
}
.py-xsmall {
  padding-top: 3py;
  padding-bottom: 3py;
}
.py-small {
  padding-top: 6py;
  padding-bottom: 6py;
}
.py-large {
  padding-top: 12py;
  padding-bottom: 12py;
}
.py-xlarge {
  padding-top: 18py;
  padding-bottom: 18py;
}
.py-xxlarge {
  padding-top: 24py;
  padding-bottom: 0py;
}

/* ---------------------------------------------------------------------------------------------------
TEXT/BACKGROUND COLORS
--------------------------------------------------------------------------------------------------- */
.text-info {
  color: #55557f;
}
.text-warning {
  color: #ff5500;
}
.text-danger {
  color: #ce0000;
}
.text-success {
  color: #009c00;
}
.black {
  color: #000000;
}
.white {
  color: #ffffff;
}
.red {
  color: #aa0000;
}
.blue {
  color: #0000c6;
}
.green {
  color: #006200;
}
.orange {
  color: #d03b00;
}
.bg-black {
  color: #000000;
}
.bg-red {
  color: #aa0000;
}
.bg-blue {
  color: #0000c6;
}
.bg-green {
  color: #006200;
}
.bg-orange {
  color: #d03b00;
}
.bg-lightred {
  color: #f7bbbe;
}
.bg-lightblue {
  color: #9bb3ff;
}
.bg-lightgreen {
  color: #ccffc6;
}
.bg-lightorange {
  color: #ffd3a7;
}

/* ---------------------------------------------------------------------------------------------------
STATUS COLORS
--------------------------------------------------------------------------------------------------- */
.error {
  color: #bc0000;
}
.warn {
  color: #ffaa00;
}
.danger {
  color: #ff0000;
}

/* ---------------------------------------------------------------------------------------------------
RŮZNÉ PRVKY
--------------------------------------------------------------------------------------------------- */
/* Pruh se zaoblenými rohy */
.band-rounded {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid #55557f;
}
.band-light {
  background: #b8b8ef;
}
.band-dark {
  background: #33334c;
  color: white;
}
/* ---------------------------------------------------------------------------------------------------
TOPBAR – DVĚ ŘADY: LOGO + NAVIGACE
--------------------------------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 1500;
  background: var(--color-topbar-bg);
  color: white;
  width: 100%;
  padding: 0 10px;
  /*font-size: 16px !important;*/
}
/* ŘÁDEK 1 – LOGO */
.topbar-row-logo {
  display: inline-flex;
  align-items: center;
  margin: 0 !important;
  padding: 0 !important;
}
.topbar-row-logo a {
  margin: 5px;
}
.topbar-row-logo .brand {
  /*font-size: 20px;*/
  font-weight: bold;
  color: white;
}
.topbar-row-logo img {
  display: block;
  height: 35px;
  margin: 0;
}
/* ŘÁDEK 2 DESKTOP – hlavní menu + dropdowny */
.desktop-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 3px;
  font-weight: bold;
}
.desktop-left a {
  white-space: nowrap;  
  margin-right: 20px;
  text-decoration: none;
  color: white;
}
.desktop-left a:hover {
  color: #d0e9ff;
}
.desktop-left a.active {
  color: #ffaa7f !important;
}
.desktop-right {
  white-space: nowrap;  
  display: flex;
  align-items: center;
  gap: 20px;
}
/* Dropdowny */
.dropdown {
  position: relative;
  font-size: 16px !important;
}
.dropdown-btn {
  white-space: nowrap;  
  background: transparent;
  color: white;
  border: none;
  cursor: pointer;
  padding: 6px 10px;
}
.dropdown-btn:hover {
  color: #d0e9ff;
  text-decoration: none;
}
.admin-btn {
  white-space: nowrap;  
  background: #7b1fa2;
  border-radius: 6px;
}
.user-btn {
  white-space: nowrap;  
  background: #0000ff;
  border-radius: 6px;
}
.dropdown-content {
  display: none;
  position: absolute;
  right: 0;
  background: white;
  min-width: 180px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  z-index: 2000;
}
.dropdown-content a {
  white-space: nowrap;  
  display: block;
  font-size: 16px !important;
  padding: 10px 12px;
  color: #333;
  border-bottom: 1px solid #eee;
}
.dropdown-content a:hover {
  background: #f0f6ff;
}
.dropdown-content a.active {
  font-weight: 700;
  background: #aaa99d;
  color: #555500 !important;
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* ŘÁDEK 2 MOBILE – MENU | Admin | User */
.mobile-nav {
  display: none;
  font-size: 16px !important;
  justify-content: flex-start;
  gap: 20px;
  padding: 8px 0 10px 0;
}
.mobile-toggle, .mobile-toggle a {
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  color: white !important;
  padding: 6px 10px;
}

/* ŘÁDEK 2 MOBILE – Položky rozbalovací menu */
.mobile-menu {
  display: none;
  background: #2c3e50;
  width: 100%;
}
.admin-menu {
  background: #7b1fa2;
}
.user-menu {
  background: #0000ff;
}
.mobile-menu.open {
  display: block;
}
.mobile-menu a {
  white-space: nowrap;  
  display: block;
  padding: 10px 20px;
  color: white;
}
.mobile-menu a.active {
  font-weight: 700;
  background: #aaa99d;
  color: #555500 !important;
}

/* RESPONSIVE LOGIKA */
@media (max-width: 850px) {
  /* Desktop menu pryč */
  .desktop-nav {
    display: none;
  }
  /* Mobilní řádek 2 viditelný */
  .mobile-nav {
    display: flex;
  }
}
@media (min-width: 851px) {
  /* Mobilní prvky pryč */
  .mobile-nav,
  .mobile-menu {
    display: none !important;
  }
}

/* ---------------------------------------------------------------------------------------------------
PAGE CONTENT
--------------------------------------------------------------------------------------------------- */
.page-content {
  max-width: 1200px;
  margin: 30px auto;
  padding: 0 20px;
}

/* ---------------------------------------------------------------------------------------------------
FOOTER
--------------------------------------------------------------------------------------------------- */
.footer {
  text-align: center;
  padding: 20px;
  margin-top: 40px;
  color: #666;
}


/* ---------------------------------------------------------------------------------------------------
GENERAL CLASSES
--------------------------------------------------------------------------------------------------- */

/* FONT SIZE */
.text-tiny {
  font-size: 60%;
}
.text-small {
  font-size: 80%;
}
.text-medium {
  font-size: 100%;
}
.text-large {
  font-size: 120%;
}
.text-xlarge {
  font-size: 140%;
}

/* OBJECT SIZE */
.object-tiny {
  font-size: 60%;
  height: 60%;
  padding: 2px;
}
.object-small {
  font-size: 80%;
  height: 80%;
  padding: 5px;
}
.object-medium {
  font-size: 100%;
  height: 100%;
}
.object-large {
  font-size: 120%;
  height: 120%;
}
.object-xlarge {
  font-size: 140%;
  height: 140%;
}

/* DISPLAY */
.row {
  display: flex;
  flex-direction: row;
}
.in-line {
  display: inline;
}
.block {
  display: block;
}
.no-wrap {
  white-space: nowrap;
}
.vertical-top {
  vertical-align: top;
}
.vertical-middle {
  vertical-align: middle;
}
.vertical-bottom {
  vertical-align: bottom;
}

/* BUTTONS */
button,
input[type=submit], a.button {
  margin-bottom: 10px;
  padding: 6px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease;
}
.btn-primary {
  background: #007bff !important;
  color: white !important;
}
.btn-primary:hover {
  background: #0069d9;
}
.btn-danger {
  background: #dc3545;
  color: white;
}
.btn-danger:hover {
  background: #b52a37;
}
.btn-secondary {
  background: #6c757d;
  color: white;
}
.btn-secondary:hover {
  background: #5a6268;
}
.btn-others {
  background: #55557f;
  color: white;
}
.btn-others:hover {
  background: #444466;
}
.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 2px 6px;
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.icon-btn:hover {
  opacity: 1;
}
button.disabled, .button.disabled, .btn.disabled, .btn-disabled, .button-disabled, .disabled {
  background: #888 !important;
  opacity: 0.5;
  cursor: not-allowed;
}
.upload-btn {
  display: inline-block;
  padding: 3px 6px;
  background: #007bff;
  color: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 4px;
}

.upload-btn:hover {
  background: #0056b3;
}

.file-name {
  display: inline-block;
  margin-left: 8px;
  font-size: 13px;
  color: #444;
}


/* ---------------------------------------------------------------------------------------------------
NOTIFI BAR
--------------------------------------------------------------------------------------------------- */
.notify-container {
  position: fixed;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 99%;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
}
.notify-item {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 15px;
  color: #141414;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: auto;
}

.notify-item.visible {
  display: flex;
  opacity: 1;
  pointer-events: auto
}
.notify-item.success {
  background: #6fa75e;
} .notify-item.error {
  background: #d99a9a;
} .notify-item.warning {
  background: #ffaa00;
} .notify-item.info {
  background: #aaaa7f;
}
.notify-close {
  float: right;
  background: transparent;
  border: none;
  color: #141414;
  font-size: 20px;
  cursor: pointer;
  margin-right: 12px;
  line-height: 1;
}
.notify-bar {
  position: fixed;
  top: 3px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 15px;
  color: #141414;
  z-index: 99999;
  display: none;
  opacity: 0;
  width: 99%;
  justify-content: space-between;
  align-items: center;
  transition: opacity 0.4s ease;
}


/* ---------------------------------------------------------------------------------------------------
OVERLAY
--------------------------------------------------------------------------------------------------- */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255,255,255,0.85);
  z-index: 9999;

  /* CENTROVÁNÍ */
  justify-content: center;   /* horizontálně */
  align-items: center;       /* vertikálně */

  font-size: 22px;
  font-weight: bold;
  text-align: center;
}
#sync-overlay-text {
  animation: fadeIn 0.4s ease-out;
}
@keyframes fadeIn {
  from {
    opacity: 0;
  transform: translateY(10px);
  }
  to   {
    opacity: 1;
  transform: translateY(0);
  }
}
.overlay-dots::after {
  content: '...';
  display: inline-block;
  width: 1.5em;
  text-align: left;
  animation: dots 1.2s steps(4, end) infinite;
}
@keyframes dots {
  0%   { content: ''; }
  25%  { content: '.'; }
  50%  { content: '..'; }
  75%  { content: '...'; }
  100% { content: ''; }
}


/* ---------------------------------------------------------------------------------------------------
MESSAGE BOX – minimalistická inline hláška
--------------------------------------------------------------------------------------------------- */
.message-box {
  display: none;
  margin-bottom: 12px;
  font-size: 15px;
  line-height: 1.4;
  font-weight: 500; /* můžeš snížit na 400, pokud chceš ještě jemnější vzhled */
}
/* INFO */
.message-box.info {
  color: #2a4a8a; /* jemná modrá */
}
/* SUCCESS */
.message-box.success {
  color: #1f7a1f; /* jemná zelená */
}
/* ERROR */
.message-box.error {
  color: #b00020; /* výraznější červená, ale stále elegantní */
}
/* WARNING (volitelné) */
.message-box.warning {
  color: #a66b00; /* teplá žlutohnědá */
}
.message-box.loading {
  color: #555;
  font-style: italic;
}



/* ---------------------------------------------------------------------------------------------------
PAGINATION 
--------------------------------------------------------------------------------------------------- */
.pagination {
  margin: 10px 0;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  font-size: 12px;
}
.page-btn,
.page-number {
  padding: 4px 8px;
  background: #eee;
  border-radius: 6px;
  text-decoration: none;
  color: #333;
  font-weight: 500;
}
.page-btn:hover,
.page-number:hover {
  background: #ddd;
}
.page-number.active {
  background: #007bff;
  color: white;
  font-weight: bold;
  cursor: default;
}


/* ---------------------------------------------------------------------------------------------------
STANDARD TABLES
--------------------------------------------------------------------------------------------------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  /*overflow: hidden;*/
  margin-bottom: 20px;
}
th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--color-table-header-bg);
  color: white;
  padding: 10px;
  text-align: left;
}
table tr:nth-child(even) td {
  background: #f7f9fc;
}
td {
  padding: 10px;
  border-bottom: 1px solid #eee;
}
tr:hover {
  background: #f0f6ff;
}
table a, table a:visited {
  color: inherit;
  text-decoration: none;
}

table a:hover {
  text-decoration: underline;
}
.table-scroll {
  max-height: 80vh;
  overflow-y: auto;
}
/* Sticky header – univerzální třída */
.table-sticky {
  border-collapse: separate !important;
  border-spacing: 0;
}
.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--color-table-header-bg);
}
/* Sticky header for admin tables */
.admin-table {
  border-collapse: separate; /* důležité! */
  border-spacing: 0;
}
/* TABLE ROW MESSAGES */
.msg-row td {
  background: #e8f7e8;
  color: #1e7a1e;
  font-weight: bold;
  border-bottom: 1px solid #d0e6d0;
}
.msg-row.error td {
  background: #fdeaea;
  color: #b30000;
  border-bottom: 1px solid #f5c2c2;
}
.msg-row.info td {
  background: #e7f4fa;
  color: #0b6c8c;
  border-bottom: 1px solid #c8e6f2;
}


/* ---------------------------------------------------------------------------------------------------
STANDARD FORMS
--------------------------------------------------------------------------------------------------- */
.form-row {
  margin-bottom: 12px;
}
input[type=text],
input[type=date],
input[type=password],
input[type=email],
input[type=number],
input[type=datetime-local],
textarea,
select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 14px;
}
textarea {
  resize: vertical;
}
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 6px 12px;
  margin-top: 6px;
}


/* ---------------------------------------------------------------------------------------------------
INLINE FILTER LAYOUT
--------------------------------------------------------------------------------------------------- */
.filter-form {
  font-size: 12px !important;
}
.filter-form button {
  font-size: 12px !important;
}
.filter-inline {
  display: flex;
  margin-bottom: 10px;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}
.filter-pair {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 13px;
  height: 48px;
  justify-content: flex-end;
}
.filter-pair label {
  font-weight: 600;
  font-size: 12px;
  line-height: 1.1;
  margin: 0;
}
.filter-pair input,
.filter-pair select {
  height: 28px !important;
  padding: 3px 6px !important;
  margin-bottom: 0 !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  width: auto;
}
.filter-pair input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
  border: 1px solid #ccc !important;
}
.filter-btn {
  height: 28px !important;
  padding: 0 12px !important;
  font-size: 13px !important;
  border-radius: 4px !important;
  margin-bottom: 0 !important;
  display: flex;
  align-items: center;
}
a.filter-btn {
  color: white;
}

/* ---------------------------------------------------------------------------------------------------
HOME PAGE – charity_home.php
--------------------------------------------------------------------------------------------------- */
/* Patron card (charity_home, charity_leaderboard, charity_user_activities) */
.patron-card-box {
  display: flex;
  gap: 20px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  align-items: flex-start;
  flex-wrap: wrap;
}
.patron-card-box img {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 10px;
}
.patron-card-title {
  float: left;
  width: 100%;
}
.patron-card-info {
  flex: 1;
  min-width: 240px;
}
.patron-card-info-user {
  float: left;
  width: 100%;
}

/* Our patrons cards */
.patron-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.patron-card {
  background: white;
  border-radius: 10px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.patron-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.patron-card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
}
.patron-card h4 {
  margin: 8px 0 4px;
  font-size: 18px;
  font-weight: bold;
}
.patron-card p {
  margin: 0;
  color: #666;
  font-size: 14px;
}


/* Patron box */
.patron-box {
}
.patron-box img {
  height: 200px;
}

/* ---------------------------------------------------------------------------------------------------
STATS PAGE – charity_leaderboard.php
--------------------------------------------------------------------------------------------------- */
/* Simple summary cards (charity_leaderboard, charity_results) */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.summary-card {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  font-size: 16px;
}
.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}
.summary-card .value {
  font-size: 28px;
  font-weight: bold;
  margin-bottom: 6px;
}
.summary-card .unit {
  font-size: 25px;
  color: #666;
}
.summary-activities {
  font-size: 14px;
  font-weight: normal;
}

/* Přepínač formátu času (charity_leaderboard, charity_user_activities) */
.time-format-switch {
  margin: 10px 0 15px 0;
  display: flex;
  justify-content: left;
  gap: 12px;
  flex-wrap: wrap;
}
.time-format-switch span {
  background: #f0f0f0;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
  font-size: 14px;
}

.time-format-switch span:hover {
  background: #e0e0e0;
}
.active-format {
  background: #007bff !important;
  color: white;
}

/* TOP Ranking highlight (charity_home, charity_leaderboard, charity_results) */
.top-row-highlight td, tr:nth-child(even).top-row-highlight td {
  background: #fff9e6;
}
.top-row-highlight:hover td, tr:nth-child(even).top-row-highlight:hover td {
  background: #fff3cc;
}


/* Activity List */
.used-for-donation {
  color: #007400 !important;
}
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #e9ffe7;
  color: #1b6b00;
  border: 1px solid #b7e2b5;
}
.not-used-for-donation {
  color: #565656 !important;
}
.badge-grey {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ccc;
  color: #565656;
  border: 1px solid #333;
}
.badge-warning {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #ffc5fb;
  color: #aa0000;
  border: 1px solid #333;
}
.reason-popup {
  display: none;
  background: white;
  border: 1px solid #ccc;
  padding: 14px;
  margin-top: 8px;
  border-radius: 8px;
  font-size: 14px;
  max-width: 360px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  line-height: 1.4;
  white-space: normal;
  z-index: 50;
  text-align: left;
}
.reason-popup h4 {
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: bold;
}
.reason-text {
  color: #b30000;
  font-weight: 600;
  margin-top: 6px;
}
.criteria {
  color: #666;
  font-size: 0.9em;
}
.reason-item {
  margin-bottom: 10px;
}
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
.popup-window {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 450px;
  max-width: 90%;
  max-height: 90vh;      /* popup nikdy nepřesáhne výšku okna */
  overflow-y: auto;      /* scroll uvnitř popupu */
}

  /* Zalamování dlouhých textů v popupu */
  .popup-content pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-x: auto;
    max-width: 100%;
    font-size: 13px;
    line-height: 1.3;
    background: #f7f7f7;
    padding: 8px;
    border-radius: 6px;
    border: 1px solid #ddd;
  }
  
}
/* Popup – zalomení dlouhých textů */
.popup-content pre {
  white-space: pre-wrap;     /* zalamuje řádky */
  word-wrap: break-word;     /* láme dlouhá slova */
  overflow-x: auto;          /* horizontální scroll, pokud je třeba */
  max-width: 100%;           /* nikdy nepřesáhne popup */
  font-size: 13px;           /* menší písmo pro lepší čitelnost */
  line-height: 1.3;
}
/* Obecné zalomení textu v popupu */
.popup-content {
  white-space: normal;
  overflow-wrap: break-word;
}
.popup-content pre {
  background: #f7f7f7;
  padding: 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
}
.error-cell {
  cursor: pointer;
}


/* ---------------------------------------------------------------------------------------------------
RESULTS PAGE – charity_results.php
--------------------------------------------------------------------------------------------------- */
/* grid a card převzato výše */
.summary-donation {
  font-size: 24px;
  font-weight: bold;
}
.summary-monthly-donation {
  font-size: 20px;
  font-weight: bold;
  min-width: 220px;
}

/* Tabulka sumarizace */
.sum-table {
  display: grid;
  grid-template-columns: 1fr 95px 95px;
  row-gap: 6px;
  column-gap: 10px;
  font-size: 16px;
  font-weight: bold;
  text-align: left;
}
.sum-total {
  
}
.sum-km,
.sum-time {
  text-align: right;
}

/* Tabulka kategorií */
.cat-table {
  display: grid;
  grid-template-columns: 1fr 95px 95px;
  row-gap: 6px;
  column-gap: 10px;
  font-size: 14px;
  text-align: left;
}
.cat-name {
  font-weight: 600;
}
.cat-km,
.cat-time,
.cat-donation,
.cat-avg {
  text-align: right;
  color: #444;
}
.elevation {
  margin: 10px 0 0 0;
  font-size: 16px;
}

/* SUMMARY MOBILE */
@media (max-width: 800px) {
  .summary-grid,
  .summary-cards-3col {
    grid-template-columns: 1fr;
  }
  .summary-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .sum-table, .cat-table {
    grid-template-columns: 1fr 180px 180px;
  }
}

/* LEADERBOARD TABLE */
.leaderboard-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
/* Sticky header */
.leaderboard-table thead th {
  position: sticky;
  top: 0;
  z-index: 5;              /* musí být nad ostatními buňkami */
  box-shadow: 0 2px 3px rgba(0,0,0,0.05); /* jemný oddělovač */
}
/* Nastavení th a td */
.leaderboard-table th,
.leaderboard-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #ddd;
  vertical-align: top;
  white-space: nowrap;          /* NEZALAMOVAT */
  overflow: hidden;             /* SKRÝT PŘETEKLÝ TEXT */
  text-overflow: ellipsis;      /* ... ZA DLOUHÝ TEXT */
  font-size: 14px;
}
/* Jméno uživatele */
.user-cell {
  line-height: 1em;
  white-space: nowrap;
  font-size: 16px;
  
}
.user-cell strong {
  display: block;
  margin-top: 6px;
  white-space: nowrap;
  padding-top: 10px;
}
/* Souhrn */
.summary-cell div {
  margin-bottom: 4px;
  line-height: 1em;
  white-space: nowrap;
}
/* Kategorie */
.cat-cell,
.cat-cell * {
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.3em;
}


/* ---------------------------------------------------------------------------------------------------
ABOUT PROJECT – charity_about.php
--------------------------------------------------------------------------------------------------- */
/* Section card */
.about-section {
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}
/* Category table - donate rates */
.category-table {
  
}
.category-row {
  cursor: pointer;
  background: #f5f5f5;
}
.category-row:hover {
  background: #e9e9e9;
}
.category-row .arrow {
  display: inline-block;
  width: 16px;
  margin-right: 6px;
  transition: transform 0.2s ease;
}
.category-details td {
  background: #fafafa;
  padding: 0;
}
/* Table category details - rozbalovací seznam typů aktivit*/
.details-inner {
  width: 100%;
  border-collapse: collapse;
}
.details-inner td {
  padding: 6px 10px;
  border-bottom: 1px solid #ddd;
  font-size: 0.9em;
  text-align: left;
}
.details-inner td.activity-type {
  padding-left: 50px;
}
.details-inner td.donate-rate {
  white-space: nowrap;
}
.details-inner td.validity {
  white-space: nowrap;
}

/* ---------------------------------------------------------------------------------------------------
LOGIN / REGISTER – charity_user_login.php | charity_user_register.php
--------------------------------------------------------------------------------------------------- */
.login-box {
  background: white;
  margin: 0 auto;
  padding: 20px;
  border-radius: 8px;
  max-width: 430px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* ------------------------------ */
/* ADMINISTRACE PATRONA */
/* ------------------------------ */
.patron-photo {
  height: 100px;
}
a.login {
  color:white!important;
}
a.login:hover {
  color: white!important;
}


/* ------------------------------ */
/* MODÁLNÍ OKNO */
/* ------------------------------ */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}
.modal-content {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 99%;
  max-width: 430px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.modal-content-wide {
  background: white;
  padding: 20px;
  border-radius: 8px;
  width: 95vw;
  max-width: 860px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.photo-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  border: 2px solid transparent;
}
.photo-thumb:hover {
  border-color: #007bff;
}






/* ---------------------------------------------------------------------------------------------------
ADMIN – DONATION SUMMARY
--------------------------------------------------------------------------------------------------- */
.summary-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3f3f3;
  padding: 15px 20px;
  border-radius: 8px;
  margin-bottom: 25px;
  border: 1px solid #ddd;
}
.summary-left h2,
.summary-right h2 {
  margin: 0 0 5px 0;
  font-size: 18px;
}
.patron-name {
  font-size: 20px;
  font-weight: bold;
}
.summary-amount {
  font-size: 26px;
  font-weight: bold;
  color: #007700;
}



/* ---------------------------------------------------------------------------------------------------
ADMIN – PATRON PHOTOS MANAGEMENT
--------------------------------------------------------------------------------------------------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.photo-box {
  border: 2px solid #ccc;
  padding: 10px;
  border-radius: 8px;
  background: #fafafa;
  text-align: center;
  transition: 0.2s ease;
}
.photo-box.used {
  border-color: #0077cc;
  background: #e8f3ff;
}
.photo-box img {
  max-width: 100%;
  border-radius: 6px;
  height: 140px;
  object-fit: cover;
}
.photo-info {
  margin-top: 8px;
  font-size: 14px;
  color: #444;
}
.photo-used-by {
  color: #0055aa;
  font-weight: bold;
  margin-top: 5px;
  font-size: 13px;
}
.btn-delete {
  margin-top: 10px;
  background: #dc3545;
  color: white;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease;
}
.btn-delete:hover {
  background: #b52a37;
}
.btn-delete:disabled {
  background: #888;
  cursor: not-allowed;
}

/* ------------------------------ */
/* ADMIN - DONATION RULES */
/* ------------------------------ */
.td-changed {
  background: #fff3cd !important;
}
.dr-change-panel {
  background: #fff3cd !important;
  color: blue;
  margin-bottom: 6px;
  padding: 6px;
  font-size: 13px;
}
.dr-change-panel ul {
  margin-top: 4px;
  padding-left: 18px;
}
.dr-change-panel li {
  margin-bottom: 2px;
}
.dr-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 10px;
  margin-bottom: 3px;
  flex-wrap: wrap;
}
.dr-toolbar .spacer {
  flex: 1;
}
.td-edit.editing {
  background: #fffbe6 !important;
  padding: 0;
}
.td-changed {
  background: #fff3cd !important;
}
.td-error {
  background: #fdeaea !important;
  border: 1px solid #ffaaaa;
}
/* Detailní sloupce (posledních 6) */
.detail-row td {
  border-bottom: 1px solid #1f1f1f;
}
.detail-row.collapsed td {
  font-size: 14px;
  padding: 2px 6px;
  line-height: 18px;
  opacity: 0.8;
  cursor: pointer;
  border-top: none;
  border-bottom: 1px solid #1f1f1f;
}
.detail-row.collapsed td .label {
  display: block;
  font-size: 12px;
  opacity: 0.7;
  line-height: 14px;
}
.detail-row.expanded td {
  font-size: 14px;
  padding: 2px 6px;
  line-height: 20px;
  cursor: text;
  opacity: 1;
  border-bottom: 1px solid #1f1f1f;
}
.detail-row.expanded td .label {
  font-size: 14px;
  opacity: 0.8;
  margin-bottom: 2px;
}
.expand-toggle {
  cursor: pointer;
  text-align: center;
  width: 30px;
}


/* ------------------------------ */
/* ADMIN - SYSTEM LOGS */
/* ------------------------------ */

.tag {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  display: inline-block;
}

.tag-strava  {
  background: #fff4e5;
  color: #8a4b00;
}
.tag-refresh {
  background: #e7f1ff;
  color: #003f8a;
}
.tag-upload  {
  background: #e9ffe7;
  color: #1b6b00;
}
.tag-system  {
  background: #f2f2f2;
  color: #555;
}
.tag-error   {
  background: #ffe5e5;
  color: #8a0000;
}



/* ---------------------------------------------------------------------------------------------------
USER - STATS & ACTIVITIES
--------------------------------------------------------------------------------------------------- */

/* SUMMARY CARDS – USER STATS */
.monthly-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
/* Každá karta má minimální šířku tak, aby se vešly 3 vedle sebe */
.monthly-cards .summary-card {
  flex: 0 0 calc(33.333% - 10px);
  min-width: 260px; /* aby se nerozpadaly na malých monitorech */
  box-sizing: border-box;
}
.summary-card.summary-left .total-stats > div {
  padding-top: 5px;
  padding-bottom: 5px;
}
.summary-card.summary-right .total-stats > div {
  padding-top: 5px;
  padding-bottom: 5px;
}
.summary-card.summary-left .extra-stats > div {
  padding-top: 5px;
  padding-bottom: 5px;
}
.summary-card.summary-right .extra-stats > div {
  padding-top: 5px;
  padding-bottom: 5px;
}















/* ---------------------------------------------------------------------------------------------------
USER - UPLOAD ACTIVITIES
--------------------------------------------------------------------------------------------------- */
/* Apps Integration */
.integration-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 20px;
  margin-top: 15px;
}

/* App Box */
.app-box {
  background: #fafafa;
  border: 1px solid #ddd;
  padding: 18px 20px;
  border-radius: 10px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
}
.app-box.connected {
  border-color: #28a745;
  background: #e9ffe7;
}
.app-box.unsupported {
  opacity: 0.6;
}
.app-logo {
  max-height: 50px;
  width: auto;
}
.sync-text {
  font-size: 14px;
  color: #777;
}
.btn-sync, .btn-connect, .btn-disconnect, .btn-sync-options {
  font-size: 12px !important;
  padding: 4px 8px !important;
  background: var(--color-primary) !important;
  color: white !important;
}
.btn-sync-options {
  font-size: 16px !important;
}
.btn-connect {

}
.btn-disconnect {
  background: var(--color-bg-danger) !important;
  color: var(--color-tx-danger) !important;
}
.unsupported-text {
  font-size: 13px;
  color: #777;
}

/* User activity upload */
#dropzone {
  border: 2px dashed #888;
  padding: 30px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}
#dropzone.dragover {
  background: #eef;
  border-color: #55f;
}
.status, .error {
  margin-top: 10px;
  padding: 10px;
  border-radius: 6px;
}
.status {
  background: #eef;
}
.remove-btn {
  background: #ff557f;
}
/* PREVIEW - Tabulka importovaných souborů */
/* Vypnutí zebra stylů a hover efektů z globální tabulky */
.preview-table tr,
.preview-table td,
.preview-table tr:hover td {
  background: var(--color-bg) !important;
}
/* Vypnutí defaultního border-bottom z globálního td */
.preview-table td {
  border: none !important;
}
.preview-table select.type-input {
  width: 120px;
}
.preview-table input.dist-input {
  width: 100px;
  text-align: right;
}
.preview-table input.dur-input {
  width: 90px;
  text-align: center;
}
.preview-table input.elev-input {
  width: 90px;
  text-align: right;
}
.preview-table input.start-input {
  width: 180px;
}
.preview-table input,
.preview-table select {
  font-size: 0.95em;
  padding: 4px 6px;
  box-sizing: border-box;
}
.preview-row-name {
  background: var(--color-bg) !important;
  border-top: 1px solid #2d2d2d;
  border-bottom: none !important;
}
.preview-row-name td,
.preview-row td,
.preview-row-error td {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}
.preview-table input,
.preview-table select {
  padding: 2px 4px !important;
  height: 26px; /* kompaktní, ale stále dobře ovladatelné */
  font-size: 0.9em;
}
.preview-name-cell input {
  padding: 4px 6px !important;
  height: 28px;
}

.preview-row-name td {
  background: var(--color-bg) !important;
  padding: 4px 8px;
  font-size: 1.1em;
}
.preview-name-cell input {
  width: 100%;
  border-left: 4px solid #2d2d2d;
  padding: 6px;
  font-size: 1em;
}
.preview-row {
  background: var(--color-bg) !important;
  border: none !important;
}
.preview-row td {
  background: var(--color-bg) !important;
  border: none !important;
}
.preview-row-error {
  background: var(--color-bg) !important;
  border-top: none !important;
  border-bottom: 1px solid #2d2d2d;
  border-left: 4px solid #d33;
}
.preview-row-error td {
  background: var(--color-bg) !important;
  padding: 4px 8px;
  font-size: 0.9em;
  color: #a00;
}
.preview-error-line {
  background: var(--color-bg) !important;
  border-bottom: 1px solid #2d2d2d;
}
.preview-row[data-duplicate="strong"] {
  border-left: 4px solid #d33;
}
.preview-row[data-duplicate="medium"] {
  border-left: 4px solid #b8732e;
}
.preview-row[data-duplicate="weak"] {
  border-left: 4px solid #ffebac;
}
/* Import overlay */
.import-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.import-overlay.hidden {
  display: none;
}
.import-overlay-box {
  background: #fff;
  padding: 30px 40px;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 0 20px rgba(0,0,0,0.3);
  font-size: 18px;
  font-weight: 500;
}
.import-text {
  margin-top: 10px;
}
.overlay .spinner, .import-overlay .spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #ddd;
  border-top-color: #007bff;
  border-radius: 50%;
  margin: 0 auto 15px auto;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------------------------------------------------------------------------------------------
RESPONSIVE - DESKTOP
--------------------------------------------------------------------------------------------------- */
@media (min-width: 601px) {
  
}

/* ---------------------------------------------------------------------------------------------------
RESPONSIVE – MOBIL
--------------------------------------------------------------------------------------------------- */
@media (max-width: 600px) {
  
  .dropdown-btn, .dropdown-content {
    font-size: 120%;
  }
  
  /* Katrta souhrnů */
  .summary-card {
    grid-template-columns: 1fr;
  }
  
  /* Tabulka na přehledových stránkách */
  .leaderboard-table {
    overflow-x: auto;
    display: block;
  }
  
}