/* ====== STYLES FOR PENGELUARAN PAGE ====== */

/* Container */
.container-pengeluaran {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* Tab Buttons (sama seperti stock) */
.tab-buttons-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 30px 0 25px;
}

.tab-buttons {
    display: inline-flex;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    padding: 4px;
}

.tab-button {
    padding: 12px 40px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #1c3f77;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.tab-button.active {
    background: linear-gradient(135deg, #1c3f77 0%, #2a5ba8 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(28, 63, 119, 0.3);
}

.tab-button:hover:not(.active) {
    background-color: rgba(28, 63, 119, 0.08);
    transform: translateY(-1px);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-left: 4px solid #2196f3;
    padding: 14px 18px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.info-box i {
    font-size: 1.3rem;
    color: #1976d2;
}

.info-box span {
    font-size: 14px;
    color: #0d47a1;
    line-height: 1.5;
}

/* Filter Section */
.filter-section {
    background: #fff;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 20px;
}

.filter-section .form-label {
    font-weight: 600;
    color: #1c3f77;
    font-size: 13px;
    margin-bottom: 6px;
}

.filter-section .form-select,
.filter-section .form-control {
    border-radius: 8px;
    border: 1px solid #dce3ec;
    font-size: 14px;
    transition: all 0.2s ease;
    padding: 8px 12px;
}

.filter-section .form-select:focus,
.filter-section .form-control:focus {
    border-color: #1c3f77;
    box-shadow: 0 0 0 0.2rem rgba(28, 63, 119, 0.15);
    outline: none;
}

.filter-section .btn {
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.filter-section .btn-primary {
    background: linear-gradient(135deg, #1c3f77 0%, #2a5ba8 100%);
    border: none;
}

.filter-section .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 63, 119, 0.3);
}

.filter-section .btn-secondary {
    background: #6c757d;
    border: none;
}

.filter-section .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

/* Table Section */
.table-persediaan {
    width: 100%;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

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

.table-persediaan thead {
    background: linear-gradient(135deg, #f8f9fc 0%, #f1f4f9 100%);
}

.table-persediaan th {
    text-transform: uppercase;
    font-size: 12px;
    font-weight: 700;
    color: #1c3f77;
    padding: 16px 20px;
    text-align: left;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #e8edf5;
}

.table-persediaan tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f2f5;
}

.table-persediaan tbody tr:hover {
    background-color: #f8f9fd;
    transform: scale(1.001);
}

.table-persediaan tbody tr:last-child {
    border-bottom: none;
}

.table-persediaan td {
    padding: 16px 20px;
    font-size: 14px;
    color: #333;
}

/* Badge Styles */
.badge {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    display: inline-block;
}

.badge.bg-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
}

/* Button Group Actions */
.btn-group-action {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.btn-group-action .btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: 6px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.btn-group-action .btn-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: none;
}

.btn-group-action .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
}

.btn-group-action .btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: none;
}

.btn-group-action .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(220, 53, 69, 0.3);
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.2);
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.2);
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    box-shadow: 0 2px 8px rgba(23, 162, 184, 0.2);
}

.alert .badge {
    margin-right: 8px;
    margin-bottom: 4px;
}

/* Table Bottom Buttons */
.table-bottom-buttons {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    margin-top: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.left-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex: 1;
}

.top-info-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.bottom-export-button {
    display: flex;
}

.right-button {
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

/* Button Styles */
.info-button,
.add-button,
.export-button {
    border: none;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    padding: 12px 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    letter-spacing: 0.3px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.info-button {
    background: linear-gradient(135deg, #1c3f77 0%, #2a5ba8 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(28, 63, 119, 0.2);
    pointer-events: none;
}

.add-button {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
    box-shadow: 0 3px 10px rgba(40, 167, 69, 0.25);
}

.add-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(40, 167, 69, 0.35);
}

.export-button {
    background-color: #fff;
    color: #1c3f77;
    border: 2px solid #1c3f77;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.export-button:hover {
    background: linear-gradient(135deg, #1c3f77 0%, #2a5ba8 100%);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(28, 63, 119, 0.25);
}

/* Modal Styling */
.modal-content {
    border: none;
    border-radius: 16px !important;
}

.modal-header {
    border-radius: 16px 16px 0 0 !important;
    padding: 20px 24px;
    border-bottom: none;
}

.modal-body {
    padding: 24px;
}

.modal-body p {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.6;
}

.modal-body strong {
    color: #1c3f77;
    font-weight: 600;
    display: inline-block;
    min-width: 140px;
}

.modal-body h6 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-footer {
    border-top: 1px solid #e8edf5;
    padding: 16px 24px;
}

.modal-footer .btn-secondary {
    background: #6c757d;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.modal-footer .btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* Empty State */
.text-center.text-muted {
    color: #8e9cae !important;
}

.text-center .bi-inbox {
    color: #dce3ec;
}

/* Pagination */
.pagination {
    margin: 0;
}

.page-link {
    color: #1c3f77;
    border: 1px solid #dce3ec;
    border-radius: 8px;
    margin: 0 4px;
    padding: 8px 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.page-link:hover {
    background: #f8f9fd;
    border-color: #1c3f77;
    color: #1c3f77;
}

.page-item.active .page-link {
    background: linear-gradient(135deg, #1c3f77 0%, #2a5ba8 100%);
    border-color: #1c3f77;
}

/* Responsive Design */
@media (max-width: 992px) {
    .container-pengeluaran {
        padding: 0 15px;
    }

    .table-persediaan th,
    .table-persediaan td {
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .tab-buttons {
        width: 100%;
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        padding: 14px 20px;
        text-align: center;
    }

    .filter-section .d-flex {
        flex-direction: column;
    }

    .filter-section .form-group {
        width: 100%;
        margin-bottom: 15px;
    }

    .filter-section .btn {
        width: 100%;
        margin-bottom: 8px;
    }

    .table-bottom-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .left-buttons,
    .right-button {
        width: 100%;
    }

    .right-button {
        justify-content: stretch;
    }

    .add-button {
        width: 100%;
        margin-top: 0;
    }

    .top-info-buttons {
        flex-direction: column;
    }

    .info-button,
    .export-button {
        width: 100%;
        text-align: center;
    }

    .table-persediaan {
        overflow-x: auto;
    }

    .table-persediaan table {
        min-width: 800px;
    }

    .btn-group-action {
        flex-direction: column;
    }

    .btn-group-action .btn-sm {
        width: 100%;
    }

    .info-box {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tab-button {
        font-size: 13px;
        padding: 12px 16px;
    }

    .table-persediaan th,
    .table-persediaan td {
        padding: 10px 12px;
        font-size: 12px;
    }

    .info-button,
    .add-button,
    .export-button {
        font-size: 12px;
        padding: 10px 18px;
    }
}

/* Print Styles */
@media print {
    .tab-buttons-wrapper,
    .filter-section,
    .table-bottom-buttons,
    .btn-group-action,
    .pagination,
    .info-box,
    .alert {
        display: none !important;
    }

    .table-persediaan {
        box-shadow: none;
    }

    .table-persediaan table {
        border: 1px solid #000;
    }

    .table-persediaan th,
    .table-persediaan td {
        border: 1px solid #000;
        padding: 8px;
    }
}
