<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Registro de Gastos - Estética Avanzada</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;600&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Poppins', sans-serif;
            background: linear-gradient(to right, #ece9e6, #ffffff);
            color: #333;
            overflow-x: hidden;
            background-image: url('fondo.jpg'); /* Imagen de fondo personalizada */
            background-size: cover;
            background-attachment: fixed;
        }
        .container {
            background-color: #ffffffcc;
            border-radius: 10px;
            padding: 20px;
            margin-top: 50px;
            box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.1);
        }
        .title {
            font-size: 1.8em;
            font-weight: 600;
            text-align: center;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #007bff;
        }
        .title span {
            font-size: 2em;
            margin-right: 10px;
        }
        .form-group input, .form-group select {
            background-color: #ffffffcc;
            border: none;
            box-shadow: inset 0px 0px 5px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }
        .form-group input:focus, .form-group select:focus {
            box-shadow: 0px 0px 8px rgba(0, 123, 255, 0.5);
        }
        .table-responsive {
            max-height: 300px;
            overflow-x: auto;
            border: 1px solid #ddd;
            margin-top: 20px;
            border-radius: 5px;
            background: #ffffffcc;
        }
        .table-hover tbody tr:hover {
            background-color: rgba(0, 123, 255, 0.1);
            transition: background-color 0.3s ease;
        }
        .animated-icon {
            font-size: 2em;
            transition: transform 0.3s ease;
            color: #007bff;
        }
        .animated-icon:hover {
            transform: rotate(360deg);
        }
        .table-info {
            background-color: rgba(0, 123, 255, 0.2);
            color: #007bff;
        }
        /* Microinteractions */
        .form-group input, .form-group select, .table th, .table td {
            transition: transform 0.2s ease;
        }
        .form-group input:hover, .form-group select:hover, .table th:hover, .table td:hover {
            transform: scale(1.05);
        }
    </style>
</head>
<body>
<div class="container">

    <div class="row">
        <div class="col">
            <?php
            date_default_timezone_set("America/Lima"); 
            include 'conexion1.php';
            if (!empty($_GET["columna"])) { $designa1 = $_GET["columna"]; }
            if (!empty($_GET["buscarfecha"])) { $columna2 = $_GET["buscarfecha"]; }
            if (!empty($_GET["serie_correlativo"])) { $columna2 = $_GET["serie_correlativo"]; }
            $conectar = mysqli_connect($servidor, $nombre, $clave, $base);
            $sql = "SELECT * FROM gastos WHERE $designa1='$columna2'";
            $result = mysqli_query($conectar, $sql);
            ?>
            <div class="table-responsive">
                <table class="table table-striped table-bordered table-hover">
                    <thead>
                        <tr class="table-info">
                            <td>ID</td>
                            <td>FECHA_REGISTRO</td>
                            <td>HORA_REGISTRO</td>
                            <td>TIPO_DOCUMENTO</td>
                            <td>SERIE_CORRELATIVO</td>
                            <td>FECHA_EMISION</td>
                            <td>DNI_RUC</td>
                            <td>NOMBRE_PROVEEDOR</td>
                            <td>DIRECCION</td>
                            <td>CODIGO_PRO_SER</td>
                            <td>PRODUCTO_SERVICIO</td>
                            <td>CANTIDAD</td>
                            <td>SUB_TOTAL</td>
                            <td>IGV</td>
                            <td>IMPORTE_TOTAL</td>
                        </tr>
                    </thead>
                    <tbody>
                        <?php while ($mostrar = mysqli_fetch_array($result)) { ?>
                        <tr>
                            <td><?php echo $mostrar["ID"] ?></td>
                            <td><?php echo $mostrar["FECHA_REGISTRO"] ?></td>
                            <td><?php echo $mostrar["HORA_REGISTRO"] ?></td>
                            <td><?php echo $mostrar["TIPO_DOCUMENTO"] ?></td>
                            <td><?php echo $mostrar["SERIE_CORRELATIVO"] ?></td>
                            <td><?php echo $mostrar["FECHA_EMISION"] ?></td>
                            <td><?php echo $mostrar["DNI_RUC"] ?></td>
                            <td><?php echo $mostrar["NOMBRE_PROVEEDOR"] ?></td>
                            <td><?php echo $mostrar["DIRECCION"] ?></td>
                            <td><?php echo $mostrar["CODIGO_PRO_SER"] ?></td>
                            <td><?php echo $mostrar["PRODUCTO_SERVICIO"] ?></td>
                            <td><?php echo $mostrar["CANTIDAD"] ?></td>
                            <td><?php echo $mostrar["SUB_TOTAL"] ?></td>
                            <td><?php echo $mostrar["IGV"] ?></td>
                            <td><?php echo $mostrar["IMPORTE_TOTAL"] ?></td>
                        </tr>
                        <?php } ?>
                    </tbody>
                </table>
            </div>
        </div>
    </div>
</div>

<script src="https://code.jquery.com/jquery-3.4.1.slim.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
</body>
</html>
