/* VARIABLES CORPORATIVAS CARAL */
:root {
    --primary: #0056b3;
    --success: #28a745;
    --bg: #f4f7f9;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

/* --- ESTRUCTURA BASE --- */
html, body.form-layout {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg);
}

/* --- NAVBAR / HEADER (Ajustado para que no se distorsione el logo) --- */
/* Navbar Minimalista */
.navbar-minimal {
    background: white;
    padding: 10px 40px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.navbar-minimal img {
    height: 45px;
}

.nav-container-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

/* Estilo de los nuevos botones del Header */
.nav-shortcuts {
    display: flex;
    gap: 30px;
    align-items: center;
}

/* Nuevo Header Horizontal */
.navbar-forms {
    background: white;
    padding: 10px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.navbar-forms img {
    height: 40px;
}

.nav-center-links {
    display: flex;
    gap: 40px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 0.75rem;
    font-weight: 700;
}

.nav-item ion-icon {
    font-size: 1.8rem;
    margin-bottom: 3px;
}

.icon-warning {
    color: #ffc107;
}

.icon-danger {
    color: #dc3545;
}

.shortcut-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-size: 0.7rem;
    font-weight: 700;
}

.icon-circle-mini {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: white;
    border: 2px solid #ddd;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    margin-bottom: 3px;
    transition: transform 0.2s;
}

.icon-circle-mini:hover {
    transform: scale(1.1);
}

.border-warning {
    border-color: #ffc107;
}

.border-danger {
    border-color: #dc3545;
}

.nav-right-status {
    text-align: right;
    display: flex;
    flex-direction: column;
}

/* Contenedor que empuja el footer */
.main-content-wrapper {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.form-card {
    display: flex;
    background: var(--white);
    width: 100%;
    max-width: 850px;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-body {
    flex: 1;
    padding: 40px 60px;
    display: flex;
    flex-direction: column;
}

/* --- FORMULARIO Y TEXTOS --- */
.form-header-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--success);
    padding-bottom: 15px;
    margin-bottom: 35px;
}

.form-title-group h3 {
    color: var(--success);
    margin: 0;
    font-size: 1.1rem;
    font-weight: 800;
}

.form-title-group h4 {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
    font-weight: 600;
}

.form-group {
    text-align: left;
    margin-bottom: 20px;
}

.form-label-custom {
    font-weight: 700;
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 5px;
    display: block;
}

.input-with-icon {
    position: relative;
}

.input-with-icon ion-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-size: 1.2rem;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 40px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

/* --- BOTONES --- */
.btn-group-np {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 35px;
}

.btn-np {
    flex: 1;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
}

.btn-green { background: var(--success); color: white !important; }
.btn-blue { background: var(--primary); color: white !important; }
.btn-np.disabled { background: #ccc !important; pointer-events: none; }

/* --- FOOTER --- */
footer {
    padding: 10px;
    text-align: center;
    color: #888;
    font-size: 0.75rem;
    border-top: 1px solid #eee;
    background: var(--white);
    flex-shrink: 0;
}



/* --- CUADRÍCULA DE OPCIONES (MECHANICS) --- */
.options-inline-grid {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.option-btn-item {
    flex: 1;
    min-width: 220px;
    max-width: 280px;
    padding: 25px 20px;
    background: #ffffff;
    border: 2px solid #eee;
    border-radius: 12px;
    display: flex;
    flex-direction: column; /* Icono arriba, texto abajo */
    align-items: center;
    gap: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option-btn-item:hover {
    border-color: var(--success);
    background-color: #f9fffb;
    transform: translateY(-3px);
}

.option-btn-item.active {
    border-color: var(--success);
    background-color: #f0fff4;
    box-shadow: 0 8px 20px rgba(122, 184, 0, 0.15);
}

.btn-icon {
    font-size: 2.5rem;
    color: #ccc;
}

.option-btn-item.active .btn-icon {
    color: var(--success);
}

.btn-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: #444;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.3;
}

.option-btn-item.active .btn-label {
    color: var(--success);
}


/******* CSS para el formulario no propietario**********/
.form-grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    text-align: left;
}

.full-width {
    grid-column: span 2;
}

.form-label-custom {
    font-weight: 700;
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

.input-with-icon {
    position: relative;
}

.input-with-icon ion-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--success);
    font-size: 1.2rem;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.form-control-custom {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

.file-input-wrapper label {
    font-size: 0.75rem;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

/* Reutiliza el dropdown de búsqueda */
.search-results-dropdown {
    position: absolute;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    border-radius: 0 0 8px 8px;
}


.form-images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    width: 100%;
}

.file-card input {
    display: none;
}

.file-card label {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    height: 70px;

    border: 2px dashed #ccc;
    border-radius: 10px;
    cursor: pointer;

    background: #fafafa;
    transition: all .25s ease;
}

.file-card label:hover {
    border-color: #4CAF50;
    background: #f0fff4;
}

.icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.text {
    font-size: 14px;
    color: #444;
    text-align: center;
}

/**********************************************/

/* Contenedor principal adaptable */
.form-grid-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Espacio entre campos */
    width: 100%;
}

/* Por defecto (Móvil): Cada grupo ocupa el 100% */
.form-group {
    flex: 1 1 100%; 
    display: flex;
    flex-direction: column;
}

/* Campos de ancho completo (Observación y Fotos) */
.full-width {
    flex: 1 1 100% !important;
}

/* Diseño para Tablets y Escritorio (Pantallas mayores a 768px) */
@media (min-width: 768px) {
    .form-group {
        /* Ocupan casi la mitad para dejar espacio al gap */
        flex: 1 1 calc(50% - 20px); 
    }
    
    /* Si quieres que las fotos se vean en 3 columnas en PC */
    .form-images-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }
}

/* Ajustes para el Header (Títulos que se amontonan) */
.form-header-info {
    display: flex;
    flex-direction: column;
    text-align: center !important;
    gap: 10px;
    margin-bottom: 20px;
}

@media (min-width: 600px) {
    .form-header-info {
        flex-direction: row;
        justify-content: space-between;
        text-align: left !important;
    }
}

/* Ajuste de Botones en móvil */
.btn-group-np {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 480px) {
    .btn-group-np {
        flex-direction: row;
        justify-content: center;
    }
}