:root {
    --bg: #f0f2f5;
    --card: #ffffff;
    --primary: #4CAF50;
    --primary-dark: #3e9c43;
    --primary-active: #144917;
    --border: #ddd;
    --text: #333;
    --muted: #666;
    --radius: 12px;
}

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    padding: 20px;
}

/* Layout principal */
.container {
    max-width: 1400px;
    margin: auto;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

/* Panels */
.panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 30px;

    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Títulos */
h1 {
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.subtitle {
    color: var(--muted);
    margin-bottom: 30px;
}

h2 {
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
    margin-top: 35px;
    margin-bottom: 20px;
    font-size: 20px;
    color: var(--muted);
}

/* Labels */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

/* Inputs */
input[type="text"],
input[type="email"],
textarea {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 18px;

    border: 1px solid var(--border);
    border-radius: 8px;

    font-size: 15px;
    font-family: inherit;

    transition:
        border 0.2s ease,
        box-shadow 0.2s ease;

    background: #fff;
    color: var(--text);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Focus */
input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);

    box-shadow:
        0 0 0 3px rgba(76, 175, 80, 0.15);
}

/* Field */
.field {
    margin-bottom: 16px;
}

/* Dynamic blocks */
.dynamic-item {
    border: 1px solid var(--border);
    border-radius: 12px;

    padding: 20px;
    margin-bottom: 18px;

    background: #fafafa;
}

/* Buttons */
button {
    background: var(--primary);
    color: white;

    border: none;
    border-radius: 8px;

    padding: 12px 22px;

    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.05s ease;

    margin-right: 10px;
    margin-bottom: 10px;
}

button:hover {
    background: var(--primary-dark);
}

button:active {
    background: var(--primary-active);
    transform: scale(0.98);
}

/* Variantes */
.btn-danger {
    background: #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-secondary {
    background: #2563eb;
}

.btn-secondary:hover {
    background: #1d4ed8;
}

/* Actions */
.top-actions {
    margin-top: 30px;
}

/* PREVIEW */

.preview {
    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 50px;

    min-height: 100%;

    font-family: Arial, Helvetica, sans-serif;
    color: #222;

    line-height: 1.6;
}

/* Nombre */
.preview h1 {
    font-size: 34px;
    margin-bottom: 8px;
    color: #111;
}

/* Sections */
.preview h3 {
    margin-top: 30px;
    margin-bottom: 14px;

    font-size: 18px;

    border-bottom: 1px solid #ccc;
    padding-bottom: 6px;

    color: #222;
}

/* Text */
.preview p {
    margin-bottom: 10px;
}

/* Items */
.preview .item {
    margin-bottom: 22px;
}

.preview .item strong {
    display: block;
    font-size: 16px;
    margin-bottom: 4px;
}

/* Responsive */
@media (max-width: 1000px) {

    .container {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 600px) {

    body {
        padding: 15px;
    }

    .panel {
        padding: 20px;
    }

    .preview {
        padding: 30px;
    }

    button {
        width: 100%;
        margin-right: 0;
    }

}