/* =====================================================
   Assignr — Atamalar sayfası ("Court" kimliği)
   Token kaynağı: design-system/assignr/MASTER.md
   ===================================================== */

:root {
    --paper: #F7F4ED;
    --court: #0C352A;
    --court-2: #114536;
    --court-deep: #082A20;
    --gold: #E1AA44;
    --gold-deep: #9C7420;
    --ink: #1A231F;
    --muted: #6E6B62;
    --hairline: #E3DDCD;
    --white: #FFFFFF;
    --row-line: #F1EEE5;
    --ok: #2E7D4F;
    --disp: 'Bricolage Grotesque', sans-serif;
    --sans: 'Instrument Sans', -apple-system, sans-serif;
    --nav-h: 64px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 15.5px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}
img, svg { display: inline-block; vertical-align: middle; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold-deep); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(225, 170, 68, 0.35); }
.container { max-width: 1180px; margin: 0 auto; padding: 0 32px; }
.hidden { display: none !important; }
.ic { width: 14px; height: 14px; flex-shrink: 0; }

/* ---- Navbar ---- */
.navbar {
    position: sticky; top: 0; z-index: 60;
    background: var(--paper);
    border-bottom: 1px solid var(--hairline);
}
.nav-content { display: flex; align-items: center; justify-content: space-between; height: var(--nav-h); gap: 18px; }
.brand {
    font-family: var(--disp);
    font-weight: 700; font-size: 20px; letter-spacing: -0.02em;
    display: inline-flex; align-items: center; gap: 8px;
}
.brand-dot { width: 11px; height: 11px; border-radius: 50%; border: 3px solid var(--gold); flex-shrink: 0; }
.brand-light { color: var(--paper); }
.nav-links { display: flex; align-items: center; gap: 18px; }
.nav-link { font-size: 14px; font-weight: 500; color: var(--muted); transition: color 150ms ease; }
.nav-link:hover { color: var(--ink); }
.nav-login {
    background: var(--court); color: var(--paper);
    font-weight: 600; font-size: 13.5px;
    padding: 9px 18px; border-radius: 9px;
    transition: background 150ms ease;
}
.nav-login:hover { background: var(--court-deep); }

/* Şehir seçici */
.assignments-city-switcher {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--hairline);
    background: var(--white);
    border-radius: 999px;
    padding: 5px 12px 5px 14px;
}
.assignments-city-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted);
}
.assignments-city-select {
    border: none; background: transparent;
    font: inherit; font-weight: 600; font-size: 13.5px;
    color: var(--ink);
    cursor: pointer;
}
.assignments-city-notice {
    background: #FBF3DF;
    border-bottom: 1px solid #EAD9AE;
    color: #6B5312;
    font-size: 13.5px;
    padding: 10px 32px;
    text-align: center;
}

/* ---- Yeşil sayfa başlığı ---- */
.page-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(ellipse 70% 100% at 12% 0%, rgba(255, 255, 255, 0.05), transparent),
        linear-gradient(170deg, var(--court-2), var(--court) 60%);
    color: var(--paper);
}
.hero-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.page-hero-in { position: relative; padding: 40px 32px 44px; }
.page-kicker {
    display: flex; align-items: center; gap: 16px;
    margin-bottom: 12px;
}
.page-kicker span {
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase;
    color: var(--gold);
    white-space: nowrap;
}
.page-kicker::after { content: ""; flex: 1; height: 1px; background: rgba(247, 244, 237, 0.18); }
.section-title {
    font-family: var(--disp);
    font-size: clamp(32px, 4vw, 44px);
    font-weight: 700; letter-spacing: -0.02em; line-height: 1.02;
}
.assignments-page-subtitle { color: rgba(247, 244, 237, 0.65); font-size: 15px; margin-top: 6px; }

.assignments-page { padding: 24px 0 72px; min-height: 60vh; }

/* ---- Sekmeler: segmented kontrol ---- */
.pub-tab-bar {
    display: inline-flex; gap: 4px;
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    padding: 4px;
    margin-bottom: 16px;
}
.pub-tab-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px;
    font-size: 14px; font-weight: 600;
    color: var(--muted);
    border-radius: 9px;
    transition: color 150ms ease, background 150ms ease;
    min-height: 40px;
}
.pub-tab-btn .ic { width: 15px; height: 15px; }
.pub-tab-btn:hover { color: var(--ink); background: #FCFBF7; }
.pub-tab-btn.active { color: var(--paper); background: var(--court); }
.pub-tab-btn.active:hover { color: var(--paper); background: var(--court); }

/* ---- Filtre kartı ---- */
.feature-card {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 20px 22px;
}
.filter-card { margin-bottom: 18px; }
.assignments-filter-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 16px;
    align-items: end;
}
.assignments-label {
    display: block;
    font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 6px;
}
.assignments-input {
    width: 100%;
    font: inherit; font-size: 14px;
    color: var(--ink);
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 9px;
    padding: 9px 12px;
    min-height: 40px;
    transition: border-color 150ms ease;
}
.assignments-input:hover { border-color: #CFC7B2; }
.assignments-input:focus { outline: none; border-color: var(--gold-deep); }
.assignments-input::placeholder { color: #B4AF9F; }
.week-nav { display: flex; gap: 6px; }
.week-nav .assignments-input { flex: 1; min-width: 0; }
.week-step {
    width: 40px;
    min-height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--hairline);
    border-radius: 9px;
    background: var(--white);
    color: var(--court);
    font-size: 19px;
    font-weight: 600;
    line-height: 1;
    transition: border-color 150ms ease, color 150ms ease;
}
.week-step:hover { border-color: var(--gold-deep); color: var(--gold-deep); }
.assignments-clear-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    font-size: 13.5px; font-weight: 600;
    color: var(--court);
    border: 1px solid var(--hairline);
    background: var(--white);
    border-radius: 9px;
    padding: 9px 16px;
    min-height: 40px;
    transition: border-color 150ms ease, color 150ms ease, background 150ms ease;
    white-space: nowrap;
}
.assignments-clear-btn:hover { border-color: var(--gold-deep); color: var(--gold-deep); }

/* İpucu ve aktif filtre bildirimleri */
.assignments-guide,
.assignments-inline-notice {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    margin-top: 14px;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13.5px;
}
.assignments-guide { background: #FCFBF7; border: 1px dashed var(--hairline); color: var(--muted); }
.assignments-inline-notice { background: #FBF3DF; border: 1px solid #EAD9AE; color: #6B5312; }
.assignments-guide-btn,
.assignments-inline-notice-btn {
    font-size: 12.5px; font-weight: 700;
    color: var(--court);
    border-bottom: 1px solid currentColor;
    padding-bottom: 1px;
    white-space: nowrap;
}
.assignments-guide-btn:hover,
.assignments-inline-notice-btn:hover { color: var(--gold-deep); }

/* ---- Durum ve boş haller ---- */
.assignments-status {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
    padding: 11px 16px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 18px;
}
.assignments-empty {
    background: var(--white);
    border: 1px dashed var(--hairline);
    border-radius: 14px;
    padding: 48px 24px;
    text-align: center;
    color: var(--muted);
}
.assignments-empty-title {
    font-family: var(--disp);
    font-size: 19px; font-weight: 600;
    color: var(--ink);
    margin-bottom: 6px;
}
.assignments-empty-hint { font-size: 14px; }

/* ---- Tip bölümleri (AAL / Bölge) ---- */
.assignments-type-section { margin: 30px 0 12px; }
.assignments-type-title {
    display: flex; align-items: center; gap: 12px;
    font-family: var(--disp);
    font-size: 20px; font-weight: 700; letter-spacing: -0.01em;
}
.assignments-type-title::after { content: ""; flex: 1; height: 1px; background: var(--hairline); }
.assignments-count-badge {
    font-family: var(--sans);
    font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em;
    color: var(--gold-deep);
    background: #F7F3E6;
    border: 1px solid var(--hairline);
    border-radius: 999px;
    padding: 3px 10px;
}

/* ---- Klasik liste: gün paneli > salon grubu > satırlar ---- */
.fx-day {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 16px;
}
.fx-day-head {
    display: flex; align-items: baseline; gap: 10px;
    padding: 15px 22px;
    border-bottom: 1px solid var(--hairline);
    background: #FCFBF7;
}
.fx-day-name {
    font-family: var(--disp);
    font-size: 19px; font-weight: 700; letter-spacing: -0.01em;
    color: var(--court);
}
.fx-day-date { font-size: 13.5px; font-weight: 500; color: var(--muted); }
.fx-day-head .assignments-count-badge { margin-left: auto; }

.fx-hall { border-bottom: 1px solid var(--hairline); }
.fx-hall:last-child { border-bottom: none; }
.fx-hall-head {
    display: flex; align-items: center; gap: 9px;
    padding: 12px 22px 11px;
    font-size: 13.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
    color: var(--gold-deep);
}
.fx-hall-head .ic { width: 15px; height: 15px; }
.fx-hall-head .fx-hall-count {
    font-style: normal;
    font-weight: 600; letter-spacing: 0.02em; text-transform: none;
    color: var(--muted); font-size: 12px;
}
.fx-hall-head::after { content: ""; flex: 1; height: 1px; background: var(--row-line); }

.fx-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1.25fr) minmax(0, 1fr) 44px;
    gap: 16px; align-items: center;
    padding: 10px 22px 11px;
    border-top: 1px solid var(--row-line);
    transition: background 130ms ease;
}
.fx-row:hover { background: #FCFBF7; }
.fx-time {
    font-weight: 700; font-size: 14.5px;
    font-variant-numeric: tabular-nums;
    color: var(--court);
}
.fx-main { min-width: 0; }
.fx-teams {
    display: flex; align-items: baseline; flex-wrap: wrap; gap: 3px 8px;
    font-weight: 600; font-size: 13.5px; letter-spacing: -0.005em;
}
.fx-vs { color: #B4AF9F; font-weight: 400; font-size: 13px; }
.fx-league { font-size: 12px; color: var(--muted); margin-top: 2px; }
.fx-who { display: flex; flex-wrap: wrap; gap: 5px; justify-content: flex-end; }
.fx-who .assignments-ref-badge {
    background: transparent;
    border-color: var(--hairline);
    color: var(--court);
    font-weight: 500;
}
.fx-who .assignments-ref-badge .ic { color: #9AAF9F; }
.fx-who .assignments-ref-badge-btn:hover {
    background: #F7F3E6;
    border-color: var(--gold-deep);
    color: var(--gold-deep);
}
.assignments-row-refs-label {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
    color: var(--gold-deep);
    margin-right: 2px;
}
.assignments-meta-item {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--muted); font-size: 13px;
}
.assignments-meta-item .ic { color: #B4AF9F; }
.fx-none { color: #B4AF9F; font-size: 12.5px; font-style: italic; }
.fx-cal {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    color: #B4AF9F;
    transition: color 130ms ease, border-color 130ms ease, background 130ms ease;
}
.fx-row:hover .fx-cal { color: var(--court); }
.fx-cal:hover { border-color: var(--gold-deep); color: var(--gold-deep); background: #F7F3E6; }
.calendar-btn { cursor: pointer; }

/* Görevli rozetleri */
.assignments-ref-list, .assignments-row-refs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.assignments-ref-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.5px; font-weight: 600;
    color: var(--court);
    background: #E9F1EB;
    border: 1px solid #C8DACB;
    border-radius: 999px;
    padding: 3.5px 12px;
}
.assignments-ref-badge .ic { width: 12px; height: 12px; color: #4E7A62; }
.assignments-ref-badge-btn { cursor: pointer; transition: border-color 150ms ease, background 150ms ease, color 150ms ease; }
.assignments-ref-badge-btn:hover { border-color: var(--gold-deep); background: #F7F3E6; color: var(--gold-deep); }
.assignments-ref-badge-btn:hover .ic { color: var(--gold-deep); }
.assignments-badge-pos {
    font-size: 10px; font-weight: 700;
    color: var(--gold-deep);
    background: #F7F3E6;
    border: 1px solid var(--hairline);
    border-radius: 4px;
    padding: 0 4px;
    font-variant-numeric: tabular-nums;
}

/* ---- Gün/Salon özet görünümü ---- */
.assignments-compact-group {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 9px;
}
.assignments-compact-list { list-style: none; margin: 0; padding: 0; }
.assignments-compact-summary {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    padding: 13px 20px;
    cursor: pointer;
    font-weight: 600; font-size: 14px;
    list-style: none;
    transition: background 150ms ease;
}
.assignments-compact-summary::-webkit-details-marker { display: none; }
.assignments-compact-summary:hover { background: #FCFBF7; }
.assignments-compact-summary .ic { color: var(--gold-deep); }
.assignments-compact-summary .assignments-count-badge { margin-left: auto; }
.assignments-compact-summary::after {
    content: "";
    width: 7px; height: 7px;
    border-right: 2px solid var(--muted);
    border-bottom: 2px solid var(--muted);
    transform: rotate(45deg) translateY(-2px);
    transition: transform 200ms ease;
    flex-shrink: 0;
}
details[open] > .assignments-compact-summary::after { transform: rotate(-135deg) translateY(-2px); }
details[open].assignments-compact-group {
    border-color: #CFC7B2;
    box-shadow: inset 3px 0 0 var(--gold), 0 16px 32px -26px rgba(8, 42, 32, 0.4);
}
details[open].pub-cal-day {
    border-color: #CFC7B2;
    box-shadow: inset 3px 0 0 var(--gold), 0 16px 32px -26px rgba(8, 42, 32, 0.4);
}
.assignments-compact-row {
    display: grid;
    grid-template-columns: 60px minmax(0, 1fr) auto;
    gap: 12px; align-items: center;
    padding: 11px 20px 12px;
    border-top: 1px solid var(--row-line);
}
.assignments-compact-time {
    font-weight: 700; font-size: 13.5px;
    font-variant-numeric: tabular-nums;
    color: var(--court);
}
.assignments-compact-row-main { min-width: 0; }
.assignments-compact-teams { font-weight: 600; font-size: 13.5px; }
.assignments-compact-row-refs {
    display: flex; flex-wrap: wrap; gap: 5px; align-items: center;
    margin-top: 4px;
}
/* Grup açılınca görünen "Hakemler / Görevliler" özet şeridi */
.assignments-compact-refs {
    display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center;
    padding: 12px 20px 13px;
    border-top: 1px solid var(--row-line);
    background: #FCFBF7;
}
.assignments-compact-calendar { min-height: 32px; padding: 6px 9px; }

/* ---- Takvim (görevli bazlı) görünümü ---- */
.pub-cal-day {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
}
.pub-cal-day-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 13px 18px;
    cursor: pointer;
    list-style: none;
    font-weight: 600; font-size: 14.5px;
    transition: background 150ms ease;
}
.pub-cal-day-summary::-webkit-details-marker { display: none; }
.pub-cal-day-summary:hover { background: #FCFBF7; }
.pub-cal-day-label { display: inline-flex; align-items: center; gap: 9px; }
.pub-cal-day-label .ic { color: var(--gold-deep); }
.pub-cal-day-meta { font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.pub-cal-today-badge {
    font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
    color: var(--ok);
    background: #E8F3EA;
    border-radius: 999px;
    padding: 2.5px 9px;
    margin-left: 8px;
}
.pub-cal-day-body { border-top: 1px solid var(--row-line); }
.pub-cal-ref-row {
    display: flex; gap: 18px;
    padding: 12px 18px;
    border-bottom: 1px solid var(--row-line);
}
.pub-cal-ref-row:last-child { border-bottom: none; }
.pub-cal-ref-name {
    min-width: 150px; max-width: 190px;
    font-weight: 600; font-size: 13.5px;
    padding-top: 6px;
}
.pub-cal-ref-schedule { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.pub-cal-venue-block {
    background: #FCFBF7;
    border: 1px solid var(--row-line);
    border-radius: 10px;
    padding: 9px 12px;
    min-width: 220px;
    flex: 1;
    max-width: 340px;
}
.pub-cal-venue-header { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-bottom: 7px; }
.pub-cal-venue-name { font-weight: 700; font-size: 12.5px; }
.pub-cal-venue-span {
    font-size: 11.5px; font-weight: 700;
    color: var(--court);
    background: #E8F0EA;
    padding: 2px 8px; border-radius: 999px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.pub-cal-venue-count {
    font-size: 11px; font-weight: 600; color: var(--muted);
    background: var(--white);
    border: 1px solid var(--row-line);
    padding: 2px 7px; border-radius: 999px;
    white-space: nowrap;
}
.pub-cal-pills { display: flex; flex-direction: column; gap: 4px; }
.pub-cal-pill {
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 2px 8px;
    background: var(--white);
    border: 1px solid var(--row-line);
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 12.5px;
}
.pub-cal-pill-time { font-weight: 700; color: var(--court); font-variant-numeric: tabular-nums; align-self: center; }
.pub-cal-pill-teams { font-weight: 500; line-height: 1.3; word-break: break-word; }
.pub-cal-transfer {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
    color: var(--gold-deep);
    font-size: 11.5px; font-weight: 700;
    min-width: 68px;
    text-align: center;
}
.pub-cal-transfer .ic { color: var(--gold-deep); }
.pub-cal-transfer-halls { font-size: 10.5px; font-weight: 600; color: var(--muted); }
.pub-cal-directions { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.pub-cal-directions a {
    display: inline-flex; align-items: center; gap: 3px;
    font-size: 10.5px; font-weight: 700; color: var(--court);
    background: #E8F0EA; border-radius: 999px; padding: 3px 8px;
    text-decoration: none; white-space: nowrap;
}
.pub-cal-directions a:hover { background: #d9e6db; }
.pub-cal-directions a .ic { width: 11px; height: 11px; color: var(--court); }
.pub-cal-empty { color: #B4AF9F; font-size: 13px; padding: 10px 16px; }
.pub-cal-day-past { opacity: 0.62; }
.pub-cal-day-past[open] { opacity: 1; }

/* ---- Diyalog ---- */
.referee-dialog-backdrop {
    position: fixed; inset: 0;
    background: rgba(8, 42, 32, 0.55);
    display: flex; align-items: center; justify-content: center;
    z-index: 100;
    padding: 24px;
}
.referee-dialog {
    background: var(--white);
    border: 1px solid var(--hairline);
    border-radius: 14px;
    padding: 24px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 30px 60px -30px rgba(8, 42, 32, 0.5);
}
.feature-description { color: var(--muted); font-size: 14.5px; }
.referee-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.login-btn {
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--court); color: var(--paper);
    font-weight: 600; font-size: 13.5px;
    padding: 10px 18px; border-radius: 9px;
    transition: background 150ms ease;
    min-height: 40px;
}
.login-btn:hover { background: var(--court-deep); }
.referee-dialog-btn-secondary {
    background: var(--white);
    color: var(--ink);
    border: 1px solid var(--hairline);
}
.referee-dialog-btn-secondary:hover { background: #FCFBF7; border-color: #CFC7B2; }

/* ---- Alt bilgi ---- */
.page-footer { background: var(--court-deep); color: var(--paper); margin-top: 48px; }
.page-footer-in {
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    padding-top: 22px; padding-bottom: 22px;
}
.page-footer p { font-size: 13px; color: rgba(247, 244, 237, 0.6); }
.page-footer span { font-size: 13px; color: rgba(247, 244, 237, 0.5); }

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .assignments-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pub-cal-ref-row { flex-direction: column; gap: 10px; }
    .pub-cal-ref-name {
        max-width: none; min-width: 0;
        padding: 0 0 8px;
        border-bottom: 1px dashed var(--row-line);
    }
    .pub-cal-venue-block { max-width: none; }
}
@media (max-width: 640px) {
    .container { padding: 0 18px; }
    .assignments-city-notice { padding: 10px 18px; }
    .nav-link { display: none; }
    .assignments-filter-grid { grid-template-columns: 1fr; }
    .fx-row { grid-template-columns: 52px minmax(0, 1fr) 40px; padding: 10px 16px 11px; }
    .fx-who { grid-column: 2; justify-content: flex-start; }
    .fx-day-head, .fx-hall-head { padding-left: 16px; padding-right: 16px; }
    .assignments-compact-row { grid-template-columns: 50px minmax(0, 1fr); }
    .assignments-compact-row .assignments-compact-calendar { grid-column: 1 / -1; justify-self: end; }
    .page-footer-in { flex-direction: column; align-items: flex-start; gap: 8px; }
}
