* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    transition: background 0.5s ease;
}

/* Sayfa spesifik arka plan renkleri */
body.index-page {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
}

body.gelir-page {
    background: linear-gradient(135deg, #e8f5e8 0%, #e0f2f1 100%);
}

body.gider-page {
    background: linear-gradient(135deg, #ffebee 0%, #fce4ec 100%);
}

body.raporlar-page {
    background: linear-gradient(135deg, #fff3e0 0%, #fff8e1 100%);
}

body.kullanicilar-page {
    background: linear-gradient(135deg, #f3e5f5 0%, #e1f5fe 100%);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    transition: all 0.5s ease;
}

/* Sayfa spesifik container border renkleri */
body.index-page .container {
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

body.gelir-page .container {
    border-color: #27ae60;
    box-shadow: 0 0 0 2px rgba(39, 174, 96, 0.2);
}

body.gider-page .container {
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.2);
}

body.raporlar-page .container {
    border-color: #f39c12;
    box-shadow: 0 0 0 2px rgba(243, 156, 18, 0.2);
}

body.kullanicilar-page .container {
    border-color: #9b59b6;
    box-shadow: 0 0 0 2px rgba(155, 89, 182, 0.2);
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    transition: opacity 0.3s;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-success {
    background: #27ae60;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn:hover {
    opacity: 0.8;
}

.nav-tabs {
    display: flex;
    gap: 1px;
    background: #f8f9fa;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.nav-tab {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #666;
    transition: all 0.3s;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.nav-tab:hover {
    color: white;
    transform: translateY(-1px);
}

/* Ana Sayfa Butonu */
.nav-tab:nth-child(1) {
    background: #3498db;
    color: white;
}

.nav-tab:nth-child(1):hover {
    background: #2980b9;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.nav-tab:nth-child(1).active {
    background: #2980b9;
    color: white;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

/* Gelir Ekle Butonu */
.nav-tab:nth-child(2) {
    background: #27ae60;
    color: white;
}

.nav-tab:nth-child(2):hover {
    background: #229954;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

.nav-tab:nth-child(2).active {
    background: #229954;
    color: white;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
}

/* Gider Ekle Butonu */
.nav-tab:nth-child(3) {
    background: #e74c3c;
    color: white;
}

.nav-tab:nth-child(3):hover {
    background: #c0392b;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

.nav-tab:nth-child(3).active {
    background: #c0392b;
    color: white;
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4);
}

/* Raporlar Butonu */
.nav-tab:nth-child(4) {
    background: #f39c12;
    color: white;
}

.nav-tab:nth-child(4):hover {
    background: #e67e22;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

.nav-tab:nth-child(4).active {
    background: #e67e22;
    color: white;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

/* Mobil Navigasyon */
@media (max-width: 768px) {
    .nav-tabs {
        gap: 0 !important;
        padding: 0 !important;
        background: #f8f9fa !important;
        border-radius: 0 !important;
        margin: 0 !important;
        display: flex !important;
        flex-direction: row !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
        overflow: hidden !important;
        position: sticky !important;
        top: 0 !important;
        z-index: 1000 !important;
    }
    
    .nav-tab {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
        width: auto !important;
        padding: 12px 4px !important;
        font-size: 20px !important;
        border-radius: 6px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        white-space: nowrap !important;
    }
    
    .nav-tab i {
        font-size: 18px !important;
    }
    
    .nav-tab span {
        display: none !important;
    }
    
    .nav-tab:hover {
        transform: translateY(-1px) !important;
    }
    
    /* Mobilde renkleri koru */
    .nav-tab:nth-child(1) {
        background: #3498db !important;
        color: white !important;
    }
    
    .nav-tab:nth-child(1):hover,
    .nav-tab:nth-child(1).active {
        background: #2980b9 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4) !important;
    }
    
    .nav-tab:nth-child(2) {
        background: #27ae60 !important;
        color: white !important;
    }
    
    .nav-tab:nth-child(2):hover,
    .nav-tab:nth-child(2).active {
        background: #229954 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4) !important;
    }
    
    .nav-tab:nth-child(3) {
        background: #e74c3c !important;
        color: white !important;
    }
    
    .nav-tab:nth-child(3):hover,
    .nav-tab:nth-child(3).active {
        background: #c0392b !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(231, 76, 60, 0.4) !important;
    }
    
    .nav-tab:nth-child(4) {
        background: #f39c12 !important;
        color: white !important;
    }
    
    .nav-tab:nth-child(4):hover,
    .nav-tab:nth-child(4).active {
        background: #e67e22 !important;
        color: white !important;
        box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4) !important;
    }
    
    /* Tooltip için */
    .nav-tab::after {
        content: attr(data-tooltip) !important;
        position: absolute !important;
        bottom: -30px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background: #333 !important;
        color: white !important;
        padding: 4px 8px !important;
        border-radius: 4px !important;
        font-size: 12px !important;
        white-space: nowrap !important;
        opacity: 0 !important;
        pointer-events: none !important;
        transition: opacity 0.3s !important;
        z-index: 1000 !important;
    }
    
    .nav-tab:hover::after {
        opacity: 1 !important;
    }
}

/* Raporlar Sayfası Mobil Uyumluluğu */
@media (max-width: 768px) {
    .filters {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .filter-tabs {
        flex-direction: column !important;
        margin-bottom: 15px !important;
    }
    
    .filter-tab {
        padding: 12px 15px !important;
        margin-bottom: 2px !important;
        border-radius: 5px !important;
    }
    
    .filter-tab.active {
        border-bottom: none !important;
        background: #3498db !important;
        color: white !important;
    }
    
    .filter-row {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .filter-group {
        min-width: auto !important;
        width: 100% !important;
    }
    
    .summary-box {
        padding: 15px !important;
        margin-bottom: 15px !important;
    }
    
    .summary-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
        margin-top: 15px !important;
    }
    
    .summary-item {
        padding: 12px !important;
    }
    
    .summary-item h4 {
        font-size: 13px !important;
    }
    
    .amount {
        font-size: 16px !important;
    }
    
    .table-container {
        margin-bottom: 15px !important;
    }
    
    .table-header {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
    
    th, td {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    
    .category-item {
        padding: 12px 15px !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 5px !important;
    }
    
    .category-name {
        font-size: 13px !important;
    }
    
    .category-amount {
        font-size: 14px !important;
        align-self: flex-end !important;
    }
    
    .no-data {
        padding: 20px !important;
        font-size: 13px !important;
    }
    
    /* Grid layout mobilde alt alta */
    div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
}

@media (max-width: 480px) {
    .filters {
        padding: 10px !important;
    }
    
    .filter-tab {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    
    .summary-box {
        padding: 10px !important;
    }
    
    .summary-item {
        padding: 10px !important;
    }
    
    .amount {
        font-size: 14px !important;
    }
    
    .table-header {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }
    
    th, td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }
}

/* Popup Stilleri */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    animation: popupSlide 0.3s ease-out;
}

@keyframes popupSlide {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border-radius: 12px 12px 0 0;
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.popup-form {
    padding: 25px;
}

.popup-form .form-group {
    margin-bottom: 20px;
}

.popup-form .form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.popup-form .form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    box-sizing: border-box;
}

.popup-form .form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.popup-form .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

.popup-form .form-actions .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.popup-form .form-actions .btn-success {
    background: #27ae60;
    color: white;
}

.popup-form .form-actions .btn-success:hover {
    background: #229954;
    transform: translateY(-1px);
}

.popup-form .form-actions .btn-secondary {
    background: #95a5a6;
    color: white;
}

.popup-form .form-actions .btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
}

/* Popup Mobil */
@media (max-width: 768px) {
    .popup-content {
        width: 95%;
        max-height: 85vh;
        top: 45%;
        margin: 0;
    }
    
    .popup-header {
        padding: 12px 15px;
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
        margin-bottom: 10px;
    }
    
    .popup-title {
        font-size: 16px;
    }
    
    .popup-close {
        font-size: 20px;
        width: 28px;
        height: 28px;
        padding: 0;
    }
    
    .popup-form {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .popup-form .form-group {
        margin-bottom: 12px;
    }
    
    .popup-form .form-group label {
        font-size: 14px;
        margin-bottom: 4px;
    }
    
    .popup-form .form-group input {
        padding: 10px;
        font-size: 14px;
        height: 40px;
    }
    
    .popup-form .form-actions {
        flex-direction: column;
        gap: 8px;
        position: sticky;
        bottom: 0;
        background: white;
        padding: 10px 0;
        margin-top: 15px;
    }
    
    .popup-form .form-actions .btn {
        width: 100%;
        justify-content: center;
        padding: 12px;
        margin: 0;
        height: 45px;
    }
}

/* Footer */
footer {
    background: #2c3e50;
    color: white;
    padding: 20px 0;
    margin-top: 40px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left .logo {
    color: white;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.footer-left p {
    margin: 0 0 10px 0;
    color: #bdc3c7;
    font-size: 14px;
}

.footer-left .btn {
    margin-top: 10px;
    margin-right: 10px;
}

.footer-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.btn-info {
    background: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    transform: translateY(-1px);
}

.footer-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-details {
    display: flex;
    align-items: center;
    gap: 8px;
    color: white;
    font-size: 14px;
}

.user-details i {
    color: #3498db;
}

.admin-badge {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 5px;
}

/* Footer Mobil */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-left .logo {
        font-size: 16px;
    }
    
    .footer-left p {
        font-size: 12px;
    }
    
    .footer-right {
        justify-content: center;
    }
    
    .user-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .user-details {
        justify-content: center;
        font-size: 13px;
    }
    
    .admin-badge {
        font-size: 10px;
        padding: 2px 6px;
    }
}

.nav-tab.active:hover {
    background: #2980b9;
}

.filters {
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filter-row {
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
}

.filter-group label {
    margin-bottom: 5px;
    font-weight: bold;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #3498db;
}

.summary-box {
    background: white;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.summary-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #2c3e50;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    transition: transform 0.3s;
}

.summary-item:hover {
    transform: translateY(-2px);
}

.summary-item h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.summary-item .amount {
    font-size: 20px;
    font-weight: bold;
}

.amount.positive {
    color: #27ae60;
}

.amount.negative {
    color: #e74c3c;
}

.amount.neutral {
    color: #2c3e50;
}

.table-container {
    background: white;
    border-radius: 5px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

.table-header {
    background: #34495e;
    color: white;
    padding: 15px;
    font-weight: bold;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: bold;
    font-size: 14px;
}

tr:hover {
    background: #f8f9fa;
}

.gelir {
    color: #27ae60;
    font-weight: bold;
}

.gider {
    color: #e74c3c;
    font-weight: bold;
}

.category-list {
    list-style: none;
}

.category-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.3s;
}

.category-item:hover {
    background: #f8f9fa;
    padding-left: 5px;
}

.category-item:last-child {
    border-bottom: none;
}

.category-name {
    font-weight: 500;
}

.category-amount {
    font-weight: bold;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.form-container {
    background: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.form-title {
    font-size: 24px;
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.hata {
    background: #e74c3c;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
}

.odeme-tipi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.odeme-tipi-card {
    border: 2px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.odeme-tipi-card:hover {
    border-color: #3498db;
}

.odeme-tipi-card.selected {
    border-color: #3498db;
    background: #e3f2fd;
}

.odeme-tipi-card input[type="radio"] {
    display: none;
}

.odeme-tipi-card .icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.stats-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.stat-card .value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.stat-card .trend {
    font-size: 12px;
    color: #999;
}

.stat-card.success .value {
    color: #27ae60;
}

.stat-card.danger .value {
    color: #e74c3c;
}

.stat-card.primary .value {
    color: #3498db;
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    th, td {
        padding: 8px;
        font-size: 13px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .odeme-tipi-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .filters {
        padding: 15px;
    }
    
    .form-container {
        padding: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
}
