<?php include_once "encabezado1.php"; ?>

<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <title>Registrar Transacción</title>
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css">
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            background-color: #f4f6f9;
            font-family: 'Roboto', sans-serif;
            color: #495057;
        }
        .container {
            margin-top: 50px;
            background-color: #ffffff;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
            max-width: 600px;
            transition: transform 0.3s ease;
        }
        .container:hover {
            transform: scale(1.01);
        }
        h2 {
            color: #007bff;
            font-weight: 700;
            margin-bottom: 25px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .form-group label {
            font-weight: 500;
            color: #495057;
            display: flex;
            align-items: center;
            gap: 5px;
        }
        .form-control {
            border-radius: 8px;
            transition: box-shadow 0.3s;
        }
        .form-control:focus {
            box-shadow: 0px 0px 8px rgba(0, 123, 255, 0.3);
            border-color: #007bff;
        }
        .btn-primary {
            background-color: #007bff;
            border: none;
            font-weight: 500;
            transition: background-color 0.3s, transform 0.3s;
        }
        .btn-primary:hover {
            background-color: #0056b3;
            transform: translateY(-2px);
        }
        .btn-primary i {
            margin-right: 5px;
        }
        .form-group label i {
            color: #007bff;
        }
    </style>
</head>
<body>
    <div class="container">
        <h2><i class="fas fa-plus-circle"></i> Registrar Transacción</h2>
        <form action="guardar_transaccion.php" method="POST">
            <div class="form-group">
                <label><i class="fas fa-exchange-alt"></i> Tipo de Transacción</label>
                <select name="tipo" class="form-control" required>
                    <option value="Cuenta por Cobrar">Cuenta por Cobrar</option>
                    <option value="Cuenta por Pagar">Cuenta por Pagar</option>
                </select>
            </div>
            <div class="form-group">
                <label><i class="fas fa-user"></i> Cliente/Proveedor</label>
                <input type="text" name="cliente_proveedor" class="form-control" placeholder="Nombre del cliente o proveedor" required>
            </div>
            <div class="form-group">
                <label><i class="fas fa-calendar-alt"></i> Fecha</label>
                <input type="date" name="fecha" class="form-control" required>
            </div>
            <div class="form-group">
                <label><i class="fas fa-dollar-sign"></i> Monto</label>
                <input type="number" name="monto" class="form-control" step="0.01" placeholder="Ingrese el monto" required>
            </div>
            <div class="form-group">
                <label><i class="fas fa-align-left"></i> Descripción</label>
                <textarea name="descripcion" class="form-control" rows="3" placeholder="Agregue una descripción (opcional)"></textarea>
            </div>
            <button type="submit" class="btn btn-primary btn-block"><i class="fas fa-save"></i> Guardar</button>
        </form>
    </div>

    <!-- Scripts de Bootstrap y jQuery -->
    <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>