/* ============================================================
   Bahis CMS — Kurumsal Tasarım
   Açık tema (zorunlu), profesyonel yayıncı görünümü
   ============================================================ */

:root {
    --bg:            #f5f6f8;
    --surface:       #ffffff;
    --surface-2:     #fafbfc;
    --border:        #e3e6eb;
    --border-strong: #cfd4dc;
    --text:          #0f172a;
    --text-2:        #334155;
    --muted:         #64748b;
    --muted-2:       #94a3b8;

    --primary:       #0b3d91;        /* derin lacivert — kurumsal */
    --primary-dark:  #082c6b;
    --primary-soft:  #e8eef9;
    --accent:        #0d8f5e;        /* yeşil — onay/lisans */
    --accent-soft:   #e6f5ee;
    --warning:       #b45309;
    --warning-soft:  #fff7e6;
    --danger:        #b91c1c;
    --danger-soft:   #fdecec;

    --radius:        10px;
    --radius-sm:     6px;
    --radius-lg:     14px;

    --shadow-sm:     0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
    --shadow-md:     0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.06);
    --shadow-lg:     0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.05);

    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
    background: var(--bg);
    color: var(--text);
    font: 15.5px/1.6 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}
a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-dark); text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }

/* ============ HEADER ============ */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 50;
    backdrop-filter: saturate(180%) blur(8px);
    background: rgba(255,255,255,.92);
}
.header-row {
    display: flex; align-items: center; justify-content: space-between;
    height: 68px; gap: 24px;
}
.brand {
    font-weight: 800; font-size: 19px; color: var(--primary);
    letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px;
}
.brand::before {
    content:""; width: 24px; height: 24px; border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    box-shadow: inset 0 -2px 0 rgba(0,0,0,.15);
}
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
    color: var(--text-2); padding: 8px 14px; border-radius: 6px;
    font-weight: 500; font-size: 14.5px;
}
.main-nav a:hover { background: var(--surface-2); color: var(--primary); text-decoration: none; }

/* ============ MAIN ============ */
.site-main { padding: 32px 24px 64px; }

h1 { font-size: 32px; line-height: 1.18; margin: 0 0 14px; letter-spacing: -.02em; font-weight: 700; }
h2 { font-size: 22px; line-height: 1.3; margin: 36px 0 14px; letter-spacing: -.01em; font-weight: 700; }
h3 { font-size: 17px; line-height: 1.4; margin: 18px 0 8px; font-weight: 600; }
.lede { color: var(--muted); font-size: 17px; max-width: 720px; margin: 0 0 20px; }

/* ============ HERO ============ */
.hero {
    background: linear-gradient(135deg, #0b3d91 0%, #0a2f6e 50%, #061d44 100%);
    color: #fff;
    margin: -32px -24px 32px;
    padding: 56px 24px 48px;
    border-bottom: 1px solid var(--border);
    position: relative; overflow: hidden;
}
.hero::before {
    content:""; position: absolute; inset: 0;
    background:
        radial-gradient(800px 300px at 10% 0%, rgba(56,118,222,.35), transparent 70%),
        radial-gradient(600px 250px at 90% 100%, rgba(13,143,94,.18), transparent 70%);
    pointer-events: none;
}
.hero > * { position: relative; }
.hero .inner { max-width: 1180px; margin: 0 auto; }
.hero h1 { font-size: 40px; color: #fff; max-width: 780px; }
.hero .lede { color: rgba(255,255,255,.82); font-size: 18px; max-width: 700px; }
.hero .hero-cta { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.hero .btn.primary { background: #fff; color: var(--primary); }
.hero .btn.primary:hover { background: #f1f5ff; }
.hero .btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.3); }
.hero .btn.ghost:hover { background: rgba(255,255,255,.08); }

/* ============ BLOCK ============ */
.block { margin: 36px 0; }
.block-head {
    display: flex; align-items: baseline; justify-content: space-between;
    margin-bottom: 16px; gap: 16px;
}
.block-head h2 { margin: 0; }
.block-head .more { font-weight: 600; font-size: 14px; color: var(--primary); }
.block-head .more::after { content: " →"; }

/* ============ CARDS (siteler grid) ============ */
.grid.cards {
    display: grid; gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

/* Profesyonel kart: üstte logo bandı, altta isim ve meta */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex; flex-direction: column; gap: 14px;
    color: var(--text);
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    position: relative;
    min-height: 154px;
}
.card:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-strong);
}

/* Dikdörtgen logo bandı — 120×30 oranı (4:1), her boyut düzgün */
.logo-frame {
    width: 100%;
    height: 56px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 8px 12px;
}
.logo-frame img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}
.logo-frame .placeholder {
    font-weight: 700;
    color: var(--muted);
    font-size: 18px;
    letter-spacing: .04em;
}

.card-body { display: flex; flex-direction: column; gap: 6px; }
.card-body h3 {
    margin: 0; font-size: 15.5px; font-weight: 600; color: var(--text);
    letter-spacing: -.005em;
}
.card-body .meta {
    margin: 0; color: var(--muted); font-size: 13px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

/* Rozet sistemi */
.badge {
    display: inline-flex; align-items: center;
    padding: 2px 8px; border-radius: 999px;
    font-size: 11.5px; font-weight: 600; line-height: 1.6;
    letter-spacing: .01em;
}
.badge.featured { background: var(--accent-soft); color: var(--accent); }
.badge.license  { background: var(--primary-soft); color: var(--primary); }
.badge.muted    { background: var(--surface-2); color: var(--muted); border: 1px solid var(--border); }

/* ============ LICENSE TAGS ============ */
.license-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.license-tags a {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 999px; padding: 8px 16px;
    color: var(--text-2); font-size: 14px; font-weight: 500;
    transition: all .15s ease;
}
.license-tags a:hover {
    border-color: var(--primary); color: var(--primary);
    background: var(--primary-soft); text-decoration: none;
}

/* ============ PROFILE PAGE ============ */
.profile-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 24px;
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 8px;
}

/* Profil sayfasında daha büyük dikdörtgen logo: 200×60 */
.profile-logo {
    width: 200px;
    height: 64px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    padding: 10px 16px;
    flex: 0 0 200px;
}
.profile-logo img {
    max-width: 100%; max-height: 100%; width: auto; height: auto;
    object-fit: contain; display: block;
}
.profile-logo .placeholder { font-weight: 700; color: var(--muted); font-size: 26px; }

.profile-meta { min-width: 0; }
.profile-meta h1 { margin: 0 0 6px; font-size: 28px; }
.profile-meta .license {
    color: var(--text-2); margin: 0 0 0; font-size: 14px;
    display: inline-flex; align-items: center; gap: 8px;
}
.profile-meta .license::before {
    content:""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.profile-cta { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }

.research-link {
    margin: 16px 0 0; font-size: 14px;
    display: inline-flex; align-items: center; gap: 6px;
}

/* ============ ADVICE / NOTICE BOXES ============ */
.advice-box {
    background: var(--warning-soft);
    border: 1px solid #fbe2a9;
    border-left: 4px solid #d97706;
    border-radius: var(--radius);
    padding: 18px 20px; margin-top: 24px;
}
.advice-box h3 { margin: 0 0 6px; color: var(--warning); font-size: 16px; }
.advice-box p { margin: 0 0 12px; color: #5b3a07; }

/* ============ TABLES ============ */
.info-table {
    width: 100%; border-collapse: collapse;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    font-size: 14.5px;
}
.info-table th, .info-table td {
    padding: 14px 18px; text-align: left;
    border-bottom: 1px solid var(--border);
}
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th {
    width: 35%; color: var(--muted);
    font-weight: 500;
    background: var(--surface-2);
}
.info-table td { color: var(--text); font-weight: 500; }

.small.note { font-size: 13px; color: var(--muted); margin-top: 10px; line-height: 1.55; }

/* ============ BONUS CARD ============ */
.bonus-card {
    background: linear-gradient(135deg, var(--surface) 0%, #fafbff 100%);
    border: 1px solid var(--border);
    border-left: 4px solid var(--primary);
    border-radius: var(--radius); padding: 24px;
}
.bonus-card h2 { margin-top: 0; }
.bonus-card h3 { color: var(--primary); font-size: 19px; margin: 0 0 8px; }

/* ============ SCREENSHOT ============ */
.screenshot {
    width: 100%; height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

/* ============ SOCIALS ============ */
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.socials a {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 8px 16px;
    color: var(--text-2); font-weight: 500; font-size: 14px;
}
.socials a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }

.final-notes { color: var(--muted); margin-top: 24px; font-size: 14px; line-height: 1.6; }
.cta-row { margin: 32px 0 8px; text-align: center; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--primary-soft); color: var(--primary);
    font-weight: 600; font-size: 14.5px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1.4;
    white-space: nowrap;
}
.btn:hover { background: #d8e3f5; text-decoration: none; }
.btn.primary {
    background: var(--primary); color: #fff;
    box-shadow: 0 1px 2px rgba(11,61,145,.25);
}
.btn.primary:hover { background: var(--primary-dark); color: #fff; box-shadow: 0 2px 6px rgba(11,61,145,.35); }
.btn.big { padding: 14px 28px; font-size: 15.5px; }
.btn.danger { background: var(--danger-soft); color: var(--danger); }
.btn.danger:hover { background: #fbd5d5; }
.btn.ghost { background: transparent; border-color: var(--border); color: var(--text-2); }
.btn.ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }

/* ============ FORMS ============ */
.form { display: grid; gap: 16px; max-width: 580px; }
.form label { display: grid; gap: 6px; font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.form input, .form textarea, .form select {
    font: inherit; padding: 11px 14px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.form input:focus, .form textarea:focus, .form select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.notice { padding: 14px 16px; border-radius: var(--radius-sm); margin-bottom: 16px; font-size: 14.5px; }
.notice.success { background: var(--accent-soft); color: #065f46; border: 1px solid #a7f3d0; }
.notice.error   { background: var(--danger-soft); color: #991b1b; border: 1px solid #fecaca; }

/* ============ PAGER ============ */
.pager { display: flex; gap: 6px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.pager a {
    padding: 8px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    color: var(--text-2); background: var(--surface); font-weight: 500; font-size: 14px;
}
.pager a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pager a.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ CRUMBS ============ */
.crumbs { color: var(--muted); margin-bottom: 12px; font-size: 13.5px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--primary); }

/* ============ PROSE ============ */
.prose { line-height: 1.7; color: var(--text-2); font-size: 15.5px; }
.prose p { margin: 0 0 14px; }
.prose strong { color: var(--text); }

/* ============ DETAILS / FAQ ============ */
details {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px;
    transition: border-color .15s, box-shadow .15s;
}
details:hover { border-color: var(--border-strong); }
details[open] { box-shadow: var(--shadow-sm); }
details > summary {
    font-weight: 600; cursor: pointer; padding: 4px 0;
    list-style: none; position: relative; padding-right: 28px;
    color: var(--text);
}
details > summary::-webkit-details-marker { display: none; }
details > summary::after {
    content: "+"; position: absolute; right: 0; top: 50%;
    transform: translateY(-50%); font-size: 22px; font-weight: 400;
    color: var(--muted); line-height: 1;
    transition: transform .2s;
}
details[open] > summary::after { content: "−"; }
details[open] > summary { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }
details p { margin: 0; color: var(--text-2); line-height: 1.7; }

/* ============ FOOTER ============ */
.site-footer {
    background: #0f172a; color: #cbd5e1;
    border-top: 1px solid var(--border);
    padding: 48px 0 28px;
    margin-top: 80px;
}
.site-footer p { margin: 0 0 10px; line-height: 1.6; font-size: 14px; }
.site-footer a { color: #93c5fd; }
.site-footer a:hover { color: #bfdbfe; }
.site-footer .legal {
    font-size: 13px; margin-top: 16px; padding-top: 16px;
    border-top: 1px solid #1e293b; color: #94a3b8;
}
.site-footer .copy { font-size: 12px; margin-top: 12px; color: #64748b; }

/* ============ ADMIN ============ */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; background: var(--bg); }
.admin-side {
    background: #0f172a; color: #cbd5e1;
    padding: 22px 16px;
    display: flex; flex-direction: column;
}
.admin-side .brand { color: #fff; font-size: 17px; display: block; margin-bottom: 22px; padding: 0 8px; }
.admin-side .brand::before { display: none; }
.admin-side a {
    display: block; color: #cbd5e1; padding: 9px 12px;
    border-radius: var(--radius-sm); margin-bottom: 2px;
    font-size: 14px; font-weight: 500;
}
.admin-side a:hover { background: #1e293b; color: #fff; text-decoration: none; }
.admin-side a.active { background: var(--primary); color: #fff; }
.admin-main { padding: 28px 32px; }
.admin-main h1 { margin-top: 0; font-size: 26px; }
.admin-topbar {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 22px; gap: 14px; flex-wrap: wrap;
}
.admin-topbar form { display: flex; gap: 8px; align-items: center; }
.admin-topbar input[type="search"], .admin-topbar select {
    padding: 9px 12px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); background: #fff; font: inherit; font-size: 14px;
}
.stats {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px; margin-bottom: 28px;
}
.stat-card {
    background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
    box-shadow: var(--shadow-sm);
}
.stat-card .label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-card .value { font-size: 28px; font-weight: 700; color: var(--text); margin-top: 4px; letter-spacing: -.02em; }

.table {
    width: 100%; border-collapse: collapse; background: #fff;
    border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow-sm);
}
.table th, .table td {
    padding: 12px 14px; border-bottom: 1px solid var(--border);
    text-align: left; vertical-align: middle; font-size: 14px;
}
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--surface-2); }
.table thead th {
    background: var(--surface-2); color: var(--muted);
    font-weight: 600; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em;
}
.table .actions { display: flex; gap: 6px; }
.bulk-bar { display: flex; gap: 8px; align-items: center; margin: 14px 0; flex-wrap: wrap; }
.bulk-bar select, .bulk-bar button {
    padding: 9px 12px; border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm); background: #fff; font: inherit; font-size: 14px;
}

.form-grid {
    display: grid; gap: 16px;
    grid-template-columns: 1fr 1fr; max-width: 960px;
}
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: grid; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.form-grid input, .form-grid textarea, .form-grid select {
    font: inherit; padding: 10px 12px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff;
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-soft);
}
.form-grid textarea {
    min-height: 120px; resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13.5px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
    .container { padding: 0 18px; }
    .site-main { padding: 24px 18px 48px; }
    .hero { margin: -24px -18px 24px; padding: 44px 20px 36px; }
    .hero h1 { font-size: 30px; }
    h1 { font-size: 26px; }
    .profile-card { grid-template-columns: 1fr; text-align: center; padding: 22px; }
    .profile-logo { margin: 0 auto; }
    .profile-cta .btn { width: 100%; }
    .form-grid { grid-template-columns: 1fr; }
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side {
        flex-direction: row; flex-wrap: wrap; padding: 12px 14px; gap: 4px;
    }
    .admin-side .brand { width: 100%; margin-bottom: 8px; }
    .admin-side a { padding: 6px 10px; font-size: 13px; }
    .admin-main { padding: 20px 18px; }
}

@media (max-width: 640px) {
    .header-row { height: auto; padding: 12px 0; flex-wrap: wrap; gap: 8px; }
    .main-nav { width: 100%; overflow-x: auto; padding-bottom: 4px; }
    .main-nav a { padding: 6px 10px; font-size: 13.5px; }
    .grid.cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
    .grid.cards { grid-template-columns: 1fr; }
    .hero h1 { font-size: 26px; }
    .hero .lede { font-size: 16px; }
}
