/* ============================================================
   Şehir Sigorta — Kurumsal Tasarım Sistemi
   Palet: Lacivert #24388E · Kırmızı #E30B13 (logo renkleri)
   Bootstrap 5 üzerine kurumsal, modern, responsive tema.
   ============================================================ */

:root {
    --brand-navy: #24388E;
    --brand-navy-600: #1d2f78;
    --brand-navy-700: #182761;
    --brand-navy-050: #eef1fb;
    --brand-red: #E30B13;
    --brand-red-600: #c30910;
    --ink: #1a2233;
    --muted: #6b7385;
    --line: #e6e9f0;
    --bg: #f4f6fb;
    --card: #ffffff;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 2px rgba(16,24,51,.06), 0 1px 3px rgba(16,24,51,.05);
    --shadow: 0 6px 24px rgba(16,24,51,.08);
    --shadow-lg: 0 18px 50px rgba(16,24,51,.14);
}

* { box-sizing: border-box; }

body {
    font-family: "Inter", "Segoe UI", system-ui, -apple-system, Tahoma, sans-serif;
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    letter-spacing: .1px;
}

/* ---------- Marka üst bandı (formlar & giriş) ---------- */
.brand-topbar {
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 30;
}
.brand-topbar .brand-inner {
    max-width: 960px;
    margin: 0 auto;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 14px;
}
.brand-logo { height: 40px; width: auto; display: block; }
.brand-topbar .brand-tag {
    margin-left: auto;
    font-size: .82rem;
    color: var(--muted);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}
.brand-topbar .brand-tag i { color: var(--brand-navy); }

/* ---------- Form kabuğu ---------- */
.page-wrap { max-width: 720px; margin: 0 auto; padding: 26px 16px 60px; }

.form-hero {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-700) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 30px 28px;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    margin-bottom: 22px;
}
.form-hero::after {
    content: "";
    position: absolute;
    right: -40px; top: -40px;
    width: 180px; height: 180px;
    background: radial-gradient(circle, rgba(227,11,19,.35), transparent 70%);
    border-radius: 50%;
}
.form-hero .eyebrow {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: .72rem;
    font-weight: 700;
    opacity: .8;
    margin-bottom: 8px;
}
.form-hero h1 { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.form-hero .kurum-adi { font-size: 1.02rem; font-weight: 500; opacity: .95; margin: 0; }
.form-hero .kurum-kod {
    display: inline-block;
    margin-top: 12px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.22);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
}

.card-panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
    margin-bottom: 18px;
}
.card-panel + .card-panel { margin-top: 0; }

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--brand-navy);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 18px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--brand-navy-050);
}
.section-title .ico {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-navy-050);
    color: var(--brand-navy);
    border-radius: 9px;
    font-size: .9rem;
}

/* ---------- Form elemanları ---------- */
.form-label { font-weight: 600; font-size: .85rem; color: #3a4256; margin-bottom: 6px; }
.form-control, .form-select {
    border: 1px solid #d7dce8;
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    font-size: .95rem;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand-navy);
    box-shadow: 0 0 0 4px rgba(36,56,142,.12);
}
.form-control::placeholder { color: #9aa1b2; }

.form-check-input { width: 1.15em; height: 1.15em; margin-top: .15em; }
.form-check-input:checked { background-color: var(--brand-navy); border-color: var(--brand-navy); }
.form-check-input:focus { border-color: var(--brand-navy); box-shadow: 0 0 0 3px rgba(36,56,142,.15); }
.form-check-label { font-size: .92rem; }

/* Onay/soru kartı */
.toggle-card {
    background: var(--brand-navy-050);
    border: 1px solid #d9e0f6;
    border-radius: var(--radius-sm);
    padding: 16px 18px;
}
.toggle-card.accent { background: #fff4f4; border-color: #f6d5d6; }

/* Dinamik eş/çocuk blokları */
.dynamic-section {
    border: 1px dashed #cfd6e6;
    border-radius: var(--radius-sm);
    padding: 18px;
    margin-bottom: 14px;
    background: #fafbff;
    position: relative;
}
.remove-btn { position: absolute; top: 12px; right: 12px; }

/* Taahhütname metni */
.taahhut-box {
    background: #fbfcff;
    border: 1px solid var(--line);
    border-left: 4px solid var(--brand-red);
    border-radius: var(--radius-sm);
    padding: 18px 20px;
    font-size: .9rem;
    line-height: 1.6;
}
.taahhut-box h5 { color: var(--brand-navy); font-size: 1rem; }
.taahhut-box h6 { color: var(--ink); }

/* ---------- Butonlar ---------- */
.btn { border-radius: var(--radius-sm); font-weight: 600; padding: 10px 18px; transition: all .15s; }
.btn-brand, .btn-primary {
    background: var(--brand-navy);
    border: 1px solid var(--brand-navy);
    color: #fff;
}
.btn-brand:hover, .btn-primary:hover {
    background: var(--brand-navy-600);
    border-color: var(--brand-navy-600);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(36,56,142,.25);
}
.btn-accent { background: var(--brand-red); border: 1px solid var(--brand-red); color: #fff; }
.btn-accent:hover { background: var(--brand-red-600); color: #fff; }
.btn-lg { padding: 13px 26px; font-size: 1.02rem; }
.btn-outline-navy { color: var(--brand-navy); border: 1px solid #c9d2ec; background: #fff; }
.btn-outline-navy:hover { background: var(--brand-navy-050); }

.btn-submit-wrap { text-align: center; margin-top: 8px; }

/* ---------- Bildirim / kapalı sayfa ---------- */
.notice-screen {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px 16px;
}
.notice-card {
    max-width: 520px;
    width: 100%;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
    padding: 44px 34px;
}
.notice-card .notice-ico {
    width: 76px; height: 76px;
    margin: 0 auto 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 2rem;
}
.notice-card.closed .notice-ico { background: #fff0f0; color: var(--brand-red); }
.notice-card.success .notice-ico { background: #eafaf1; color: #16a34a; }
.notice-card.error .notice-ico { background: #fff0f0; color: var(--brand-red); }
.notice-card h2 { font-weight: 700; font-size: 1.4rem; margin-bottom: 10px; color: var(--ink); }
.notice-card p { color: var(--muted); margin-bottom: 6px; }

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-navbar {
    background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-700) 100%);
    box-shadow: var(--shadow);
    position: sticky; top: 0; z-index: 40;
}
.admin-navbar .navbar-brand { display: flex; align-items: center; gap: 12px; font-weight: 700; color: #fff; }
.admin-navbar .navbar-brand img { height: 34px; background: #fff; padding: 4px 8px; border-radius: 8px; }
.admin-navbar .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; border-radius: 8px; padding: 8px 14px !important; }
.admin-navbar .nav-link:hover { color: #fff !important; background: rgba(255,255,255,.12); }

.admin-shell { max-width: 1320px; margin: 0 auto; padding: 26px 20px 60px; }

.stat-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex; align-items: center; justify-content: space-between;
    height: 100%;
}
.stat-card .stat-ico {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.stat-card .lbl { color: var(--muted); font-size: .82rem; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.stat-card .val { font-size: 1.9rem; font-weight: 800; line-height: 1.1; color: var(--ink); }
.stat-ico.navy { background: var(--brand-navy-050); color: var(--brand-navy); }
.stat-ico.amber { background: #fff5e0; color: #c77700; }
.stat-ico.green { background: #eafaf1; color: #16a34a; }
.stat-ico.red { background: #fff0f0; color: var(--brand-red); }

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 20px 22px;
    margin-bottom: 22px;
}
.panel-title { font-weight: 700; color: var(--ink); font-size: 1.05rem; margin: 0 0 4px; }

.table thead th {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .5px;
    color: var(--muted); font-weight: 700; border-bottom: 2px solid var(--line);
    background: #fafbfe;
}
.table td { vertical-align: middle; }
.table-hover tbody tr:hover { background: var(--brand-navy-050); }

.badge-soft { padding: 5px 11px; border-radius: 20px; font-size: .74rem; font-weight: 700; }
.badge-beklemede { background: #fff5e0; color: #b9770a; }
.badge-isleme { background: #eafaf1; color: #15803d; }
.badge-aktif { background: #eafaf1; color: #15803d; }
.badge-kapali { background: #fff0f0; color: var(--brand-red); }

/* Sayfalama — yatay taşmayı kesin engelle */
.pagination { flex-wrap: wrap; row-gap: .3rem; }
.pagination .page-link { color: var(--brand-navy); border-radius: 8px !important; margin: 0 2px; border: 1px solid var(--line); }
.pagination .page-item.active .page-link { background: var(--brand-navy); border-color: var(--brand-navy); color: #fff; }
.pagination .page-link:focus { box-shadow: 0 0 0 3px rgba(36,56,142,.15); }

mark { background: #fff3cd; color: #7a5b00; padding: 1px 4px; border-radius: 4px; }

/* Aç/kapa anahtarı (ayarlar) */
.form-switch .form-check-input { width: 2.6em; height: 1.4em; cursor: pointer; }
.form-switch .form-check-input:checked { background-color: #16a34a; border-color: #16a34a; }

/* ---------- Responsive ---------- */
@media (max-width: 576px) {
    .form-hero { padding: 24px 20px; }
    .form-hero h1 { font-size: 1.25rem; }
    .card-panel { padding: 18px; }
    .brand-topbar .brand-tag span { display: none; }
    .stat-card .val { font-size: 1.5rem; }
}
