/* ------------------------------------------------------------------
   Kudret Metal Ödeme Sistemi - marka teması
   Metronic 8.2.9 (demo39) üzerine ince bir katman.
   ------------------------------------------------------------------ */

:root,
[data-bs-theme="light"] {
    --bs-primary: #1f4e9c;
    --bs-primary-active: #163c7c;
    --bs-primary-light: #eaf1fb;
    --bs-primary-inverse: #ffffff;
    --bs-primary-rgb: 31, 78, 156;
    --bs-primary-clarity: rgba(31, 78, 156, 0.2);
    --bs-primary-bg-subtle: #e3ecfa;
    --bs-primary-border-subtle: #b3c9ea;
    --bs-primary-text-emphasis: #12305f;
    --bs-link-color: #1f4e9c;
    --bs-link-hover-color: #163c7c;

    --km-brand: #1f4e9c;
    --km-brand-soft: #eaf1fb;
    --km-steel: #6c7480;
    --km-surface: #ffffff;
    --km-shell: linear-gradient(160deg, #16315c 0%, #1f4e9c 55%, #2f6ec4 100%);
}

[data-bs-theme="dark"] {
    --bs-primary: #4a86dd;
    --bs-primary-active: #3a72c6;
    --bs-primary-light: #16223a;
    --bs-primary-inverse: #ffffff;
    --bs-primary-rgb: 74, 134, 221;
    --bs-primary-clarity: rgba(74, 134, 221, 0.2);
    --bs-primary-bg-subtle: #12203a;
    --bs-primary-border-subtle: #263f6b;
    --bs-primary-text-emphasis: #8fb6f0;
    --bs-link-color: #6ea2e8;
    --bs-link-hover-color: #8fb6f0;

    --km-brand: #4a86dd;
    --km-brand-soft: #16223a;
    --km-steel: #9aa3af;
    --km-surface: #1b1c22;
    --km-shell: linear-gradient(160deg, #0c1526 0%, #16315c 55%, #234a8c 100%);
}

/* ---------------------------- Genel ---------------------------- */

body {
    letter-spacing: -0.01em;
}

.app-sidebar-logo img,
.km-logo img {
    max-width: 100%;
}

/* Marka logosu koyu zeminde okunmuyor; beyaza çevrilir */
[data-bs-theme="dark"] .km-logo img {
    filter: brightness(0) invert(1);
    opacity: 0.92;
}

/* Kart/güvenlik logoları koyu temada beyaz zemin üzerinde gösterilir */
.km-paylogos {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
}

[data-bs-theme="dark"] .km-paylogos {
    background: #fff;
    border-radius: 0.5rem;
    padding: 0.35rem 0.75rem;
}

/* Marka gradyanlı kart (özet kutuları) */
.km-hero {
    background: var(--km-shell);
    color: #fff;
    border: 0;
    overflow: hidden;
    position: relative;
}

.km-hero::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.km-hero .card-body {
    position: relative;
    z-index: 1;
}

.km-hero .text-muted,
.km-hero .text-gray-500,
.km-hero .text-gray-600 {
    color: rgba(255, 255, 255, 0.72) !important;
}

.km-hero .text-gray-900,
.km-hero .text-gray-800 {
    color: #fff !important;
}

/* İstatistik kutusu */
.km-stat {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.km-stat:hover {
    box-shadow: 0 12px 30px rgba(15, 34, 68, 0.09);
    transform: translateY(-2px);
}

.km-stat .km-stat-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.65rem;
}

/* Tablolarda satır vurgusu */
.km-table tbody tr:hover > td {
    background-color: var(--bs-gray-100);
}

.km-table td,
.km-table th {
    vertical-align: middle;
}

/* Kart formu */
.km-card-preview {
    background: var(--km-shell);
    color: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    min-height: 190px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(15, 34, 68, 0.25);
}

.km-card-preview::before {
    content: "";
    position: absolute;
    inset: auto -40px -80px auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
}

.km-card-preview .km-card-number {
    font-size: 1.35rem;
    letter-spacing: 0.14em;
    font-variant-numeric: tabular-nums;
}

.km-card-chip {
    width: 42px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f4d38a, #c9a144);
}

/* Ödeme sonucu ekranı */
.km-result-icon {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
}

/* Yükleniyor katmanı */
#km-loader {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(2px);
}

[data-bs-theme="dark"] #km-loader {
    background: rgba(14, 15, 20, 0.72);
}

#km-loader.show {
    display: flex;
}

/* Yazdırma */
@media print {
    .app-header,
    .app-sidebar,
    .app-footer,
    .app-toolbar,
    .km-no-print {
        display: none !important;
    }

    .app-wrapper,
    .app-main,
    .app-content {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Giriş ekranı */
.km-auth {
    min-height: 100vh;
    background: var(--km-shell);
}

.km-auth-panel {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 1.25rem;
    backdrop-filter: blur(6px);
}

.km-auth-card {
    border-radius: 1.25rem;
    box-shadow: 0 30px 70px rgba(5, 18, 40, 0.35);
}

.km-auth-feature {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.85);
}

.km-auth-feature i {
    color: #fff;
    opacity: 0.85;
}

/* Durum rozetleri */
.km-badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}
