/* Responsive CSS untuk Mobile */
@media (max-width: 768px) {
    /* Admin Panel Sidebar */
    .sidebar {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 15px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .sidebar .nav-link {
        padding: 12px 15px;
        font-size: 0.9rem;
        border-bottom: 1px solid #e0e0e0;
    }

    .sidebar .nav-link.active {
        border-left: none;
        border-bottom: 3px solid #4A90E2;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
    }

    .stats-card {
        margin-bottom: 15px;
        padding: 15px;
    }

    .stats-card h3 {
        font-size: 1.8rem;
    }

    .stats-card p {
        font-size: 0.85rem;
    }

    .content-section h3 {
        font-size: 1.1rem;
    }

    /* Admin Tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Hide less important columns on mobile */
    .table th:nth-child(4),
    .table td:nth-child(4),
    .table th:nth-child(5),
    .table td:nth-child(5) {
        display: none;
    }

    /* Stack action buttons vertically */
    .table td form {
        display: block;
        margin-bottom: 5px;
    }

    .table td .btn {
        width: 100%;
        margin-bottom: 3px;
    }
    /* Header Official */
    .header-official {
        padding: 8px 0;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .header-logo {
        height: 40px;
    }

    .header-text h1 {
        font-size: 0.85rem;
    }

    .header-text p {
        font-size: 0.7rem;
    }

    .header-buttons {
        width: 100%;
        justify-content: center;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        padding: 6px 15px;
        font-size: 0.8rem;
    }

    /* Navbar */
    .navbar-brand {
        font-size: 0.85rem;
        flex-direction: column;
        gap: 5px;
    }

    .navbar-brand img {
        height: 35px;
    }

    .navbar .user-info {
        font-size: 0.8rem;
        display: none;
    }

    .navbar .btn-logout {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Cards */
    .card {
        margin-bottom: 15px;
    }

    .card-header h5 {
        font-size: 0.9rem;
    }

    .card-body {
        padding: 1rem;
    }

    /* Info Section */
    .info-section {
        padding: 12px;
        margin-bottom: 12px;
    }

    .info-section h4 {
        font-size: 0.9rem;
    }

    .info-section h3 {
        font-size: 1rem;
    }

    .info-section p {
        font-size: 0.75rem;
    }

    .info-item {
        font-size: 0.8rem;
        padding: 6px 0;
    }

    .info-item i {
        width: 25px;
        height: 25px;
        font-size: 0.75rem;
    }

    /* Table */
    .table-responsive {
        font-size: 0.75rem;
        max-height: 400px;
    }

    .table thead th {
        padding: 8px 5px;
        font-size: 0.7rem;
    }

    .table tbody td {
        padding: 8px 5px;
        font-size: 0.75rem;
    }

    /* Hide columns on mobile */
    .table th:nth-child(3),
    .table td:nth-child(3),
    .table th:nth-child(4),
    .table td:nth-child(4) {
        display: none;
    }

    /* Buttons */
    .btn-sm {
        padding: 4px 8px;
        font-size: 0.7rem;
    }

    .action-buttons {
        flex-direction: column;
        gap: 5px;
    }

    .action-buttons .btn {
        width: 100%;
        font-size: 0.75rem;
    }

    /* Forms */
    .form-label {
        font-size: 0.85rem;
    }

    .form-control,
    .form-select {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    /* Login & Register Cards */
    .login-card,
    .register-card {
        margin: 10px;
    }

    .logo-section {
        padding: 20px;
    }

    .logo-section img {
        max-width: 70px;
    }

    .logo-section h4 {
        font-size: 1rem;
    }

    .logo-section p {
        font-size: 0.8rem;
    }

    .form-section {
        padding: 20px;
    }

    .form-section h3 {
        font-size: 1.2rem;
    }

    /* Dashboard Layout */
    .col-md-4,
    .col-md-8 {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Admin Panel */
    .sidebar {
        position: static !important;
        width: 100% !important;
        height: auto !important;
        margin-bottom: 15px;
    }

    .sidebar .nav-link {
        padding: 10px;
        font-size: 0.85rem;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 15px !important;
    }

    .stats-card {
        margin-bottom: 10px;
    }

    .stats-card h3 {
        font-size: 1.5rem;
    }

    .stats-card p {
        font-size: 0.8rem;
    }

    /* Upload Section */
    .upload-history {
        font-size: 0.8rem;
    }

    .upload-history .table td {
        font-size: 0.75rem;
        padding: 6px 4px;
    }

    /* Navbar Mobile Improvements */
    .navbar-brand span {
        display: block;
        font-size: 0.75rem;
    }

    .navbar .d-flex {
        flex-direction: column;
        gap: 5px;
    }

    /* Card improvements for mobile */
    .row > [class*='col-'] {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Better spacing for mobile */
    .mt-4 {
        margin-top: 1rem !important;
    }

    .mb-4 {
        margin-bottom: 1rem !important;
    }

    /* Improve button groups */
    .btn-group {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .btn-group .btn {
        width: 100%;
        margin-bottom: 5px;
    }

    /* Footer */
    footer {
        padding: 15px 0;
        font-size: 0.75rem;
    }

    /* Container */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Badges */
    .badge-aktif,
    .badge-tidak-aktif {
        font-size: 0.65rem;
        padding: 3px 8px;
    }

    /* Alert */
    .alert {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }

    /* Cetak Page */
    @media print {
        body {
            font-size: 10pt;
        }
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-text h1 {
        font-size: 0.95rem;
    }

    .table thead th,
    .table tbody td {
        font-size: 0.85rem;
        padding: 10px 8px;
    }

    .card-body {
        padding: 1.5rem;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .header-text h1 {
        font-size: 0.75rem;
    }

    .header-text p {
        font-size: 0.65rem;
    }

    .btn-primary-custom,
    .btn-outline-custom {
        padding: 5px 10px;
        font-size: 0.7rem;
    }

    .table-responsive {
        font-size: 0.7rem;
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .form-control,
    .form-select {
        font-size: 0.8rem;
    }

    .navbar-brand {
        font-size: 0.75rem;
    }

    .navbar-brand img {
        height: 30px;
    }

    .card-header h5 {
        font-size: 0.85rem;
    }

    .btn {
        font-size: 0.75rem;
        padding: 8px 12px;
        min-height: 44px;
    }

    .mb-3 {
        margin-bottom: 0.75rem !important;
    }

    .alert {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .info-section i.fa-3x {
        font-size: 1.5rem !important;
    }
}
