/* Responsive (Mobil Uyumlu) Tasarım */

/* Tablet ve altı */
@media (max-width: 1024px) {
    .layout {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }
    
    .sidebar.show {
        left: 0;
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 60px 15px 15px 15px;
    }
    
    /* Mobil header */
    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: var(--card-bg);
        box-shadow: var(--shadow);
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 999;
    }
    
    .mobile-header h1 {
        font-size: 18px;
        margin: 0;
    }
    
    .menu-toggle {
        background: var(--primary-color);
        color: white;
        border: none;
        padding: 10px 15px;
        border-radius: var(--border-radius);
        cursor: pointer;
        font-size: 20px;
        display: flex;
        align-items: center;
        gap: 5px;
    }
    
    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    /* Stats grid mobilde tek sütun */
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* Dashboard widgets */
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .widget-wide {
        grid-column: span 1;
    }
    
    /* Form row mobilde tek sütun */
    .form-row {
        flex-direction: column;
    }
    
    .form-group {
        width: 100% !important;
    }
    
    /* Tablo kaydırma */
    .card-body {
        overflow-x: auto;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Butonlar */
    .header-actions {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }
    
    .header-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Modal tam ekran */
    .modal-content {
        width: 95%;
        max-width: 95%;
        max-height: 90vh;
        overflow-y: auto;
        margin: 20px auto;
    }
    
    /* Filtreler */
    .filters {
        flex-direction: column;
        gap: 10px;
    }
    
    .filters input,
    .filters select {
        width: 100%;
    }
}

/* Mobil telefon */
@media (max-width: 600px) {
    .content-header h1 {
        font-size: 20px;
    }
    
    .stat-card {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    /* Tablo aksiyonları dikey */
    .table-actions {
        flex-direction: column;
        gap: 5px;
    }
    
    .table-actions button {
        width: 100%;
    }
    
    /* Card padding küçült */
    .card {
        padding: 10px;
    }
    
    .card-header,
    .card-body {
        padding: 15px 10px;
    }
    
    /* Widget padding */
    .widget {
        padding: 15px;
    }
    
    /* Form padding */
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Buton boyutları */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    /* Navbar küçük */
    .sidebar-nav .nav-item {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .sidebar-nav .icon {
        font-size: 18px;
    }
    
    /* Fatura print mobilde de çalışsın */
    .fatura-print {
        padding: 10px;
    }
    
    .fatura-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .fatura-bilgi {
        text-align: left;
    }
    
    .taraflar {
        grid-template-columns: 1fr;
    }
}

/* Landscape modda tablet */
@media (max-width: 1024px) and (orientation: landscape) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        padding: 15px;
    }
}

/* Touch özellikler */
@media (hover: none) and (pointer: coarse) {
    /* Touch cihazlar için */
    .btn,
    .nav-item,
    button {
        min-height: 44px; /* Apple önerisi */
        min-width: 44px;
    }
    
    /* Hover efektleri kaldır */
    .btn:hover,
    .nav-item:hover {
        transform: none;
    }
    
    /* Active state göster */
    .btn:active {
        transform: scale(0.95);
    }
    
    /* Kaydırma iyileştirmeleri */
    .card-body,
    .modal-content {
        -webkit-overflow-scrolling: touch;
    }
}

/* Küçük ekran için sidebar scroll */
@media (max-height: 600px) {
    .sidebar-nav {
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }
}

/* Login sayfası mobil */
@media (max-width: 600px) {
    .login-container {
        padding: 20px;
    }
    
    .login-box {
        padding: 20px;
        border-radius: 10px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 14px;
    }
    
    .form-group input {
        font-size: 16px; /* iOS zoom engellemek için */
    }
}

/* Mobil header gizle - desktop */
@media (min-width: 1025px) {
    .mobile-header {
        display: none !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
}
