:root {
    --green-dark: #1F4E35;
    --green-light: #2c6e4b;
    --red-dark: #8B0000;
    --red-main: #d90429;
    --red-light: #ff4d6d;
    --bg-color: #f4f7f6;
    --text-dark: #222222;
    --text-light: #666666;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 260px;
    background: var(--green-dark);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: all 0.3s ease;
}

.logo-panel {
    padding: 30px 20px;
    text-align: center;
    background: rgba(0,0,0,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo-panel img {
    width: 150px;
    height: auto;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,0.3));
}

.menu {
    list-style: none;
    padding: 20px 15px;
    flex: 1;
}

.menu li a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: rgba(255,255,255,0.8);
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.3s ease;
    gap: 15px;
}

.menu li a i {
    font-size: 1.2rem;
}

.menu li a:hover, .menu li a.active {
    background: var(--red-main);
    color: var(--white);
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(217, 4, 41, 0.4);
}

/* --- MAIN CONTENT --- */
.main-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: calc(100% - 260px);
}

/* --- HEADER --- */
header {
    background: linear-gradient(135deg, var(--red-dark), var(--red-main));
    color: var(--white);
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-bottom-left-radius: 30px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

header p {
    font-size: 1rem;
    opacity: 0.9;
}

/* --- CONTENEDOR DEL FORMULARIO --- */
.form-wrapper {
    padding: 40px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex: 1;
}

form {
    background: var(--white);
    width: 100%;
    max-width: 800px;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05), 0 5px 15px rgba(0,0,0,0.03);
    display: grid;
    grid-template-columns: 1fr 1fr; /* Dos columnas */
    gap: 25px;
}

.form-header {
    grid-column: span 2;
    margin-bottom: 10px;
}

.form-header h2 {
    color: var(--text-dark);
    font-size: 1.8rem;
    font-weight: 600;
}

.form-header p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group.full-width {
    grid-column: span 2;
}

form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

form label i {
    color: var(--red-main);
}

form input[type="text"],
form input[type="number"],
form select {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e1e5ea;
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-dark);
    background: #fafbfc;
    transition: all 0.3s ease;
}

form input:focus,
form select:focus {
    outline: none;
    border-color: var(--red-main);
    background: var(--white);
    box-shadow: 0 0 0 4px rgba(217, 4, 41, 0.1);
}

/* --- ZONA DE ARCHIVO (DRAG & DROP) --- */
.file-drop-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    width: 100%;
    padding: 40px 20px;
    border: 2px dashed #c0c7d1;
    border-radius: 16px;
    background-color: #fafbfc;
    transition: all 0.3s;
    cursor: pointer;
    text-align: center;
    gap: 10px;
}

.file-drop-area:hover, .file-drop-area.dragover {
    background-color: rgba(217, 4, 41, 0.03);
    border-color: var(--red-main);
}

.file-drop-area i {
    font-size: 3rem;
    color: var(--red-main);
    opacity: 0.8;
    margin-bottom: 10px;
}

.file-msg {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.file-msg-sub {
    font-size: 0.85rem;
    color: var(--text-light);
}

.file-input {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    cursor: pointer;
    opacity: 0;
}

/* --- BOTON ENVIAR --- */
form input[type="submit"] {
    grid-column: span 2;
    background: var(--red-main);
    color: var(--white);
    border: none;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    box-shadow: 0 8px 20px rgba(217, 4, 41, 0.25);
}

form input[type="submit"]:hover {
    background: var(--red-dark);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(139, 0, 0, 0.3);
}

form input[type="submit"]:active {
    transform: translateY(0);
}

/* --- RESPONSIVE DESIGN --- */
@media(max-width: 992px) {
    form {
        grid-template-columns: 1fr; /* Una columna en tablets/celulares */
    }
    .input-group.full-width {
        grid-column: span 1;
    }
    form input[type="submit"], .form-header, .file-drop-area {
        grid-column: span 1;
    }
}

@media(max-width: 768px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    .logo-panel {
        padding: 10px 0;
        border: none;
        background: transparent;
    }
    .logo-panel img {
        width: 100px; /* Logo mas pequeño en celular */
    }
    .menu {
        display: flex;
        padding: 0;
    }
    .menu li a {
        padding: 10px 15px;
        margin: 0;
    }
    .menu li a span {
        display: none; /* Ocultar texto del menú en celular, dejar solo icono */
    }
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    header {
        border-radius: 0;
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
    .form-wrapper {
        padding: 20px;
    }
}