:root {
    --zb-lacivert: #17255a;
    --zb-mavi: #2563eb;
    --zb-yesil: #059669;
    --zb-kirmizi: #dc2626;
    --zb-turuncu: #ea580c;
    --zb-zemin: #f4f6fb;
    --zb-alt-menu-yukseklik: 4.1rem;
}

body {
    background-color: var(--zb-zemin);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-text-size-adjust: 100%;
}

/* ---------- Üst menü ---------- */

.zb-navbar {
    /* Alt menü (1030) offcanvas'ın üstüne binmesin diye navbar yığını yükseltilir. */
    z-index: 1045;
    background: linear-gradient(120deg, var(--zb-lacivert), var(--zb-mavi));
    box-shadow: 0 2px 12px rgba(23, 37, 90, .18);
}

.zb-navbar .navbar-brand,
.zb-navbar .navbar-text,
.zb-navbar .navbar-toggler {
    color: #fff;
}

.zb-logo {
    height: 1.9rem;
    width: auto;
}

.offcanvas-title .zb-logo {
    height: 1.6rem;
}

.zb-giris-logo {
    width: 5.5rem;
    height: auto;
}

.zb-ucretsiz-rozet {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .35rem .85rem;
    border-radius: .55rem;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .06em;
    line-height: 1;
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}

.zb-ucretsiz-rozet-acik {
    color: #ecfdf5;
    background: rgba(16, 185, 129, .28);
    border-color: rgba(167, 243, 208, .55);
}

.zb-ucretsiz-rozet-kucuk {
    padding: .28rem .55rem;
    font-size: .7rem;
}

/* Telefona kurulduğunda üstteki durum çubuğu alanı boş bırakılır. */
@media (display-mode: standalone) {
    .zb-navbar {
        padding-top: env(safe-area-inset-top);
    }

    body {
        overscroll-behavior-y: contain;
    }
}

.zb-navbar .navbar-nav .nav-link {
    color: rgba(255, 255, 255, .82);
    border-radius: .6rem;
    padding: .55rem .85rem;
}

.zb-navbar .navbar-nav .nav-link:hover,
.zb-navbar .navbar-nav .nav-link.active {
    color: #fff;
    background-color: rgba(255, 255, 255, .16);
}

/* Offcanvas mobilde beyaz zeminde açıldığı için yazı rengi koyulaşır. */
@media (max-width: 991.98px) {
    .offcanvas .navbar-nav .nav-link {
        color: #1f2937;
        font-size: 1.05rem;
        padding: .7rem .85rem;
    }

    .offcanvas .navbar-nav .nav-link.active {
        color: #fff;
        background-color: var(--zb-mavi);
    }

    /* Sol menü açıkken alt sekme çubuğu çıkış düğmesini örtmesin. */
    body:has(#anaMenu.show) .zb-alt-menu {
        visibility: hidden;
        pointer-events: none;
    }

    #anaMenu .offcanvas-body {
        display: flex;
        flex-direction: column;
        padding-bottom: calc(1rem + env(safe-area-inset-bottom));
    }

    #anaMenu .zb-menu-hesap {
        margin-top: auto;
        padding-top: .5rem;
        padding-bottom: .25rem;
        background: #fff;
    }
}

.zb-icerik {
    padding-top: 1rem;
    padding-bottom: calc(var(--zb-alt-menu-yukseklik) + env(safe-area-inset-bottom) + 1rem);
    max-width: 1400px;
}

@media (min-width: 992px) {
    .zb-icerik {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }
}

/* ---------- Alt menü (mobil) ---------- */

.zb-alt-menu {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 1030;
    display: flex;
    justify-content: space-around;
    background: #fff;
    border-top: 1px solid #e5e7eb;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 12px rgba(15, 23, 42, .08);
}

.zb-alt-link {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .15rem;
    min-height: var(--zb-alt-menu-yukseklik);
    padding: .4rem .2rem;
    color: #6b7280;
    text-decoration: none;
    font-size: .72rem;
}

.zb-alt-link i {
    font-size: 1.35rem;
    line-height: 1;
}

.zb-alt-link.active {
    color: var(--zb-mavi);
    font-weight: 600;
}

/* ---------- Kartlar ---------- */

.card {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 8px 24px -16px rgba(15, 23, 42, .3);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid rgba(15, 23, 42, .07);
    font-weight: 600;
    padding: .9rem 1rem;
}

.zb-ozet-kart {
    height: 100%;
}

.zb-ozet-kart .zb-ozet-baslik {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    font-weight: 600;
}

.zb-ozet-kart .zb-ozet-deger {
    font-size: clamp(1rem, 4.6vw, 1.45rem);
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

/* Dar ekranlarda ikon üste alınır, rakam tam genişliği kullanır. */
@media (max-width: 575.98px) {
    .zb-ozet-kart .card-body {
        flex-direction: column;
        gap: .5rem !important;
        padding: .85rem;
    }

    .zb-ozet-kart .zb-ozet-ikon {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 1.05rem;
    }
}

@media (min-width: 768px) {
    .zb-ozet-kart .zb-ozet-deger {
        font-size: 1.7rem;
    }
}

.zb-ozet-ikon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex: 0 0 auto;
}

.zb-ikon-mavi { background: rgba(37, 99, 235, .12); color: var(--zb-mavi); }
.zb-ikon-yesil { background: rgba(5, 150, 105, .12); color: var(--zb-yesil); }
.zb-ikon-kirmizi { background: rgba(220, 38, 38, .12); color: var(--zb-kirmizi); }
.zb-ikon-turuncu { background: rgba(234, 88, 12, .12); color: var(--zb-turuncu); }
.zb-ikon-mor { background: rgba(124, 58, 237, .12); color: #7c3aed; }

/* ---------- Grafikler ---------- */

.zb-grafik-kutu {
    position: relative;
    height: 260px;
}

@media (min-width: 992px) {
    .zb-grafik-kutu {
        height: 300px;
    }
}

/* ---------- Tablolar ---------- */

.table > :not(caption) > * > * {
    padding: .7rem .65rem;
}

.table-kart thead th {
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .02em;
    color: #6b7280;
    white-space: nowrap;
}

.zb-tutar {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Mobilde tablo satırları kart görünümüne dönüşür. */
@media (max-width: 767.98px) {
    .table-kart {
        border-collapse: separate;
        border-spacing: 0;
    }

    .table-kart thead {
        display: none;
    }

    .table-kart tbody,
    .table-kart tr,
    .table-kart td {
        display: block;
        width: 100%;
    }

    .table-kart tbody tr {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: .85rem;
        margin-bottom: .7rem;
        padding: .35rem .85rem .6rem;
    }

    .table-kart tbody td {
        border: 0;
        padding: .3rem 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        text-align: right;
    }

    .table-kart tbody td::before {
        content: attr(data-baslik);
        font-size: .8rem;
        font-weight: 600;
        color: #6b7280;
        text-align: left;
        flex: 0 0 auto;
    }

    .table-kart tbody td[data-baslik=""] {
        justify-content: flex-end;
    }

    .table-kart tbody td[data-baslik=""]::before {
        content: none;
    }

    .table-kart tbody td.zb-kart-baslik {
        font-weight: 600;
        font-size: 1.02rem;
        border-bottom: 1px solid #f1f5f9;
        padding-bottom: .5rem;
        margin-bottom: .2rem;
    }

    .table-kart tbody td.zb-kart-baslik::before {
        content: none;
    }
}

/* ---------- Formlar ve dokunmatik ---------- */

.btn,
.form-control,
.form-select {
    min-height: 2.75rem;
    border-radius: .65rem;
}

.btn-sm {
    min-height: 2.25rem;
}

.form-label {
    font-weight: 600;
    font-size: .88rem;
    margin-bottom: .3rem;
}

.badge {
    font-weight: 600;
    padding: .4em .65em;
}

.zb-bos-durum {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6b7280;
}

.zb-bos-durum i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: .6rem;
    opacity: .5;
}

/* ---------- Giriş sayfası ---------- */

.zb-giris-sayfa {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(140deg, var(--zb-lacivert), var(--zb-mavi));
    padding: 1.5rem 0;
}

.zb-giris-cerceve {
    display: grid;
    gap: 2rem;
    align-items: center;
    max-width: 58rem;
    margin: 0 auto;
}

@media (min-width: 992px) {
    .zb-giris-cerceve {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 2.5rem;
    }
}

.zb-giris-kart {
    max-width: 26rem;
    margin: 0 auto;
    border-radius: 1.2rem;
}

.zb-giris-sag .zb-giris-kart {
    width: 100%;
}

.zb-giris-ozet {
    max-width: 26rem;
    margin: 0 auto;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .92);
}

.zb-tanitim-liste li {
    display: flex;
    gap: .85rem;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: rgba(255, 255, 255, .92);
}

.zb-tanitim-liste li:last-child {
    margin-bottom: 0;
}

.zb-tanitim-liste i {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .14);
    flex: 0 0 auto;
    font-size: 1.05rem;
}

.zb-tanitim-liste strong {
    display: block;
    font-size: .95rem;
    margin-bottom: .1rem;
}

.zb-tanitim-liste span {
    display: block;
    font-size: .82rem;
    color: rgba(255, 255, 255, .68);
    line-height: 1.35;
}

/* ---------- Kullanım rehberi (panel) ---------- */

.zb-rehber .card-header .btn-link:hover {
    color: var(--zb-mavi) !important;
}

.zb-rehber-madde {
    display: flex;
    gap: .75rem;
    align-items: flex-start;
}

.zb-rehber-no {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(37, 99, 235, .12);
    color: var(--zb-mavi);
    font-weight: 700;
    font-size: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

/* ---------- Demo hızlı giriş ---------- */

.zb-demo-ayrac {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
    color: #9ca3af;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.zb-demo-ayrac::before,
.zb-demo-ayrac::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

.zb-demo-btn {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 3.4rem;
    padding: .65rem .85rem;
    border: 1px solid #e5e7eb;
    border-radius: .85rem;
    background: #f8fafc;
    color: inherit;
}

.zb-demo-btn:hover {
    border-color: var(--zb-mavi);
    background: rgba(37, 99, 235, .06);
}

.zb-demo-ikon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .12);
    color: var(--zb-mavi);
    font-size: 1.1rem;
    flex: 0 0 auto;
}

/* ---------- Sistem yöneticisi bantı ---------- */

.zb-admin-bant {
    background: #7c2d12;
    color: #fff7ed;
}

.zb-admin-bant .btn-light {
    font-weight: 600;
}

/* ---------- Yardımcılar ---------- */

.zb-satir-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    width: 100%;
    min-height: 3.25rem;
    padding: .85rem 1rem;
    margin: 0;
    border-radius: .85rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.zb-satir-link:hover,
.zb-satir-link:focus-visible {
    color: inherit;
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.zb-satir-link-metin {
    display: flex;
    flex-direction: column;
    gap: .1rem;
    min-width: 0;
    text-align: left;
}

.zb-satir-link-baslik {
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.25;
}

.zb-satir-link-alt {
    font-size: .82rem;
    font-weight: 400;
    color: #6b7280;
}

.zb-satir-ok {
    flex: 0 0 auto;
    color: var(--zb-mavi);
    font-size: 1.15rem;
    opacity: .85;
}

.table-kart tbody td.zb-kart-baslik {
    padding: .55rem .4rem;
}

@media (max-width: 767.98px) {
    .table-kart tbody td.zb-kart-baslik {
        padding: .35rem 0 .65rem;
    }
}

/* ---------- Sayfa yardım (?) ---------- */

.zb-yardim-dugme {
    position: fixed;
    right: 1rem;
    bottom: calc(var(--zb-alt-menu-yukseklik) + env(safe-area-inset-bottom) + 1rem);
    z-index: 1040;
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    background: var(--zb-lacivert);
    color: #fff;
    font-size: 1.35rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(23, 37, 90, .35);
}

.zb-yardim-dugme:hover,
.zb-yardim-dugme:focus-visible {
    background: var(--zb-mavi);
    color: #fff;
}

@media (min-width: 992px) {
    .zb-yardim-dugme {
        bottom: 1.5rem;
        right: 1.5rem;
        width: 3.25rem;
        height: 3.25rem;
    }
}

.zb-yardim-liste li {
    font-size: .95rem;
    line-height: 1.45;
}

.zb-ilerleme {
    height: .45rem;
    border-radius: 1rem;
}

.zb-yapistir-alt {
    position: sticky;
    bottom: calc(var(--zb-alt-menu-yukseklik) + .5rem);
    z-index: 5;
}

@media (min-width: 992px) {
    .zb-yapistir-alt {
        position: static;
    }
}

@media print {
    .zb-navbar,
    .zb-alt-menu,
    .btn {
        display: none !important;
    }
}
