/* Turnuva istatistik — mobil (turnuva_istatistik.php) */
:root {
  --blue: #2041a5;
  --deep: #07133a;
  --orange: #ff6b35;
  --green: #059669;
  --red: #dc2626;
  --yellow: #f59e0b;
  --bg: #f4f6fb;
  --line: #e6edf6;
  --muted: #64748b;
}

.tis-page {
  width: min(430px, 100%);
  margin: 0 auto;
}

.tis-page .page-title {
  margin-bottom: 14px;
}

.tis-page .page-title h1 {
  margin: 0;
  color: var(--deep);
  font-size: 21px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.4px;
  text-transform: uppercase;
}

.tis-page .top-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-bottom: 14px;
}

.tis-page .top-btn,
.tis-page .select-btn {
  min-height: 43px;
  border-radius: 15px;
  border: 1px solid transparent;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.05);
}

.tis-page .top-btn {
  color: var(--blue);
  background: #eef5ff;
  border-color: #cfe0ff;
}

.tis-page .select-btn {
  color: #fff;
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 12px 24px rgba(255, 107, 53, 0.22);
}

.tis-page .page-hero {
  background: linear-gradient(135deg, #11288a, #3158de);
  color: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
  margin-bottom: 14px;
  overflow: hidden;
  position: relative;
}

.tis-page .page-hero::after {
  content: "";
  position: absolute;
  width: 140px;
  height: 140px;
  right: -50px;
  top: -55px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.tis-page .page-hero h2 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.3;
  text-transform: uppercase;
}

.tis-page .page-hero > .hero-inner > p {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
}

.tis-page .filter-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 21px;
  box-shadow: 0 12px 26px rgba(8, 60, 116, 0.08);
  padding: 12px;
  margin-bottom: 16px;
}

.tis-page .filter-card .select-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #07376a;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 9px;
}

.tis-page .filter-card select,
.tis-page .filter-card input[type="search"] {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fbfdff;
  color: #10243d;
  padding: 0 13px;
  outline: 0;
  font-size: 12px;
  font-weight: 800;
}

.tis-page .filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 9px;
}

.tis-page .filter-search-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 9px;
}

.tis-page .filter-search-btn {
  width: 48px;
  min-height: 48px;
  border-radius: 15px;
  border: 1px solid #cfe5ff;
  background: linear-gradient(135deg, #1688ff, #0d6efd);
  color: #fff;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.tis-page .summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.tis-page .summary-box {
  min-height: 82px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 24px rgba(8, 60, 116, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
}

.tis-page .summary-box strong {
  font-size: 23px;
  line-height: 1;
  color: #0d6efd;
  font-weight: 900;
}

.tis-page .summary-box span {
  margin-top: 7px;
  color: #6b7f99;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
}

.tis-page .summary-box.green strong { color: #18b45b; }
.tis-page .summary-box.orange strong { color: #f59e0b; }
.tis-page .summary-box.red strong { color: #ef4444; }
.tis-page .summary-box.purple strong { color: #7c3aed; }

.tis-page .stat-tabs {
  display: flex;
  gap: 8px;
  overflow: auto;
  padding: 2px 0 14px;
  scrollbar-width: none;
}

.tis-page .stat-tabs::-webkit-scrollbar { display: none; }

.tis-page .stat-tab {
  flex: 0 0 auto;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--line);
  color: #6b7f99;
  box-shadow: 0 10px 22px rgba(8, 60, 116, 0.06);
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.tis-page .stat-tab.active {
  background: linear-gradient(135deg, #1688ff, #0d6efd);
  border-color: transparent;
  color: #fff;
}

.tis-page .section-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 23px;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  margin-bottom: 14px;
}

.tis-page .section-head {
  padding: 14px 15px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.tis-page .section-head h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
  margin: 0;
}

.tis-page .section-head h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
}

.tis-page .section-head span {
  color: #0d6efd;
  background: #eaf5ff;
  border: 1px solid #cfe5ff;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.tis-page .section-body {
  padding: 13px;
  display: grid;
  gap: 10px;
  background: linear-gradient(180deg, #fff, #f8fbff);
}

.tis-page .leader-list { display: grid; gap: 10px; }

.tis-page .leader-card {
  display: grid;
  grid-template-columns: 34px 42px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid #e6edf6;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
}

.tis-page .rank {
  width: 30px;
  height: 30px;
  border-radius: 11px;
  background: #eef5ff;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 900;
}

.tis-page .rank.gold { background: #fff7ed; color: #c2410c; }

.tis-page .avatar {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #2041a5, #2f5bea);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 900;
  position: relative;
  overflow: hidden;
}

.tis-page .avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tis-page .leader-info { min-width: 0; }

.tis-page .leader-info h4 {
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  line-height: 1.25;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tis-page .leader-info span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.tis-page .score-badge {
  min-width: 42px;
  height: 34px;
  border-radius: 13px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #047857;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 900;
}

.tis-page .yellow-badge { background: #fffbeb; border-color: #fde68a; color: #b45309; }
.tis-page .red-badge { background: #fff1f2; border-color: #fecdd3; color: var(--red); }

.tis-page .tis-empty {
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  border-radius: 18px;
  padding: 18px 14px;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.45;
}

.tis-page .table-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 23px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.tis-page .table-note {
  padding: 13px 14px;
  background: #f8fbff;
  border-bottom: 1px solid #e7eff8;
  color: #6b7f99;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 800;
}

.tis-page .table-scroll { overflow: auto; }

.tis-page .table-scroll table {
  width: 100%;
  border-collapse: collapse;
  min-width: 620px;
  font-size: 12px;
}

.tis-page .table-scroll th {
  padding: 12px 8px;
  background: #edf6ff;
  color: #275072;
  text-align: left;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.tis-page .table-scroll td {
  padding: 12px 8px;
  border-top: 1px solid #eef4fb;
  color: #10243d;
  font-weight: 800;
}

.tis-page .table-scroll th.num,
.tis-page .table-scroll td.num { text-align: center; }

.tis-page .stat-good { color: #18b45b; font-weight: 900; }
.tis-page .stat-warn { color: #f59e0b; font-weight: 900; }
.tis-page .stat-bad { color: #ef4444; font-weight: 900; }

.tis-page .notice-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
  padding: 14px;
  margin-top: 16px;
}

.tis-page .notice-card h4 {
  margin: 0 0 8px;
  color: #07376a;
  font-size: 15px;
  font-weight: 900;
}

.tis-page .notice-card p {
  margin: 0;
  color: #6b7f99;
  font-size: 12px;
  line-height: 1.65;
  font-weight: 700;
}

@media (max-width: 360px) {
  .tis-page .top-actions { grid-template-columns: 1fr; }
  .tis-page .summary-grid, .tis-page .filter-row { grid-template-columns: 1fr; }
  .tis-page .leader-card { grid-template-columns: 30px 38px 1fr auto; gap: 7px; padding: 9px; }
  .tis-page .avatar { width: 38px; height: 38px; border-radius: 13px; }
  .tis-page .leader-info h4 { font-size: 12px; }
  .tis-page .leader-info span { font-size: 10px; }
}
