/* Mobile Responsive CSS untuk Sistem Informasi Anggota PKS */

/* Mobile First Approach */
@media (max-width: 576px) {
    /* Container adjustments */
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Typography */
    h1 { font-size: 1.25rem; }
    h2 { font-size: 1.1rem; }
    h3 { font-size: 1rem; }
    h4 { font-size: 0.9rem; }
    h5 { font-size: 0.85rem; }
    h6 { font-size: 0.8rem; }
    
    /* Cards */
    .card {
        margin-bottom: 0.75rem;
        border-radius: 0.5rem;
    }
    
    .card-header {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    /* Buttons */
    .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .btn-sm {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Forms */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.5rem 0.75rem;
    }
    
    .form-label {
        font-size: 0.8rem;
        font-weight: 600;
        margin-bottom: 0.25rem;
    }
    
    /* Tables */
    .table {
        font-size: 0.7rem;
    }
    
    .table th,
    .table td {
        padding: 0.25rem 0.125rem;
        vertical-align: middle;
    }
    
    /* Badges */
    .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    /* Alerts */
    .alert {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    /* Pagination */
    .pagination {
        font-size: 0.7rem;
        justify-content: center;
    }
    
    .pagination .page-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.7rem;
        margin: 0.1rem;
    }
    
    /* Stats cards */
    .stats-card {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .stats-number {
        font-size: 1.5rem;
    }
    
    .stats-icon {
        font-size: 1.75rem;
    }
    
    .stats-label {
        font-size: 0.7rem;
    }
    
    /* Quick action cards */
    .quick-action-card {
        padding: 1rem 0.75rem;
        margin-bottom: 0.75rem;
    }
    
    .quick-action-icon {
        font-size: 1.75rem;
        margin-bottom: 0.5rem;
    }
    
    .quick-action-card h6 {
        font-size: 0.8rem;
        margin-bottom: 0.25rem;
    }
    
    .quick-action-card p {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }
    
    /* Chart containers */
    .chart-container {
        height: 180px;
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-header {
        padding: 0.75rem;
    }
    
    .modal-body {
        padding: 0.75rem;
    }
    
    .modal-footer {
        padding: 0.75rem;
    }
}

/* Tablet adjustments */
@media (min-width: 577px) and (max-width: 768px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .stats-number {
        font-size: 2rem;
    }
    
    .stats-icon {
        font-size: 2.25rem;
    }
    
    .quick-action-icon {
        font-size: 2.25rem;
    }
    
    .chart-container {
        height: 220px;
    }
    
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.375rem 0.25rem;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .sidebar {
        width: 250px;
    }
    
    .chart-container {
        height: 150px;
    }
    
    .stats-card {
        padding: 0.5rem;
    }
    
    .quick-action-card {
        padding: 0.75rem;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .dropdown-item {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    /* Improve form usability */
    .form-control:focus,
    .form-select:focus {
        box-shadow: 0 0 0 0.2rem rgba(255, 87, 34, 0.25);
        border-color: #FF5722;
    }
    
    /* Better spacing for mobile */
    .mb-4 { margin-bottom: 1rem !important; }
    .mb-3 { margin-bottom: 0.75rem !important; }
    .py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }
    .py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
    
    /* Mobile table improvements */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
    }
    
    /* Mobile navigation improvements */
    .navbar-toggler {
        border: 2px solid #FF5722;
        padding: 0.5rem;
    }
    
    .navbar-toggler:focus {
        box-shadow: 0 0 0 0.25rem rgba(255, 87, 34, 0.25);
    }
    
    /* Mobile sidebar improvements */
    .sidebar {
        box-shadow: 2px 0 15px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar .nav-link {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .sidebar .nav-link i {
        width: 24px;
        font-size: 1.1rem;
    }
}

/* Print styles for mobile */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        font-size: 0.8rem;
    }
}
