/* ========================================
   GRUPO DE EMPRESA - Form Styles
   ======================================== */

/* === PAGE TITLE WITH BACK BUTTON === */
.title-with-back {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-button {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 32px;
    height: 32px;
    padding: 6px;
    background: transparent;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.back-button:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.back-button i {
    width: 20px;
    height: 20px;
    color: #6b7280;
}

/* === FORM CONTAINER === */
.form-container {
    background: #ffffff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* === FORM SECTIONS === */
.form-section {
    margin-bottom: 32px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-title {
    font-family: 'Archivo', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px 0;
    letter-spacing: -0.16px;
}

/* === COLLAPSIBLE SECTION === */
.section-header-collapsible {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
}

.section-header-collapsible:hover .section-title {
    color: #0068ab;
}

.section-header-collapsible .section-title {
    margin: 0;
    transition: color 0.2s ease;
}

.collapse-icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
    transition: transform 0.3s ease;
}

.section-header-collapsible.expanded .collapse-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    overflow: hidden;
    transition: all 0.3s ease;
}

/* === FORM GRID === */
.form-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.form-grid:last-child {
    margin-bottom: 0;
}

/* === FORM GROUP === */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    letter-spacing: -0.13px;
}

.form-label .required-asterisk {
    color: #d54033;
    margin-left: 2px;
}

/* === FORM INPUTS === */
.form-input,
.form-select {
    width: 100%;
    height: 40px;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #0068ab;
    box-shadow: 0 0 0 3px rgba(0, 104, 171, 0.1);
}

.form-input::placeholder {
    color: #9ca3af;
}

.form-input:disabled,
.form-select:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

/* === SELECT WRAPPER === */
.select-wrapper {
    position: relative;
}

.form-select {
    appearance: none;
    padding-right: 40px;
    cursor: pointer;
}

.form-select option {
    color: #111827;
}

.form-select option:first-child {
    color: #9ca3af;
}

.select-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #6b7280;
    pointer-events: none;
}

/* === LINK BUTTON === */
.link-button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    background: transparent;
    border: none;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #0068ab;
    cursor: pointer;
    transition: color 0.2s ease;
    text-decoration: none;
}

.link-button:hover {
    color: #005a94;
}

.link-button i {
    width: 16px;
    height: 16px;
}

/* === FORM ACTIONS === */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
    margin-top: 24px;
}

.btn-secondary {
    padding: 10px 20px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-primary {
    padding: 10px 20px;
    background: #0068ab;
    border: none;
    border-radius: 6px;
    font-family: 'Archivo', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background: #005a94;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-container {
        padding: 16px;
    }

    .form-actions {
        flex-direction: column-reverse;
    }

    .form-actions button {
        width: 100%;
    }
}
