/**
 * Ana stil dosyası
 *
 * @package Finans
 */

/*--------------------------------------------------------------
# Genel Stiller
--------------------------------------------------------------*/
body {
    font-family: var(--font-family-sans-serif, 'Roboto', sans-serif);
    color: var(--dark-color, #333);
    line-height: 1.6;
    background-color: var(--body-bg);
}

a {
    color: var(--primary-color, #0d6efd);
    text-decoration: none;
    transition: var(--transition-base, all 0.3s);
}

a:hover {
    color: var(--primary-dark, #0a58ca);
}

/* Yardımcı sınıflar */
.text-primary {
    color: var(--primary-color, #0d6efd) !important;
}

.bg-gradient {
    background: var(--gradient-primary, linear-gradient(135deg, #0052cc 0%, #007bff 100%));
}

.shadow-sm {
    box-shadow: var(--shadow-sm, 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075));
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.site-header {
    background: var(--gradient-primary, linear-gradient(135deg, #0052cc 0%, #007bff 100%));
    box-shadow: var(--shadow, 0 2px 15px rgba(0,0,0,0.1));
}

.site-branding {
    display: flex;
    align-items: center;
}

.site-branding .img-fluid {
    max-height: 50px;
}

.site-title {
    font-weight: 700;
    margin-bottom: 0;
    font-size: 1.5rem;
}

.site-title a {
    color: var(--dark-color, #333);
}

.site-title a:hover {
    color: var(--primary-color, #0d6efd);
}

.site-description {
    margin-bottom: 0;
    font-size: 0.875rem;
    color: var(--secondary-color, #6c757d);
}

/*--------------------------------------------------------------
# Navigation
--------------------------------------------------------------*/
.navbar-nav .nav-link {
    font-weight: 500;
}

.navbar-nav .nav-link.active {
    color: var(--primary-color, #0d6efd);
}

.user-actions .btn-sm {
    padding: 0.25rem 0.75rem;
}

/*--------------------------------------------------------------
# Content
--------------------------------------------------------------*/
.site-content {
    padding: 2rem 0;
}

/* Hero section */
.hero {
    padding: 4rem 0;
    background: var(--gradient-primary, linear-gradient(135deg, #0052cc 0%, #007bff 100%));
}

.hero .display-3 {
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hero .lead {
    font-size: 1.25rem;
}

/* Features section */
.features .card {
    transition: transform 0.3s;
}

.features .card:hover {
    transform: translateY(-5px);
}

/* Testimonials section */
.testimonials .card {
    transition: transform 0.3s;
}

.testimonials .card:hover {
    transform: translateY(-5px);
}

.avatar img {
    object-fit: cover;
}

/* CTA section */
.cta {
    background: var(--gradient-primary, linear-gradient(135deg, #0052cc 0%, #007bff 100%));
}

/*--------------------------------------------------------------
# Sidebar
--------------------------------------------------------------*/
.widget-area {
    padding: 1.5rem;
    background-color: var(--light-color, #f8f9fa);
    border-radius: 0.375rem;
}

.widget {
    margin-bottom: 2rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--bs-border-color, #dee2e6);
}

/*--------------------------------------------------------------
# Dashboard
--------------------------------------------------------------*/
.dashboard-card {
    margin-bottom: 1.5rem;
}

.dashboard-card .card-header {
    font-weight: 600;
}

.stats-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1.2;
}

.stats-label {
    color: var(--secondary-color, #6c757d);
    font-size: 0.875rem;
    margin-bottom: 0;
}

.stats-trend {
    font-size: 0.875rem;
    font-weight: 500;
}

.stats-trend.positive {
    color: var(--success-color, #198754);
}

.stats-trend.negative {
    color: var(--danger-color, #dc3545);
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
    padding: 1.5rem 0 1rem;
    background: var(--gradient-primary, linear-gradient(135deg, #0052cc 0%, #007bff 100%));
    color: var(--white-color, #ffffff);
}

.site-footer .widget-title {
    color: var(--white-color, #ffffff);
}

.site-footer .footer-links a,
.site-footer .contact-info span,
.site-footer .site-info p,
.site-footer .site-info a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer .footer-links a:hover,
.site-footer .site-info a:hover {
    color: var(--warning-color, #ffc107);
    text-decoration: none;
}

.site-footer .social-icons a {
    color: var(--white-color, #ffffff);
    transition: var(--transition-base, all 0.3s ease);
}

.site-footer .social-icons a:hover {
    color: var(--warning-color, #ffc107);
    transform: translateY(-2px);
}

.site-footer .site-info {
    border-top-color: rgba(255, 255, 255, 0.1) !important;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
}

.site-footer a:hover {
    color: var(--white-color, #fff);
}

.site-info {
    font-size: 0.75rem;
}

.widget-title.h6 {
    margin-bottom: 0.5rem !important;
}

/*--------------------------------------------------------------
# Forms
--------------------------------------------------------------*/
.form-control:focus {
    border-color: var(--primary-color, #0d6efd);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb, 13, 110, 253), 0.25);
}

.form-label {
    font-weight: 500;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991.98px) {
    .hero {
        padding: 3rem 0;
    }
}

@media (max-width: 767.98px) {
    .hero {
        padding: 2rem 0;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

/* Grafik stileri */
.chart-container {
    position: relative;
    min-height: 300px;
    width: 100%;
    margin: 0 auto;
}

canvas#incomeExpenseChart,
canvas#expenseCategoriesChart,
canvas#incomeSourcesChart {
    width: 100% !important;
    height: 100% !important;
    max-height: 300px;
}

.chart-error {
    padding: 20px;
    text-align: center;
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 15px 0;
}

/* Bütçe Sayfası Stilleri */
.budget-empty {
    padding: 2rem;
    text-align: center;
}

.budget-info .row {
    margin-bottom: 1rem;
}

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

.category-budget-item {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.category-budget-item .progress {
    height: 10px;
    border-radius: 5px;
    margin-top: 0.5rem;
}

.budget-info-card {
    border-left: 4px solid;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.budget-info-card.budget-total-card {
    border-left-color: #0d6efd;
}

.budget-info-card.budget-spent-card {
    border-left-color: #dc3545;
}

.budget-info-card.budget-remaining-card {
    border-left-color: #198754;
}

.budget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.budget-category-header {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.budget-period-selector {
    margin-bottom: 1.5rem;
}

/* İçerik genişliği ve ortalama ayarları */
.site-main .container > .row:not(.no-center) {
    justify-content: center;
}

.site-main .container > .row:not(.no-center) > .col-12 {
    max-width: 83.333333%;
}

@media (min-width: 992px) {
    .site-main .container > .row:not(.no-center) > .col-12 {
        max-width: 83.333333%;
    }
}

/* Menü öğeleri için özel stil (header.php'den taşındı) */
.finans-menu .nav-item {
    margin: 0 0.25rem;
}

.finans-menu .nav-link {
    color: var(--white-color, #fff);
    padding: 0.25rem 0.75rem;
    border-radius: 0.2rem;
    font-size: 0.875rem;
    border: 1px solid rgba(255,255,255,0.3);
    transition: var(--transition-base, all 0.3s ease);
}

.finans-menu .nav-link:hover,
.finans-menu .nav-link:focus {
    background-color: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.5);
    color: var(--white-color, #fff);
}

.finans-menu .nav-link.active,
.finans-menu .nav-item.current-menu-item > .nav-link,
.finans-menu .nav-item.current-menu-ancestor > .nav-link {
    background-color: var(--bs-warning, #ffc107);
    border-color: var(--bs-warning, #ffc107);
    color: var(--dark-color, #212529);
    font-weight: 500;
}

/* Alt menü stillerini düzelt (header.php'den taşındı) */
.finans-menu .dropdown-menu {
    background-color: var(--white-color, #fff);
    border: none;
    box-shadow: var(--shadow-lg, 0 0.5rem 1rem rgba(0,0,0,0.15));
    border-radius: 0.25rem;
    margin-top: 0.5rem;
}

.finans-menu .dropdown-item {
    padding: 0.5rem 1rem;
    color: var(--dark-color, #212529);
    font-size: 0.875rem;
    transition: background-color 0.2s ease-in-out;
}

.finans-menu .dropdown-item:hover,
.finans-menu .dropdown-item:focus {
    background-color: rgba(0,123,255,0.1);
    color: var(--primary-color, #0d6efd);
}

/*--------------------------------------------------------------
# Ana Sayfa (home.php) Stilleri
--------------------------------------------------------------*/
.dashboard-preview .chart-bars {
    height: 100px;
}

.dashboard-preview .chart-bar {
    width: 12%;
}

.dashboard-preview .progress {
    height: 8px;
}

.financial-importance .feature-icon {
    /* width: 64px; height: 64px; */ /* Bu zaten finans.css içinde .feature-icon için tanımlı, tekrar etmeye gerek yok */
    /* Eğer burada farklı bir boyut isteniyorsa, yeni bir sınıf veya ID ile hedeflenmeli */
}

/*--------------------------------------------------------------
# Breadcrumbs (inc/finans-functions.php finans_breadcrumbs() için)
--------------------------------------------------------------*/
#breadcrumbs .breadcrumb {
    /* Bootstrap tarafından gelen py-2, px-3, bg-light, border-bottom, rounded-0, mb-4 zaten uygulanıyor. */
    /* İsteğe bağlı olarak font boyutu, ayırıcı rengi vb. burada özelleştirilebilir. */
    font-size: 0.875rem; /* Biraz daha küçük font */
}

#breadcrumbs .breadcrumb-item a {
    color: var(--primary-color, #0d6efd);
    text-decoration: none;
}

#breadcrumbs .breadcrumb-item a:hover {
    color: var(--primary-dark, #0a58ca);
    text-decoration: underline;
}

#breadcrumbs .breadcrumb-item.active {
    color: var(--secondary-color, #6c757d);
}

#breadcrumbs .breadcrumb-item + .breadcrumb-item::before {
    /* Bootstrap'in kendi ayırıcısını kullanıyoruz, eğer farklı bir ayırıcı istenirse (PHP'de $separator ile tanımlanan) */
    /* content: none; /* Bootstrap ayırıcısını kaldırır */
    /* PHP'deki $separator değişkeni <i class...> içerdiği için CSS'de ::before ile ayırıcı eklemeye gerek yok. */
    /* Eğer metin tabanlı bir ayırıcı olsaydı: */
    /* float: left; */
    /* padding-right: var(--bs-breadcrumb-item-padding-x); */
    /* color: var(--bs-breadcrumb-divider-color); */
    /* content: var(--bs-breadcrumb-divider, "/"); */
}

/*--------------------------------------------------------------
# Scrolling Text (Kayan Yazı - header.php)
--------------------------------------------------------------*/
.scrolling-text-container {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    background-color: var(--primary-color, #007bff); /* Tema rengiyle uyumlu */
    color: var(--white-color, #fff);
    padding: 0.5rem 0; /* py-2 Bootstrap sınıfına ek olarak veya yerine */
    margin-bottom: 1rem; /* mb-4 Bootstrap sınıfına ek olarak veya yerine */
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.scrolling-text-content p {
    display: inline-block;
    padding-left: 100%; /* Animasyonun başlangıç pozisyonu */
    animation: scroll-left 20s linear infinite;
    margin-bottom: 0; /* p etiketinden gelen alt boşluğu kaldır */
}

/* Kayan yazı animasyonu */
@keyframes scroll-left {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%); 
        /* Metin tamamen kaybolduktan sonra tekrar etmesi için, içeriğin genişliği kadar eksi yönde hareket */
        /* Eğer metin çok uzunsa ve kesintisiz bir döngü isteniyorsa, JavaScript ile metni çoğaltmak gerekebilir. */
        /* Şimdilik basit CSS ile yapıyoruz. Metin bir kez kayar, biter ve tekrar başlar (padding-left: 100% sayesinde). */
    }
}

/*--------------------------------------------------------------
# Ana Sayfa (home.php) Stilleri
--------------------------------------------------------------*/
/* ... existing code ... */

/* Ana sayfa sarmalayıcısı için kutulu stil */
#page {
    max-width: 1200px; /* Tercihinize göre ayarlanabilir */
    margin: 0 auto;
    background-color: var(--white-color, #fff);
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative; /* Alt elemanların konumlandırması için */
}

/* ... existing code ... */

/* footer.php'den gelen hover stili */
.hover-text-warning:hover {
    color: var(--warning-color, #ffc107) !important;
}

/* Bildirim Sistemi Stilleri */
.notification-bell-container {
    position: relative;
}

.notification-badge {
    font-size: 0.6rem;
    transform: translate(-50%, -50%) !important;
}

.notifications-dropdown {
    padding: 0;
    min-width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

.notification-item {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.notification-item:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.notification-item.unread {
    background-color: rgba(0, 123, 255, 0.1);
}

.notification-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-all-read {
    font-size: 0.8rem;
    color: #0d6efd;
}

.mark-all-read:hover {
    text-decoration: underline !important;
}

.unread-indicator {
    display: flex;
    align-items: center;
}

.unread-indicator .badge {
    display: inline-block;
    width: 8px;
    height: 8px;
    padding: 0;
}

.notifications-footer {
    background-color: #f8f9fa;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
}

.notification-content {
    font-size: 0.8rem;
}

.notification-time {
    font-size: 0.75rem;
    color: #6c757d;
}

/*--------------------------------------------------------------
# Template Ortak Stilleri (Template dosyalarından taşındı)
--------------------------------------------------------------*/
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.alert {
    position: relative;
    z-index: 1050;
}

.pagination {
    justify-content: center;
    margin-bottom: 0;
}

/* Filtreler bölümü için kompakt stil */
.compact-filters .card-header {
    padding: 0.5rem 1rem;
}

.compact-filters .card-body {
    padding: 0.75rem;
}

.compact-filters .form-label {
    margin-bottom: 0.25rem;
    font-size: 0.85rem;
    font-weight: 500;
}

.compact-filters .form-select,
.compact-filters .form-control {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    min-height: unset;
    height: calc(1.5em + 0.5rem + 2px);
}

.compact-filters .btn {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
}

.compact-filters .btn-sm {
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
}

@media (max-width: 767.98px) {
    .compact-filters {
        display: none !important;
    }
    .modal-dialog {
        max-width: 75vw;
    }
} 