/* ============================================================
   Finans Takip — Custom Styles
   ============================================================ */

:root {
    --sidebar-width: 240px;
    --nav-bottom-height: 60px;
    --accent: #0d6efd;
}

/* ----------------------------------------------------------
   Layout
   ---------------------------------------------------------- */
body {
    background-color: var(--bs-body-bg);
    font-size: 0.9rem;
}

/* Sidebar (masaüstü) */
#sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: var(--bs-body-bg);
    border-right: 1px solid var(--bs-border-color);
    display: flex;
    flex-direction: column;
}

#sidebar .sidebar-brand {
    padding: 1.25rem 1.5rem;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.3px;
    border-bottom: 1px solid var(--bs-border-color);
    color: var(--bs-body-color);
    text-decoration: none;
}

#sidebar .nav-link {
    padding: 0.6rem 1.5rem;
    color: var(--bs-secondary-color);
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    transition: background 0.15s, color 0.15s;
}

#sidebar .nav-link:hover,
#sidebar .nav-link.active {
    background-color: var(--bs-primary-bg-subtle);
    color: var(--bs-primary);
}

#sidebar .nav-link i {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

#sidebar .sidebar-bottom {
    margin-top: auto;
    border-top: 1px solid var(--bs-border-color);
    padding: 0.75rem 0;
}

/* Ana içerik */
#main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 1.5rem;
    padding-bottom: calc(var(--nav-bottom-height) + 1rem);
}

/* ----------------------------------------------------------
   Üst bar (mobilde görünür)
   ---------------------------------------------------------- */
#topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 99;
    background-color: var(--bs-body-bg);
    border-bottom: 1px solid var(--bs-border-color);
    padding: 0.75rem 1rem;
    align-items: center;
    justify-content: space-between;
}

/* ----------------------------------------------------------
   Alt navigasyon (mobil)
   ---------------------------------------------------------- */
#bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-bottom-height);
    background-color: var(--bs-body-bg);
    border-top: 1px solid var(--bs-border-color);
    z-index: 100;
}

#bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: var(--bs-secondary-color);
    text-decoration: none;
    font-size: 0.68rem;
    padding: 0.35rem 0;
    transition: color 0.15s;
}

#bottom-nav a i {
    font-size: 1.2rem;
}

#bottom-nav a.active,
#bottom-nav a:hover {
    color: var(--bs-primary);
}

/* ----------------------------------------------------------
   Floating "+ Yeni İşlem" butonu
   ---------------------------------------------------------- */
#btn-yeni-islem {
    position: fixed;
    bottom: calc(var(--nav-bottom-height) + 1rem);
    right: 1rem;
    z-index: 101;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* ----------------------------------------------------------
   Mobil breakpoint
   ---------------------------------------------------------- */
@media (max-width: 767.98px) {
    #sidebar       { display: none !important; }
    #main-content  { margin-left: 0; padding: 1rem; padding-bottom: calc(var(--nav-bottom-height) + 5rem); }
    #topbar        { display: flex; }
    #bottom-nav    { display: flex; }
    #btn-yeni-islem { display: flex; }
}

/* ----------------------------------------------------------
   Kart stilleri
   ---------------------------------------------------------- */
.stat-card {
    border: 1px solid var(--bs-border-color);
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: var(--bs-body-bg);
    transition: box-shadow 0.15s;
}

.stat-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}

.stat-card .stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--bs-secondary-color);
    margin-bottom: 0.35rem;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.stat-card .stat-icon {
    font-size: 1.75rem;
    opacity: 0.15;
}

/* ----------------------------------------------------------
   İşlem tipi renkleri
   ---------------------------------------------------------- */
.tip-gelir    { color: var(--bs-success); }
.tip-gider    { color: var(--bs-danger); }
.tip-transfer { color: var(--bs-info); }

/* ----------------------------------------------------------
   Tablo
   ---------------------------------------------------------- */
.table-hover tbody tr:hover {
    background-color: var(--bs-primary-bg-subtle);
    cursor: pointer;
}

/* ----------------------------------------------------------
   Dark mode geçişi
   ---------------------------------------------------------- */
[data-bs-theme="dark"] #sidebar,
[data-bs-theme="dark"] #topbar,
[data-bs-theme="dark"] #bottom-nav {
    background-color: #1a1d20;
}

/* ----------------------------------------------------------
   Form yardımcıları
   ---------------------------------------------------------- */
.required-star { color: var(--bs-danger); }

.cari-secim-alani {
    border: 1px dashed var(--bs-border-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bs-secondary-bg);
    transition: border-color 0.2s;
}

.cari-secim-alani.aktif {
    border-color: var(--bs-primary);
    background: var(--bs-primary-bg-subtle);
}
