/* HakemSkor — temel stiller (Tailwind'e ek) */
:root {
  --navy: #0B1222;
  --navy-2: #121B30;
  --orange: #F97316;
  --orange-d: #C2410C;
  --wood: #F6EFE4;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

html { -webkit-tap-highlight-color: transparent; }
body {
  background: #F4F1EC;
  color: #0F172A;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.font-display { font-family: 'Barlow Condensed', 'Inter', sans-serif; letter-spacing: .01em; }
.tabular { font-variant-numeric: tabular-nums; }

/* Saha çizgisi deseni (koyu başlık alanları) */
.court-bg {
  background-color: var(--navy);
  background-image:
    radial-gradient(circle at 100% 0%, rgba(249,115,22,.28), transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(249,115,22,.12), transparent 40%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='200' viewBox='0 0 400 200' fill='none' stroke='white' stroke-opacity='.06' stroke-width='2'%3E%3Crect x='1' y='1' width='398' height='198'/%3E%3Cline x1='200' y1='0' x2='200' y2='200'/%3E%3Ccircle cx='200' cy='100' r='36'/%3E%3Cpath d='M0 30h60a70 70 0 0 1 0 140H0'/%3E%3Cpath d='M400 30h-60a70 70 0 0 0 0 140h60'/%3E%3Crect x='0' y='70' width='70' height='60'/%3E%3Crect x='330' y='70' width='70' height='60'/%3E%3C/svg%3E");
  background-size: auto, auto, 520px auto;
  background-position: center, center, center;
}

.card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(15, 23, 42, .06);
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 4px 16px -6px rgba(15,23,42,.08);
}

/* Puan rozetleri */
.score-pill {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 700; font-variant-numeric: tabular-nums;
  min-width: 3rem;
}
.tone-emerald { background: #D1FAE5; color: #047857; }
.tone-lime    { background: #ECFCCB; color: #4D7C0F; }
.tone-amber   { background: #FEF3C7; color: #B45309; }
.tone-orange  { background: #FFEDD5; color: #C2410C; }
.tone-rose    { background: #FFE4E6; color: #BE123C; }
.tone-slate   { background: #F1F5F9; color: #64748B; }

.bar-emerald { background: #10B981; } .bar-lime { background: #84CC16; } .bar-amber { background: #F59E0B; }
.bar-orange { background: #F97316; } .bar-rose { background: #F43F5E; } .bar-slate { background: #CBD5E1; }

/* Form elemanları */
.input, .select, .textarea {
  width: 100%; border-radius: .75rem; border: 1px solid #E2E8F0; background: #fff;
  padding: .7rem .9rem; font-size: 16px; /* iOS zoom engeli */ line-height: 1.3;
  transition: border-color .15s, box-shadow .15s;
}
@media (min-width: 768px) { .input, .select, .textarea { font-size: .925rem; padding: .6rem .8rem; } }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(249,115,22,.18); }
.label { display: block; font-size: .8rem; font-weight: 600; color: #475569; margin-bottom: .35rem; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  border-radius: .75rem; padding: .7rem 1.1rem; font-weight: 600; font-size: .9rem;
  transition: transform .08s, background .15s, box-shadow .15s; white-space: nowrap; cursor: pointer;
  border: 1px solid transparent; min-height: 44px;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--orange); color: #fff; box-shadow: 0 6px 16px -6px rgba(249,115,22,.6); }
.btn-primary:hover { background: #EA580C; }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover { background: #1E293B; }
.btn-light { background: #fff; color: #0F172A; border-color: #E2E8F0; }
.btn-light:hover { background: #F8FAFC; }
.btn-ghost { background: transparent; color: #475569; }
.btn-ghost:hover { background: rgba(15,23,42,.05); }
.btn-danger { background: #FFF1F2; color: #BE123C; border-color: #FECDD3; }
.btn-danger:hover { background: #FFE4E6; }
.btn-success { background: #16A34A; color: #fff; box-shadow: 0 6px 16px -6px rgba(22,163,74,.6); }
.btn-success:hover { background: #15803D; }
.btn-sm { padding: .4rem .75rem; font-size: .8rem; min-height: 36px; border-radius: .6rem; }
.btn-icon { padding: .5rem; min-height: 40px; min-width: 40px; }

.chip { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .15rem .6rem; font-size: .72rem; font-weight: 600; }
.chip-slate { background: #F1F5F9; color: #475569; }
.chip-orange { background: #FFEDD5; color: #C2410C; }
.chip-green { background: #DCFCE7; color: #15803D; }
.chip-blue { background: #DBEAFE; color: #1D4ED8; }
.chip-red { background: #FFE4E6; color: #BE123C; }
.chip-navy { background: var(--navy); color: #fff; }

/* Yan menü */
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .65rem .85rem; border-radius: .75rem; color: #CBD5E1; font-weight: 500; font-size: .92rem; }
.nav-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav-link.active { background: rgba(249,115,22,.16); color: #FDBA74; }
.nav-link.active svg { color: var(--orange); }

/* Alt menü (mobil / APK) */
.bottom-nav { padding-bottom: var(--safe-b); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 10.5px; font-weight: 600; color: #94A3B8; padding: 8px 0 6px; flex: 1; }
.bottom-nav a.active { color: var(--orange); }
.bottom-nav a.active .dot { opacity: 1; }
.bottom-nav .dot { width: 4px; height: 4px; border-radius: 9px; background: var(--orange); opacity: 0; }
.pb-safe { padding-bottom: calc(76px + var(--safe-b)); }
@media (min-width: 1024px) { .pb-safe { padding-bottom: 2rem; } }

/* Puanlama butonları */
.rate-group { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: .4rem; }
.rate-group input { position: absolute; opacity: 0; pointer-events: none; }
.rate-group label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 52px; border-radius: .75rem; border: 1.5px solid #E2E8F0; background: #fff;
  font-weight: 800; font-size: 1.15rem; color: #334155; cursor: pointer; user-select: none;
  transition: all .12s;
}
.rate-group label small { font-size: 9.5px; font-weight: 600; color: #94A3B8; line-height: 1; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 95%; }
.rate-group label:hover { border-color: #FDBA74; }
.rate-group input:focus-visible + label { box-shadow: 0 0 0 3px rgba(249,115,22,.3); }
.rate-group input:checked + label { color: #fff; border-color: transparent; transform: translateY(-1px); }
.rate-group input:checked + label small { color: rgba(255,255,255,.85); }
.rate-group input[value="1"]:checked + label { background: #E11D48; }
.rate-group input[value="2"]:checked + label { background: #F97316; }
.rate-group input[value="3"]:checked + label { background: #EAB308; }
.rate-group input[value="4"]:checked + label { background: #65A30D; }
.rate-group input[value="5"]:checked + label { background: #059669; }
.rate-group.locked label { cursor: default; opacity: .9; }
.q-row.missing { background: #FFF7ED; border-color: #FDBA74 !important; }

/* Lider panosu podyum */
.podium-1 { background: linear-gradient(160deg, #FDE68A, #F59E0B); }
.podium-2 { background: linear-gradient(160deg, #E2E8F0, #94A3B8); }
.podium-3 { background: linear-gradient(160deg, #FED7AA, #C2410C); }

.rank-badge { width: 2rem; height: 2rem; border-radius: .6rem; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .85rem; }

/* Tablo */
.table { width: 100%; font-size: .875rem; }
.table th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #64748B; font-weight: 700; padding: .7rem .9rem; background: #F8FAFC; border-bottom: 1px solid #E2E8F0; }
.table td { padding: .75rem .9rem; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #FFFBF6; }

/* Akordeon */
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details[open] .rotate-when-open { transform: rotate(180deg); }

/* Flash */
.toast { animation: toastIn .25s ease-out; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

.scrollbar-none::-webkit-scrollbar { display: none; }
.scrollbar-none { scrollbar-width: none; }

[x-cloak] { display: none !important; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ddd; }
}
