/* ===== SporKariyerim — Yönetim Paneli (açık tema) =====
   Tüm class'lar "adm-" önekiyle izole edilmiştir (propshaft :app bundle'ı
   tüm stylesheet'leri yüklediği için public site ile çakışmaz). */

:root {
  --adm-blue: #0673E4;
  --adm-blue-dark: #045bc0;
  --adm-green: #63C61A;
  --adm-green-dark: #4E9E10;
  --adm-navy: #0B1F4D;
  --adm-bg: #F4F6FB;
  --adm-surface: #FFFFFF;
  --adm-border: #E5E9F0;
  --adm-text: #0B1F4D;
  --adm-muted: #6B7280;
  --adm-red: #E11D48;
  --adm-amber: #D97706;
  --adm-radius: 12px;
  --adm-shadow: 0 1px 3px rgba(11, 31, 77, 0.06);
  --adm-shadow-lg: 0 8px 30px rgba(11, 31, 77, 0.10);
  --adm-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.adm-body {
  margin: 0;
  font-family: var(--adm-font);
  background: var(--adm-bg);
  color: var(--adm-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== Kabuk ===== */
.adm-shell { display: flex; min-height: 100vh; }

/* ===== Sol menü ===== */
.adm-sidebar {
  width: 256px; flex-shrink: 0;
  background: var(--adm-surface);
  border-right: 1px solid var(--adm-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
/* Marka alanı: logo üstte, altında ne olduğunu söyleyen tek satır.
   Yan yana dizilmiyordu — 469×264'lük logo 38px'lik kare rozetin yerine
   geçince yazıya yer kalmıyor, ikisi de sıkışıyordu. Alt alta hem logo
   nefes alıyor hem "Yönetim Paneli" etiketi okunur boyutta kalıyor. */
.adm-sidebar-brand { padding: 16px 14px 14px; border-bottom: 1px solid var(--adm-border); }
.adm-brand-link {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  text-decoration: none; color: inherit;
}
/* Ölçü YÜKSEKLİKTEN değil GENİŞLİKTEN veriliyor. `height` sabitken global
   `img { max-width:100% }` kuralı 228px'lik kolona sığmayan logonun yalnızca
   genişliğini kısar; yükseklik sabit kaldığı için logo yatay ezilir. Yeni
   dosya 3,3:1 ve 102px'te 338px genişliğe çıkıyordu — tam bu tuzağa düşerdi. */
.adm-brand-logo { width: 200px; max-width: 100%; height: auto; display: block; }
.adm-brand-text {
  font-weight: 700; font-size: 11px; letter-spacing: .6px; text-transform: uppercase;
  color: var(--adm-muted); line-height: 1;
}

.adm-nav { flex: 1; padding: 14px 12px; display: flex; flex-direction: column; gap: 2px; }
.adm-nav-section {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--adm-muted); padding: 14px 10px 6px;
}
.adm-nav-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--adm-text);
  text-decoration: none; transition: background 0.15s, color 0.15s;
}
.adm-nav-link:hover { background: #EAF4FF; color: var(--adm-blue); }
.adm-nav-link.is-active { background: var(--adm-blue); color: #fff; }
.adm-nav-icon { width: 20px; text-align: center; font-size: 15px; flex-shrink: 0; }
/* .adm-nav-link.is-disabled ve .adm-soon KALDIRILDI — menüde artık "yakında"
   etiketli öğe yok (bkz. layouts/admin.html.erb notu). */

.adm-sidebar-foot { padding: 16px 18px; border-top: 1px solid var(--adm-border); }
.adm-site-link { font-size: 13px; font-weight: 600; color: var(--adm-muted); text-decoration: none; }
.adm-site-link:hover { color: var(--adm-blue); }

/* ===== Ana bölüm ===== */
.adm-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.adm-topbar {
  background: var(--adm-surface); border-bottom: 1px solid var(--adm-border);
  padding: 0 28px; height: 64px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.adm-topbar-title { font-size: 18px; font-weight: 800; margin: 0; }
.adm-topbar-actions { display: flex; align-items: center; gap: 14px; }
.adm-topbar-user { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.adm-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #EAF4FF; color: var(--adm-blue); font-weight: 800; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.adm-inline-form { display: inline; margin: 0; }

.adm-content { padding: 28px; max-width: 1400px; width: 100%; box-sizing: border-box; }

/* ===== Flash ===== */
.adm-flash {
  padding: 12px 16px; border-radius: 10px; font-size: 14px; font-weight: 600; margin-bottom: 18px;
}
.adm-flash--notice { background: #EEF8E6; color: #3D7A10; border: 1px solid #CFEAB3; }
.adm-flash--alert  { background: #FDECEC; color: #B42323; border: 1px solid #F5C6C6; }

/* ===== Butonlar ===== */
.adm-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px; border-radius: 8px; border: 1px solid transparent;
  font-family: inherit; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-decoration: none; transition: all 0.15s; white-space: nowrap;
  background: none; color: var(--adm-text);
}
.adm-btn--primary { background: var(--adm-blue); color: #fff; }
.adm-btn--primary:hover { background: var(--adm-blue-dark); }
.adm-btn--green { background: var(--adm-green); color: #fff; }
.adm-btn--green:hover { background: var(--adm-green-dark); }
.adm-btn--ghost { border-color: var(--adm-border); background: var(--adm-surface); color: var(--adm-text); }
.adm-btn--ghost:hover { border-color: var(--adm-blue); color: var(--adm-blue); }
.adm-btn--danger { border-color: #F5C6C6; background: var(--adm-surface); color: var(--adm-red); }
.adm-btn--danger:hover { background: #FDECEC; }
.adm-btn--sm { padding: 5px 10px; font-size: 12.5px; border-radius: 7px; }

/* ===== Sayfa başlığı ===== */
.adm-page-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.adm-page-head h2 { margin: 0; font-size: 20px; font-weight: 800; }
.adm-page-sub { color: var(--adm-muted); font-size: 13.5px; margin: 2px 0 0; }
.adm-page-actions { display: flex; gap: 10px; }

/* ===== KPI kartları ===== */
.adm-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 24px;
}
.adm-stat-card {
  background: var(--adm-surface); border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius); padding: 18px 20px; box-shadow: var(--adm-shadow);
}
.adm-stat-label { font-size: 13px; font-weight: 600; color: var(--adm-muted); }
.adm-stat-value { font-size: 30px; font-weight: 800; letter-spacing: -0.5px; margin: 4px 0 2px; }
.adm-stat-sub { font-size: 12.5px; color: var(--adm-muted); }
.adm-stat-sub strong { color: var(--adm-green-dark); font-weight: 700; }
.adm-stat-card--blue  { border-top: 3px solid var(--adm-blue); }
.adm-stat-card--green { border-top: 3px solid var(--adm-green); }
.adm-stat-card--navy  { border-top: 3px solid var(--adm-navy); }
.adm-stat-card--amber { border-top: 3px solid var(--adm-amber); }

/* ===== Kartlar / grid ===== */
.adm-card {
  background: var(--adm-surface); border: 1px solid var(--adm-border);
  border-radius: var(--adm-radius); box-shadow: var(--adm-shadow);
  margin-bottom: 24px; overflow: hidden;
}
.adm-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-bottom: 1px solid var(--adm-border);
}
.adm-card-title { font-size: 15px; font-weight: 700; margin: 0; }
.adm-card-body { padding: 20px; }
.adm-card-link { font-size: 13px; font-weight: 600; color: var(--adm-blue); text-decoration: none; }
.adm-card-link:hover { text-decoration: underline; }
.adm-grid-2 { display: grid; grid-template-columns: 3fr 2fr; gap: 24px; align-items: start; }
.adm-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }

/* ===== Filtre çubuğu ===== */
.adm-filters {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  padding: 14px 20px; border-bottom: 1px solid var(--adm-border); background: #FAFBFD;
}
.adm-input, .adm-select {
  font-family: inherit; font-size: 13.5px; color: var(--adm-text);
  padding: 8px 12px; border: 1px solid var(--adm-border); border-radius: 8px;
  background: var(--adm-surface); box-sizing: border-box;
}
.adm-input:focus, .adm-select:focus { outline: none; border-color: var(--adm-blue); }
.adm-input--search { min-width: 240px; }

/* ===== Veri tablosu ===== */
.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th {
  text-align: left; font-size: 11.5px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--adm-muted);
  padding: 11px 16px; border-bottom: 1px solid var(--adm-border); background: #FAFBFD;
  white-space: nowrap;
}
.adm-table td { padding: 12px 16px; border-bottom: 1px solid var(--adm-border); vertical-align: middle; }
.adm-table tbody tr:hover { background: #F6F9FE; }
.adm-table tbody tr:last-child td { border-bottom: none; }
.adm-table .adm-cell-main { font-weight: 600; color: var(--adm-text); }
.adm-table .adm-cell-sub { display: block; font-size: 12px; color: var(--adm-muted); font-weight: 500; }
/* Kaydı silinmiş aday / ilan gibi çözülemeyen değerler */
.adm-table .adm-cell-muted { color: var(--adm-muted); font-style: italic; }
.adm-table a.adm-cell-main { text-decoration: none; }
.adm-table a.adm-cell-main:hover { color: var(--adm-blue); }
.adm-cell-actions { display: flex; gap: 6px; justify-content: flex-end; align-items: center; }
.adm-cell-num { text-align: right; font-variant-numeric: tabular-nums; }

/* ===== Rozetler ===== */
.adm-badge {
  display: inline-block; font-size: 12px; font-weight: 700;
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.adm-badge--green { background: #EEF8E6; color: #3D7A10; }
.adm-badge--gray  { background: #EEF1F5; color: #5A6A82; }
.adm-badge--blue  { background: #EAF4FF; color: var(--adm-blue-dark); }
.adm-badge--amber { background: #FDF3E3; color: #9A5B04; }
.adm-badge--red   { background: #FDECEC; color: #B42323; }

/* ===== Boş durum ===== */
.adm-empty { text-align: center; padding: 48px 20px; color: var(--adm-muted); font-size: 14px; }

/* ===== Sayfalama (pagy) ===== */
.adm-pagination { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 20px; flex-wrap: wrap; }
.adm-pagination-info { font-size: 13px; color: var(--adm-muted); }
.adm-pagination nav.pagy { display: flex; gap: 4px; flex-wrap: wrap; }
.adm-pagination nav.pagy a {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px;
  font-size: 13px; font-weight: 600; text-decoration: none;
  color: var(--adm-text); border: 1px solid var(--adm-border); background: var(--adm-surface);
}
.adm-pagination nav.pagy a:hover { border-color: var(--adm-blue); color: var(--adm-blue); }
/* Pagy 43 işaretlemesi: geçerli sayfa a[aria-current="page"], boşluk a[role="separator"] */
.adm-pagination nav.pagy a[aria-current="page"] { background: var(--adm-blue); border-color: var(--adm-blue); color: #fff; }
.adm-pagination nav.pagy a[role="separator"] { border: none; background: none; }
.adm-pagination nav.pagy a[aria-disabled="true"]:not([aria-current="page"]) { opacity: 0.4; pointer-events: none; }

/* ===== Formlar ===== */
.adm-form { max-width: 920px; }
.adm-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.adm-form-grid .adm-field--full { grid-column: 1 / -1; }
.adm-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 4px; }
.adm-field label { font-size: 13px; font-weight: 600; color: var(--adm-text); }
.adm-field input[type="text"], .adm-field input[type="email"], .adm-field input[type="number"],
.adm-field input[type="date"], .adm-field input[type="datetime-local"], .adm-field input[type="password"],
.adm-field select, .adm-field textarea {
  font-family: inherit; font-size: 14px; color: var(--adm-text);
  padding: 10px 14px; border: 1px solid var(--adm-border); border-radius: 8px;
  background: var(--adm-surface); box-sizing: border-box; width: 100%;
}
.adm-field input:focus, .adm-field select:focus, .adm-field textarea:focus {
  outline: none; border-color: var(--adm-blue); box-shadow: 0 0 0 3px rgba(6, 115, 228, 0.12);
}
.adm-field textarea { resize: vertical; min-height: 110px; }
.adm-field .adm-hint { font-size: 12px; color: var(--adm-muted); }
.adm-checkbox { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.adm-checkbox input { width: 17px; height: 17px; accent-color: var(--adm-green); }
.adm-form-actions {
  display: flex; gap: 10px; align-items: center;
  margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--adm-border);
}
.adm-form-section {
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
  color: var(--adm-muted); margin: 22px 0 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--adm-border); grid-column: 1 / -1;
}

/* ===== Detay (aday profili vb.) ===== */
.adm-detail-list { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14px; margin: 0; }
.adm-detail-list dt { color: var(--adm-muted); font-weight: 600; }
.adm-detail-list dd { margin: 0; font-weight: 600; }

/* ===== Grafik kapsayıcı ===== */
.adm-chart { padding: 8px 12px 16px; }

/* ===== Responsive ===== */
@media (max-width: 960px) {
  .adm-shell { flex-direction: column; }
  .adm-sidebar { width: 100%; height: auto; position: static; }
  .adm-nav { flex-direction: row; flex-wrap: wrap; }
  .adm-nav-section { width: 100%; padding-top: 8px; }
  .adm-grid-2, .adm-grid-3, .adm-form-grid { grid-template-columns: 1fr; }
  .adm-content { padding: 18px; }
  .adm-topbar { padding: 0 18px; }
}

/* ===== Zengin metin editörü (richtext Stimulus controller) ===== */
/* JS ile textarea gizlenir; JS yoksa textarea normal görünür (progressive enhancement). */
.rt-hidden-input { display: none !important; }

.rt-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 3px;
  padding: 6px 8px;
  border: 1px solid var(--adm-border); border-bottom: none;
  border-radius: 8px 8px 0 0;
  background: #FAFBFD;
}
.rt-sep { width: 1px; height: 20px; background: var(--adm-border); margin: 0 4px; }
.rt-btn {
  font-family: inherit; font-size: 13px; line-height: 1;
  min-width: 30px; height: 30px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 6px;
  background: transparent; color: var(--adm-text); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.rt-btn:hover { background: #EAF1FB; border-color: var(--adm-border); }
.rt-btn:active { background: #DCE8FA; }

.rt-editor {
  font-family: inherit; font-size: 14px; color: var(--adm-text); line-height: 1.6;
  min-height: 180px; max-height: 460px; overflow-y: auto;
  padding: 12px 14px; box-sizing: border-box;
  border: 1px solid var(--adm-border); border-radius: 0 0 8px 8px;
  background: var(--adm-surface);
}
.rt-editor:focus { outline: none; border-color: var(--adm-blue); box-shadow: 0 0 0 3px rgba(6,115,228,0.08); }
.rt-editor:empty::before {
  content: attr(data-placeholder);
  color: var(--adm-muted); pointer-events: none;
}
.rt-editor h2 { font-size: 18px; font-weight: 700; margin: 14px 0 8px; color: var(--adm-navy); }
.rt-editor p { margin: 0 0 10px; }
.rt-editor ul, .rt-editor ol { margin: 0 0 10px; padding-left: 22px; }
.rt-editor li { margin-bottom: 4px; }
.rt-editor a { color: var(--adm-blue); text-decoration: underline; }

/* --- Promosyon kodu paylaşım satırı --- */
.adm-share-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 0; border-bottom: 1px solid var(--adm-border);
}
.adm-share-row:last-of-type { border-bottom: none; }
.adm-share-label { font-size: 12.5px; font-weight: 600; color: var(--adm-muted); margin-bottom: 4px; }
.adm-share-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px;
  color: var(--adm-text); background: #F4F7FB; padding: 4px 10px; border-radius: 6px;
  word-break: break-all;
}

/* ===== Reklam formu / listesi ===== */
.adm-check-group { display: flex; flex-wrap: wrap; gap: 10px; }
.adm-checkbox--card {
  padding: 10px 14px; border: 1px solid var(--adm-border); border-radius: 8px;
  cursor: pointer; background: var(--adm-surface); font-weight: 500;
}
.adm-checkbox--card:has(input:checked) { border-color: var(--adm-blue); background: #EAF4FF; font-weight: 600; }
/* Önizleme kutusu sitedeki reklam kutusuyla aynı oran ve aynı sığdırma
   (contain) — admin ne görüyorsa ziyaretçi de onu görür. */
.adm-ad-preview {
  display: grid; place-items: center; aspect-ratio: 4 / 1; width: 100%; max-width: 680px;
  background: #F7F9FC; border: 1px dashed var(--adm-border); border-radius: 10px; overflow: hidden;
}
.adm-ad-preview--mobile { aspect-ratio: 2 / 1; max-width: 340px; }
.adm-ad-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.adm-ad-preview-empty { font-size: 13px; color: var(--adm-muted); padding: 8px; text-align: center; }
.adm-ad-meta { font-size: 12.5px; color: var(--adm-muted); min-height: 1.2em; }
.adm-ad-meta--ok    { color: #3D7A10; }
.adm-ad-meta--warn  { color: #9A5B04; }
.adm-ad-meta--error { color: #B42323; font-weight: 600; }
.adm-ad-thumb {
  flex: 0 0 auto; width: 104px; aspect-ratio: 4 / 1; object-fit: contain; display: block;
  background: #F7F9FC; border: 1px solid var(--adm-border); border-radius: 5px;
}
.adm-ad-thumb--empty {
  display: grid; place-items: center; font-size: 11px; color: var(--adm-muted); font-style: italic;
}
.adm-badge-row { display: flex; flex-wrap: wrap; gap: 4px; }
/* Başlık + ölçü notu tek-iki satırda kalsın; diğer sütunlar zaten dar */
.adm-ad-cell { min-width: 340px; }

/* Onay süreci (06.09.2026): menü rozeti + satır içi ret formu */
.adm-nav-badge { margin-left: auto; min-width: 22px; padding: 2px 7px; border-radius: 999px; background: #F59E0B; color: #fff; font-size: 11.5px; font-weight: 700; text-align: center; }
.adm-reject { position: relative; display: inline-block; }
.adm-reject > summary { list-style: none; display: inline-flex; cursor: pointer; }
.adm-reject > summary::-webkit-details-marker { display: none; }
.adm-reject-form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; width: 300px; padding: 12px; background: #fff; border: 1px solid #E5E9F0; border-radius: 10px; box-shadow: 0 10px 30px rgba(11,31,77,.14); display: grid; gap: 8px; }
.adm-reject-form textarea { width: 100%; font: inherit; font-size: 13px; }
