        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            padding: 20px;
            background-color: #f0f2f5;
            min-height: 100vh;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 30px;
            background: linear-gradient(145deg, #ffffff, #f5f5f5);
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }

        .header-text {
            flex-grow: 1;
        }

        .header-text h1 {
            color: #2c3e50;
            font-weight: bold; 
            font-size: 32px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .header-text h2 {
            color: #34495e;
            font-size: 20px;
            font-weight: 400;
        }

        .logo {
            width: 100px;
            height: 100px;
            border-radius: 50%;
            overflow: hidden; /* Para mantener la imagen dentro del círculo */
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            margin-left: 20px;
        }
        
        .logo img {
            width: 100%;
            height: 100%;
            object-fit: cover; /* Asegura que la imagen cubra todo el espacio sin deformarse */
        }

        .logo {
            width: 100px;
            height: 100px;
            background: linear-gradient(145deg, #3498db, #2980b9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 32px;
            font-weight: 600;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            margin-left: 20px;
        }

        .form-container {
            background: #ffffff;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .form-group {
            margin-bottom: 25px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #2c3e50;
            font-weight: 500;
            font-size: 16px;
        }

        input[type="text"],
        input[type="date"],
        input[type="number"] {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        input[type="text"]:focus,
        input[type="date"]:focus,
        input[type="number"]:focus {
            border-color: #3498db;
            outline: none;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }

        .items-container {
            margin: 30px 0;
        }

        .item-row {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
            animation: fadeIn 0.3s ease;
            position: relative;
            align-items: center; /* Añadir esta línea */
        }
        
        .delete-item {
            background: #e74c3c;
            color: white;
            border: none;
            border-radius: 50%;
            width: 24px;
            height: 24px;
            font-size: 18px;
            line-height: 1;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.3s ease;
            padding: 0;
            flex-shrink: 0; /* Añadir esta línea */
        }
        
        .delete-item:hover {
            background: #c0392b;
            transform: scale(1.1);
        }
        
        /* Ajustar el espaciado en item-row para el nuevo botón */
        .item-row {
            position: relative;
            padding-right: 30px;
        }

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

        .add-item {
            background: linear-gradient(145deg, #27ae60, #2ecc71);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
        }

        .add-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
        }

        .total {
            font-size: 24px;
            font-weight: 600;
            text-align: right;
            margin: 30px 0;
            color: #2c3e50;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .generate-pdf {
            background: linear-gradient(145deg, #3498db, #2980b9);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 18px;
            font-weight: 500;
            width: 100%;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
        }

        .generate-pdf:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
        }

        /* Nuevos estilos para validación */
        .error {
            border-color: #e74c3c !important;
            box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
        }

        .error-message {
            color: #e74c3c;
            font-size: 14px;
            margin-top: 5px;
            display: none;
            position: absolute;
            bottom: -20px;
            left: 0;
            width: 100%;
        }

        @media (max-width: 768px) {
            .item-row {
                flex-direction: column;
            }
            
            header {
                flex-direction: column;
                text-align: center;
            }
            
            .logo {
                margin: 20px 0 0 0;
            }

            .error-message {
                position: static;
                margin-top: 5px;
            }
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            padding: 20px;
            background-color: #f0f2f5;
            min-height: 100vh;
        }

        header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 30px;
            background: linear-gradient(145deg, #ffffff, #f5f5f5);
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            margin-bottom: 30px;
        }

        .header-text {
            flex-grow: 1;
        }

        .header-text h1 {
            color: #2c3e50;
            font-size: 32px;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .header-text h2 {
            color: #34495e;
            font-size: 20px;
            font-weight: 400;
        }

        .logo {
            width: 100px;
            height: 100px;
            background: linear-gradient(145deg, #3498db, #2980b9);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 32px;
            font-weight: 600;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
            margin-left: 20px;
        }

        .form-container {
            background: #ffffff;
            padding: 30px;
            border-radius: 15px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
        }

        .form-group {
            margin-bottom: 25px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: #2c3e50;
            font-weight: 500;
            font-size: 16px;
        }

        input[type="text"],
        input[type="date"],
        input[type="number"] {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 16px;
            transition: all 0.3s ease;
        }

        input[type="text"]:focus,
        input[type="date"]:focus,
        input[type="number"]:focus {
            border-color: #3498db;
            outline: none;
            box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
        }

        .items-container {
            margin: 30px 0;
        }

        .item-row {
            display: flex;
            gap: 15px;
            margin-bottom: 15px;
            animation: fadeIn 0.3s ease;
        }

        .error {
            border-color: #e74c3c !important;
            box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.2) !important;
        }

        .error-message {
            color: #e74c3c;
            font-size: 14px;
            margin-top: 5px;
            display: none;
        }

        .error-container {
            margin: 20px 0;
            padding: 10px;
            border-radius: 8px;
            display: none;
        }

        .error-container.active {
            display: block;
            background-color: #fff3f3;
            border: 1px solid #ffa7a7;
        }

        .error-list {
            list-style: none;
            padding: 0;
            margin: 0;
            color: #e74c3c;
        }

        .error-list li {
            padding: 5px 0;
            font-size: 14px;
            display: flex;
            align-items: center;
        }

        .error-list li::before {
            content: "•";
            color: #e74c3c;
            font-weight: bold;
            margin-right: 10px;
        }

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

        .add-item {
            background: linear-gradient(145deg, #27ae60, #2ecc71);
            color: white;
            border: none;
            padding: 12px 25px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 500;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
        }

        .add-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(46, 204, 113, 0.4);
        }

        .total {
            font-size: 24px;
            font-weight: 600;
            text-align: right;
            margin: 30px 0;
            color: #2c3e50;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 8px;
        }

        .generate-pdf {
            background: linear-gradient(145deg, #3498db, #2980b9);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 18px;
            font-weight: 500;
            width: 100%;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
        }

        .generate-pdf:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
        }

        @media (max-width: 768px) {
            .item-row {
                flex-direction: column;
            }
            
            header {
                flex-direction: column;
                text-align: center;
            }
            
            .logo {
                margin: 20px 0 0 0;
            }
        }